Enable fast preamble and change fast preamble length to 4ms
This commit is contained in:
parent
7f493a33d3
commit
55c6bd06a2
@ -2644,11 +2644,11 @@ void sx128x::updateBitrate() {
|
||||
if (_csma_slot_ms < CSMA_SLOT_MIN_MS) { _csma_slot_ms = CSMA_SLOT_MIN_MS; }
|
||||
|
||||
float target_preamble_symbols;
|
||||
//if (_bitrate <= LORA_FAST_BITRATE_THRESHOLD) {
|
||||
if (_bitrate <= LORA_FAST_BITRATE_THRESHOLD) {
|
||||
target_preamble_symbols = (LORA_PREAMBLE_TARGET_MS/_lora_symbol_time_ms)-LORA_PREAMBLE_SYMBOLS_HW;
|
||||
//} else {
|
||||
/*target_preamble_symbols = (LORA_PREAMBLE_FAST_TARGET_MS/_lora_symbol_time_ms)-LORA_PREAMBLE_SYMBOLS_HW;
|
||||
}*/
|
||||
} else {
|
||||
target_preamble_symbols = (LORA_PREAMBLE_FAST_TARGET_MS/_lora_symbol_time_ms)-LORA_PREAMBLE_SYMBOLS_HW;
|
||||
}
|
||||
if (target_preamble_symbols < LORA_PREAMBLE_SYMBOLS_MIN) {
|
||||
target_preamble_symbols = LORA_PREAMBLE_SYMBOLS_MIN;
|
||||
} else {
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define LORA_PREAMBLE_SYMBOLS_HW 4
|
||||
#define LORA_PREAMBLE_SYMBOLS_MIN 18
|
||||
#define LORA_PREAMBLE_TARGET_MS 15
|
||||
#define LORA_PREAMBLE_FAST_TARGET_MS 1
|
||||
#define LORA_PREAMBLE_FAST_TARGET_MS 4
|
||||
#define LORA_FAST_BITRATE_THRESHOLD 40000
|
||||
#define CSMA_SLOT_MAX_MS 100
|
||||
#define CSMA_SLOT_MIN_MS 24
|
||||
|
Loading…
Reference in New Issue
Block a user