mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 14:59:24 -05:00
Merge pull request #60 from eried/scanner-update
Scanner features (#55) - Added freq description to scanner display.
This commit is contained in:
commit
0afc88ea7b
@ -81,6 +81,7 @@ void ScannerView::handle_retune(uint32_t i) {
|
||||
text_cycle.set( to_string_dec_uint(i) + "/" +
|
||||
to_string_dec_uint(frequency_list.size()) + " : " +
|
||||
to_string_dec_uint(frequency_list[i]) );
|
||||
desc_cycle.set( description_list[i] );
|
||||
}
|
||||
|
||||
void ScannerView::focus() {
|
||||
@ -109,6 +110,7 @@ ScannerView::ScannerView(
|
||||
&field_wait,
|
||||
//&record_view,
|
||||
&text_cycle,
|
||||
&desc_cycle,
|
||||
//&waterfall,
|
||||
});
|
||||
|
||||
@ -119,19 +121,27 @@ ScannerView::ScannerView(
|
||||
if (entry.type == RANGE) {
|
||||
for (uint32_t i=entry.frequency_a; i < entry.frequency_b; i+= 1000000) {
|
||||
frequency_list.push_back(i);
|
||||
description_list.push_back("RNG " + to_string_dec_uint(entry.frequency_a) + ">" + to_string_dec_uint(entry.frequency_b));
|
||||
}
|
||||
} else {
|
||||
frequency_list.push_back(entry.frequency_a);
|
||||
description_list.push_back(entry.description);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// DEBUG
|
||||
frequency_list.push_back(466025000);
|
||||
description_list.push_back("POCSAG-France");
|
||||
frequency_list.push_back(466050000);
|
||||
description_list.push_back("POCSAG-France");
|
||||
frequency_list.push_back(466075000);
|
||||
description_list.push_back("POCSAG-France");
|
||||
frequency_list.push_back(466175000);
|
||||
description_list.push_back("POCSAG-France");
|
||||
frequency_list.push_back(466206250);
|
||||
description_list.push_back("POCSAG-France");
|
||||
frequency_list.push_back(466231250);
|
||||
description_list.push_back("POCSAG-France");
|
||||
}
|
||||
|
||||
field_bw.set_selected_index(2);
|
||||
|
@ -66,6 +66,7 @@ private:
|
||||
void handle_retune(uint32_t i);
|
||||
|
||||
std::vector<rf::Frequency> frequency_list { };
|
||||
std::vector<string> description_list { };
|
||||
int32_t trigger { 0 };
|
||||
int32_t squelch { 0 };
|
||||
uint32_t timer { 0 };
|
||||
@ -136,6 +137,10 @@ private:
|
||||
{ 0, 5 * 16, 240, 16 },
|
||||
"--/--"
|
||||
};
|
||||
Text desc_cycle {
|
||||
{0, 6 * 16, 240, 16 },
|
||||
" "
|
||||
};
|
||||
|
||||
std::unique_ptr<ScannerThread> scan_thread { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user