Add battery run protection: require charger below 10%
All checks were successful
Build / Build (push) Successful in 10s
All checks were successful
Build / Build (push) Successful in 10s
- Add bq24193_charger_connected() for charger detection - Block install when battery < 10% and charger not plugged in - Show clear screen after charger detected before continuing - User can cancel with + and - to return to Hekate Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -164,6 +164,12 @@ void bq24193_enable_charger()
|
||||
i2c_send_byte(I2C_1, BQ24193_I2C_ADDR, BQ24193_PORConfig, reg);
|
||||
}
|
||||
|
||||
bool bq24193_charger_connected()
|
||||
{
|
||||
u8 status = bq24193_get_reg(BQ24193_Status);
|
||||
return (status & BQ24193_STATUS_PG_MASK) != 0;
|
||||
}
|
||||
|
||||
void bq24193_fake_battery_removal()
|
||||
{
|
||||
// Disable watchdog to keep BATFET disabled.
|
||||
|
||||
Reference in New Issue
Block a user