Skip to content

Commit 6ee997b

Browse files
committed
Increase hysteresis
1 parent fdab648 commit 6ee997b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

firmware/src/charger_sm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,12 @@ static void update_charging_led(void) {
570570
}
571571

572572
// LED "breathing" speed depends on (dis)charging current.
573-
// Hysteresis: downward transitions (slower speed) require 50 mA below the threshold
573+
// Hysteresis: downward transitions (slower speed) require 100 mA below the threshold
574574
// to avoid rapid toggling when current fluctuates near a boundary.
575575
static uint8_t breathing_speed = 7;
576-
int16_t thresh_fast = (breathing_speed > 1) ? 2000 : 1950;
577-
int16_t thresh_medium = (breathing_speed > 3) ? 1000 : 950;
578-
int16_t thresh_slow = (breathing_speed > 5) ? 500 : 450;
576+
int16_t thresh_fast = (breathing_speed > 1) ? 2000 : 1900;
577+
int16_t thresh_medium = (breathing_speed > 3) ? 1000 : 900;
578+
int16_t thresh_slow = (breathing_speed > 5) ? 500 : 400;
579579

580580
if (battery_current >= thresh_fast) {
581581
// Fast charging

0 commit comments

Comments
 (0)