fix build for !wifi devices

This commit is contained in:
Kevin Hester 2021-04-05 13:00:56 +08:00
parent 65914fad07
commit 7abc3534c4

View File

@ -6,9 +6,12 @@
#include "configuration.h" #include "configuration.h"
#include "main.h" #include "main.h"
#include "mesh-pb-constants.h" #include "mesh-pb-constants.h"
#include "mqtt/MQTT.h"
#include "plugins/RoutingPlugin.h" #include "plugins/RoutingPlugin.h"
#if defined(HAS_WIFI) || defined(PORTDUINO)
#include "mqtt/MQTT.h"
#endif
/** /**
* Router todo * Router todo
* *
@ -209,8 +212,10 @@ ErrorCode Router::send(MeshPacket *p)
return encodeResult; // FIXME - this isn't a valid ErrorCode return encodeResult; // FIXME - this isn't a valid ErrorCode
} }
#if defined(HAS_WIFI) || defined(PORTDUINO)
if (mqtt) if (mqtt)
mqtt->onSend(*p, chIndex); mqtt->onSend(*p, chIndex);
#endif
} }
assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside) assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside)