summaryrefslogtreecommitdiff
path: root/src/displayapp/screens
diff options
context:
space:
mode:
authorpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-15 21:35:36 +0100
committerpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-15 21:35:36 +0100
commitabc30028a2b3d0089bca880a73e7fbad9d7cd9bb (patch)
treee7b0c2bc724cbb8211d496fe9c053047240174b5 /src/displayapp/screens
parentbc6d447a5f7b272047c8bb977f6a476413268782 (diff)
Removed unused variables. Tested.
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r--src/displayapp/screens/StopWatch.cpp10
-rw-r--r--src/displayapp/screens/StopWatch.h5
2 files changed, 7 insertions, 8 deletions
diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp
index 733e92d9..b23194ab 100644
--- a/src/displayapp/screens/StopWatch.cpp
+++ b/src/displayapp/screens/StopWatch.cpp
@@ -36,18 +36,18 @@ namespace {
}
static void play_pause_event_handler(lv_obj_t* obj, lv_event_t event) {
- StopWatch* stopWatch = static_cast<StopWatch*>(obj->user_data);
+ auto stopWatch = static_cast<StopWatch*>(obj->user_data);
stopWatch->playPauseBtnEventHandler(event);
}
static void stop_lap_event_handler(lv_obj_t* obj, lv_event_t event) {
- StopWatch* stopWatch = static_cast<StopWatch*>(obj->user_data);
+ auto stopWatch = static_cast<StopWatch*>(obj->user_data);
stopWatch->stopLapBtnEventHandler(event);
}
-StopWatch::StopWatch(DisplayApp* app, const Pinetime::Controllers::DateTime& dateTime)
- : Screen(app), dateTime {dateTime}, running {true}, currentState {States::INIT}, currentEvent {Events::STOP}, startTime {},
- oldTimeElapsed {}, currentTimeSeparated {}, lapBuffer {}, lapNr {}, lapPressed {false} {
+StopWatch::StopWatch(DisplayApp* app)
+ : Screen(app), running {true}, currentState {States::INIT}, currentEvent {Events::STOP}, startTime {}, oldTimeElapsed {},
+ currentTimeSeparated {}, lapBuffer {}, lapNr {}, lapPressed {false} {
time = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
diff --git a/src/displayapp/screens/StopWatch.h b/src/displayapp/screens/StopWatch.h
index a5cf5ceb..2b9c67a4 100644
--- a/src/displayapp/screens/StopWatch.h
+++ b/src/displayapp/screens/StopWatch.h
@@ -63,7 +63,7 @@ namespace Pinetime::Applications::Screens {
class StopWatch : public Screen {
public:
- StopWatch(DisplayApp* app, const Pinetime::Controllers::DateTime& dateTime);
+ StopWatch(DisplayApp* app);
~StopWatch() override;
bool Refresh() override;
bool OnButtonPushed() override;
@@ -71,7 +71,6 @@ namespace Pinetime::Applications::Screens {
void stopLapBtnEventHandler(lv_event_t event);
private:
- const Pinetime::Controllers::DateTime& dateTime;
bool running;
States currentState;
Events currentEvent;
@@ -84,4 +83,4 @@ namespace Pinetime::Applications::Screens {
lv_obj_t *time, *msecTime, *btnPlayPause, *btnStopLap, *txtPlayPause, *txtStopLap;
lv_obj_t *lapOneText, *lapTwoText;
};
-} \ No newline at end of file
+}