Merge branch 'development' into dev-raspberrypi
This commit is contained in:
+15
-48
@@ -102,17 +102,12 @@
|
||||
#define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
|
||||
#endif
|
||||
|
||||
// Not necessary to include blinking feature if no LED's are defined!
|
||||
#if defined(MY_LEDS_BLINKING_FEATURE) && !defined(MY_DEFAULT_RX_LED_PIN) && !defined(MY_DEFAULT_TX_LED_PIN) && !defined(MY_ERR_LED_PIN)
|
||||
#undef MY_LEDS_BLINKING_FEATURE
|
||||
#if defined(MY_LEDS_BLINKING_FEATURE)
|
||||
#error MY_LEDS_BLINKING_FEATURE is now removed from MySensors core,\
|
||||
define MY_DEFAULT_ERR_LED_PIN, MY_DEFAULT_TX_LED_PIN or\
|
||||
MY_DEFAULT_RX_LED_PIN in your sketch instead to enable LEDs
|
||||
#endif
|
||||
|
||||
// Enable LED BLINKING FEATURE, if there are any LEDs defined.
|
||||
#if defined(MY_DEFAULT_RX_LED_PIN) || defined(MY_DEFAULT_ERR_LED) || defined(MY_DEFAULT_TX_LED_PIN)
|
||||
#define MY_LEDS_BLINKING_FEATURE
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @def MY_DEFAULT_LED_BLINK_PERIOD
|
||||
* @brief Default LEDs blinking period in milliseconds.
|
||||
@@ -120,41 +115,8 @@
|
||||
#ifndef MY_DEFAULT_LED_BLINK_PERIOD
|
||||
#define MY_DEFAULT_LED_BLINK_PERIOD 300
|
||||
#endif
|
||||
/**
|
||||
* @def MY_DEFAULT_RX_LED_PIN
|
||||
* @brief The RX LED default pin.
|
||||
*/
|
||||
#ifndef MY_DEFAULT_RX_LED_PIN
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
#define MY_DEFAULT_RX_LED_PIN 8
|
||||
#else
|
||||
#define MY_DEFAULT_RX_LED_PIN 6
|
||||
#endif
|
||||
#endif
|
||||
/**
|
||||
* @def MY_DEFAULT_TX_LED_PIN
|
||||
* @brief The TX LED default pin.
|
||||
*/
|
||||
#ifndef MY_DEFAULT_TX_LED_PIN
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
#define MY_DEFAULT_TX_LED_PIN 9
|
||||
#else
|
||||
#define MY_DEFAULT_TX_LED_PIN 5
|
||||
#endif
|
||||
#endif
|
||||
/**
|
||||
* @def MY_DEFAULT_ERR_LED_PIN
|
||||
* @brief The Error LED default pin.
|
||||
*/
|
||||
#ifndef MY_DEFAULT_ERR_LED_PIN
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
#define MY_DEFAULT_ERR_LED_PIN 7
|
||||
#else
|
||||
#define MY_DEFAULT_ERR_LED_PIN 4
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(MY_LEDS_BLINKING_FEATURE)
|
||||
#if defined(MY_DEFAULT_RX_LED_PIN) || defined(MY_DEFAULT_TX_LED_PIN) || defined(MY_DEFAULT_ERR_LED_PIN)
|
||||
#include "core/MyLeds.cpp"
|
||||
#else
|
||||
#include "core/MyLeds.h"
|
||||
@@ -197,6 +159,13 @@
|
||||
#endif
|
||||
|
||||
// GATEWAY - TRANSPORT
|
||||
#if defined(MY_CONTROLLER_IP_ADDRESS) || defined(MY_CONTROLLER_URL_ADDRESS)
|
||||
#define MY_GATEWAY_CLIENT_MODE
|
||||
#endif
|
||||
#if defined(MY_USE_UDP) && !defined(MY_GATEWAY_CLIENT_MODE)
|
||||
#error You must specify MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS for UDP
|
||||
#endif
|
||||
|
||||
#if defined(MY_GATEWAY_MQTT_CLIENT)
|
||||
#if defined(MY_RADIO_FEATURE)
|
||||
// We assume that a gateway having a radio also should act as repeater
|
||||
@@ -204,7 +173,7 @@
|
||||
#endif
|
||||
// GATEWAY - COMMON FUNCTIONS
|
||||
// We support MQTT Client using W5100, ESP8266 and Linux
|
||||
#if !(defined(MY_CONTROLLER_URL_ADDRESS) || defined(MY_CONTROLLER_IP_ADDRESS))
|
||||
#if !defined(MY_GATEWAY_CLIENT_MODE)
|
||||
#error You must specify MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS
|
||||
#endif
|
||||
|
||||
@@ -240,9 +209,6 @@
|
||||
// We assume that a gateway having a radio also should act as repeater
|
||||
#define MY_REPEATER_FEATURE
|
||||
#endif
|
||||
#if defined(MY_CONTROLLER_IP_ADDRESS)
|
||||
#define MY_GATEWAY_CLIENT_MODE
|
||||
#endif
|
||||
#if !defined(MY_PORT)
|
||||
#error You must define MY_PORT (controller or gatway port to open)
|
||||
#endif
|
||||
@@ -305,7 +271,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(MY_PARENT_NODE_IS_STATIC) && (MY_PARENT_NODE_ID == AUTO)
|
||||
#error Parent is static but no parent ID defined.
|
||||
#error Parent is static but no parent ID defined.
|
||||
#endif
|
||||
|
||||
// Make sure to disable child features when parent feature is disabled
|
||||
@@ -348,4 +314,5 @@
|
||||
// This is used to enable disabled macros/definitions to be included in the documentation as well.
|
||||
#if DOXYGEN
|
||||
#define MY_GATEWAY_FEATURE
|
||||
#define MY_LEDS_BLINKING_FEATURE //!< \deprecated use MY_DEFAULT_RX_LED_PIN, MY_DEFAULT_TX_LED_PIN and/or MY_DEFAULT_ERR_LED_PIN instead **** DEPRECATED, DO NOT USE ****
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user