mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 07:19:34 -05:00
Removed unused items from the UI
Removed unused items from the UI
This commit is contained in:
parent
ab364ca497
commit
62f063aef5
@ -34,7 +34,7 @@ using namespace pocsag;
|
||||
|
||||
void POCSAGLogger::log_raw_data(const pocsag::POCSAGPacket& packet, const uint32_t frequency) {
|
||||
std::string entry = "Raw: F:" + to_string_dec_uint(frequency) + "Hz " +
|
||||
pocsag::bitrate_str(packet.bitrate()) + " Codewords:";
|
||||
to_string_dec_uint(packet.bitrate()) + " Codewords:";
|
||||
|
||||
// Raw hex dump of all the codewords
|
||||
for (size_t c = 0; c < 16; c++)
|
||||
@ -70,8 +70,6 @@ POCSAGAppView::POCSAGAppView(NavigationView& nav) {
|
||||
&field_lna,
|
||||
&field_vga,
|
||||
&field_frequency,
|
||||
&options_bitrate,
|
||||
&options_phase,
|
||||
&check_log,
|
||||
&field_volume,
|
||||
&check_ignore,
|
||||
@ -102,15 +100,6 @@ POCSAGAppView::POCSAGAppView(NavigationView& nav) {
|
||||
logging = v;
|
||||
};
|
||||
|
||||
options_bitrate.on_change = [this](size_t, OptionsField::value_t v) {
|
||||
on_config_changed(v, options_phase.selected_index_value());
|
||||
};
|
||||
options_bitrate.set_selected_index(1); // 1200bps
|
||||
|
||||
options_phase.on_change = [this](size_t, OptionsField::value_t v) {
|
||||
on_config_changed(options_bitrate.selected_index_value(),v);
|
||||
};
|
||||
|
||||
field_volume.set_value((receiver_model.headphone_volume() - audio::headphone::volume_range().max).decibel() + 99);
|
||||
field_volume.on_change = [this](int32_t v) {
|
||||
this->on_headphone_volume_changed(v);
|
||||
@ -182,9 +171,10 @@ void POCSAGAppView::on_packet(const POCSAGPacketMessage * message) {
|
||||
|
||||
|
||||
std::string console_info;
|
||||
|
||||
const uint32_t roundVal = 50;
|
||||
const uint32_t bitrate = roundVal * ((message->packet.bitrate() + (roundVal/2))/roundVal);
|
||||
console_info = "\n" + to_string_datetime(message->packet.timestamp(), HM);
|
||||
console_info += " " + pocsag::bitrate_str(message->packet.bitrate());
|
||||
console_info += " " + to_string_dec_uint(bitrate);
|
||||
console_info += " ADDR:" + to_string_dec_uint(pocsag_state.address);
|
||||
console_info += " F" + to_string_dec_uint(pocsag_state.function);
|
||||
|
||||
|
@ -105,7 +105,7 @@ private:
|
||||
}
|
||||
};
|
||||
Checkbox check_log {
|
||||
{ 22 * 8, 21 },
|
||||
{ 24 * 8, 21 },
|
||||
3,
|
||||
"LOG",
|
||||
true
|
||||
@ -119,19 +119,19 @@ private:
|
||||
};
|
||||
|
||||
Checkbox check_ignore {
|
||||
{ 1 * 8, 40 },
|
||||
15,
|
||||
"Ignore address:",
|
||||
{ 1 * 8, 21 },
|
||||
12,
|
||||
"Ignore addr:",
|
||||
true
|
||||
};
|
||||
SymField sym_ignore {
|
||||
{ 19 * 8, 40 },
|
||||
{ 16 * 8, 21 },
|
||||
7,
|
||||
SymField::SYMFIELD_DEC
|
||||
};
|
||||
|
||||
Console console {
|
||||
{ 0, 4 * 16, 240, 240 }
|
||||
{ 0, 3 * 16, 240, 256 }
|
||||
};
|
||||
|
||||
std::unique_ptr<POCSAGLogger> logger { };
|
||||
|
@ -63,11 +63,11 @@ public:
|
||||
return (index < 16) ? codewords[index] : 0;
|
||||
}
|
||||
|
||||
void set_bitrate(const BitRate bitrate) {
|
||||
void set_bitrate(const uint16_t bitrate) {
|
||||
bitrate_ = bitrate;
|
||||
}
|
||||
|
||||
BitRate bitrate() const {
|
||||
uint16_t bitrate() const {
|
||||
return bitrate_;
|
||||
}
|
||||
|
||||
@ -81,12 +81,12 @@ public:
|
||||
|
||||
void clear() {
|
||||
codewords.fill(0);
|
||||
bitrate_ = UNKNOWN;
|
||||
bitrate_ = 0u;
|
||||
flag_ = NORMAL;
|
||||
}
|
||||
|
||||
private:
|
||||
BitRate bitrate_ { UNKNOWN };
|
||||
uint16_t bitrate_ { 0 };
|
||||
PacketFlag flag_ { NORMAL };
|
||||
std::array <uint32_t, 16> codewords { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
|
||||
Timestamp timestamp_ { };
|
||||
|
Loading…
Reference in New Issue
Block a user