Fix: use reg REG_ID_BAT to store current battery percent

also fix bug in low_bat, use low_bat_count to debounce
first time battery percent detection error
This commit is contained in:
cuu
2025-04-21 15:43:39 +08:00
parent 6b8553e04c
commit a1847ee338
3 changed files with 46 additions and 40 deletions

View File

@@ -41,5 +41,5 @@ void reg_init(void)
regs[REG_ID_FRQ] = 5;
regs[REG_ID_BKL] = 255;//100%duty
regs[REG_ID_BK2] = 0;
regs[REG_ID_BAT] = 0xff; //default .no battery
regs[REG_ID_BAT] = 0; //default .no battery ,no charging
}