mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 07:17:51 +00:00
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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user