Public Access
`r` in the GNSS App (or `gnss track start|stop`) records a Track to /gnss/tracks/YYYYMMDD-HHMMSS.gpx: a point every 5 s once moved 5 m (lib/gnss/track, 7 tests: haversine, the rule, GPX text, the file name). It keeps recording with the App closed, shows REC in the Status Bar, and announces start and stop with a Toast. It needs a card and the time; switching GNSS off stops it. Tracks are written like Captures: past 90 % card usage, until full. Storage Clean-up gets a GNSS tracks category. A Track cut short by a reset or power loss has no GPX footer; the GNSS Service closes such files at the next boot. Verified on the device: a recorded Track and one interrupted by a reset both parse as GPX 1.1 on the PC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
34 lines
924 B
C++
34 lines
924 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#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
|