Separate load and USB out, improve state handling
Identified issues: - The load output and USB charging port shared the same state machine, which did not allow to set different switch-off thresholds. - Load error codes were global, so it was not possible to have multiple load instances. This commit introduces load-specific error_flags, makes the LoadOutput class inherit from PowerPort (to improve code readability), separates the load driver better from higher level implementation and adds a second LoadOutput object for the USB charging port.
This commit is contained in:
+1
-1
@@ -17,7 +17,6 @@
|
||||
|
||||
extern DcBus lv_bus;
|
||||
extern PowerPort lv_terminal;
|
||||
extern PowerPort load_terminal;
|
||||
|
||||
#if CONFIG_HAS_DCDC_CONVERTER
|
||||
extern DcBus hv_bus;
|
||||
@@ -40,6 +39,7 @@ extern BatConf bat_conf;
|
||||
extern BatConf bat_conf_user;
|
||||
|
||||
extern LoadOutput load;
|
||||
extern LoadOutput usb_pwr;
|
||||
|
||||
extern ThingSet ts; // defined in data_objects.cpp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user