Minor code cleanups
This commit is contained in:
+3
-9
@@ -121,11 +121,7 @@ static void bt_callback(bool connected) {
|
|||||||
static void batt_callback(BatteryChargeState state) {
|
static void batt_callback(BatteryChargeState state) {
|
||||||
s_batt_level = state.charge_percent / 5;
|
s_batt_level = state.charge_percent / 5;
|
||||||
layer_mark_dirty(s_fuel_layer);
|
layer_mark_dirty(s_fuel_layer);
|
||||||
if (state.charge_percent <= settings.LowFuelPercent) {
|
toggle_fuel_warning_state(state.charge_percent <= settings.LowFuelPercent, false);
|
||||||
toggle_fuel_warning_state(true, false);
|
|
||||||
} else {
|
|
||||||
toggle_fuel_warning_state(false, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void temp_update_proc(Layer *layer, GContext *ctx) {
|
static void temp_update_proc(Layer *layer, GContext *ctx) {
|
||||||
@@ -216,13 +212,13 @@ static void update_minute_1() {
|
|||||||
s_time_digits[2] = minute / 10;
|
s_time_digits[2] = minute / 10;
|
||||||
s_time_digits[3] = minute % 10;
|
s_time_digits[3] = minute % 10;
|
||||||
|
|
||||||
|
bitmap_layer_set_bitmap(s_digit_fg_layers[0], s_hour_bitmaps[s_time_digits[0]]);
|
||||||
|
bitmap_layer_set_bitmap(s_digit_fg_layers[1], s_hour_bitmaps[s_time_digits[1]]);
|
||||||
if (!s_peek_active) {
|
if (!s_peek_active) {
|
||||||
if (settings.ShowDigitsMG) {
|
if (settings.ShowDigitsMG) {
|
||||||
bitmap_layer_set_bitmap(s_digit_mg_layers[2], s_digit_mg_super8);
|
bitmap_layer_set_bitmap(s_digit_mg_layers[2], s_digit_mg_super8);
|
||||||
bitmap_layer_set_bitmap(s_digit_mg_layers[3], s_digit_mg_super8);
|
bitmap_layer_set_bitmap(s_digit_mg_layers[3], s_digit_mg_super8);
|
||||||
}
|
}
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[0], s_hour_bitmaps[s_time_digits[0]]);
|
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[1], s_hour_bitmaps[s_time_digits[1]]);
|
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[2], s_minute_bitmaps[s_time_digits[2]]);
|
bitmap_layer_set_bitmap(s_digit_fg_layers[2], s_minute_bitmaps[s_time_digits[2]]);
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[3], s_minute_bitmaps[s_time_digits[3]]);
|
bitmap_layer_set_bitmap(s_digit_fg_layers[3], s_minute_bitmaps[s_time_digits[3]]);
|
||||||
} else {
|
} else {
|
||||||
@@ -230,8 +226,6 @@ static void update_minute_1() {
|
|||||||
bitmap_layer_set_bitmap(s_digit_mg_layers[2], s_digit_mg_super8_mini);
|
bitmap_layer_set_bitmap(s_digit_mg_layers[2], s_digit_mg_super8_mini);
|
||||||
bitmap_layer_set_bitmap(s_digit_mg_layers[3], s_digit_mg_super8_mini);
|
bitmap_layer_set_bitmap(s_digit_mg_layers[3], s_digit_mg_super8_mini);
|
||||||
}
|
}
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[0], s_hour_bitmaps[s_time_digits[0]]);
|
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[1], s_hour_bitmaps[s_time_digits[1]]);
|
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[2], s_minute_bitmaps_mini[s_time_digits[2]]);
|
bitmap_layer_set_bitmap(s_digit_fg_layers[2], s_minute_bitmaps_mini[s_time_digits[2]]);
|
||||||
bitmap_layer_set_bitmap(s_digit_fg_layers[3], s_minute_bitmaps_mini[s_time_digits[3]]);
|
bitmap_layer_set_bitmap(s_digit_fg_layers[3], s_minute_bitmaps_mini[s_time_digits[3]]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user