This is my journey building an open source car system with Go & Qt, rear camera, live OpenGL map …
In Part I, I had to patch qtmultimedia for the camera to work, but Qt compilation is resource hungry, same goes for the osrm compilation, the memory of the Raspberry Pi is too small.
I had to to set up a cross compilation system in my case for armv7h.
Since most of the application is in QML, I’ve used the c++
main.cpp launcher as long as possible for the development.
At the moment I needed to inject data from the outside world (like the GPS location) to QML via Qt, so I switched to Go using therecipe Qt Go bindings.
The Go bindings project is young but the main author is really active fixing issues.
It makes desktop applications easy to code without the assle of C++ (at least for me).
About QML, by separating the logic and forms using
.qml.ui you still can edit your views with Qt Creator:
That’s just the narrative, truth is Creator is really buggy and I edited the ui files by hand most of the time.
I worked with Interface Builder on iOS for years, Qt is painful, lack of decent visual editor for QML really hurts.
Serving the map without internet access
In Part I, we talked about OpenMapTiles and OpenGL rendering, but I needed a web server capable of reading MBTiles format and serving the necessary assets for the map to be rendered.
Experimenting with another touch screen
I’m using a less performant but smaller LANDZO 5 Inch Touch Display 800x480
This touchscreen is handled as a one button mouse.
It can be calibrate using tslib
Then in your start env tell Qt to use tslib.
TSLIB_TSDEVICE=/dev/input/event0 QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0 QT_QPA_FB_TSLIB=1
I’m also not satisfied with the map matching of OSRM for real time display, I may rewrite one using mbmatch.
I’ve started POIs lookups with full text search and geo proximity using bleve by exposing an API compatible with the OSM API so it can be used directly by QML Locations.
Speeding up boot
systemctl mask systemd-udev-settle.service systemctl mask lvm2-activation-net.service systemctl mask lvm2-monitor.service
The project is far from finished and not ready for everybody but it’s fun to play with.
I’ve open sourced most of the code for Mocs on github, feel free to contribute.