Added options for enabling CLKOUT.

- CLKOUT can be enabled in Radio settings and status bar.
- Fixed a typo(I believe) in ui_navigation.
This commit is contained in:
dqs105 2020-09-16 19:27:56 +08:00
parent 55783a60f5
commit b15b781039
8 changed files with 80 additions and 9 deletions

View file

@ -144,6 +144,7 @@ SetRadioView::SetRadioView(
}
add_children({
&check_clkout,
&labels_bias,
&check_bias,
&button_done,
@ -156,6 +157,14 @@ SetRadioView::SetRadioView(
form_init(model);
check_clkout.set_value(portapack::persistent_memory::clkout_enabled());
check_clkout.on_select = [this](Checkbox&, bool v) {
clock_manager.enable_clock_output(v);
portapack::persistent_memory::set_clkout_enabled(v);
StatusRefreshMessage message { };
EventDispatcher::send_message(message);
};
check_bias.set_value(portapack::get_antenna_bias());
check_bias.on_select = [this](Checkbox&, bool v) {
portapack::set_antenna_bias(v);

View file

@ -147,8 +147,14 @@ private:
};
Labels labels_correction {
{ { 2 * 8, 4 * 16 }, "Frequency correction:", Color::light_grey() },
{ { 6 * 8, 5 * 16 }, "PPM", Color::light_grey() },
{ { 2 * 8, 3 * 16 }, "Frequency correction:", Color::light_grey() },
{ { 6 * 8, 4 * 16 }, "PPM", Color::light_grey() },
};
Checkbox check_clkout {
{ 28, (6 * 16 - 4) },
4,
"Enable 10MHz CLKOUT"
};
Labels labels_bias {
@ -159,7 +165,7 @@ private:
};
NumberField field_ppm {
{ 2 * 8, 5 * 16 },
{ 2 * 8, 4 * 16 },
3,
{ -50, 50 },
1,