Add load info variable (combines state and error_flags)

This commit is contained in:
Martin Jäger
2020-02-29 13:39:34 +01:00
parent a20644f145
commit 651f66616b
3 changed files with 10 additions and 8 deletions
+6 -3
View File
@@ -122,10 +122,13 @@ public:
*/
void set_voltage_limits(float lvd, float lvr, float ov);
uint32_t state; ///< Current state of load output switch (negative value means
///< error state, indicated by LoadErrorFlags)
uint32_t state; ///< Current state of load output switch
uint32_t error_flags = 0;
uint32_t error_flags = 0; ///< Stores error flags as bits according to LoadErrorFlag enum
int32_t info; ///< Contains either the state or negative value of error_flags
///< in case of error_flags > 0. This allows to have a single
///< variable for load state diagnosis.
bool enable = false; ///< Target on state set via communication port (overruled if
///< battery is empty or any errors occured)