Skip to content
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

Merged
merged 10 commits into from May 18, 2023

Conversation

cedel1
Copy link
Contributor

@cedel1 cedel1 commented May 13, 2023

Follows #33 .

- 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
Comment on lines 3 to 4
#include "fonts/ChewyRegular24.h"
#include "fonts/ChewyRegular32.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused fonts

Comment on lines 469 to 471
com_serial_baud->setTextColor(color, BG_COLOR);
drawSerialBaud(this->serial_baud);
com_serial_baud->select();
Copy link
Contributor Author

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)
Copy link
Contributor Author

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
@cedel1 cedel1 force-pushed the reorganize_settings_screen branch from 89c0803 to c124e11 Compare May 13, 2023 15:55
@cedel1 cedel1 marked this pull request as ready for review May 13, 2023 19:53
@hardkernel hardkernel merged commit ded7f0e into hardkernel:master May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants