Close

Successful Launch

A project log for KAPCOM

Yet another hardware controller for Kerbal Space Program. Leveraging Telemachus, Python and Arduino to drive joysticks, buttons and displays

lawnmowerlattelawnmowerlatte 02/01/2015 at 05:380 Comments

I've had frustratingly little time to work on this the last month. I have however, gotten a functional test launch of a rocket in KSP.

To follow up on what I remarked on last post, I was able to remove the '?' from the JSON by simply removing it. Not 100% where that comes from, but that fixed the issue. I resolved the issue with compiling; I've found that not using pin 0 and 1 (which are also serial Rx and Tx) fixed the issue.

I actually got the "first" launch a few weeks ago, but soon found that it only worked for staging and that the abort button wouldn't work. It turned out that Telemachus expects "True" and "False" for some tokens, but staging is very liberal about what it accepts. I ended up having to shoehorn a toString() method that uses a 'format' object value to control what it outputs. I'm actually pretty happy with how it turned out, and now the staging and abort buttons work great.

The joystick values also make their way into the game, but the values are still wrong are still wrong. I have to take a look at that once I have some time. I did redo the Joy class to map directly to the range of -1 to 1 which is what Telemachus expects. It doesn't make any sense to use 0-255 internally and then convert it.

I am having issues with uploading sketches to my Mega. The issues are strange and ephemeral, if I change anything of significance it might fix or break it. It doesn't seem to matter what part of the code I change, but it does seem to change if the binary changes (ie. comments don't seem to have an effect, but code changes do).

Overall, it's a good day. Still lots of work to do, but I was able to overcome some obstacles and make real, measurable progress.

Discussions