Porting to Raspberry Pi


After successfully creating a debian installation file for desktop/laptop, the next challenge is to try if I can get TrackDay to run on a Raspberry Pi minicomputer. As it is my goal to promote from carpet-racer to a fixed track, it would be massive overkill to sacrifice a complete laptop or desktop to run the slot-racing software. As the Pi is cheap and consumes very little power, it seems like a good device for my future any fixed track setup. One of the nice things is that there is a great community to ask for support and Qt is well supported.

So…. There I went. I did a native build of Qt 5.4.1. Downloaded the latest version of the TrackDay source from my repository and built an executable. It was a big surprise it worked on the first try. So I went along and fired the software up. First I tried to do it using X-forwarding, but that did not give me any visual, so I hooked the Raspberry up to my TV and tested again. Start-up takes a few seconds, but after that it looked rather good (except I got some message about not being able to figure out the screen resolution or something, I still have to dig into). Extra cool feature: it should in theory also support touch-screen, but I don’t have the hardware to test it (yet).

Success so far! Next step, try to connect to the  Carrera Digital track. Remarkably, this also worked! But when moving my cars back and forth the finish line, nothing happened… AAARGHH!

After the initial panic, I realized I had programmed my cars to controllers 3 and 4. My grid however, only featured cars 1 and 2 (DOH!)………..

I reprogrammed the cars and after that, the software worked just like it does on my laptop. The only difference is that on the Raspberry it runs in full screen and not within a window frame. No biggie I thought and wanted to close the program………. Which showed a stupid mistake minor flaw: There is not exit button.

I have always relied on the red cross of the window frame to close the program, therefore it only shows now that there is no exit possibility. [note to self: add exit button before releasing Raspberry Pi port]

I’m writing this as if it was a very simple and straightforward deal to make a port, but that is a bit besides the truth. I first tried cross compiling Qt, which worked, but I was not able to run the TrackDay program. so next a native compile of Qt took me  a complete weekend of compile-time… all in all it was a lot of work, but I think it is well worth the effort.

For whomever is interested in running TrackDay on Raspberry Pi, I will prepare an image file with Qt 5.4.1 installed and an installer package for TrackDay (maybe not .deb since I had some nasty failure messages when trying to install the package, but it will be quite straightforward. I promise).

To wrap up: the Raspberry Pi release will come soon, but I still need to add an exit button and fix some overlapping text things when using a 4:3 screen. To be continued soon….

Leave a comment