mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2025-05-03 07:04:54 -04:00
T3S3 SX1280 support
This commit is contained in:
parent
315bcb02a0
commit
6bf06ca94e
3 changed files with 25 additions and 8 deletions
16
Utilities.h
16
Utilities.h
|
@ -1095,11 +1095,17 @@ void updateBitrate() {
|
|||
if (csma_slot_ms > CSMA_SLOT_MAX_MS) { csma_slot_ms = CSMA_SLOT_MAX_MS; }
|
||||
if (csma_slot_ms < CSMA_SLOT_MIN_MS) { csma_slot_ms = CSMA_SLOT_MIN_MS; }
|
||||
float target_preamble_symbols = (LORA_PREAMBLE_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 {
|
||||
target_preamble_symbols = ceil(target_preamble_symbols);
|
||||
}
|
||||
|
||||
#if MODEM == SX1280
|
||||
target_preamble_symbols = 12;
|
||||
#else
|
||||
if (target_preamble_symbols < LORA_PREAMBLE_SYMBOLS_MIN) {
|
||||
target_preamble_symbols = LORA_PREAMBLE_SYMBOLS_MIN;
|
||||
} else {
|
||||
target_preamble_symbols = ceil(target_preamble_symbols);
|
||||
}
|
||||
#endif
|
||||
|
||||
lora_preamble_symbols = (long)target_preamble_symbols;
|
||||
setPreamble();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue