mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-07 06:02:20 -04:00
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:
parent
4819a2f4e2
commit
62310ad9a9
10 changed files with 236 additions and 8 deletions
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue