if (display_power_level) {
n_blinks = power_level + 1;
- blink_on_time = 1;
- blink_off_time = 2;
+ if (batt_on >> 8 == batt_off >> 8) { // load unplugged
+ n_blinks = 2 * n_blinks;
+ blink_on_time = 0;
+ blink_off_time = 0;
+ } else {
+ blink_on_time = 2;
+ blink_off_time = 2;
+ }
} else {
unsigned char b_level = battery_level();
if (b_level) {
}
n_blinks = b_level + 1;
- blink_on_time = 3;
+ blink_on_time = 4;
blink_off_time = 0;
}
- blink_counter = 10;
+ blink_counter = 12;
display_power_level = !display_power_level;
}