Jump to content

[WIP][Hardware, Plugin, Software] A debugging tool for KSPSerialIO


KingLuxor

Recommended Posts

I've developed a simple tool for testing/debugging custom display/controllers which use the KSPSerialIO mod by @zitronen

This allows you to monitor controls from the Arduino, as well as send control values to the Arduino. Reloading KSP multiple times, and the lack of real time onscreen data make this tool a bit more efficient in finding what isn't working.

It also allows you to test/play with your display or controller without loading KSP.

The project is open source and can be found on my github at https://github.com/bolwire/KSPSerialIODebugTool

Thoughts ? Ideas ? Found a bug ? Please reply to this thread. Once things smooth out I will add a link in the application to the Report Issue feature on github, as well as this thread.

Currently this only runs on windows, and you must build it from the source.

WrAUegs.png

n4TgzT5.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Wau, this thing. Amazing piece of work! It ll be very helpful. That makes my Kerbals happy.

EDIT: I found kind of issue or bug if you want call it like that. Your pluggin/debug program expect that arduino serial port is running at default baud rate setting (38400) and if you change that to any other value (like i did, I am running at 57600) then debug program cant establish connection and wont find control panel. I tryed to change my code to use 38400 and then it connects no problem at all.  It is something to look at maybe, have option to select baud rate would be nice :) 

EDIT2: I just found config file for build. I did changes and now it works with 57600 also. Still would be nice to have way ti change it without need rebuild program :)

Edited by Mattew
Bug repport added
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 2 weeks later...

@KingLuxor I found a bug, just posting here incase you have github notifications turned off. The bug is basically that you hard coded the refresh rate into the timer at half a second. In the issue on github you can find a fix for the code (only one line so I didn't make a pull request).

Link to github issue

I've made a PR for the fix the next update of serialIO. (turns out that you can't just make a PR and then push a change to your own fork with out it getting included into the PR)

Edited by ryan00793
Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...

Well I finally got VS installed and managed to build an EXE out of it.  But it doesn't seem to work like KSP does - it handshakes, connects, then immediately disconnects.  It also doesn't seem to send any of the data.  Does this not work with the latest version?

Edited by moeburn
Link to comment
Share on other sites

If it's from May then it almost certainly won't work. There's been a couple of additions to the VesselData packet the plugin sends to devices since then. That means after handshaking this tool will send packets that your newer arduino sketch won't be able to decode properly, and it will disconnect.

At a bare minimum, you'll want to update the KSPSerialIO.cs file in this tool's source repository, and ensure the VesselData struct within it contains the same fields as the VesselData struct listed in the first post of the KSPSerialIO thread. You'll immediately notice that this tool only has the first 52 fields, whereas there are currently 55.

After that, it's probably worthwhile to add them to the user interface some how so that they can be modified/tested like the other fields, but that's getting well out of scope of what I know about this tool.

Edited by stibbons
Link to comment
Share on other sites

  • 2 years later...

Hi everyone

I was using this tool when i started to make my own controller.

I let it in stand by for a long time (i moved twice and started to run a business) and recently i found a solution to bring back the Zitronen plugin to life with win10.

This tool is very usefull to try and debug code, so i forked this tool to make it compliant with the version 0.19.1 of the Zitronen plugin, essentially in updating the VesselData packet, added controls for SAS, navball mode, liquid fuel and oxidizer total and current stage and "vectors"

It is still open source and can be found on GitHub : https://github.com/Jimbo-Farrar/KSPSerialIODebugTool (there is a executable version in the directory bin/Release/)

 

Edited by Jimbofarrar
added infos
Link to comment
Share on other sites

  • 1 year later...
On 11/11/2019 at 8:19 PM, Jimbofarrar said:

Hi everyone

I was using this tool when i started to make my own controller.

I let it in stand by for a long time (i moved twice and started to run a business) and recently i found a solution to bring back the Zitronen plugin to life with win10.

This tool is very usefull to try and debug code, so i forked this tool to make it compliant with the version 0.19.1 of the Zitronen plugin, essentially in updating the VesselData packet, added controls for SAS, navball mode, liquid fuel and oxidizer total and current stage and "vectors"

It is still open source and can be found on GitHub : https://github.com/Jimbo-Farrar/KSPSerialIODebugTool (there is a executable version in the directory bin/Release/)

 

I was expecting some guidance to packet format that i type/paste in serial monitor but i got thing with GUI? That is better that i hoped for!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...