Enable fast preamble and change fast preamble length to 4ms

This commit is contained in:
jacob.eva 2024-10-16 16:08:16 +01:00
parent 7f493a33d3
commit 55c6bd06a2
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E
2 changed files with 5 additions and 5 deletions

View File

@ -2644,11 +2644,11 @@ void sx128x::updateBitrate() {
if (_csma_slot_ms < CSMA_SLOT_MIN_MS) { _csma_slot_ms = CSMA_SLOT_MIN_MS; } if (_csma_slot_ms < CSMA_SLOT_MIN_MS) { _csma_slot_ms = CSMA_SLOT_MIN_MS; }
float target_preamble_symbols; 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; target_preamble_symbols = (LORA_PREAMBLE_TARGET_MS/_lora_symbol_time_ms)-LORA_PREAMBLE_SYMBOLS_HW;
//} else { } else {
/*target_preamble_symbols = (LORA_PREAMBLE_FAST_TARGET_MS/_lora_symbol_time_ms)-LORA_PREAMBLE_SYMBOLS_HW; target_preamble_symbols = (LORA_PREAMBLE_FAST_TARGET_MS/_lora_symbol_time_ms)-LORA_PREAMBLE_SYMBOLS_HW;
}*/ }
if (target_preamble_symbols < LORA_PREAMBLE_SYMBOLS_MIN) { if (target_preamble_symbols < LORA_PREAMBLE_SYMBOLS_MIN) {
target_preamble_symbols = LORA_PREAMBLE_SYMBOLS_MIN; target_preamble_symbols = LORA_PREAMBLE_SYMBOLS_MIN;
} else { } else {

View File

@ -34,7 +34,7 @@
#define LORA_PREAMBLE_SYMBOLS_HW 4 #define LORA_PREAMBLE_SYMBOLS_HW 4
#define LORA_PREAMBLE_SYMBOLS_MIN 18 #define LORA_PREAMBLE_SYMBOLS_MIN 18
#define LORA_PREAMBLE_TARGET_MS 15 #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 LORA_FAST_BITRATE_THRESHOLD 40000
#define CSMA_SLOT_MAX_MS 100 #define CSMA_SLOT_MAX_MS 100
#define CSMA_SLOT_MIN_MS 24 #define CSMA_SLOT_MIN_MS 24