You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
370 B
C++
30 lines
370 B
C++
#include "settings.h"
|
|
|
|
uint16_t COLOR_FG = 0x0000;
|
|
uint16_t COLOR_BG = 0xFFFF;
|
|
|
|
void setupSettings()
|
|
{
|
|
NVS.begin();
|
|
|
|
loadSettingsColor();
|
|
}
|
|
|
|
void settingsFactoryReset()
|
|
{
|
|
NVS.eraseAll();
|
|
}
|
|
|
|
void loadSettingsColor()
|
|
{
|
|
if (NVS.getString("device.theme") == "black")
|
|
{
|
|
COLOR_FG = 0xFFFF;
|
|
COLOR_BG = 0x0000;
|
|
}
|
|
else
|
|
{
|
|
COLOR_FG = 0x0000;
|
|
COLOR_BG = 0xFFFF;
|
|
}
|
|
} |