Fixed some bugs update TODO with EEPROM info

This commit is contained in:
nedko 2022-11-05 17:36:39 +02:00
parent 19d0ddfb91
commit 24da8002d8
2 changed files with 3 additions and 6 deletions

2
TODO
View File

@ -1,2 +1,2 @@
Fix EEPROM detection (and maybe read / write)
Fix EEPROM write - detection and read work (maybe algo failure?)
Battery icon - how to calc percentage?

View File

@ -518,9 +518,6 @@ int main()
attach_detach_spool();
display_enable(1);
print_mm();
print_direction();
print_battery_icon();
state = STATE_IDLE;
sei();
@ -1586,7 +1583,7 @@ void spool_count(uint8_t event)
// Clear old cell & write to next one
write_eeprom_val(eeprom_idx, 0xFFFFFFFF, 0xFF);
++eeprom_idx;
eeprom_idx %= EEPROM_SIZE;
eeprom_idx %= (EEPROM_SIZE / EEPROM_IDX_SIZE);
write_eeprom_val(eeprom_idx, (uint32_t) count_value_fine, rot_dir_is_A);
}
count_value = (uint32_t) count_value_fine;
@ -1894,7 +1891,7 @@ void attach_detach_spool()
// Clear old cell & write to next one
write_eeprom_val(eeprom_idx, 0xFFFFFFFF, 0xFF);
++eeprom_idx;
eeprom_idx %= EEPROM_SIZE;
eeprom_idx %= (EEPROM_SIZE / EEPROM_IDX_SIZE);
write_eeprom_val(eeprom_idx, (uint32_t) count_value_fine, rot_dir_is_A);
spool_counting = 0;