Make battery configurable via Kconfig (fix #94)

Also adds crazy IS_ENABLED macro to unit tests.
This commit is contained in:
Martin Jäger
2020-08-19 15:55:15 +02:00
committed by Martin Jäger
parent 5b024dcd60
commit ab63204adb
6 changed files with 315 additions and 37 deletions
+1 -2
View File
@@ -35,8 +35,7 @@ void main(void)
setup();
battery_conf_init(&bat_conf, CONFIG_BAT_DEFAULT_TYPE,
CONFIG_BAT_DEFAULT_NUM_CELLS, CONFIG_BAT_DEFAULT_CAPACITY_AH);
battery_conf_init(&bat_conf, CONFIG_BAT_TYPE, CONFIG_BAT_NUM_CELLS, CONFIG_BAT_CAPACITY_AH);
battery_conf_overwrite(&bat_conf, &bat_conf_user); // initialize conf_user with same values
// read custom configuration from EEPROM