Commit graph

57 commits

Author SHA1 Message Date
Mikael Degerfält
2f5c546b2c Two unrelated changes
* Move text print of submenu into function
 * No need to check if value changed since writeSettings uses EEPROM.update.
2019-06-23 17:14:17 +02:00
Mikael Degerfält
e362546e3c First iteration of menu cleanup
* Broke up the code into more general functions instead of duplicating code
 * Made stuff const and removed variables no longer used
 * Use defines for menu button values
 * Changed the order or things to avoid forward declarations
 * Use array lookup instead of switch-case on some menu options
 * Adjust menu functionification
 * Cleaned up sensor rendering
2019-06-23 17:14:17 +02:00
Mikael Degerfält
921fdb1266 Global namespace cleanup
Moved variables only used in menu to menu code. Variables only used in NuEVI.ino removed from globals.h and made static.
2019-06-08 15:34:16 +02:00
Mikael Degerfält
2c4fd26d25 Fix problem where the V was still visible if battery low 2019-06-07 23:57:17 +02:00
Mikael Degerfält
883dbf605e Avoid converting value to a double
No need to convert a value to double when all we want is a two digits converted to string.
This also avoids linking some math library, which saved almost 8K och program storage space.
2019-06-07 00:12:06 +02:00
Mikael Degerfält
58ea673994 Moved settings #defines to settings.h
I did feel like they belong in config.h
2019-06-04 23:34:26 +02:00
Mikael Degerfält
4bf2a3a91e Renamed menu.ino to menu.cpp
This change required lots of other changes to have it compile. I had to declare all variables from NuEVI.ino used by the menu as extern in a separate header file (globals.h).
Also I moved all defines from NuEVI.ino to a config.h file. I think some of these could be moved back or even moved into menu.cpp.
I declared many variables and functions in menu.cpp as static and moved them around to avoid forward declarations. For simplicity I did some forward declarations anyway.
Some varibles only used in menu.cpp was moved from NuEVI.ino instead of having them as externals.
2019-06-03 19:24:21 +02:00
Renamed from NuEVI/menu.ino (Browse further)