PowerPort added to store current independent from DC bus type

The DC bus type caused issues because current limits could not be defined individually for each
connection to a junction, as described in issue #50.

With this commit, also some structs were converted to C++ classes to improve readibility of the
code and make sure that pointers (e.g. to PowerPort objects) are always assigned during
initialization.
This commit is contained in:
Martin Jaeger
2019-10-20 14:52:35 +02:00
parent d7ed3cdd13
commit 0399c4e877
25 changed files with 860 additions and 823 deletions
+3 -2
View File
@@ -23,7 +23,8 @@
*/
#include <stdbool.h>
#include "dc_bus.h"
#include "power_port.h"
/** PWM charger type
*
@@ -46,7 +47,7 @@ void pwm_switch_init(PwmSwitch *pwm_switch);
* @param solar_bus Solar connector DC bus struct
* @param bat_bus Battery connector DC bus struct
*/
void pwm_switch_control(PwmSwitch *pwm_switch, DcBus *solar_bus, DcBus *bat_bus);
void pwm_switch_control(PwmSwitch *pwm_switch, PowerPort *solar_bus, PowerPort *bat_bus);
/** Read the on/off status of the PWM switch
*