3.2 Update System State Routine
This routine is called to examine the solar input voltage to determine if the system should be running in Solar Charge mode, Sleep or LED Driver modes. It monitors Vsolar and Vbat to determine which system mode should be implemented based on voltage set points found in MultiChemCharger_Hardware.h, including separate rising/falling values for appropriate hysteresis.
For example, when the solar voltage drops below the set point (SOLAR_INPUT_STARTUP_MIN), the routine flags the system to enter Sleep mode and shuts down the charger, setting the System_State variable to flag all other routines of this change. When the solar voltage then drops further below the set point (SOLAR_INPUT_MAX_START_LED), the system enters LED Driver mode by setting the System_State variable and enabling the LED driver.
Note that external control inputs from the GUI or I/O inputs can override default behavior as needed, but the input/output voltage for charging can’t be violated (Vsolar must be greater than Vbat to charge).
