Skip to content

Commit

Permalink
fixed issues found by the test-format CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjourney committed Oct 28, 2024
1 parent 8b52ba5 commit 20464e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/stopwatch/StopWatchController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Pinetime {
namespace System {
class SystemTask;
}

namespace Controllers {

enum class StopWatchStates { Cleared, Running, Paused };
Expand All @@ -18,7 +19,6 @@ namespace Pinetime {
TickType_t timeSinceStart = 0; // Excluding pauses
};


class StopWatchController {
public:
StopWatchController();
Expand Down
5 changes: 2 additions & 3 deletions src/displayapp/screens/StopWatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ namespace {
constexpr TickType_t blinkInterval = pdMS_TO_TICKS(1000);
}

StopWatch::StopWatch(System::SystemTask& systemTask,
StopWatchController& stopWatchController)
StopWatch::StopWatch(System::SystemTask& systemTask, StopWatchController& stopWatchController)
: wakeLock(systemTask), stopWatchController {stopWatchController} {
static constexpr uint8_t btnWidth = 115;
static constexpr uint8_t btnHeight = 80;
Expand Down Expand Up @@ -80,7 +79,7 @@ StopWatch::StopWatch(System::SystemTask& systemTask,
// Figure out what the current state of the stopwatch is and select the correct display
if (stopWatchController.IsCleared()) {
DisplayCleared();
} else {
} else {
if (stopWatchController.GetMaxLapNumber() > 0) {
RenderLaps();
}
Expand Down
6 changes: 2 additions & 4 deletions src/displayapp/screens/StopWatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ namespace Pinetime::Applications {

class StopWatch : public Screen {
public:
explicit StopWatch(System::SystemTask& systemTask,
Controllers::StopWatchController& stopWatchController);
explicit StopWatch(System::SystemTask& systemTask, Controllers::StopWatchController& stopWatchController);
~StopWatch() override;
void Refresh() override;

Expand Down Expand Up @@ -56,8 +55,7 @@ namespace Pinetime::Applications {
static constexpr const char* icon = Screens::Symbols::stopWatch;

static Screens::Screen* Create(AppControllers& controllers) {
return new Screens::StopWatch(*controllers.systemTask,
controllers.stopWatchController);
return new Screens::StopWatch(*controllers.systemTask, controllers.stopWatchController);
};
};
}

0 comments on commit 20464e1

Please sign in to comment.