mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-23 05:24:46 -07:00
Format code
This commit is contained in:
@@ -71,7 +71,6 @@ bool infrared_scene_start_on_event(void* context, SceneManagerEvent event) {
|
|||||||
} else if(
|
} else if(
|
||||||
submenu_index == SubmenuIndexLearnNewRemote ||
|
submenu_index == SubmenuIndexLearnNewRemote ||
|
||||||
submenu_index == SubmenuIndexLearnNewRemoteRaw) {
|
submenu_index == SubmenuIndexLearnNewRemoteRaw) {
|
||||||
|
|
||||||
// enable automatic signal decoding if "Learn New Remote"
|
// enable automatic signal decoding if "Learn New Remote"
|
||||||
// disable automatic signal decoding if "Learn New Remote (RAW)"
|
// disable automatic signal decoding if "Learn New Remote (RAW)"
|
||||||
infrared_worker_rx_enable_signal_decoding(
|
infrared_worker_rx_enable_signal_decoding(
|
||||||
|
|||||||
@@ -101,8 +101,7 @@ bool unitemp_BMP180_init(Sensor* sensor) {
|
|||||||
bmp180_instance->bmp180_cal.MC = (buff[18] << 8) | buff[19];
|
bmp180_instance->bmp180_cal.MC = (buff[18] << 8) | buff[19];
|
||||||
bmp180_instance->bmp180_cal.MD = (buff[20] << 8) | buff[21];
|
bmp180_instance->bmp180_cal.MD = (buff[20] << 8) | buff[21];
|
||||||
|
|
||||||
|
UNITEMP_DEBUG(
|
||||||
UNITEMP_DEBUG(
|
|
||||||
"Sensor BMP180 (0x%02X) calibration values: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
|
"Sensor BMP180 (0x%02X) calibration values: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
|
||||||
i2c_sensor->currentI2CAdr,
|
i2c_sensor->currentI2CAdr,
|
||||||
bmp180_instance->bmp180_cal.AC1,
|
bmp180_instance->bmp180_cal.AC1,
|
||||||
|
|||||||
@@ -62,8 +62,9 @@ void power_draw_battery_callback(Canvas* canvas, void* context) {
|
|||||||
} else if(
|
} else if(
|
||||||
(power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) &&
|
(power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) &&
|
||||||
(power->state != PowerStateCharging) && // Default bar display with percentage
|
(power->state != PowerStateCharging) && // Default bar display with percentage
|
||||||
(power->info.voltage_battery_charging >= 4.2)) { // not looking nice with low voltage indicator
|
(power->info.voltage_battery_charging >=
|
||||||
canvas_set_font(canvas, FontBatteryPercent);
|
4.2)) { // not looking nice with low voltage indicator
|
||||||
|
canvas_set_font(canvas, FontBatteryPercent);
|
||||||
|
|
||||||
// align charge dispaly value with digits to draw
|
// align charge dispaly value with digits to draw
|
||||||
uint8_t bar_charge = power->info.charge;
|
uint8_t bar_charge = power->info.charge;
|
||||||
@@ -153,7 +154,6 @@ void power_draw_battery_callback(Canvas* canvas, void* context) {
|
|||||||
canvas_draw_str_aligned(
|
canvas_draw_str_aligned(
|
||||||
canvas, 16, 4, AlignCenter, AlignCenter, batteryPercentile);
|
canvas, 16, 4, AlignCenter, AlignCenter, batteryPercentile);
|
||||||
} else if(power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) {
|
} else if(power->displayBatteryPercentage == DISPLAY_BATTERY_BAR_PERCENT) {
|
||||||
|
|
||||||
// clean-up default charging bar display
|
// clean-up default charging bar display
|
||||||
canvas_set_color(canvas, ColorWhite);
|
canvas_set_color(canvas, ColorWhite);
|
||||||
canvas_draw_box(canvas, 1, 1, 22, 6);
|
canvas_draw_box(canvas, 1, 1, 22, 6);
|
||||||
|
|||||||
@@ -28,14 +28,8 @@ const uint32_t auto_lock_delay_value[AUTO_LOCK_DELAY_COUNT] =
|
|||||||
|
|
||||||
#define BATTERY_VIEW_COUNT 6
|
#define BATTERY_VIEW_COUNT 6
|
||||||
|
|
||||||
const char* const battery_view_count_text[BATTERY_VIEW_COUNT] = {
|
const char* const battery_view_count_text[BATTERY_VIEW_COUNT] =
|
||||||
"Bar",
|
{"Bar", "%", "Inv. %", "Retro 3", "Retro 5", "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_BAR,
|
DISPLAY_BATTERY_BAR,
|
||||||
@@ -43,8 +37,7 @@ const uint32_t displayBatteryPercentage_value[BATTERY_VIEW_COUNT] = {
|
|||||||
DISPLAY_BATTERY_INVERTED_PERCENT,
|
DISPLAY_BATTERY_INVERTED_PERCENT,
|
||||||
DISPLAY_BATTERY_RETRO_3,
|
DISPLAY_BATTERY_RETRO_3,
|
||||||
DISPLAY_BATTERY_RETRO_5,
|
DISPLAY_BATTERY_RETRO_5,
|
||||||
DISPLAY_BATTERY_BAR_PERCENT
|
DISPLAY_BATTERY_BAR_PERCENT};
|
||||||
};
|
|
||||||
|
|
||||||
static void desktop_settings_scene_start_var_list_enter_callback(void* context, uint32_t index) {
|
static void desktop_settings_scene_start_var_list_enter_callback(void* context, uint32_t index) {
|
||||||
DesktopSettingsApp* app = context;
|
DesktopSettingsApp* app = context;
|
||||||
|
|||||||
Reference in New Issue
Block a user