Merge branch 'clkout_enable' of https://github.com/dqs105/portapack-mayhem into upstream

This commit is contained in:
dqs105 2020-10-14 20:15:36 +08:00
commit 48ccc1e988
8 changed files with 74 additions and 10 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,