blueisaak Posted November 5, 2020 Share Posted November 5, 2020 On 9/15/2020 at 8:51 PM, CanisLupus518 said: I installed the 0.4.8 version of the mod using CKAN after temporarily enabling 1.5 compatibility. It seems to work in KSP 1.10.1. Ihave not tested every API, but so far I am able to get orbital telemetry without an issue yes I did it the same way. And it works. I am only scared that it is not supported any longer since I base my gaming console on it. Quote Link to comment Share on other sites More sharing options...
blueisaak Posted November 5, 2020 Share Posted November 5, 2020 Hey, searched for about an hour in kRPC. Is there a way other than using action groups to trigger "Reverse Thrust" on an jet engine? Cheers Quote Link to comment Share on other sites More sharing options...
lucabianco97 Posted November 7, 2020 Share Posted November 7, 2020 Hello, On 11/5/2020 at 11:47 AM, blueisaak said: yes I did it the same way. And it works. I am only scared that it is not supported any longer since I base my gaming console on it. Did you connect via Serial or via TCP? I'm using KSP 1.10.1.2939 and trying to connect an Arduino Uno so I have to connect via a serial port. I tried the simplest example, and it compiles great on Arduino IDE but then it doesn't connect . Something's in the mod is probably broken with this version of KSP... Which isn't surprising if it hasn't been updated since October 2018. #include <krpc.h> #include <krpc/services/krpc.h> #include <krpc/services/space_center.h> HardwareSerial *conn; void setup() { pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); conn = &Serial; // Open the serial port connection krpc_open(&conn, NULL); // Set up communication with the server while (krpc_connect(conn, "Arduino Example") != KRPC_OK); // Indicate succesful connection by lighting the on-board LED digitalWrite(LED_BUILTIN, HIGH); } void loop() { } I'll try with another version of KSP, since I really want real switches and buttons. BTW, this is what I'm working on (yes the holes for the buttons are terribly spaced: the manufacturing process is still... in progress haha): Quote Link to comment Share on other sites More sharing options...
blueisaak Posted November 9, 2020 Share Posted November 9, 2020 On 11/7/2020 at 9:23 PM, lucabianco97 said: Did you connect via Serial or via TCP? I connect via TCP. Rasberry runs kRPC(https://github.com/TeWu/krpc-rb) and catches some interrupts from i2c devices. The I2C devices do GPIO expansion and RGB-LED driving. And I also made bad hardware UI choices: Quote Link to comment Share on other sites More sharing options...
darthgently Posted December 7, 2020 Share Posted December 7, 2020 Hello, I've been playing with kOS for several months and am wanting to branch out a bit and kRPC has been recommended by some smart guys. I'm running on linux, but could go to windows if required (hopefully not though). I do wonder about the lack of updates since 2018; is it being actively maintained with regards to newer versions? I'm currently running 1.10.1 but am not glued to that. tl;dr questions: Is linux a problem with kRPC? Is kRPC being (or will be soon) actively maintained for current versions of KSP? What is the "best" KSP version for kRPC? Is there Trajectories support? Thanks Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted January 27, 2021 Share Posted January 27, 2021 On 7/22/2020 at 10:08 AM, blueisaak said: I saw on git that there is a build for 1.9. May I ask where you saw that? The list of releases on GitHub only seems to list the ones CKAN has, the latest of which only mentions KSP 1.5.1: https://github.com/krpc/krpc/releases On 8/29/2020 at 7:00 AM, darthgently said: I, too, only see CKAN presenting an apparent old version and am not sure if this is because CKAN isn't up to speed or if CKAN hasn't deemed the later versions compatible and the git version is 'beta'. The forum seems fairly quiet Are you saying it's an "apparent old version" because @blueisaaksaid so, or because you found this "git version" yourself? If the latter, may I inquire as to where it is? Quote Link to comment Share on other sites More sharing options...
aeroeng14 Posted March 30, 2021 Share Posted March 30, 2021 (edited) On 1/27/2021 at 10:54 AM, HebaruSan said: May I ask where you saw that? The list of releases on GitHub only seems to list the ones CKAN has, the latest of which only mentions KSP 1.5.1: https://github.com/krpc/krpc/releases Are you saying it's an "apparent old version" because @blueisaaksaid so, or because you found this "git version" yourself? If the latter, may I inquire as to where it is? The KRPC discord is fairly active. I dabbled around with this fork (NOT master release): Release build for ksp 1.8.0 - 1.9.0 · haeena/krpc · GitHub but the Unity version in KSP changed with 1.9 so some of the UI stuff such as drawing vectors isn't working right now. I just saw someone just did an 11.x fork but I am in the process now of trying it so can't speak to it. Edit: Yahoo, the 1.11 fork I found has working UI elements! Canvases and vector lines are working again! (Maybe someone fixed them some time ago, but anyhow they work again!) Github fork: Release 0.49-1.11 · nullprofile/krpc · GitHub Edited March 30, 2021 by aeroeng14 Updated with 1.11 fork test results. Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted March 30, 2021 Share Posted March 30, 2021 14 minutes ago, aeroeng14 said: The KRPC discord is fairly active. I dabbled around with this fork (NOT master release): Release build for ksp 1.8.0 - 1.9.0 · haeena/krpc · GitHub but the Unity version in KSP changed with 1.9 so some of the UI stuff such as drawing vectors isn't working right now. I just saw someone just did an 11.x fork but I am in the process now of trying it so can't speak to it. Ahh, I see, thanks. I guess this is as good a time as any to try to set some user expectations: The CKAN bot does not subscribe to random Discords to eavesdrop on user chats about the latest recompiles that they're sharing. Unless somebody announces they're adopting the mod and sets up a forum thread or a SpaceDock page or submits an issue or a pull request to NetKAN, builds like that will not show up in CKAN. Quote Link to comment Share on other sites More sharing options...
aeroeng14 Posted March 30, 2021 Share Posted March 30, 2021 4 minutes ago, HebaruSan said: Ahh, I see, thanks. I guess this is as good a time as any to try to set some user expectations: The CKAN bot does not subscribe to random Discords to eavesdrop on user chats about the latest recompiles that they're sharing. Unless somebody announces they're adopting the mod and sets up a forum thread or a SpaceDock page or submits an issue or a pull request to NetKAN, builds like that will not show up in CKAN. Very true. These are as far as I know not official in any way and obviously why CKAN didn't pick them up. Quote Link to comment Share on other sites More sharing options...
artwhaley Posted August 29, 2021 Share Posted August 29, 2021 I've started on a 'final' features complete update fork. So far I've added support for:stock roboticsrotating docking ports blinking lightsstock alarm clockthe wheel upgrades resource drainsand autostruts.You can grab a preliminary version at https://github.com/artwhaley/krpc/releases/tag/experimentalUnfortunately I'm building in windows and am just recompiling the DLLs, so I'm not able to rebuild the documentation and a few of the client files, but things should be named pretty self-explanatorily so it should at least all work for folks using python. If anyone with the full build environment working wants to help out with documentation and the client libraries that require building... I'd really appreciate it! I'll try to eventually get around to setting up a linux laptop and making it work myself if nobody else can, but... If anyone finds bugs or has questions, please let me know! I've made pull requests to both the main repo and to Null Profile who's been doing rebuilds... but until someone more qualified takes over, I'll do my best to get things updated and finalized! Quote Link to comment Share on other sites More sharing options...
Cannon Posted November 14, 2021 Share Posted November 14, 2021 (edited) For anyone trying to use LaunchOrbit java code from tutorials, there is a problem in every while loop. Basically lots of variables aren't declared as "volatile" which causes different threads to not be synchronized, and then your while loop keeps going on forever without doing anything. The reason for that is the JVM is allowed to assume that other threads do not change some of the variables during the loop. The proper fix would be to make them all "volatile", but you can also fix it more easily by adding the following at the start of every loop: System.out.print("."); System.out.print("\b"); This will add a dot and then delete it every time, but what it does is force syncrhronization which makes the loop work properly. Edited November 15, 2021 by Cannon Quote Link to comment Share on other sites More sharing options...
Azerty Posted September 19, 2022 Share Posted September 19, 2022 (edited) Hi, I'm using kRPC 0.4.8 on KSP 1.5.1 and I was wondering if it was possible to modify the RPC Rate. I'm stuck at 50 RPC/s. I tried to modify the advanced settings with no luck. I'm using the Java client. Thanks EDIT: Works fine on 1.9.1 Edited September 19, 2022 by Azerty Quote Link to comment Share on other sites More sharing options...
darthgently Posted September 19, 2022 Share Posted September 19, 2022 (edited) 12 hours ago, Azerty said: Hi, I'm using kRPC 0.4.8 on KSP 1.5.1 and I was wondering if it was possible to modify the RPC Rate. I'm stuck at 50 RPC/s. I tried to modify the advanced settings with no luck. I'm using the Java client. Thanks EDIT: Works fine on 1.9.1 Probably not as that looks like the physics tick rate in the game engine and all mods code functions by squeezing into that schedule. I believe that physics engine heartbeat, whatever its limits are on your platform, is a hard limit, but could be wrong in some way Edited September 19, 2022 by darthgently Quote Link to comment Share on other sites More sharing options...
Azerty Posted September 20, 2022 Share Posted September 20, 2022 (edited) You are probably right because I think I read somewhere the physics simulation runs at 50Hz in KSP. I assume something has changed regarding this matter between 1.5.1 and 1.9.1 because I'm not limited anymore. I can have spikes at 3000 RPC/s no problem. Edited September 20, 2022 by Azerty Quote Link to comment Share on other sites More sharing options...
darthgently Posted September 20, 2022 Share Posted September 20, 2022 (edited) 4 hours ago, Azerty said: You are probably right because I think I read somewhere the physics simulation runs at 50Hz in KSP. I assume something has changed regarding this matter between 1.5.1 and 1.9.1 because I'm not limited anymore. I can have spikes at 3000 RPC/s no problem. If it like kOS then it will fit as many things as it can in the 50hz slice it can. If your RPC is low enough overhead I could see it s squeezing in more in a later version. Beware of reading data in one physics tick, but not acting on it until the next as this can introduce error. I know about nothing concerning kRPC but look for a mechanism that allows you wait until the next tick so all data gathering and actions occur in the same tick. In kOS we look for the in game time to change. Someone more knowledgeable will chime in hopefully Edited September 20, 2022 by darthgently Quote Link to comment Share on other sites More sharing options...
Ajam Posted September 21, 2022 Share Posted September 21, 2022 Im haveing issues installing the python package any advice? Quote Link to comment Share on other sites More sharing options...
dtrauma Posted October 31, 2022 Share Posted October 31, 2022 So for anyone wondering, there seems to be an active community still around this mod. AFAICT the current effort is best accessed here: https://github.com/nullprofile/krpc In the releases you can find krpc recompiles for current versions of KSP, and under actions you can grab the CI builds of the current development which will also include new features found in stock, including those added by @artwhaley and mentioned by them in the post above. I'm a bit allergic to hanging out on discord and apparently this is where people are so I don't know why no one officially adopted krpc or at least posts here from time to time, and I hope I don't step on anyone's toes by posting, but I'm very happy that krpc lives on and thought I'd share. Quote Link to comment Share on other sites More sharing options...
TheOtherDave Posted January 12, 2023 Share Posted January 12, 2023 Does anyone know where the proto file defines all the data structures? I'm trying to create a client for Swift and all I'm getting out protoc is some request and response types that don't have anything to do with "space center" or "active vessel" or any of the other stuff that's in the example code. Quote Link to comment Share on other sites More sharing options...
djungelorm Posted February 27, 2023 Author Share Posted February 27, 2023 (edited) The proto file defines the messaging format that a client should use to communicate with the server. You would need to generate Swift code from the krpc.proto file, using a protobuf compiler. Quick google found this which should generate what you need: https://github.com/apple/swift-protobuf There is also documentation on how client/server communication works in the kRPC documentation at these links: https://krpc.github.io/krpc/communication-protocols/tcpip.html https://krpc.github.io/krpc/communication-protocols/messages.html Edit: To get the available RPCs (i.e the spacecenter/active vessel stuff) you could either look in GameData/kRPC for the files named e.g. KRPC.SpaceCenter.json. These files contain details of all the RPCs. Or you can get the RPCs that a server provides by invoking the KRPC.GetServices RPC call. Edited February 27, 2023 by djungelorm Quote Link to comment Share on other sites More sharing options...
djungelorm Posted March 1, 2023 Author Share Posted March 1, 2023 kRPC v0.5.0 has been released This release includes all the changes from nullprofile's fork, and lots more. Full details over on the github release page. Thanks for all the great contributions! https://github.com/krpc/krpc/releases/tag/v0.5.0 Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted March 1, 2023 Share Posted March 1, 2023 5 minutes ago, djungelorm said: kRPC v0.5.0 has been released This release includes all the changes from nullprofile's fork, and lots more. Full details over on the github release page. Thanks for all the great contributions! https://github.com/krpc/krpc/releases/tag/v0.5.0 Glad to see this project is still alive! Quote Link to comment Share on other sites More sharing options...
LIAOTIAN Posted March 2, 2023 Share Posted March 2, 2023 (edited) 5 hours ago, djungelorm said: kRPC v0.5.0 has been released This release includes all the changes from nullprofile's fork, and lots more. Full details over on the github release page. Thanks for all the great contributions! https://github.com/krpc/krpc/releases/tag/v0.5.0 Thanks for your hard working! Congratulations! Reborn in five years. Edited March 2, 2023 by sumghai Merged successive posts for the same content by the same user Quote Link to comment Share on other sites More sharing options...
Stone Blue Posted March 2, 2023 Share Posted March 2, 2023 On 2/26/2023 at 7:31 PM, djungelorm said: There is also documentation on how client/server communication works in the kRPC documentation at these links: https://krpc.github.io/krpc/communication-protocols/tcpip.html https://krpc.github.io/krpc/communication-protocols/messages.html Is there anyway to get the full documentation, as a downloadable file, for offline reading? Quote Link to comment Share on other sites More sharing options...
djungelorm Posted March 2, 2023 Author Share Posted March 2, 2023 6 minutes ago, Stone Blue said: Is there anyway to get the full documentation, as a downloadable file, for offline reading? Yes there is a pdf in krpc-0.5.0.zip Quote Link to comment Share on other sites More sharing options...
Stone Blue Posted March 2, 2023 Share Posted March 2, 2023 29 minutes ago, djungelorm said: Yes there is a pdf in krpc-0.5.0.zip huh.. I looked thru the repo directories, only THANK YOU!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.