2015-11-21

K-42 Part 5: The Master Control Program

This post is a repost of a blog entry from 26th September 2015 on Kerbal Space Program forum (soon to be defunct).

I've finally mangled the bugs out of the basic software for the Kommodore-42 master control unit. There is still no real functionality in the guidance computer, but it looks like the rest works as planned. As all this has been a learning project, the code is a bit ugly and could use a cleanup in a few places. I will also have to try to optimize the memory use as I have only 2.5 kB EEPROM left.

In order to make it play well with Kerbal I've had to use all the tricks available in that litte Atmega 32u4. I use the serial emulation and the keyboard emulation for the switches. In order to get the joysticks to work well with SAS I had to add joystick emulation as well as sending joystick commands over the KSPserialIO mod caused SAS to cease working until it was turned off and on again.

There is still room for a lot of expansion as I still have 2 action groups, 17 key combinations, 29 joystick buttons, 3 rotational joystick axes and 119 I2C adresses left for future use. The future is full of possibilities but now I'm going to play the game for a few weeks.

Source Code:
https://drive.google.com/open?id=0B5...TdvNkNWYnY2ZDQ

P.S. I also added two LEDs to the Engine and chute module that serves as indicators when it is safe to deply the chutes. I will add a picture, description and the new source code some other day as it's getting really late while I'm writing this.

P.P.S. I've decided that all source code and design of my control panel is licensed with the WTFPL version 2 as quoted below:
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.

No comments:

Post a Comment