From 60d6c4fc3cc8c13e9f365e7534e2ee886a21c248 Mon Sep 17 00:00:00 2001 From: Marcelo Aquino Date: Tue, 17 Feb 2015 17:24:51 -0200 Subject: [PATCH] add MYSENSORS_MQTT_GATEWAY definition --- libraries/MySensors/MyConfig.h | 3 ++- libraries/MySensors/MyRFDriverNRF24.h | 2 +- .../MySensors/examples/EthernetGateway/EthernetGateway.ino | 4 ++-- libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libraries/MySensors/MyConfig.h b/libraries/MySensors/MyConfig.h index d9cb7c2..96f2253 100644 --- a/libraries/MySensors/MyConfig.h +++ b/libraries/MySensors/MyConfig.h @@ -8,7 +8,8 @@ // pick ONE of these - other board layouts can be easily added this way #define MYSENSORS_SENSOR //#define MYSENSORS_SERIAL_GATEWAY -//#define MYSENSORS_ETHERNET_MQTT_GATEWAY +//#define MYSENSORS_ETHERNET_GATEWAY +//#define MYSENSORS_MQTT_GATEWAY // Choose radio type by enabling one of the following #define MYSENSORS_RF_NRF24 diff --git a/libraries/MySensors/MyRFDriverNRF24.h b/libraries/MySensors/MyRFDriverNRF24.h index 66a78fe..267b19c 100644 --- a/libraries/MySensors/MyRFDriverNRF24.h +++ b/libraries/MySensors/MyRFDriverNRF24.h @@ -21,7 +21,7 @@ #define RF24_PA_LEVEL RF24_PA_LOW #endif -#ifdef MYSENSORS_ETHERNET_MQTT_GATEWAY +#if defined(MYSENSORS_ETHERNET_GATEWAY) || defined(MYSENSORS_MQTT_GATEWAY) #define RF24_CE_PIN 5 #define RF24_CS_PIN 6 #define RF24_PA_LEVEL RF24_PA_LOW diff --git a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino index 143a6fe..f0f941c 100644 --- a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino +++ b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino @@ -48,8 +48,8 @@ #include #include "GatewayUtil.h" -#ifndef MYSENSORS_ETHERNET_MQTT_GATEWAY -#error Please switch to MYSENSORS_ETHERNET_MQTT_GATEWAY in MyConfig.h +#ifndef MYSENSORS_ETHERNET_GATEWAY +#error Please switch to MYSENSORS_ETHERNET_GATEWAY in MyConfig.h #endif // Use this if you have attached a Ethernet ENC28J60 shields diff --git a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino index de61f13..a9a497d 100644 --- a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino +++ b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino @@ -62,8 +62,8 @@ http://forum.mysensors.org/topic/303/mqtt-broker-gateway #include #include "MyMQTT.h" -#ifndef MYSENSORS_ETHERNET_MQTT_GATEWAY -#error Please switch to MYSENSORS_ETHERNET_MQTT_GATEWAY in MyConfig.h +#ifndef MYSENSORS_MQTT_GATEWAY +#error Please switch to MYSENSORS_MQTT_GATEWAY in MyConfig.h #endif #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled