Record gps lat, lon, satinuse from recorder app if there was gps signal. (#1992)

* Record gps lat, lon, satinuse from recorder app if there was gps signal.

* Add _GEO to filename that has geotag
This commit is contained in:
Totoo
2024-03-15 14:56:20 +01:00
committed by GitHub
parent 181624daf1
commit 9e40e38f07
8 changed files with 90 additions and 6 deletions

View File

@@ -88,6 +88,7 @@ class RecordView : public View {
OversampleRate get_oversample_rate(uint32_t sample_rate);
void on_gps(const GPSPosDataMessage* msg);
// bool pitch_rssi_enabled = false;
// Time Stamp
@@ -95,6 +96,10 @@ class RecordView : public View {
bool filename_as_is = false;
rtc::RTC datetime{};
float latitude = 0; // for wardriwing with ext module
float longitude = 0;
uint8_t satinuse = 0; // to see if there was enough sats used or not
const std::filesystem::path filename_stem_pattern;
const std::filesystem::path folder;
FileType file_type;
@@ -147,6 +152,13 @@ class RecordView : public View {
const auto message = *reinterpret_cast<const CaptureThreadDoneMessage*>(p);
this->handle_capture_thread_done(message.error);
}};
MessageHandlerRegistration message_handler_gps{
Message::ID::GPSPosData,
[this](Message* const p) {
const auto message = static_cast<const GPSPosDataMessage*>(p);
this->on_gps(message);
}};
};
} /* namespace ui */