Config mode (#1433)

* Allow code to run without a token
* Reverted submodule change by mistake
* WIP force tcxo
* Added check to hide if not an R9
* Fixed comments
* Updated name
* Fixed crashing on TCXO switching
* Fixed the reboot issue
* Updated boot order
* Cleaned up comments
* added new recovery mode
* added IO
* implemented cpld mode change
* whitespace change
* renamed config mode
* inverted logic
* removed r9 dependency
* added disable external tcxo option to config mode
* fixed CLKIN detection for r9
* integrated tcxo setting into clock selection
Co-authored-by @jLynx
This commit is contained in:
Bernd Herzog 2023-09-04 17:46:07 +02:00 committed by GitHub
parent 4819a2f4e2
commit 62310ad9a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 236 additions and 8 deletions

View file

@ -169,6 +169,8 @@ SetRadioView::SetRadioView(
&button_save,
&button_cancel});
add_children({&disable_external_tcxo});
SetFrequencyCorrectionModel model{
static_cast<int8_t>(pmem::correction_ppb() / 1000), 0};
@ -221,10 +223,13 @@ SetRadioView::SetRadioView(
send_system_refresh();
};
disable_external_tcxo.set_value(pmem::config_disable_external_tcxo());
button_save.on_select = [this, &nav](Button&) {
const auto model = this->form_collect();
pmem::set_correction_ppb(model.ppm * 1000);
pmem::set_clkout_freq(model.freq);
pmem::set_config_disable_external_tcxo(disable_external_tcxo.value());
clock_manager.enable_clock_output(pmem::clkout_enabled());
nav.pop();
};