edit getTimeOnAir to support implicit mode

pull/103/head
Callan Bryant 2020-01-10 14:31:21 +00:00
rodzic 8d2c98339f
commit a4e087daf5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: C31FA9DF3ACBFFAA
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1168,7 +1168,7 @@ uint32_t SX126x::getTimeOnAir(size_t len) {
sfDivisor = 4*(_sf - 2);
}
const int8_t bitsPerCrc = 16;
const int8_t N_symbol_header = 20;
const int8_t N_symbol_header = _headerType == SX126X_LORA_HEADER_EXPLICIT ? 20 : 0;
// numerator of equation in section 6.1.4 of SX1268 datasheet v1.1 (might not actually be bitcount, but it has len * 8)
int16_t bitCount = (int16_t) 8 * len + _crcType * bitsPerCrc - 4 * _sf + sfCoeff2 + N_symbol_header;