- Switched to platformio, ino -> cpp
- MPRLS for pressure sensor
- Added basic ICM support
- Removed widi, battery, other features not supported in xEvi
- Removed legacy options/processing
- Added LED strip support
- Added encoder support
- Reworked menu code to use encoders/be more flexible
enable/disable works more like the real thing, however not entirely correct. When enabling the display, it takes the current content of the screen buffer instead of the data that has been send to the display controller.
This is a big one where I can finally reap what I sown. Sub menu entries now provide two functions, one to get the text for the current value and one to apply changes aka save to EEPROM. With this I can replace so much code in the menu() function that handles input, but was _almost_ identical. The process of converting the old menus are not completed, and I can probably remove about 200 lines more code.
The question is still what to do with less general menus like the rotator and fast patch menu.
One problem with the current implementation is that it is RAM heavy. It seems the const MenuEntry structs are placed in ram, because there is a pointer to RAM that I assume is allocated during execution and therefore the address cannot be stored in ROM.
My plan has been to put all the configuration fields (that are stored in EEPROM) into a struct or an array. When that is implemented, I can instead store the offset into the array in the const struct, which should be available at compile time and therefore can reside completely in ROM.
A bug in the current NuEVI.ino does not write all default values to EEPROM on the first boot, unless menu + enter buttons are pressed. I added a workaround to the simulator that fakes that the buttons are pressed when calling the setup function.
* Press W in simulator to activate (pretty slow shit, do avoid unless compiling with optimisations)
* Tiny improvement of the EEPROM simulation.
* Fixed type typo for millis and micros
Builds a native program on MacOS that runs the NuEVI firmware compiled for x86_64.
Only input is arrow keys for menu buttons for now. Only output is console and display.
Copied some more library files into the simulation folder, and renamed the modified *.cpp files from the libraries to *_sim.cpp.