Try to decode mqtt packets first (#1705)

* Try to decode first

* Remove GPS pins from TLoRAv1 so that it can boot

* Use release version of radio lib

* Use fixed versions of esp framework and tool chain
raytac-diy
Ben Meadors 2022-09-25 09:39:50 -05:00 zatwierdzone przez GitHub
rodzic de769db3bc
commit ae311c838e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 4 dodań i 6 usunięć

Wyświetl plik

@ -1,12 +1,13 @@
; Common settings for ESP targes, mixin with extends = esp32_base
[esp32_base]
extends = arduino_base
platform = espressif32
platform = espressif32@5.1.1
build_src_filter =
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040>
upload_speed = 921600
debug_init_break = tbreak setup
monitor_filters = esp32_exception_decoder
platform_packages = platformio/tool-esptoolpy@^1.40201.0
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h

Wyświetl plik

@ -65,7 +65,7 @@ framework = arduino
lib_deps =
${env.lib_deps}
; Portduino is using meshtastic fork for now
https://github.com/jgromes/RadioLib.git
https://github.com/jgromes/RadioLib.git@5.3.0
build_flags = ${env.build_flags} -Os
# -DRADIOLIB_GODMODE

Wyświetl plik

@ -27,8 +27,7 @@ void MQTT::onPublish(char *topic, byte *payload, unsigned int length)
{
// parsing ServiceEnvelope
ServiceEnvelope e = ServiceEnvelope_init_default;
if (moduleConfig.mqtt.json_enabled && !pb_decode_from_bytes(payload, length, ServiceEnvelope_fields, &e)) {
if (!pb_decode_from_bytes(payload, length, ServiceEnvelope_fields, &e) && moduleConfig.mqtt.json_enabled) {
// check if this is a json payload message
using namespace json11;
char payloadStr[length + 1];

Wyświetl plik

@ -1,7 +1,5 @@
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define GPS_RX_PIN 36
#define GPS_TX_PIN 37
#define I2C_SDA 4 // I2C pins for this board
#define I2C_SCL 15