mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-07 13:23:44 +00:00
Save most common settings for TX apps. And translated some French apps along the way.
This commit is contained in:
@@ -88,6 +88,10 @@ void SSTVTXView::paint(Painter&) {
|
||||
}
|
||||
|
||||
SSTVTXView::~SSTVTXView() {
|
||||
// save app settings
|
||||
app_settings.tx_frequency = transmitter_model.tuning_frequency();
|
||||
settings.save("tx_sstv", &app_settings);
|
||||
|
||||
transmitter_model.disable();
|
||||
baseband::shutdown();
|
||||
}
|
||||
@@ -215,6 +219,15 @@ SSTVTXView::SSTVTXView(
|
||||
options_t mode_options;
|
||||
uint32_t c;
|
||||
|
||||
// load app settings
|
||||
auto rc = settings.load("tx_sstv", &app_settings);
|
||||
if(rc == SETTINGS_OK) {
|
||||
transmitter_model.set_rf_amp(app_settings.tx_amp);
|
||||
transmitter_model.set_channel_bandwidth(app_settings.channel_bandwidth);
|
||||
transmitter_model.set_tuning_frequency(app_settings.tx_frequency);
|
||||
transmitter_model.set_tx_gain(app_settings.tx_gain);
|
||||
}
|
||||
|
||||
// Search for valid bitmaps
|
||||
file_list = scan_root_files(u"/sstv", u"*.bmp");
|
||||
if (!file_list.size()) {
|
||||
|
||||
Reference in New Issue
Block a user