mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-28 11:12:26 -04:00
Transmitter config widget
Frequency manager duplicate alert Tone sets
This commit is contained in:
parent
0642d633c3
commit
688a012443
29 changed files with 759 additions and 203 deletions
|
@ -43,10 +43,13 @@ void FrequencySaveView::on_save_timestamp(NavigationView& nav) {
|
|||
}
|
||||
|
||||
void FrequencySaveView::focus() {
|
||||
if (error == ERROR_ACCESS)
|
||||
if (error == ERROR_ACCESS) {
|
||||
nav_.display_modal("Error", "File acces error", ABORT, nullptr);
|
||||
else
|
||||
} else {
|
||||
if (error == ERROR_DUPLICATE)
|
||||
nav_.display_modal("Error", "Frequency already saved", INFO, nullptr);
|
||||
button_save_timestamp.focus();
|
||||
}
|
||||
}
|
||||
|
||||
void FrequencySaveView::on_tick_second() {
|
||||
|
@ -68,6 +71,7 @@ FrequencySaveView::FrequencySaveView(
|
|||
value_ (value)
|
||||
{
|
||||
File freqs_file;
|
||||
size_t n;
|
||||
|
||||
if (!load_freqman_file(frequencies)) {
|
||||
if (!create_freqman_file(freqs_file)) {
|
||||
|
@ -76,6 +80,13 @@ FrequencySaveView::FrequencySaveView(
|
|||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < frequencies.size(); n++) {
|
||||
if (frequencies[n].value == value_) {
|
||||
error = ERROR_DUPLICATE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
signal_token_tick_second = rtc_time::signal_tick_second += [this]() {
|
||||
this->on_tick_second();
|
||||
};
|
||||
|
@ -223,6 +234,7 @@ FreqManView::FreqManView(
|
|||
|
||||
add_children({
|
||||
&menu_view,
|
||||
&text_edit,
|
||||
&button_edit_freq,
|
||||
&button_edit_desc,
|
||||
&button_del,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue