Skip to content

Commit 348d3de

Browse files
committed
Watchfaces: Assume motionsensor is ok
The watch face shouldn't and doesn't start before the sensor is ready.
1 parent e4a6f6a commit 348d3de

10 files changed

Lines changed: 5 additions & 15 deletions

src/displayapp/screens/WatchFaceCasioStyleG7710.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ void WatchFaceCasioStyleG7710::Refresh() {
305305
}
306306

307307
stepCount = motionController.NbSteps();
308-
motionSensorOk = motionController.IsSensorOk();
309-
if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
308+
if (stepCount.IsUpdated()) {
310309
lv_label_set_text_fmt(stepValue, "%lu", stepCount.Get());
311310
lv_obj_realign(stepValue);
312311
lv_obj_realign(stepIcon);

src/displayapp/screens/WatchFaceCasioStyleG7710.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ namespace Pinetime {
4545
Utility::DirtyValue<bool> bleState {};
4646
Utility::DirtyValue<bool> bleRadioEnabled {};
4747
Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::minutes>> currentDateTime {};
48-
Utility::DirtyValue<bool> motionSensorOk {};
4948
Utility::DirtyValue<uint32_t> stepCount {};
5049
Utility::DirtyValue<uint8_t> heartbeat {};
5150
Utility::DirtyValue<bool> heartbeatRunning {};

src/displayapp/screens/WatchFaceDigital.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ void WatchFaceDigital::Refresh() {
148148
}
149149

150150
stepCount = motionController.NbSteps();
151-
motionSensorOk = motionController.IsSensorOk();
152-
if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
151+
if (stepCount.IsUpdated()) {
153152
lv_label_set_text_fmt(stepValue, "%lu", stepCount.Get());
154153
lv_obj_realign(stepValue);
155154
lv_obj_realign(stepIcon);

src/displayapp/screens/WatchFaceDigital.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ namespace Pinetime {
4545
Utility::DirtyValue<bool> bleState {};
4646
Utility::DirtyValue<bool> bleRadioEnabled {};
4747
Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::minutes>> currentDateTime {};
48-
Utility::DirtyValue<bool> motionSensorOk {};
4948
Utility::DirtyValue<uint32_t> stepCount {};
5049
Utility::DirtyValue<uint8_t> heartbeat {};
5150
Utility::DirtyValue<bool> heartbeatRunning {};

src/displayapp/screens/WatchFaceInfineat.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,7 @@ void WatchFaceInfineat::Refresh() {
452452
}
453453

454454
stepCount = motionController.NbSteps();
455-
motionSensorOk = motionController.IsSensorOk();
456-
if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
455+
if (stepCount.IsUpdated()) {
457456
lv_label_set_text_fmt(stepValue, "%lu", stepCount.Get());
458457
lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_IN_BOTTOM_MID, 10, 0);
459458
lv_obj_align(stepIcon, stepValue, LV_ALIGN_OUT_LEFT_MID, -5, 0);

src/displayapp/screens/WatchFaceInfineat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ namespace Pinetime {
5151
Utility::DirtyValue<bool> bleState {};
5252
Utility::DirtyValue<bool> bleRadioEnabled {};
5353
Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::minutes>> currentDateTime {};
54-
Utility::DirtyValue<bool> motionSensorOk {};
5554
Utility::DirtyValue<uint32_t> stepCount {};
5655
Utility::DirtyValue<bool> notificationState {};
5756
using days = std::chrono::duration<int32_t, std::ratio<86400>>; // TODO: days is standard in c++20

src/displayapp/screens/WatchFacePineTimeStyle.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,7 @@ void WatchFacePineTimeStyle::Refresh() {
499499
}
500500

501501
stepCount = motionController.NbSteps();
502-
motionSensorOk = motionController.IsSensorOk();
503-
if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
502+
if (stepCount.IsUpdated()) {
504503
lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / (settingsController.GetStepsGoal() / 100)) % 100);
505504
lv_obj_realign(stepGauge);
506505
lv_label_set_text_fmt(stepValue, "%luK", (stepCount.Get() / 1000));

src/displayapp/screens/WatchFacePineTimeStyle.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ namespace Pinetime {
5656
Utility::DirtyValue<bool> bleState {};
5757
Utility::DirtyValue<bool> bleRadioEnabled {};
5858
Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime {};
59-
Utility::DirtyValue<bool> motionSensorOk {};
6059
Utility::DirtyValue<uint32_t> stepCount {};
6160
Utility::DirtyValue<bool> notificationState {};
6261

src/displayapp/screens/WatchFaceTerminal.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ void WatchFaceTerminal::Refresh() {
145145
}
146146

147147
stepCount = motionController.NbSteps();
148-
motionSensorOk = motionController.IsSensorOk();
149-
if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
148+
if (stepCount.IsUpdated()) {
150149
lv_label_set_text_fmt(stepValue, "[STEP]#ee3377 %lu steps#", stepCount.Get());
151150
}
152151
}

src/displayapp/screens/WatchFaceTerminal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ namespace Pinetime {
4040
Utility::DirtyValue<bool> bleState {};
4141
Utility::DirtyValue<bool> bleRadioEnabled {};
4242
Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::seconds>> currentDateTime {};
43-
Utility::DirtyValue<bool> motionSensorOk {};
4443
Utility::DirtyValue<uint32_t> stepCount {};
4544
Utility::DirtyValue<uint8_t> heartbeat {};
4645
Utility::DirtyValue<bool> heartbeatRunning {};

0 commit comments

Comments
 (0)