#pragma once #include #include "app.h" #include "services/gnss_service.h" #include "settings.h" namespace roro { // GNSS (see docs/milestones/M2.md, Q59): the Position view, and the Sky view with every satellite // in view placed by direction and elevation. Tab switches between them. class GnssApp : public App { public: GnssApp(GnssService& gnss, const Settings& settings) : gnss_(gnss), settings_(settings) {} void onEnter() override { requestRedraw(); } bool onKey(const KeyEvent& e) override; void update(uint32_t nowMs) override; void draw(Canvas& c) override; private: void drawPosition(Canvas& c); void drawSky(Canvas& c); GnssService& gnss_; const Settings& settings_; bool sky_ = false; uint32_t lastDrawMs_ = 0; std::string refusal_; // why a Track couldn't start, shown for a few seconds uint32_t refusalMs_ = 0; }; } // namespace roro