Skip to content

Commit 9497449

Browse files
committed
fix runtime threshold using us instead of ms
1 parent 08a83eb commit 9497449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/system/power.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ static void power_thread(void)
526526
// use estimated remaining runtime or pptt for battery_low
527527
uint64_t runtime = sys_get_battery_remaining_time_estimate();
528528
bool runtime_valid = runtime;
529-
bool runtime_low = k_ticks_to_us_floor64(runtime) < CONFIG_3_SETTINGS_READ(CONFIG_3_BATTERY_LOW_RUNTIME_THRESHOLD);
529+
bool runtime_low = k_ticks_to_ms_floor64(runtime) < CONFIG_3_SETTINGS_READ(CONFIG_3_BATTERY_LOW_RUNTIME_THRESHOLD);
530530
bool pptt_low = current_battery_pptt < 1000;
531531
if (battery_available && !battery_low && (runtime_valid ? runtime_low : pptt_low))
532532
battery_low = true;

0 commit comments

Comments
 (0)