App settings revamp (#1139)

* WIP AppSetting overhaul

* WIP migrating apps to new settings.

* remove settings, rename tuned => target

* formatting

* Minor fixes

* Fix hang on app load

* run formatter

* PR comment fixes

* Load modulation into receiver model in app_settings

* Run formatter

---------

Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
Kyle Reed 2023-06-11 11:47:13 -07:00 committed by GitHub
parent f65e743c4c
commit 8bd3d6249d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 914 additions and 1136 deletions

View file

@ -53,13 +53,17 @@ class LevelView : public View {
private:
NavigationView& nav_;
app_settings::SettingsManager settings_{
"rx_level", app_settings::Mode::RX};
size_t change_mode(freqman_index_t mod_type);
void on_statistics_update(const ChannelStatistics& statistics);
void set_display_freq(int64_t freq);
// TODO: needed?
int32_t db{0};
long long int MAX_UFREQ = {7200000000}; // maximum usable freq
rf::Frequency freq = {0};
rf::Frequency freq_ = {0};
Labels labels{
{{0 * 8, 0 * 16}, "LNA: VGA: AMP: VOL: ", Color::light_grey()},
@ -104,7 +108,7 @@ class LevelView : public View {
{"audio off", 0},
{"audio on", 1}
//{"tone on", 2},
//{"tone off", 2},
//{"tone off", 3},
}};
Text text_ctcss{
@ -168,9 +172,6 @@ class LevelView : public View {
[this](const Message* const p) {
this->on_statistics_update(static_cast<const ChannelStatisticsMessage*>(p)->statistics);
}};
// app save settings
std::app_settings settings{};
std::app_settings::AppSettings app_settings{};
};
} /* namespace ui */