mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-14 04:04:34 +00:00
Fixed uninitialized / missing switch cases, unused
This commit is contained in:
parent
19ebf14e8c
commit
02d69e54eb
@ -172,7 +172,7 @@ void ScannerView::show_max() { //show total number of freqs to scan
|
|||||||
|
|
||||||
ScannerView::ScannerView(
|
ScannerView::ScannerView(
|
||||||
NavigationView& nav
|
NavigationView& nav
|
||||||
) : nav_ { nav }
|
) : nav_ { nav } , loaded_file_name { "SCANNER" }
|
||||||
{
|
{
|
||||||
add_children({
|
add_children({
|
||||||
&labels,
|
&labels,
|
||||||
@ -364,7 +364,7 @@ ScannerView::ScannerView(
|
|||||||
big_display.set(frequency_list[current_index]); //After showing an error
|
big_display.set(frequency_list[current_index]); //After showing an error
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
auto result = scanner_file.append(freq_file_path); //Second: append if it is not there
|
scanner_file.append(freq_file_path); //Second: append if it is not there
|
||||||
scanner_file.write_line(frequency_to_add + ",d=ADD FQ");
|
scanner_file.write_line(frequency_to_add + ",d=ADD FQ");
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@ -409,7 +409,12 @@ void ScannerView::frequency_file_load(std::string file_name, bool stop_all_befor
|
|||||||
case FM_2: def_step = 50000; break ;
|
case FM_2: def_step = 50000; break ;
|
||||||
case N_1: def_step = 25000; break ;
|
case N_1: def_step = 25000; break ;
|
||||||
case N_2: def_step = 250000; break ;
|
case N_2: def_step = 250000; break ;
|
||||||
case AIRBAND:def_step= 8330; break ;
|
case AIRBAND: def_step= 8330; break ;
|
||||||
|
case ERROR_STEP:
|
||||||
|
case STEP_DEF:
|
||||||
|
default:
|
||||||
|
def_step = step_mode.selected_index_value(); //Use def_step from manual selector
|
||||||
|
break ;
|
||||||
}
|
}
|
||||||
frequency_list.push_back(entry.frequency_a); //Store starting freq and description
|
frequency_list.push_back(entry.frequency_a); //Store starting freq and description
|
||||||
description_list.push_back("R" + to_string_short_freq(entry.frequency_a)
|
description_list.push_back("R" + to_string_short_freq(entry.frequency_a)
|
||||||
@ -435,7 +440,7 @@ void ScannerView::frequency_file_load(std::string file_name, bool stop_all_befor
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
loaded_file_name = 'SCANNER'; // back to the default frequency file
|
loaded_file_name = "SCANNER"; // back to the default frequency file
|
||||||
desc_cycle.set(" NO " + file_name + ".TXT FILE ..." );
|
desc_cycle.set(" NO " + file_name + ".TXT FILE ..." );
|
||||||
}
|
}
|
||||||
audio::output::stop();
|
audio::output::stop();
|
||||||
@ -504,7 +509,9 @@ size_t ScannerView::change_mode(uint8_t new_mod) { //Before this, do a scan_thre
|
|||||||
using option_t = std::pair<std::string, int32_t>;
|
using option_t = std::pair<std::string, int32_t>;
|
||||||
using options_t = std::vector<option_t>;
|
using options_t = std::vector<option_t>;
|
||||||
options_t bw;
|
options_t bw;
|
||||||
field_bw.on_change = [this](size_t n, OptionsField::value_t) { };
|
field_bw.on_change = [this](size_t n, OptionsField::value_t) {
|
||||||
|
(void)n; //avoid unused warning
|
||||||
|
};
|
||||||
|
|
||||||
switch (new_mod) {
|
switch (new_mod) {
|
||||||
case NFM: //bw 16k (2) default
|
case NFM: //bw 16k (2) default
|
||||||
@ -556,4 +563,4 @@ void ScannerView::start_scan_thread() {
|
|||||||
scan_thread = std::make_unique<ScannerThread>(frequency_list);
|
scan_thread = std::make_unique<ScannerThread>(frequency_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace ui */
|
} /* namespace ui */
|
||||||
|
Loading…
Reference in New Issue
Block a user