This commit is contained in:
Jonathan Bennett
2026-01-08 12:07:14 -06:00
parent 5fab45c133
commit 792e930e45
5 changed files with 51 additions and 61 deletions
+35 -46
View File
@@ -1,50 +1,39 @@
{ {
"build": { "build": {
"arduino": { "arduino": {
"ldscript": "esp32s3_out.ld", "ldscript": "esp32s3_out.ld",
"memory_type": "qio_opi" "memory_type": "qio_opi"
},
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DLILYGO_TBEAM_1W",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"psram_type": "opi",
"hwids": [
[
"0x303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "t-beam-1w"
}, },
"connectivity": [ "core": "esp32",
"wifi", "extra_flags": [
"bluetooth", "-DBOARD_HAS_PSRAM",
"lora" "-DLILYGO_TBEAM_1W",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
], ],
"debug": { "f_cpu": "240000000L",
"openocd_target": "esp32s3.cfg" "f_flash": "80000000L",
}, "flash_mode": "qio",
"frameworks": [ "psram_type": "opi",
"arduino" "hwids": [["0x303A", "0x1001"]],
], "mcu": "esp32s3",
"name": "LilyGo TBeam-1W", "variant": "t-beam-1w"
"upload": { },
"flash_size": "16MB", "connectivity": ["wifi", "bluetooth", "lora"],
"maximum_ram_size": 327680, "debug": {
"maximum_size": 16777216, "openocd_target": "esp32s3.cfg"
"require_upload_port": true, },
"speed": 921600 "frameworks": ["arduino"],
}, "name": "LilyGo TBeam-1W",
"url": "http://www.lilygo.cn/", "upload": {
"vendor": "LilyGo" "flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 921600
},
"url": "http://www.lilygo.cn/",
"vendor": "LilyGo"
} }
+3 -2
View File
@@ -246,8 +246,9 @@ uint32_t RadioInterface::getPacketTime(const meshtastic_MeshPacket *p, bool rece
/** The delay to use for retransmitting dropped packets */ /** The delay to use for retransmitting dropped packets */
uint32_t RadioInterface::getRetransmissionMsec(const meshtastic_MeshPacket *p) uint32_t RadioInterface::getRetransmissionMsec(const meshtastic_MeshPacket *p)
{ {
size_t numbytes =p->which_payload_variant == meshtastic_MeshPacket_decoded_tag ? size_t numbytes = p->which_payload_variant == meshtastic_MeshPacket_decoded_tag
pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_Data_msg, &p->decoded) : p->encrypted.size+MESHTASTIC_HEADER_LENGTH; ? pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_Data_msg, &p->decoded)
: p->encrypted.size + MESHTASTIC_HEADER_LENGTH;
uint32_t packetAirtime = getPacketTime(numbytes + sizeof(PacketHeader)); uint32_t packetAirtime = getPacketTime(numbytes + sizeof(PacketHeader));
// Make sure enough time has elapsed for this packet to be sent and an ACK is received. // Make sure enough time has elapsed for this packet to be sent and an ACK is received.
// LOG_DEBUG("Waiting for flooding message with airtime %d and slotTime is %d", packetAirtime, slotTimeMsec); // LOG_DEBUG("Waiting for flooding message with airtime %d and slotTime is %d", packetAirtime, slotTimeMsec);
+3 -3
View File
@@ -389,9 +389,9 @@ template <typename T> bool SX126xInterface<T>::sleep()
template <typename T> void SX126xInterface<T>::setTransmitEnable(bool txon) template <typename T> void SX126xInterface<T>::setTransmitEnable(bool txon)
{ {
#if defined(USE_GC1109_PA) #if defined(USE_GC1109_PA)
digitalWrite(LORA_PA_POWER, HIGH); // Ensure LDO is on digitalWrite(LORA_PA_POWER, HIGH); // Ensure LDO is on
digitalWrite(LORA_PA_EN, HIGH); // CSD=1: Chip enabled digitalWrite(LORA_PA_EN, HIGH); // CSD=1: Chip enabled
digitalWrite(LORA_PA_TX_EN, txon ? 1 : 0); // CPS: 1=full PA, 0=bypass (for RX, CPS is don't care) digitalWrite(LORA_PA_TX_EN, txon ? 1 : 0); // CPS: 1=full PA, 0=bypass (for RX, CPS is don't care)
#endif #endif
} }
+1 -1
View File
@@ -14,7 +14,7 @@ static const uint8_t SDA = 8;
static const uint8_t SCL = 9; static const uint8_t SCL = 9;
// Default SPI mapped to Radio/SD // Default SPI mapped to Radio/SD
static const uint8_t SS = 15; // LoRa CS static const uint8_t SS = 15; // LoRa CS
static const uint8_t MOSI = 11; static const uint8_t MOSI = 11;
static const uint8_t MISO = 12; static const uint8_t MISO = 12;
static const uint8_t SCK = 13; static const uint8_t SCK = 13;
+5 -5
View File
@@ -9,13 +9,13 @@
#define GPS_RX_PIN 5 #define GPS_RX_PIN 5
#define GPS_TX_PIN 6 #define GPS_TX_PIN 6
#define GPS_1PPS_PIN 7 #define GPS_1PPS_PIN 7
#define GPS_WAKEUP_PIN 16 // GPS_EN_PIN in LilyGO code #define GPS_WAKEUP_PIN 16 // GPS_EN_PIN in LilyGO code
#define HAS_GPS 1 #define HAS_GPS 1
#define GPS_BAUDRATE 9600 #define GPS_BAUDRATE 9600
// Buttons // Buttons
#define BUTTON_PIN 0 // BUTTON 1 #define BUTTON_PIN 0 // BUTTON 1
#define BUTTON_PIN_ALT 17 // BUTTON 2 #define BUTTON_PIN_ALT 17 // BUTTON 2
// SPI (shared by LoRa and SD) // SPI (shared by LoRa and SD)
#define SPI_MOSI 11 #define SPI_MOSI 11
@@ -58,7 +58,7 @@
// Truth table: DIO2=1,CTRL=0 → TX (PA on, LNA off) // Truth table: DIO2=1,CTRL=0 → TX (PA on, LNA off)
// DIO2=0,CTRL=1 → RX (PA off, LNA on) // DIO2=0,CTRL=1 → RX (PA off, LNA on)
#define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_RXEN 21 // LNA enable - HIGH during RX #define SX126X_RXEN 21 // LNA enable - HIGH during RX
// TCXO voltage - required for radio init // TCXO voltage - required for radio init
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 #define SX126X_DIO3_TCXO_VOLTAGE 1.8
@@ -68,7 +68,7 @@
// LED // LED
#define LED_PIN 18 #define LED_PIN 18
#define LED_STATE_ON 1 // HIGH = ON #define LED_STATE_ON 1 // HIGH = ON
// Battery ADC // Battery ADC
#define BATTERY_PIN 4 #define BATTERY_PIN 4