nicpottier / gnat

Decent DE1 mini heads up display. GNAT is Not A Tablet
MIT License
6 stars 3 forks source link

Reconsider data / update naming and architecture #13

Open nicpottier opened 1 year ago

nicpottier commented 1 year ago

All data updates from the BLE devices happens through a queue of DataUpdate objects. This uses native RealTimeOS queues so is fast and thread safe, so I think is a reasonable strategy.

Our DataUpdate class is a bit weird though. It is basically a container for a union of all our DataUpdate subtypes along with a marker of the type of the union. This is very efficient on space but adding a new update type feels pretty jank and includes a lot of boilerplate. Is there a better way in c/c++ that would be just as fast?