Revert "specific directory for screens and logs (#971)" (#972)

This reverts commit bc1ad5598c.
This commit is contained in:
jLynx 2023-05-11 11:44:19 +12:00 committed by GitHub
parent bc1ad5598c
commit 1edd3716a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 12 additions and 35 deletions

View File

@ -98,11 +98,9 @@ ACARSAppView::ACARSAppView(NavigationView& nav) {
logging = v;
};
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<ACARSLogger>();
if (logger)
logger->append("LOGS/ACARS.TXT");
logger->append("acars.txt");
}
ACARSAppView::~ACARSAppView() {

View File

@ -397,11 +397,9 @@ AISAppView::AISAppView(NavigationView& nav) : nav_ { nav } {
this->on_show_list();
};
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<AISLogger>();
if( logger ) {
logger->append(u"LOGS/AIS.TXT");
logger->append(u"ais.txt");
}
}

View File

@ -130,11 +130,9 @@ ERTAppView::ERTAppView(NavigationView&) {
static_cast<int8_t>(receiver_model.vga()),
}); */
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<ERTLogger>();
if( logger ) {
logger->append(u"LOGS/ERT.TXT");
logger->append(u"ert.txt");
}
}

View File

@ -129,11 +129,9 @@ POCSAGAppView::POCSAGAppView(NavigationView& nav) {
ignore_address /= 10;
}
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<POCSAGLogger>();
if (logger)
logger->append("LOGS/POCSAG.TXT");
logger->append("pocsag.txt");
audio::output::start();
audio::output::unmute();

View File

@ -194,11 +194,9 @@ TPMSAppView::TPMSAppView(NavigationView&) {
options_temperature.set_selected_index(0, true);
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<TPMSLogger>();
if( logger ) {
logger->append(u"LOGS/TMPS.TXT");
logger->append(u"tpms.txt");
}
}

View File

@ -117,12 +117,6 @@ 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));
@ -357,6 +351,7 @@ 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;
@ -437,6 +432,7 @@ 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);

View File

@ -107,11 +107,9 @@ AFSKRxView::AFSKRxView(NavigationView& nav) {
nav.push<ModemSetupView>();
};
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<AFSKLogger>();
if (logger)
logger->append("LOGS/AFSK.TXT");
logger->append("AFSK_LOG.TXT");
// Auto-configure modem for LCR RX (will be removed later)
baseband::set_afsk(persistent_memory::modem_baudrate(), 8, 0, false);

View File

@ -141,11 +141,9 @@ APRSRxView::APRSRxView(NavigationView& nav, Rect parent_rect) : View(parent_rect
options_region.set_selected_index(0, true);
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<APRSLogger>();
if (logger)
logger->append("LOGS/APRS.TXT");
logger->append("APRS_RX_LOG.TXT");
baseband::set_aprs(1200);

View File

@ -133,13 +133,12 @@ SondeView::SondeView(NavigationView& nav) {
999); //set a dummy heading out of range to draw a cross...probably not ideal?
};
std::string folder = "LOGS";
make_new_directory(folder);
logger = std::make_unique<SondeLogger>();
if (logger)
logger->append(u"LOGS/SONDE.TXT");
logger->append(u"sonde.txt");
// initialize audio:
field_volume.set_value((receiver_model.headphone_volume() - audio::headphone::volume_range().max).decibel() + 99);
field_volume.on_change = [this](int32_t v) {

View File

@ -367,11 +367,7 @@ void SystemStatusView::on_bias_tee() {
}*/
void SystemStatusView::on_camera() {
std::string folder = "SCREENSHOTS";
make_new_directory(folder);
auto path = next_filename_stem_matching_pattern(u"SCREENSHOTS/SCR_????");
auto path = next_filename_stem_matching_pattern(u"SCR_????");
if( path.empty() ) {
return;
}