mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
Pocsag improvements (#20)
* Update analog_audio_app.cpp (#353) * Adding phase field (extracted from @jamesshao8 repo)
This commit is contained in:
parent
3e15baa251
commit
4aaac8545b
9 changed files with 51 additions and 11 deletions
|
@ -71,6 +71,7 @@ bool POCSAGTXView::start_tx() {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
MessageType phase = (MessageType)options_phase.selected_index_value();
|
||||
|
||||
pocsag_encode(type, BCH_code, options_function.selected_index_value(), message, address, codewords);
|
||||
|
||||
|
@ -79,6 +80,9 @@ bool POCSAGTXView::start_tx() {
|
|||
progressbar.set_max(total_frames);
|
||||
|
||||
transmitter_model.set_sampling_rate(2280000);
|
||||
transmitter_model.set_rf_amp(true);
|
||||
transmitter_model.set_lna(40);
|
||||
transmitter_model.set_vga(40);
|
||||
transmitter_model.set_baseband_bandwidth(1750000);
|
||||
transmitter_model.enable();
|
||||
|
||||
|
@ -86,7 +90,11 @@ bool POCSAGTXView::start_tx() {
|
|||
|
||||
bi = 0;
|
||||
for (i = 0; i < codewords.size(); i++) {
|
||||
if (phase == 0)
|
||||
codeword = ~(codewords[i]);
|
||||
else
|
||||
codeword = codewords[i];
|
||||
|
||||
data_ptr[bi++] = (codeword >> 24) & 0xFF;
|
||||
data_ptr[bi++] = (codeword >> 16) & 0xFF;
|
||||
data_ptr[bi++] = (codeword >> 8) & 0xFF;
|
||||
|
@ -126,6 +134,7 @@ POCSAGTXView::POCSAGTXView(
|
|||
&field_address,
|
||||
&options_type,
|
||||
&options_function,
|
||||
&options_phase,
|
||||
&text_message,
|
||||
&button_message,
|
||||
&progressbar,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue