v1.0.14: Display blanking config in captive portal
- Add Options section to captive portal with display blanking dropdown - Options: Never, 1, 5, 10, 30, 60 minutes - Change EEPROM blanking value from seconds to minutes (supports up to 255 min) - Update Display.h and Utilities.h to interpret stored value as minutes - Default blanking timeout changed from 15s to 1 minute
This commit is contained in:
@@ -1789,12 +1789,13 @@ void da_conf_save(uint8_t dadr) {
|
||||
}
|
||||
|
||||
void db_conf_save(uint8_t val) {
|
||||
// val is in minutes (0 = disabled)
|
||||
#if HAS_DISPLAY
|
||||
if (val == 0x00) {
|
||||
display_blanking_enabled = false;
|
||||
} else {
|
||||
display_blanking_enabled = true;
|
||||
display_blanking_timeout = val*1000;
|
||||
display_blanking_timeout = (uint32_t)val * 60UL * 1000UL;
|
||||
}
|
||||
eeprom_update(eeprom_addr(ADDR_CONF_BSET), CONF_OK_BYTE);
|
||||
eeprom_update(eeprom_addr(ADDR_CONF_DBLK), val);
|
||||
|
||||
Reference in New Issue
Block a user