fix(flysky): battery charging animation and other timing issues (#5471)

This commit is contained in:
richardclli
2024-08-23 11:27:24 +10:00
committed by GitHub
parent e0ec49d84e
commit 2ef014db0f
8 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -144,7 +144,7 @@ void boardInit()
usb_state |= usbPlugged();
while (usb_state) {
pwrOn();
uint32_t now = get_tmr10ms();
uint32_t now = timersGetMsTick();
if (pwrPressed()) {
press_end = now;
if (press_start == 0) press_start = now;
@@ -160,7 +160,7 @@ void boardInit()
uint32_t press_end_touch = press_end;
if (touchPanelEventOccured()) {
touchPanelRead();
press_end_touch = get_tmr10ms();
press_end_touch = timersGetMsTick();
}
press_start = 0;
handle_battery_charge(press_end_touch);