Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not pollute Pinetime::Applications::Screens namespace #2153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/displayapp/screens/StopWatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
using namespace Pinetime::Applications::Screens;

namespace {
TimeSeparated_t convertTicksToTimeSegments(const TickType_t timeElapsed) {
StopWatch::TimeSeparated_t convertTicksToTimeSegments(const TickType_t timeElapsed) {
// Centiseconds
const int timeElapsedCentis = timeElapsed * 100 / configTICK_RATE_HZ;

const int hundredths = (timeElapsedCentis % 100);
const int secs = (timeElapsedCentis / 100) % 60;
const int mins = ((timeElapsedCentis / 100) / 60) % 60;
const int hours = ((timeElapsedCentis / 100) / 60) / 60;
return TimeSeparated_t {hours, mins, secs, hundredths};
return StopWatch::TimeSeparated_t {hours, mins, secs, hundredths};
}

void play_pause_event_handler(lv_obj_t* obj, lv_event_t event) {
Expand Down
18 changes: 9 additions & 9 deletions src/displayapp/screens/StopWatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ namespace Pinetime {
namespace Applications {
namespace Screens {

enum class States { Init, Running, Halted };

struct TimeSeparated_t {
int hours;
int mins;
int secs;
int hundredths;
};

class StopWatch : public Screen {
public:
enum class States { Init, Running, Halted };

struct TimeSeparated_t {
int hours;
int mins;
int secs;
int hundredths;
};

explicit StopWatch(System::SystemTask& systemTask);
~StopWatch() override;
void Refresh() override;
Expand Down
Loading