mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 09:07:17 -04:00
specific directory for screens and logs (#971)
* Changed to LOGS directory, creating if not existing. Adjusted to upper case. * Changed to SCREENSHOTS directory, creating if not existing
This commit is contained in:
parent
8cae998146
commit
bc1ad5598c
10 changed files with 35 additions and 12 deletions
|
@ -117,6 +117,12 @@ ADSBRxAircraftDetailsView::ADSBRxAircraftDetailsView(
|
|||
|
||||
std::unique_ptr<ADSBLogger> logger { };
|
||||
|
||||
logger = std::make_unique<ADSBLogger>();
|
||||
std::string folder = "LOGS";
|
||||
make_new_directory(folder);
|
||||
if (logger)
|
||||
logger->append(u"LOGS/ADSB.TXT");
|
||||
|
||||
icao_code = to_string_hex(entry_copy.ICAO_address, 6);
|
||||
text_icao_address.set(to_string_hex(entry_copy.ICAO_address, 6));
|
||||
|
||||
|
@ -351,7 +357,6 @@ void ADSBRxView::sort_entries_by_state()
|
|||
}
|
||||
|
||||
void ADSBRxView::on_frame(const ADSBFrameMessage * message) {
|
||||
logger = std::make_unique<ADSBLogger>();
|
||||
rtc::RTC datetime;
|
||||
std::string callsign;
|
||||
std::string str_info;
|
||||
|
@ -432,7 +437,6 @@ void ADSBRxView::on_frame(const ADSBFrameMessage * message) {
|
|||
} // frame.get_DF() == DF_ADSB
|
||||
|
||||
if (logger) {
|
||||
logger->append(u"adsb.txt");
|
||||
// will log each frame in format:
|
||||
// 20171103100227 8DADBEEFDEADBEEFDEADBEEFDEADBEEF ICAO:nnnnnn callsign Alt:nnnnnn Latnnn.nn Lonnnn.nn
|
||||
logger->log_str(logentry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue