summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/StopWatch.h
diff options
context:
space:
mode:
authorpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-12 08:43:13 (GMT)
committerpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-12 08:43:13 (GMT)
commita090664a4c1709a7925621632e579632e3f1e39a (patch)
tree4919f893bd3ef6f94ee71cc2e0307887696b9a37 /src/displayapp/screens/StopWatch.h
parent70373e734529fdd2e31f0080444360ba859ff567 (diff)
Added a button for stop lap. Logic works. Need to implement symbol and buffer for lap
Diffstat (limited to 'src/displayapp/screens/StopWatch.h')
-rw-r--r--src/displayapp/screens/StopWatch.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/displayapp/screens/StopWatch.h b/src/displayapp/screens/StopWatch.h
index 9e5779a..929813f 100644
--- a/src/displayapp/screens/StopWatch.h
+++ b/src/displayapp/screens/StopWatch.h
@@ -13,6 +13,12 @@ namespace Pinetime::Applications::Screens {
enum class Events { PLAY, PAUSE, STOP };
+ struct TimeSeparated_t {
+ int mins;
+ int secs;
+ int msecs;
+ };
+
class StopWatch : public Screen {
public:
StopWatch(DisplayApp* app, const Pinetime::Controllers::DateTime& dateTime);
@@ -21,7 +27,7 @@ namespace Pinetime::Applications::Screens {
bool OnButtonPushed() override;
bool OnTouchEvent(uint16_t x, uint16_t y) override;
void playPauseBtnEventHandler(lv_event_t event);
-
+ void stopLapBtnEventHandler(lv_event_t event);
private:
const Pinetime::Controllers::DateTime& dateTime;
@@ -30,6 +36,9 @@ namespace Pinetime::Applications::Screens {
Events currentEvent;
TickType_t startTime;
TickType_t oldTimeElapsed;
- lv_obj_t *time, *msecTime, *btnPlayPause, *btnStop, *txtPlayPause, *txtStop;
+ TimeSeparated_t timeSeparated; // Holds Mins, Secs, millisecs
+ int lapNr;
+ lv_obj_t *time, *msecTime, *btnPlayPause, *btnStopLap, *txtPlayPause, *txtStopLap;
+ lv_obj_t *lapOneText, *lapTwoText;
};
} \ No newline at end of file