mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-13 12:12:16 -04:00
View::add_children: Use std::list_initializer as argument.
Improvement in code size -- 944 bytes. Some day I will understand C++11 well enough to do the right thing the first time.
This commit is contained in:
parent
298324d6e4
commit
8a69b0523e
16 changed files with 57 additions and 55 deletions
|
@ -51,7 +51,7 @@ SetDateTimeView::SetDateTimeView(
|
|||
nav.pop();
|
||||
},
|
||||
|
||||
add_children({ {
|
||||
add_children({
|
||||
&text_title,
|
||||
&field_year,
|
||||
&text_slash1,
|
||||
|
@ -66,7 +66,7 @@ SetDateTimeView::SetDateTimeView(
|
|||
&text_format,
|
||||
&button_ok,
|
||||
&button_cancel,
|
||||
} });
|
||||
});
|
||||
|
||||
rtc::RTC datetime;
|
||||
rtcGetTime(&RTCD1, &datetime);
|
||||
|
@ -119,13 +119,13 @@ SetFrequencyCorrectionView::SetFrequencyCorrectionView(
|
|||
nav.pop();
|
||||
},
|
||||
|
||||
add_children({ {
|
||||
add_children({
|
||||
&text_title,
|
||||
&field_ppm,
|
||||
&text_ppm,
|
||||
&button_ok,
|
||||
&button_cancel,
|
||||
} });
|
||||
});
|
||||
|
||||
SetFrequencyCorrectionModel model {
|
||||
static_cast<int8_t>(portapack::persistent_memory::correction_ppb() / 1000)
|
||||
|
@ -149,7 +149,7 @@ SetFrequencyCorrectionModel SetFrequencyCorrectionView::form_collect() {
|
|||
}
|
||||
|
||||
AntennaBiasSetupView::AntennaBiasSetupView(NavigationView& nav) {
|
||||
add_children({ {
|
||||
add_children({
|
||||
&text_title,
|
||||
&text_description_1,
|
||||
&text_description_2,
|
||||
|
@ -157,7 +157,7 @@ AntennaBiasSetupView::AntennaBiasSetupView(NavigationView& nav) {
|
|||
&text_description_4,
|
||||
&options_bias,
|
||||
&button_done,
|
||||
} });
|
||||
});
|
||||
|
||||
options_bias.set_by_value(receiver_model.antenna_bias() ? 1 : 0);
|
||||
options_bias.on_change = [this](size_t, OptionsField::value_t v) {
|
||||
|
@ -172,13 +172,13 @@ void AntennaBiasSetupView::focus() {
|
|||
}
|
||||
|
||||
AboutView::AboutView(NavigationView& nav) {
|
||||
add_children({ {
|
||||
add_children({
|
||||
&text_title,
|
||||
&text_firmware,
|
||||
&text_cpld_hackrf,
|
||||
&text_cpld_hackrf_status,
|
||||
&button_ok,
|
||||
} });
|
||||
});
|
||||
|
||||
button_ok.on_select = [&nav](Button&){ nav.pop(); };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue