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 authored and Isilmerie committed Oct 14, 2024
1 parent b955d83 commit a5c1831
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 a5c1831

Please sign in to comment.