T3S3 SX1280 support

This commit is contained in:
Mark Qvist 2025-01-03 19:16:19 +01:00
parent 315bcb02a0
commit 6bf06ca94e
3 changed files with 25 additions and 8 deletions

View File

@ -46,7 +46,7 @@
#define MODEL_A5 0xA5 // RNode v2.2, 433 MHz with SX1278
#define MODEL_A6 0xA6 // RNode v2.2, 868 MHz with SX1262
#define MODEL_AA 0xAA // RNode v2.2, 868 MHz with SX1276
#define MODEL_AB 0xAB // RNode v2.2, 2.4 GHz with SX1280
#define MODEL_AC 0xAC // RNode v2.2, 2.4 GHz with SX1280 and PA
#define PRODUCT_TBEAM 0xE0 // T-Beam devices
#define BOARD_TBEAM 0x33
@ -417,7 +417,7 @@
#elif BOARD_MODEL == BOARD_RNODE_NG_22
#define IS_ESP32S3 true
#define HAS_DISPLAY true
#define HAS_CONSOLE false
#define HAS_CONSOLE true
#define HAS_BLUETOOTH false
#define HAS_BLE true
#define HAS_PMU true
@ -445,11 +445,16 @@
const int pin_dio = 33;
const int pin_tcxo_enable = -1;
#elif MODEM == SX1280
#define DIO2_AS_RF_SWITCH true
#define DIO2_AS_RF_SWITCH false
#define HAS_BUSY true
#define HAS_TCXO true
#define HAS_PA true
const int pa_max_input = 3;
#define HAS_RF_SWITCH_RX_TX false
const int pin_rxen = 21;
const int pin_txen = 10;
const int pin_busy = 36;
const int pin_dio = 9;
const int pin_tcxo_enable = -1;

View File

@ -769,6 +769,12 @@ void serialCallback(uint8_t sbyte) {
int txp = sbyte;
#if MODEM == SX1262
if (txp > 22) txp = 22;
#elif MODEM == SX1280
#if HAS_PA
if (txp > 20) txp = 20;
#else
if (txp > 13) txp = 13;
#endif
#else
if (txp > 17) txp = 17;
#endif

View File

@ -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 {