Skip to content

Commit e0013e7

Browse files
stephanie-engJF002
authored andcommitted
Ran clang-format
1 parent a65f173 commit e0013e7

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/components/motion/MotionController.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps)
1616
this->z = z;
1717
int32_t deltaSteps = nbSteps - this->nbSteps;
1818
this->nbSteps = nbSteps;
19-
if(deltaSteps > 0){
19+
if (deltaSteps > 0) {
2020
currentTripSteps += deltaSteps;
2121
}
2222
}
@@ -47,10 +47,16 @@ void MotionController::IsSensorOk(bool isOk) {
4747
isSensorOk = isOk;
4848
}
4949
void MotionController::Init(Pinetime::Drivers::Bma421::DeviceTypes types) {
50-
switch(types){
51-
case Drivers::Bma421::DeviceTypes::BMA421: this->deviceType = DeviceTypes::BMA421; break;
52-
case Drivers::Bma421::DeviceTypes::BMA425: this->deviceType = DeviceTypes::BMA425; break;
53-
default: this->deviceType = DeviceTypes::Unknown; break;
50+
switch (types) {
51+
case Drivers::Bma421::DeviceTypes::BMA421:
52+
this->deviceType = DeviceTypes::BMA421;
53+
break;
54+
case Drivers::Bma421::DeviceTypes::BMA425:
55+
this->deviceType = DeviceTypes::BMA425;
56+
break;
57+
default:
58+
this->deviceType = DeviceTypes::Unknown;
59+
break;
5460
}
5561
}
5662
void MotionController::SetService(Pinetime::Controllers::MotionService* service) {

src/components/motion/MotionController.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Pinetime {
88
namespace Controllers {
99
class MotionController {
1010
public:
11-
enum class DeviceTypes{
11+
enum class DeviceTypes {
1212
Unknown,
1313
BMA421,
1414
BMA425,
@@ -28,7 +28,7 @@ namespace Pinetime {
2828
uint32_t NbSteps() const {
2929
return nbSteps;
3030
}
31-
31+
3232
void ResetTrip() {
3333
currentTripSteps = 0;
3434
}

src/displayapp/screens/Steps.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void Steps::Refresh() {
8585
lv_label_set_text_fmt(lSteps, "%li", stepsCount);
8686
lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -40);
8787

88-
if (currentTripSteps < 100000){
88+
if (currentTripSteps < 100000) {
8989
lv_label_set_text_fmt(tripLabel, "Trip: %5li", currentTripSteps);
9090
} else {
9191
lv_label_set_text_fmt(tripLabel, "Trip: 99999+");
@@ -101,4 +101,3 @@ void Steps::lapBtnEventHandler(lv_event_t event) {
101101
motionController.ResetTrip();
102102
Refresh();
103103
}
104-

0 commit comments

Comments
 (0)