Merge pull request #70 from mapnull/dev-feature-mqtt_define

add MYSENSORS_MQTT_GATEWAY definition
This commit is contained in:
Henrik Ekblad
2015-02-17 20:40:28 +01:00
4 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -48,8 +48,8 @@
#include <PinChangeInt.h>
#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
@@ -62,8 +62,8 @@ http://forum.mysensors.org/topic/303/mqtt-broker-gateway
#include <Ethernet.h>
#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