mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2026-01-21 16:32:26 +01:00
fixed issues found by the test-format CI job
This commit is contained in:
parent
88e396f45f
commit
f1f4c9028e
@ -9,6 +9,7 @@ namespace Pinetime {
|
||||
namespace System {
|
||||
class SystemTask;
|
||||
}
|
||||
|
||||
namespace Controllers {
|
||||
|
||||
enum class StopWatchStates { Cleared, Running, Paused };
|
||||
@ -18,7 +19,6 @@ namespace Pinetime {
|
||||
TickType_t timeSinceStart = 0; // Excluding pauses
|
||||
};
|
||||
|
||||
|
||||
class StopWatchController {
|
||||
public:
|
||||
StopWatchController();
|
||||
|
||||
@ -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;
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
static bool IsAvailable(Pinetime::Controllers::FS& /*filesystem*/) {
|
||||
return true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user