mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 06:18:35 -07:00
battery off switch
This commit is contained in:
@@ -36,12 +36,13 @@
|
|||||||
#define MIN_PIN_SIZE 4
|
#define MIN_PIN_SIZE 4
|
||||||
#define MAX_APP_LENGTH 128
|
#define MAX_APP_LENGTH 128
|
||||||
|
|
||||||
#define DISPLAY_BATTERY_BAR 0
|
#define DISPLAY_BATTERY_NO 0
|
||||||
#define DISPLAY_BATTERY_PERCENT 1
|
#define DISPLAY_BATTERY_BAR 1
|
||||||
#define DISPLAY_BATTERY_INVERTED_PERCENT 2
|
#define DISPLAY_BATTERY_PERCENT 2
|
||||||
#define DISPLAY_BATTERY_RETRO_3 3
|
#define DISPLAY_BATTERY_INVERTED_PERCENT 3
|
||||||
#define DISPLAY_BATTERY_RETRO_5 4
|
#define DISPLAY_BATTERY_RETRO_3 4
|
||||||
#define DISPLAY_BATTERY_BAR_PERCENT 5
|
#define DISPLAY_BATTERY_RETRO_5 5
|
||||||
|
#define DISPLAY_BATTERY_BAR_PERCENT 6
|
||||||
|
|
||||||
#define FAP_LOADER_APP_NAME "Applications"
|
#define FAP_LOADER_APP_NAME "Applications"
|
||||||
|
|
||||||
|
|||||||
@@ -9,175 +9,185 @@
|
|||||||
void power_draw_battery_callback(Canvas* canvas, void* context) {
|
void power_draw_battery_callback(Canvas* canvas, void* context) {
|
||||||
furi_assert(context);
|
furi_assert(context);
|
||||||
Power* power = context;
|
Power* power = context;
|
||||||
canvas_draw_icon(canvas, 0, 0, &I_Battery_25x8);
|
if(power->displayBatteryPercentage == DISPLAY_BATTERY_NO) {
|
||||||
canvas_set_color(canvas, ColorWhite);
|
// no draw
|
||||||
canvas_draw_box(canvas, -1, 0, 1, 8);
|
|
||||||
canvas_draw_box(canvas, 0, -1, 24, 1);
|
|
||||||
canvas_draw_box(canvas, 0, 8, 24, 1);
|
|
||||||
canvas_draw_box(canvas, 25, 1, 2, 6);
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_box(canvas, 25, 2, 1, 4);
|
|
||||||
|
|
||||||
if(power->info.gauge_is_ok) {
|
|
||||||
char batteryPercentile[4];
|
|
||||||
snprintf(batteryPercentile, sizeof(batteryPercentile), "%d", power->info.charge);
|
|
||||||
if((power->displayBatteryPercentage == DISPLAY_BATTERY_PERCENT) &&
|
|
||||||
(power->state !=
|
|
||||||
PowerStateCharging)) { //if display battery percentage, black background white text
|
|
||||||
canvas_set_font(canvas, FontBatteryPercent);
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_box(canvas, 1, 1, 22, 6);
|
|
||||||
canvas_set_color(canvas, ColorWhite);
|
|
||||||
canvas_draw_str_aligned(canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
|
||||||
} else if(
|
|
||||||
(power->displayBatteryPercentage == DISPLAY_BATTERY_INVERTED_PERCENT) &&
|
|
||||||
(power->state !=
|
|
||||||
PowerStateCharging)) { //if display inverted percentage, white background black text
|
|
||||||
canvas_set_font(canvas, FontBatteryPercent);
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_str_aligned(canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
|
||||||
} else if(
|
|
||||||
(power->displayBatteryPercentage == DISPLAY_BATTERY_RETRO_3) &&
|
|
||||||
(power->state != PowerStateCharging)) { //Retro style segmented display, 3 parts
|
|
||||||
if(power->info.charge > 25) {
|
|
||||||
canvas_draw_box(canvas, 2, 2, 6, 4);
|
|
||||||
}
|
|
||||||
if(power->info.charge > 50) {
|
|
||||||
canvas_draw_box(canvas, 9, 2, 6, 4);
|
|
||||||
}
|
|
||||||
if(power->info.charge > 75) {
|
|
||||||
canvas_draw_box(canvas, 16, 2, 6, 4);
|
|
||||||
}
|
|
||||||
} else if(
|
|
||||||
(power->displayBatteryPercentage == DISPLAY_BATTERY_RETRO_5) &&
|
|
||||||
(power->state != PowerStateCharging)) { //Retro style segmented display, 5 parts
|
|
||||||
if(power->info.charge > 10) {
|
|
||||||
canvas_draw_box(canvas, 2, 2, 3, 4);
|
|
||||||
}
|
|
||||||
if(power->info.charge > 30) {
|
|
||||||
canvas_draw_box(canvas, 6, 2, 3, 4);
|
|
||||||
}
|
|
||||||
if(power->info.charge > 50) {
|
|
||||||
canvas_draw_box(canvas, 10, 2, 3, 4);
|
|
||||||
}
|
|
||||||
if(power->info.charge > 70) {
|
|
||||||
canvas_draw_box(canvas, 14, 2, 3, 4);
|
|
||||||
}
|
|
||||||
if(power->info.charge > 90) {
|
|
||||||
canvas_draw_box(canvas, 18, 2, 3, 4);
|
|
||||||
}
|
|
||||||
} else if(
|
|
||||||
(power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) &&
|
|
||||||
(power->state != PowerStateCharging) && // Default bar display with percentage
|
|
||||||
(power->info.voltage_battery_charging >=
|
|
||||||
4.2)) { // not looking nice with low voltage indicator
|
|
||||||
canvas_set_font(canvas, FontBatteryPercent);
|
|
||||||
|
|
||||||
// align charge dispaly value with digits to draw
|
|
||||||
uint8_t bar_charge = power->info.charge;
|
|
||||||
if(bar_charge > 23 && bar_charge < 38) {
|
|
||||||
bar_charge = 23;
|
|
||||||
} else if(bar_charge >= 38 && bar_charge < 62) {
|
|
||||||
bar_charge = 50;
|
|
||||||
} else if(bar_charge >= 62 && bar_charge < 74) {
|
|
||||||
bar_charge = 74;
|
|
||||||
}
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_box(canvas, 1, 1, (bar_charge * 22) / 100, 6);
|
|
||||||
|
|
||||||
// drawing digits
|
|
||||||
if(bar_charge < 38) { // both digits are black
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_str_aligned(
|
|
||||||
canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
|
||||||
} else if(bar_charge >= 38 && bar_charge < 74) { // first digit is white
|
|
||||||
canvas_set_color(canvas, ColorWhite);
|
|
||||||
|
|
||||||
// first
|
|
||||||
char batteryPercentileFirstDigit[2];
|
|
||||||
snprintf(
|
|
||||||
batteryPercentileFirstDigit,
|
|
||||||
sizeof(batteryPercentileFirstDigit),
|
|
||||||
"%c",
|
|
||||||
batteryPercentile[0]);
|
|
||||||
canvas_draw_str_aligned(
|
|
||||||
canvas, 9, 4, AlignCenter, AlignCenter, batteryPercentileFirstDigit);
|
|
||||||
|
|
||||||
// second
|
|
||||||
char batteryPercentileSecondDigit[2];
|
|
||||||
snprintf(
|
|
||||||
batteryPercentileSecondDigit,
|
|
||||||
sizeof(batteryPercentileSecondDigit),
|
|
||||||
"%c",
|
|
||||||
batteryPercentile[1]);
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_str_aligned(
|
|
||||||
canvas, 15, 4, AlignCenter, AlignCenter, batteryPercentileSecondDigit);
|
|
||||||
} else { // charge >= 62, both digits are white
|
|
||||||
canvas_set_color(canvas, ColorWhite);
|
|
||||||
canvas_draw_str_aligned(
|
|
||||||
canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
|
||||||
}
|
|
||||||
} else { //default bar display, added here to serve as fallback/default behaviour.
|
|
||||||
canvas_draw_box(canvas, 2, 2, (power->info.charge + 4) / 5, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Verify if it displays correctly with custom battery skins !!!
|
|
||||||
if(power->info.voltage_battery_charging < 4.2) {
|
|
||||||
// Battery charging voltage is modified, indicate with cross pattern
|
|
||||||
canvas_invert_color(canvas);
|
|
||||||
uint8_t battery_bar_width = (power->info.charge + 4) / 5;
|
|
||||||
bool cross_odd = false;
|
|
||||||
// Start 1 further in from the battery bar's x position
|
|
||||||
for(uint8_t x = 3; x <= battery_bar_width; x++) {
|
|
||||||
// Cross pattern is from the center of the battery bar
|
|
||||||
// y = 2 + 1 (inset) + 1 (for every other)
|
|
||||||
canvas_draw_dot(canvas, x, 3 + (uint8_t)cross_odd);
|
|
||||||
cross_odd = !cross_odd;
|
|
||||||
}
|
|
||||||
canvas_invert_color(canvas);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(power->state == PowerStateCharging) {
|
|
||||||
canvas_set_bitmap_mode(canvas, 1);
|
|
||||||
// TODO: replace -1 magic for uint8_t with re-framing
|
|
||||||
if(power->displayBatteryPercentage == DISPLAY_BATTERY_PERCENT ||
|
|
||||||
power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) {
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_box(canvas, 1, 1, 22, 6);
|
|
||||||
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_9x10);
|
|
||||||
canvas_set_color(canvas, ColorWhite);
|
|
||||||
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_mask_9x10);
|
|
||||||
canvas_set_font(canvas, FontBatteryPercent);
|
|
||||||
canvas_draw_str_aligned(
|
|
||||||
canvas, 16, 4, AlignCenter, AlignCenter, batteryPercentile);
|
|
||||||
} else if(power->displayBatteryPercentage == DISPLAY_BATTERY_INVERTED_PERCENT) {
|
|
||||||
canvas_set_color(canvas, ColorWhite);
|
|
||||||
canvas_draw_box(canvas, 1, 1, 22, 6);
|
|
||||||
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_9x10);
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_mask_9x10);
|
|
||||||
canvas_set_font(canvas, FontBatteryPercent);
|
|
||||||
canvas_draw_str_aligned(
|
|
||||||
canvas, 16, 4, AlignCenter, AlignCenter, batteryPercentile);
|
|
||||||
} else {
|
|
||||||
canvas_set_color(canvas, ColorWhite);
|
|
||||||
canvas_draw_icon(canvas, 8, -1, &I_Charging_lightning_mask_9x10);
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
|
||||||
canvas_draw_icon(canvas, 8, -1, &I_Charging_lightning_9x10);
|
|
||||||
}
|
|
||||||
canvas_set_bitmap_mode(canvas, 0);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
canvas_draw_box(canvas, 8, 3, 8, 2);
|
|
||||||
|
canvas_draw_icon(canvas, 0, 0, &I_Battery_25x8);
|
||||||
|
canvas_set_color(canvas, ColorWhite);
|
||||||
|
canvas_draw_box(canvas, -1, 0, 1, 8);
|
||||||
|
canvas_draw_box(canvas, 0, -1, 24, 1);
|
||||||
|
canvas_draw_box(canvas, 0, 8, 24, 1);
|
||||||
|
canvas_draw_box(canvas, 25, 1, 2, 6);
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_box(canvas, 25, 2, 1, 4);
|
||||||
|
|
||||||
|
if(power->info.gauge_is_ok) {
|
||||||
|
char batteryPercentile[4];
|
||||||
|
snprintf(batteryPercentile, sizeof(batteryPercentile), "%d", power->info.charge);
|
||||||
|
|
||||||
|
if((power->displayBatteryPercentage == DISPLAY_BATTERY_PERCENT) &&
|
||||||
|
(power->state !=
|
||||||
|
PowerStateCharging)) { //if display battery percentage, black background white text
|
||||||
|
canvas_set_font(canvas, FontBatteryPercent);
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_box(canvas, 1, 1, 22, 6);
|
||||||
|
canvas_set_color(canvas, ColorWhite);
|
||||||
|
canvas_draw_str_aligned(canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
||||||
|
} else if(
|
||||||
|
(power->displayBatteryPercentage == DISPLAY_BATTERY_INVERTED_PERCENT) &&
|
||||||
|
(power->state !=
|
||||||
|
PowerStateCharging)) { //if display inverted percentage, white background black text
|
||||||
|
canvas_set_font(canvas, FontBatteryPercent);
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_str_aligned(canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
||||||
|
} else if(
|
||||||
|
(power->displayBatteryPercentage == DISPLAY_BATTERY_RETRO_3) &&
|
||||||
|
(power->state != PowerStateCharging)) { //Retro style segmented display, 3 parts
|
||||||
|
if(power->info.charge > 25) {
|
||||||
|
canvas_draw_box(canvas, 2, 2, 6, 4);
|
||||||
|
}
|
||||||
|
if(power->info.charge > 50) {
|
||||||
|
canvas_draw_box(canvas, 9, 2, 6, 4);
|
||||||
|
}
|
||||||
|
if(power->info.charge > 75) {
|
||||||
|
canvas_draw_box(canvas, 16, 2, 6, 4);
|
||||||
|
}
|
||||||
|
} else if(
|
||||||
|
(power->displayBatteryPercentage == DISPLAY_BATTERY_RETRO_5) &&
|
||||||
|
(power->state != PowerStateCharging)) { //Retro style segmented display, 5 parts
|
||||||
|
if(power->info.charge > 10) {
|
||||||
|
canvas_draw_box(canvas, 2, 2, 3, 4);
|
||||||
|
}
|
||||||
|
if(power->info.charge > 30) {
|
||||||
|
canvas_draw_box(canvas, 6, 2, 3, 4);
|
||||||
|
}
|
||||||
|
if(power->info.charge > 50) {
|
||||||
|
canvas_draw_box(canvas, 10, 2, 3, 4);
|
||||||
|
}
|
||||||
|
if(power->info.charge > 70) {
|
||||||
|
canvas_draw_box(canvas, 14, 2, 3, 4);
|
||||||
|
}
|
||||||
|
if(power->info.charge > 90) {
|
||||||
|
canvas_draw_box(canvas, 18, 2, 3, 4);
|
||||||
|
}
|
||||||
|
} else if(
|
||||||
|
(power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) &&
|
||||||
|
(power->state != PowerStateCharging) && // Default bar display with percentage
|
||||||
|
(power->info.voltage_battery_charging >=
|
||||||
|
4.2)) { // not looking nice with low voltage indicator
|
||||||
|
canvas_set_font(canvas, FontBatteryPercent);
|
||||||
|
|
||||||
|
// align charge dispaly value with digits to draw
|
||||||
|
uint8_t bar_charge = power->info.charge;
|
||||||
|
if(bar_charge > 23 && bar_charge < 38) {
|
||||||
|
bar_charge = 23;
|
||||||
|
} else if(bar_charge >= 38 && bar_charge < 62) {
|
||||||
|
bar_charge = 50;
|
||||||
|
} else if(bar_charge >= 62 && bar_charge < 74) {
|
||||||
|
bar_charge = 74;
|
||||||
|
}
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_box(canvas, 1, 1, (bar_charge * 22) / 100, 6);
|
||||||
|
|
||||||
|
// drawing digits
|
||||||
|
if(bar_charge < 38) { // both digits are black
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
||||||
|
} else if(bar_charge >= 38 && bar_charge < 74) { // first digit is white
|
||||||
|
canvas_set_color(canvas, ColorWhite);
|
||||||
|
|
||||||
|
// first
|
||||||
|
char batteryPercentileFirstDigit[2];
|
||||||
|
snprintf(
|
||||||
|
batteryPercentileFirstDigit,
|
||||||
|
sizeof(batteryPercentileFirstDigit),
|
||||||
|
"%c",
|
||||||
|
batteryPercentile[0]);
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas, 9, 4, AlignCenter, AlignCenter, batteryPercentileFirstDigit);
|
||||||
|
|
||||||
|
// second
|
||||||
|
char batteryPercentileSecondDigit[2];
|
||||||
|
snprintf(
|
||||||
|
batteryPercentileSecondDigit,
|
||||||
|
sizeof(batteryPercentileSecondDigit),
|
||||||
|
"%c",
|
||||||
|
batteryPercentile[1]);
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas, 15, 4, AlignCenter, AlignCenter, batteryPercentileSecondDigit);
|
||||||
|
} else { // charge >= 62, both digits are white
|
||||||
|
canvas_set_color(canvas, ColorWhite);
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas, 11, 4, AlignCenter, AlignCenter, batteryPercentile);
|
||||||
|
}
|
||||||
|
} else { //default bar display, added here to serve as fallback/default behaviour.
|
||||||
|
canvas_draw_box(canvas, 2, 2, (power->info.charge + 4) / 5, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Verify if it displays correctly with custom battery skins !!!
|
||||||
|
if(power->info.voltage_battery_charging < 4.2) {
|
||||||
|
// Battery charging voltage is modified, indicate with cross pattern
|
||||||
|
canvas_invert_color(canvas);
|
||||||
|
uint8_t battery_bar_width = (power->info.charge + 4) / 5;
|
||||||
|
bool cross_odd = false;
|
||||||
|
// Start 1 further in from the battery bar's x position
|
||||||
|
for(uint8_t x = 3; x <= battery_bar_width; x++) {
|
||||||
|
// Cross pattern is from the center of the battery bar
|
||||||
|
// y = 2 + 1 (inset) + 1 (for every other)
|
||||||
|
canvas_draw_dot(canvas, x, 3 + (uint8_t)cross_odd);
|
||||||
|
cross_odd = !cross_odd;
|
||||||
|
}
|
||||||
|
canvas_invert_color(canvas);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(power->state == PowerStateCharging) {
|
||||||
|
canvas_set_bitmap_mode(canvas, 1);
|
||||||
|
// TODO: replace -1 magic for uint8_t with re-framing
|
||||||
|
if(power->displayBatteryPercentage == DISPLAY_BATTERY_PERCENT ||
|
||||||
|
power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) {
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_box(canvas, 1, 1, 22, 6);
|
||||||
|
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_9x10);
|
||||||
|
canvas_set_color(canvas, ColorWhite);
|
||||||
|
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_mask_9x10);
|
||||||
|
canvas_set_font(canvas, FontBatteryPercent);
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas, 16, 4, AlignCenter, AlignCenter, batteryPercentile);
|
||||||
|
} else if(power->displayBatteryPercentage == DISPLAY_BATTERY_INVERTED_PERCENT) {
|
||||||
|
canvas_set_color(canvas, ColorWhite);
|
||||||
|
canvas_draw_box(canvas, 1, 1, 22, 6);
|
||||||
|
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_9x10);
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_icon(canvas, 2, -1, &I_Charging_lightning_mask_9x10);
|
||||||
|
canvas_set_font(canvas, FontBatteryPercent);
|
||||||
|
canvas_draw_str_aligned(
|
||||||
|
canvas, 16, 4, AlignCenter, AlignCenter, batteryPercentile);
|
||||||
|
} else {
|
||||||
|
canvas_set_color(canvas, ColorWhite);
|
||||||
|
canvas_draw_icon(canvas, 8, -1, &I_Charging_lightning_mask_9x10);
|
||||||
|
canvas_set_color(canvas, ColorBlack);
|
||||||
|
canvas_draw_icon(canvas, 8, -1, &I_Charging_lightning_9x10);
|
||||||
|
}
|
||||||
|
canvas_set_bitmap_mode(canvas, 0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
canvas_draw_box(canvas, 8, 3, 8, 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ViewPort* power_battery_view_port_alloc(Power* power) {
|
static ViewPort* power_battery_view_port_alloc(Power* power) {
|
||||||
ViewPort* battery_view_port = view_port_alloc();
|
ViewPort* battery_view_port = view_port_alloc();
|
||||||
view_port_set_width(battery_view_port, icon_get_width(&I_Battery_25x8));
|
if(power->displayBatteryPercentage == DISPLAY_BATTERY_NO) {
|
||||||
view_port_draw_callback_set(battery_view_port, power_draw_battery_callback, power);
|
// no draw
|
||||||
gui_add_view_port(power->gui, battery_view_port, GuiLayerStatusBarRight);
|
} else {
|
||||||
|
view_port_set_width(battery_view_port, icon_get_width(&I_Battery_25x8));
|
||||||
|
view_port_draw_callback_set(battery_view_port, power_draw_battery_callback, power);
|
||||||
|
gui_add_view_port(power->gui, battery_view_port, GuiLayerStatusBarRight);
|
||||||
|
}
|
||||||
return battery_view_port;
|
return battery_view_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,11 @@ const char* const auto_lock_delay_text[AUTO_LOCK_DELAY_COUNT] = {
|
|||||||
const uint32_t auto_lock_delay_value[AUTO_LOCK_DELAY_COUNT] =
|
const uint32_t auto_lock_delay_value[AUTO_LOCK_DELAY_COUNT] =
|
||||||
{0, 10000, 15000, 30000, 60000, 90000, 120000, 300000, 600000};
|
{0, 10000, 15000, 30000, 60000, 90000, 120000, 300000, 600000};
|
||||||
|
|
||||||
#define BATTERY_VIEW_COUNT 6
|
#define BATTERY_VIEW_COUNT 7
|
||||||
const char* const battery_view_count_text[BATTERY_VIEW_COUNT] =
|
const char* const battery_view_count_text[BATTERY_VIEW_COUNT] =
|
||||||
{"Bar", "%", "Inv. %", "Retro 3", "Retro 5", "Bar %"};
|
{"Off", "Bar", "%", "Inv. %", "Retro 3", "Retro 5", "Bar %"};
|
||||||
const uint32_t displayBatteryPercentage_value[BATTERY_VIEW_COUNT] = {
|
const uint32_t displayBatteryPercentage_value[BATTERY_VIEW_COUNT] = {
|
||||||
|
DISPLAY_BATTERY_NO,
|
||||||
DISPLAY_BATTERY_BAR,
|
DISPLAY_BATTERY_BAR,
|
||||||
DISPLAY_BATTERY_PERCENT,
|
DISPLAY_BATTERY_PERCENT,
|
||||||
DISPLAY_BATTERY_INVERTED_PERCENT,
|
DISPLAY_BATTERY_INVERTED_PERCENT,
|
||||||
|
|||||||
Reference in New Issue
Block a user