KingLuxor

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

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

Share this post


Link to post
Share on other sites

Here's to hoping someone can compile a version of this to run on Macs! :sticktongue:
This looks INCREDIBLY useful!

Share this post


Link to post
Share on other sites

That's amazing! I hope you can keep this updated as we add more stuff to the packet.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I've been in class for work for a while, I'll try to take a look and add an option to change the baud rate when I get a bit of time.

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

Will be this awesome tool ever updated? That would be cool. I did try to fix it by myself but no luck :( 

Share this post


Link to post
Share on other sites

Does anyone have a precompiled EXE of this?  I can't install Visual Studio on my PC.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.