Skip to content

Commit

Permalink
bugfix: remove dependency on voltage correction for post-off voltage
Browse files Browse the repository at this point in the history
  • Loading branch information
SiteRelEnby committed Oct 1, 2024
1 parent e43203f commit 1f0d8b3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ui/anduril/battcheck-mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,16 @@ uint8_t voltage_config_state(Event event, uint16_t arg) {
VOLTAGE_CONFIG_STEPS,
voltage_config_save);
}
#else // #ifdef USE_VOLTAGE_CORRECTION
#ifdef USE_POST_OFF_VOLTAGE
void voltage_config_save(uint8_t step, uint8_t value) {
if (value) cfg.post_off_voltage = value;
}
uint8_t voltage_config_state(Event event, uint16_t arg) {
#define VOLTAGE_CONFIG_STEPS 1
return config_state_base(event, arg,
VOLTAGE_CONFIG_STEPS,
voltage_config_save);
}
#endif // #ifdef USE_POST_OFF_VOLTAGE
#endif // #ifdef USE_VOLTAGE_CORRECTION

0 comments on commit 1f0d8b3

Please sign in to comment.