mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 09:42:35 +00:00
Fix MQTT on ETH
This commit is contained in:
parent
a5d1165c54
commit
4ccb4393c5
@ -37,7 +37,7 @@
|
|||||||
#include "nimble/NimbleBluetooth.h"
|
#include "nimble/NimbleBluetooth.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_WIFI || defined(ARCH_PORTDUINO)
|
#if HAS_WIFI
|
||||||
#include "mesh/wifi/WiFiServerAPI.h"
|
#include "mesh/wifi/WiFiServerAPI.h"
|
||||||
#include "mqtt/MQTT.h"
|
#include "mqtt/MQTT.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,7 +11,7 @@ extern "C" {
|
|||||||
#include "mesh/compression/unishox2.h"
|
#include "mesh/compression/unishox2.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_WIFI
|
#if HAS_WIFI || HAS_ETHERNET
|
||||||
#include "mqtt/MQTT.h"
|
#include "mqtt/MQTT.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ ErrorCode Router::send(MeshPacket *p)
|
|||||||
if (p->which_payload_variant == MeshPacket_decoded_tag) {
|
if (p->which_payload_variant == MeshPacket_decoded_tag) {
|
||||||
ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it
|
ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it
|
||||||
|
|
||||||
#if HAS_WIFI
|
#if HAS_WIFI || HAS_ETHERNET
|
||||||
// check if we should send decrypted packets to mqtt
|
// check if we should send decrypted packets to mqtt
|
||||||
|
|
||||||
// truth table:
|
// truth table:
|
||||||
@ -240,7 +240,7 @@ ErrorCode Router::send(MeshPacket *p)
|
|||||||
return encodeResult; // FIXME - this isn't a valid ErrorCode
|
return encodeResult; // FIXME - this isn't a valid ErrorCode
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_WIFI
|
#if HAS_WIFI || HAS_ETHERNET
|
||||||
// the packet is now encrypted.
|
// the packet is now encrypted.
|
||||||
// check if we should send encrypted packets to mqtt
|
// check if we should send encrypted packets to mqtt
|
||||||
if (mqtt && shouldActuallyEncrypt)
|
if (mqtt && shouldActuallyEncrypt)
|
||||||
|
Loading…
Reference in New Issue
Block a user