add lora send bypass for debugging

This commit is contained in:
2026-02-01 19:34:28 +01:00
parent 7f31b9dd95
commit 13b4025443
2 changed files with 4 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ constexpr uint32_t WATCHDOG_TIMEOUT_SEC = 120;
constexpr bool ENABLE_HA_DISCOVERY = true; constexpr bool ENABLE_HA_DISCOVERY = true;
constexpr bool SERIAL_DEBUG_MODE = true; constexpr bool SERIAL_DEBUG_MODE = true;
constexpr bool SERIAL_DEBUG_DUMP_JSON = true; constexpr bool SERIAL_DEBUG_DUMP_JSON = true;
constexpr bool LORA_SEND_BYPASS = false;
constexpr uint8_t NUM_SENDERS = 1; constexpr uint8_t NUM_SENDERS = 1;
inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = { inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = {

View File

@@ -30,6 +30,9 @@ void lora_init() {
} }
bool lora_send(const LoraPacket &pkt) { bool lora_send(const LoraPacket &pkt) {
if (LORA_SEND_BYPASS) {
return true;
}
uint8_t buffer[5 + LORA_MAX_PAYLOAD + 2]; uint8_t buffer[5 + LORA_MAX_PAYLOAD + 2];
size_t idx = 0; size_t idx = 0;
buffer[idx++] = pkt.protocol_version; buffer[idx++] = pkt.protocol_version;