From 921b9fd3fc5307c018c1e42a74e69e5700fe433a Mon Sep 17 00:00:00 2001 From: Patrick Fallberg Date: Thu, 24 Sep 2015 10:45:08 +0200 Subject: [PATCH] Forward declare all inline functions This seem to be mandatory for newer Arduino IDE versions. --- .../MySensors/examples/MQTTClientGateway/MQTTClientGateway.ino | 2 ++ libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino | 1 + 2 files changed, 3 insertions(+) diff --git a/libraries/MySensors/examples/MQTTClientGateway/MQTTClientGateway.ino b/libraries/MySensors/examples/MQTTClientGateway/MQTTClientGateway.ino index 9c5b60b..23d657d 100644 --- a/libraries/MySensors/examples/MQTTClientGateway/MQTTClientGateway.ino +++ b/libraries/MySensors/examples/MQTTClientGateway/MQTTClientGateway.ino @@ -162,6 +162,8 @@ volatile uint8_t countErr; void processMQTTMessages(char* topic, byte* payload, unsigned int length); PubSubClient client(remote_ip, remote_port, processMQTTMessages, ethClient); +inline MyMessage& build(MyMessage &msg, uint8_t sender, uint8_t destination, uint8_t sensor, + uint8_t command, uint8_t type, bool enableAck); //////////////////////////////////////////////////////////////// diff --git a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino index 34d3fff..59f63bb 100644 --- a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino +++ b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino @@ -132,6 +132,7 @@ MyHwATMega328 hw; // Construct MySensors library (signer needed if MY_SIGNING_FEATURE is turned on in MyConfig.h) MySensor gw(transport, hw /*, signer*/); +inline MyMessage& build (MyMessage &msg, uint8_t destination, uint8_t sensor, uint8_t command, uint8_t type, bool enableAck); EthernetServer server = EthernetServer(TCP_PORT); EthernetClient *currentClient = NULL;