Skip to content

Commit fede286

Browse files
authored
Merge branch 'InfiniTimeOrg:main' into main
2 parents d653c17 + fb70b53 commit fede286

6 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/displayapp/DisplayApp.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,6 @@ void DisplayApp::Refresh() {
476476
LoadNewScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
477477
motorController.RunForDuration(35);
478478
break;
479-
case Messages::OnChargingEvent:
480-
motorController.RunForDuration(15);
481-
break;
482479
}
483480
}
484481

src/displayapp/Messages.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ namespace Pinetime {
2424
AlarmTriggered,
2525
Chime,
2626
BleRadioEnableToggle,
27-
OnChargingEvent,
2827
};
2928
}
3029
}

src/displayapp/screens/FirmwareUpdate.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <lvgl/lvgl.h>
33
#include "components/ble/BleController.h"
44
#include "displayapp/DisplayApp.h"
5+
#include "displayapp/InfiniTimeTheme.h"
56

67
using namespace Pinetime::Applications::Screens;
78

@@ -12,6 +13,9 @@ FirmwareUpdate::FirmwareUpdate(const Pinetime::Controllers::Ble& bleController)
1213
lv_obj_align(titleLabel, nullptr, LV_ALIGN_IN_TOP_MID, 0, 50);
1314

1415
bar1 = lv_bar_create(lv_scr_act(), nullptr);
16+
lv_obj_set_style_local_bg_color(bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, Colors::bgAlt);
17+
lv_obj_set_style_local_bg_opa(bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, LV_OPA_100);
18+
lv_obj_set_style_local_radius(bar1, LV_BAR_PART_BG, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
1519
lv_obj_set_size(bar1, 200, 30);
1620
lv_obj_align(bar1, nullptr, LV_ALIGN_CENTER, 0, 0);
1721
lv_bar_set_range(bar1, 0, 1000);
@@ -75,7 +79,7 @@ void FirmwareUpdate::DisplayProgression() const {
7579
const uint32_t total = bleController.FirmwareUpdateTotalBytes();
7680
const int16_t permille = current / (total / 1000);
7781

78-
lv_label_set_text_fmt(percentLabel, "%d %%", permille / 10);
82+
lv_label_set_text_fmt(percentLabel, "%d%%", permille / 10);
7983

8084
lv_bar_set_value(bar1, permille, LV_ANIM_OFF);
8185
}

src/displayapp/screens/SystemInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() {
198198
" #808080 Free# %d/%d\n"
199199
" #808080 Min free# %d\n"
200200
" #808080 Alloc err# %d\n"
201-
" #808080 Ovrfl err# %d\n",
201+
" #808080 Ovrfl err# %d",
202202
bleAddr[5],
203203
bleAddr[4],
204204
bleAddr[3],

src/displayapp/screens/Timer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ Timer::Timer(Controllers::Timer& timerController) : timer {timerController} {
5959
lv_obj_set_event_cb(btnPlayPause, btnEventHandler);
6060
lv_obj_set_size(btnPlayPause, LV_HOR_RES, 50);
6161

62-
txtPlayPause = lv_label_create(lv_scr_act(), nullptr);
63-
lv_obj_align(txtPlayPause, btnPlayPause, LV_ALIGN_CENTER, 0, 0);
62+
// Create the label as a child of the button so it stays centered by default
63+
txtPlayPause = lv_label_create(btnPlayPause, nullptr);
6464

6565
if (timer.IsRunning()) {
6666
SetTimerRunning();

src/systemtask/SystemTask.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ void SystemTask::Work() {
339339
case Messages::OnChargingEvent:
340340
batteryController.ReadPowerState();
341341
GoToRunning();
342-
displayApp.PushMessage(Applications::Display::Messages::OnChargingEvent);
343342
break;
344343
case Messages::MeasureBatteryTimerExpired:
345344
batteryController.MeasureVoltage();

0 commit comments

Comments
 (0)