Return of battery reading

Rollback 32bcd03158 as AUX updated (#5)
This commit is contained in:
Veronika Kossmann
2025-07-20 16:58:48 +03:00
committed by GitHub
parent 46d0b8243c
commit 7e1d8f28e1
2 changed files with 4 additions and 5 deletions
@@ -366,14 +366,13 @@ static bool animation_manager_is_valid_idle_animation(
bool result = true;
/*if(!strcmp(info->name, BAD_BATTERY_ANIMATION_NAME)) {
if(!strcmp(info->name, BAD_BATTERY_ANIMATION_NAME)) {
Power* power = furi_record_open(RECORD_POWER);
bool battery_is_well = power_is_battery_healthy(power);
furi_record_close(RECORD_POWER);
result = !battery_is_well;
}*/
}
if(!strcmp(info->name, NO_SD_ANIMATION_NAME)) {
Storage* storage = furi_record_open(RECORD_STORAGE);
FS_Error sd_status = storage_sd_status(storage);
+2 -2
View File
@@ -71,7 +71,7 @@ void furi_hal_power_init(void) {
furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
// Find and init gauge
size_t retry = 0;
size_t retry = 2;
while(retry > 0) {
furi_hal_power.gauge_ok =
bq27220_init(&furi_hal_i2c_handle_power, furi_hal_power_gauge_data_memory);
@@ -85,7 +85,7 @@ void furi_hal_power_init(void) {
retry--;
}
// Find and init charger
retry = 0;
retry = 2;
while(retry > 0) {
furi_hal_power.charger_ok = bq25896_init(&furi_hal_i2c_handle_power);
if(furi_hal_power.charger_ok) {