summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/StopWatch.cpp
diff options
context:
space:
mode:
authorpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-13 14:38:18 +0100
committerpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-13 14:38:18 +0100
commit02824d0671b558e5a36188df4cbc729b571dad1a (patch)
tree95c8bd48cb6bffe5e3fae53bc284e3a26497f546 /src/displayapp/screens/StopWatch.cpp
parent5d57b9054a9d30d8724fac87108d68a4f2c95e68 (diff)
Stopwatch completed. Ready for PR
Diffstat (limited to 'src/displayapp/screens/StopWatch.cpp')
-rw-r--r--src/displayapp/screens/StopWatch.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp
index 972f3a08..9abf9842 100644
--- a/src/displayapp/screens/StopWatch.cpp
+++ b/src/displayapp/screens/StopWatch.cpp
@@ -108,8 +108,7 @@ bool StopWatch::Refresh() {
lv_obj_set_event_cb(btnStopLap, stop_lap_event_handler);
lv_obj_align(btnStopLap, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 0, 0);
txtStopLap = lv_label_create(btnStopLap, nullptr);
- // TODO: Change to Lap symbol
- lv_label_set_text(txtStopLap, Symbols::shoe);
+ lv_label_set_text(txtStopLap, Symbols::lapsFlag);
startTime = xTaskGetTickCount();
currentState = States::RUNNING;
@@ -118,8 +117,7 @@ bool StopWatch::Refresh() {
}
case States::RUNNING: {
lv_label_set_text(txtPlayPause, Symbols::pause);
- // TODO: Change to Lap symbol
- lv_label_set_text(txtStopLap, Symbols::shoe);
+ lv_label_set_text(txtStopLap, Symbols::lapsFlag);
const auto timeElapsed = calculateDelta(startTime, xTaskGetTickCount());
currentTimeSeparated = convertTicksToTimeSegments((oldTimeElapsed + timeElapsed));
@@ -149,8 +147,7 @@ bool StopWatch::Refresh() {
}
case States::HALTED: {
lv_label_set_text(txtPlayPause, Symbols::play);
- // TODO: Change to stop button
- lv_label_set_text(txtStopLap, Symbols::stepBackward);
+ lv_label_set_text(txtStopLap, Symbols::stop);
if (currentEvent == Events::PLAY) {
startTime = xTaskGetTickCount();
@@ -171,13 +168,6 @@ bool StopWatch::OnButtonPushed() {
return true;
}
-bool StopWatch::OnTouchEvent(uint16_t x, uint16_t y) {
- if (y < 60) {
- playPauseBtnEventHandler(LV_EVENT_CLICKED);
- }
- return true;
-}
-
void StopWatch::playPauseBtnEventHandler(lv_event_t event) {
if (event == LV_EVENT_CLICKED) {
if (currentState == States::INIT) {