Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/c/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,14 +1242,22 @@ static void handle_battery(BatteryChargeState charge_state) {
textcolor_bat_uint8 = 0b11111111;
bkgrcolor_bat_uint8 = variable_color;
}
//On all Profiles, make battery white on red if <= 20%:

//On all Profiles (except 0 and 1), make battery white on red if <= 20%:
if (actual_battery_percent <= 20){
textcolor_bat_uint8 = 0b11111111;
bkgrcolor_bat_uint8 = variable_color;
if (ColorProfile == 0) {
textcolor_bat_uint8 = 0b11000000; //black
bkgrcolor_bat_uint8 = 0b11111111; //white
} else if (ColorProfile == 1) {
textcolor_bat_uint8 = 0b11111111; //white
bkgrcolor_bat_uint8 = 0b11000000; //black
} else {
textcolor_bat_uint8 = 0b11111111; //white
bkgrcolor_bat_uint8 = variable_color;
}
}



GlobalInverterColor = textcolor_bat_uint8 & 0b00111111;
GlobalBkgColor = bkgrcolor_bat_uint8 & 0b00111111;
textcolor_bat = (GColor8){.argb = textcolor_bat_uint8};
Expand Down