Merge branch 'develop' into t-beam-bpf

This commit is contained in:
Austin
2026-06-01 16:17:58 -04:00
committed by GitHub
7 changed files with 98 additions and 1 deletions

View File

@@ -339,6 +339,9 @@ meshtastic_MeshPacket *PositionModule::allocAtakPli()
strncpy(takPacket.device_callsign, owner.long_name, sizeof(takPacket.device_callsign) - 1);
takPacket.device_callsign[sizeof(takPacket.device_callsign) - 1] = '\0';
// CoT uid — ATAK drops PLI entities with empty uid; derive stable "!<nodenum>" id.
snprintf(takPacket.uid, sizeof(takPacket.uid), "!%08x", nodeDB->getNodeNum());
// Encode TAKPacketV2 protobuf, leaving room for flags byte prefix
uint8_t protobuf_bytes[sizeof(mp->decoded.payload.bytes) - 1];
size_t proto_size = pb_encode_to_bytes(protobuf_bytes, sizeof(protobuf_bytes), &meshtastic_TAKPacketV2_msg, &takPacket);

View File

@@ -862,7 +862,7 @@ void NimbleBluetooth::setupService()
/// Given a level between 0-100, update the BLE attribute
void updateBatteryLevel(uint8_t level)
{
if ((config.bluetooth.enabled == true) && nimbleBluetooth->isConnected()) {
if ((config.bluetooth.enabled == true) && nimbleBluetooth && nimbleBluetooth->isConnected()) {
BatteryCharacteristic->setValue(&level, 1);
BatteryCharacteristic->notify();
}

View File

@@ -0,0 +1,16 @@
[env:seeed_xiao_rp2040]
extends = rp2040_base
board = seeed_xiao_rp2040
board_level = pr
upload_protocol = picotool
# add our variants files to the include and src paths
build_src_filter = ${rp2040_base.build_src_filter} +<../variants/rp2040/seeed_xiao_rp2040/>
build_flags =
${rp2040_base.build_flags}
-D PRIVATE_HW
-D SEEED_XIAO_RP2040
-I variants/rp2040/seeed_xiao_rp2040
-D DEBUG_RP2040_PORT=Serial
;-D HW_SPI1_DEVICE
debug_build_flags = ${rp2040_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@@ -0,0 +1,10 @@
#include <Arduino.h>
// Turn off the green and blue LEDs, which are on by default.
void initVariant()
{
pinMode(PIN_LED_G, OUTPUT);
pinMode(PIN_LED_B, OUTPUT);
digitalWrite(PIN_LED_G, HIGH);
digitalWrite(PIN_LED_B, HIGH);
}

View File

@@ -0,0 +1,27 @@
#define ARDUINO_ARCH_AVR
// #define BUTTON_PIN -1
#define LED_POWER PIN_LED_R
// active low RGB led
#define LED_POWER_ON 0
// no ADC by default
#define BATTERY_PIN -1
// ratio of voltage divider = 3.0 (R1=200k, R2=100k)
#define ADC_MULTIPLIER 3
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
#define USE_SX1262
#define LORA_SCK 2
#define LORA_MISO 4
#define LORA_MOSI 3
#define SX126X_CS 6
#define SX126X_DIO1 27
#define SX126X_BUSY 29
#define SX126X_RESET 28
#define SX126X_RXEN 7
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8

View File

@@ -0,0 +1,15 @@
[env:seeed_xiao_rp2350]
extends = rp2350_base
board = seeed_xiao_rp2350
board_level = pr
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags =
${rp2350_base.build_flags}
-D PRIVATE_HW
-I variants/rp2350/seeed_xiao_rp2350
-D DEBUG_RP2040_PORT=Serial
;-D HW_SPI1_DEVICE
debug_build_flags = ${rp2350_base.build_flags}, -g
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@@ -0,0 +1,26 @@
#define ARDUINO_ARCH_AVR
// #define BUTTON_PIN -1
#define LED_POWER PIN_LED
// no ADC by default
#define BATTERY_PIN -1
// ratio of voltage divider = 3.0 (R1=200k, R2=100k)
#define ADC_MULTIPLIER 3
// ADC_RESOLUTION is missing upstream, hardcode it here.
#define BATTERY_SENSE_RESOLUTION_BITS 12
#define USE_SX1262
#define LORA_SCK 2
#define LORA_MISO 4
#define LORA_MOSI 3
#define SX126X_CS 6
#define SX126X_DIO1 27
#define SX126X_BUSY 5
#define SX126X_RESET 28
#define SX126X_RXEN 7
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8