AFSK RX works (only Bell202 for now)

AFSK RX always logs to file
Removed frequency and bw settings from modem setup view
Updated binary
Bugfix: Binary display shifted one bit
Bugfix: Frequency manager views freezing if SD card not present
Bugfix: Menuview blinking arrow not showing up at the right position
Bugfix: Freeze if console written to while it's hidden
Broken: LCR TX, needs UI update
This commit is contained in:
furrtek 2017-09-02 08:28:29 +01:00
parent 42439d1885
commit 950bc2b1d2
29 changed files with 428 additions and 206 deletions

View file

@ -79,4 +79,41 @@ void generate_data(const std::string& in_message, uint16_t * out_data) {
out_data[bytes] = 0; // End marker
}
// This accepts a word with start and stop bits removed !
uint32_t deframe_word(uint32_t raw_word) {
serial_format_t serial_format;
uint32_t parity, cur_bit, deframed_word { 0 };
size_t bit, bits;
serial_format = persistent_memory::serial_format();
/*if (serial_format.parity == ODD)
parity = 1;
else
parity = 0;*/
bits = serial_format.data_bits;
// Ignore parity for now
if (serial_format.parity)
raw_word >>= 1;
if (serial_format.bit_order == LSB_FIRST) {
// Reverse data bits
for (bit = 0; bit < bits; bit++) {
cur_bit = raw_word & 1;
deframed_word <<= 1;
deframed_word |= cur_bit;
//parity += cur_bit;
raw_word >>= 1;
}
return deframed_word;
} else
return raw_word;
}
} /* namespace modems */