Reduced rate can also occur without implicit_header

pull/77/head
Wilfried.Philips 2018-09-17 20:57:50 +02:00
rodzic 5b6dd4815b
commit ab2af8d6da
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -830,7 +830,7 @@ namespace gr {
//d_phy_crc = SM(decoded[1], 4, 0xf0) | MS(decoded[2], 0xf0, 4);
// Calculate number of payload symbols needed
uint8_t redundancy = (d_sf > 10 ? 2 : 0);
uint8_t redundancy = ((d_sf > 10 || d_reduced_rate) ? 2 : 0);
const int symbols_per_block = d_phdr.cr + 4u;
const float bits_needed = float(d_payload_length) * 8.0f;
const float symbols_needed = bits_needed * (symbols_per_block / 4.0f) / float(d_sf - redundancy);
@ -853,7 +853,7 @@ namespace gr {
d_payload_symbols = 0;
//d_demodulated.erase(d_demodulated.begin(), d_demodulated.begin() + 7u); // Test for SF 8 with header
d_payload_length = (int32_t)(d_demodulated.size() / 2);
} else if (demodulate(input, d_implicit && d_reduced_rate)) {
} else if (demodulate(input, d_implicit || d_reduced_rate)) {
if(!d_implicit)
d_payload_symbols -= (4u + d_phdr.cr);
}

Wyświetl plik

@ -297,7 +297,7 @@ namespace gr {
* \param is_header
* Whether the demodulated words were from the HDR.
*/
bool demodulate(const gr_complex *samples, const bool is_header);
bool demodulate(const gr_complex *samples, const bool reduced_rate);
/**
* \brief Deinterleave the raw demodulated words by reversing the interleave pattern.