1 #ifndef POWER_CONTROL_H_INCLUDED 2 #define POWER_CONTROL_H_INCLUDED 4 #include "FossaSat1B.h" 16 uint8_t lowPowerModeActive : 1;
17 uint8_t lowPowerModeEnabled : 1;
18 uint8_t mpptTempSwitchEnabled : 1;
19 uint8_t mpptKeepAliveEnabled : 1;
20 uint8_t transmitEnabled : 1;
void Power_Control_Delay(uint32_t ms, bool sleep, bool sleepRadio=false)
This function delays the program execution for the given number of milliseconds, while maintaining th...
bool Power_Control_Check_Battery_Limit()
Checks whether battery voltage is below low power limit. Will enable low power mode if that is the ca...
float Power_Control_Get_Charging_Current()
Gets the amperage which is being provided to the battery.
void Power_Control_Save_Configuration()
Saves the configuration bytes from RAM into EEPROM.
float Power_Control_Get_Battery_Voltage()
Get the battery voltage by switching the MPPT off and then on again after reading is taken...
void Power_Control_Load_Configuration()
Load the configuration bytes from the EEPROM into RAM.
void Power_Control_Charge(bool charge)
This function ensures that the battery is charging. "set MPPT to input which enables battery charging...
powerConfig_t powerConfig
The current power configuration settings.
Power configuration strutcture, each entry is one bit long. Total 1 byte, lowPowerModeActive is the l...
bool Power_Control_INA226_Check()
Check that the INA2256 is valid.
uint32_t Power_Control_Get_Sleep_Interval()
Get the amount of seconds to sleep for given the battery voltage.
float Power_Control_Get_Charging_Voltage()
Gets the charging voltage (from the solar panels) by not switching the MPPT off and taking an INA226 ...
Union to quickly access power configuration bits or the entire single-byte value. ...
void Power_Control_Setup_INA226()
Initializes the INA226 current sensor.