New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize settings screen #34
Reorganize settings screen #34
Conversation
- rename Setting to SettingScreen - add Settings class - move and change wifi_conn_ok and wifi_credentials_state to Settings - move current and voltage settings to Settings - move voltage and current settings from String to uint16_t - change current and voltage saving data type from String to uint16_t - change current_limit counting
- make screens separate objects - fix voltage screen selection jumping - fix log interval on shutdown sometimes turning off
- update platform from espressif32 6.1.0 to 6.2.0 - remove outdated ArduinoNVS library - switched to officially supported Preferences library - load screen fonts via single method to prevent multiple large inclusions - remove ArduinoNVS from submodules
- cleanup of redundant code - added code check configuration to platformio.ini - corrections of some problems found by cppcheck (mainly initializations) - logging fix - add NVS clearing on first run after update
smartpower3/screens/screen.cpp
Outdated
#include "fonts/ChewyRegular24.h" | ||
#include "fonts/ChewyRegular32.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused fonts
com_serial_baud->setTextColor(color, BG_COLOR); | ||
drawSerialBaud(this->serial_baud); | ||
com_serial_baud->select(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused color change of font when selected slows down screen redraw quite a lot - the selection movement then starts to behave erratically.
} | ||
|
||
void SettingScreen::selectSerialLogging(uint16_t color) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the method that drew the frame around both serial baud and logging interval.
- remove group selection - warning color when interval value forcibly changed - use one font only on settings - change alignment and spacing to be more consistent and readable - remove unused font color change when selecting to improve graphic performance
89c0803
to
c124e11
Compare
Follows #33 .