Removed unused variables. Tested.
This commit is contained in:
parent
bc6d447a5f
commit
abc30028a2
|
@ -205,7 +205,7 @@ void DisplayApp::RunningState() {
|
||||||
case Apps::Twos: currentScreen.reset(new Screens::Twos(this)); break;
|
case Apps::Twos: currentScreen.reset(new Screens::Twos(this)); break;
|
||||||
case Apps::Paint: currentScreen.reset(new Screens::InfiniPaint(this, lvgl)); break;
|
case Apps::Paint: currentScreen.reset(new Screens::InfiniPaint(this, lvgl)); break;
|
||||||
//TODO: Change it back
|
//TODO: Change it back
|
||||||
case Apps::StopWatch: currentScreen.reset(new Screens::StopWatch(this, dateTimeController)); break;
|
case Apps::StopWatch: currentScreen.reset(new Screens::StopWatch(this)); break;
|
||||||
case Apps::Brightness : currentScreen.reset(new Screens::Brightness(this, brightnessController)); break;
|
case Apps::Brightness : currentScreen.reset(new Screens::Brightness(this, brightnessController)); break;
|
||||||
case Apps::Music : currentScreen.reset(new Screens::Music(this, systemTask.nimble().music())); break;
|
case Apps::Music : currentScreen.reset(new Screens::Music(this, systemTask.nimble().music())); break;
|
||||||
case Apps::Navigation : currentScreen.reset(new Screens::Navigation(this, systemTask.nimble().navigation())); break;
|
case Apps::Navigation : currentScreen.reset(new Screens::Navigation(this, systemTask.nimble().navigation())); break;
|
||||||
|
|
|
@ -36,18 +36,18 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void play_pause_event_handler(lv_obj_t* obj, lv_event_t event) {
|
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);
|
stopWatch->playPauseBtnEventHandler(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stop_lap_event_handler(lv_obj_t* obj, lv_event_t 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->stopLapBtnEventHandler(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
StopWatch::StopWatch(DisplayApp* app, const Pinetime::Controllers::DateTime& dateTime)
|
StopWatch::StopWatch(DisplayApp* app)
|
||||||
: Screen(app), dateTime {dateTime}, running {true}, currentState {States::INIT}, currentEvent {Events::STOP}, startTime {},
|
: Screen(app), running {true}, currentState {States::INIT}, currentEvent {Events::STOP}, startTime {}, oldTimeElapsed {},
|
||||||
oldTimeElapsed {}, currentTimeSeparated {}, lapBuffer {}, lapNr {}, lapPressed {false} {
|
currentTimeSeparated {}, lapBuffer {}, lapNr {}, lapPressed {false} {
|
||||||
|
|
||||||
time = lv_label_create(lv_scr_act(), nullptr);
|
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);
|
lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace Pinetime::Applications::Screens {
|
||||||
|
|
||||||
class StopWatch : public Screen {
|
class StopWatch : public Screen {
|
||||||
public:
|
public:
|
||||||
StopWatch(DisplayApp* app, const Pinetime::Controllers::DateTime& dateTime);
|
StopWatch(DisplayApp* app);
|
||||||
~StopWatch() override;
|
~StopWatch() override;
|
||||||
bool Refresh() override;
|
bool Refresh() override;
|
||||||
bool OnButtonPushed() override;
|
bool OnButtonPushed() override;
|
||||||
|
@ -71,7 +71,6 @@ namespace Pinetime::Applications::Screens {
|
||||||
void stopLapBtnEventHandler(lv_event_t event);
|
void stopLapBtnEventHandler(lv_event_t event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Pinetime::Controllers::DateTime& dateTime;
|
|
||||||
bool running;
|
bool running;
|
||||||
States currentState;
|
States currentState;
|
||||||
Events currentEvent;
|
Events currentEvent;
|
||||||
|
|
Loading…
Reference in New Issue