This commit is contained in:
Mark Qvist 2024-09-29 01:21:49 +02:00
parent a739d6f3ab
commit 97806d1684
2 changed files with 44 additions and 43 deletions

View File

@ -995,9 +995,9 @@ void serialCallback(uint8_t sbyte) {
if (sbyte == TFESC) sbyte = FESC; if (sbyte == TFESC) sbyte = FESC;
ESCAPE = false; ESCAPE = false;
} }
npi = sbyte; sbyte;
led_set_intensity(npi); led_set_intensity(sbyte);
np_int_conf_save(npi); np_int_conf_save(sbyte);
} }
#endif #endif

View File

@ -117,8 +117,9 @@ uint8_t boot_vector = 0x00;
} }
void led_init() { void led_init() {
if (EEPROM.read(eeprom_addr(ADDR_CONF_PSET)) != 0xFF) { if (EEPROM.read(eeprom_addr(ADDR_CONF_PSET)) == CONF_OK_BYTE) {
led_set_intensity(EEPROM.read(eeprom_addr(ADDR_CONF_PINT))); uint8_t int_val = EEPROM.read(eeprom_addr(ADDR_CONF_PINT));
led_set_intensity(int_val);
} }
} }
@ -1442,7 +1443,7 @@ void db_conf_save(uint8_t val) {
} }
void np_int_conf_save(uint8_t p_int) { void np_int_conf_save(uint8_t p_int) {
eeprom_update(eeprom_addr(ADDR_CONF_PSET), 0x01); eeprom_update(eeprom_addr(ADDR_CONF_PSET), CONF_OK_BYTE);
eeprom_update(eeprom_addr(ADDR_CONF_PINT), p_int); eeprom_update(eeprom_addr(ADDR_CONF_PINT), p_int);
} }