From 255040749c5552175e61b87ecd1b6fb79d991ada Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Mon, 27 Jun 2016 12:34:10 -0500 Subject: [PATCH] Uniquifying LIBRARY_VERSION Making MYSENSORS_LIBRARY_VERSION for purposes of being more unique and preventing conflict with other libraries that chose the same LIBRARY_VERSION like PID_v1 a fairly common arduino library. Of note, I have also raised the issue with that library as well --- libraries/MySensors/core/MyGatewayTransport.cpp | 2 +- libraries/MySensors/core/MySensorsCore.cpp | 4 ++-- libraries/MySensors/core/Version.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/MySensors/core/MyGatewayTransport.cpp b/libraries/MySensors/core/MyGatewayTransport.cpp index ebbec28..a7838aa 100644 --- a/libraries/MySensors/core/MyGatewayTransport.cpp +++ b/libraries/MySensors/core/MyGatewayTransport.cpp @@ -40,7 +40,7 @@ inline void gatewayTransportProcess() { if (mGetCommand(_msg) == C_INTERNAL) { if (_msg.type == I_VERSION) { // Request for version. Create the response - gatewayTransportSend(buildGw(_msg, I_VERSION).set(LIBRARY_VERSION)); + gatewayTransportSend(buildGw(_msg, I_VERSION).set(MYSENSORS_LIBRARY_VERSION)); #ifdef MY_INCLUSION_MODE_FEATURE } else if (_msg.type == I_INCLUSION_MODE) { // Request to change inclusion mode diff --git a/libraries/MySensors/core/MySensorsCore.cpp b/libraries/MySensors/core/MySensorsCore.cpp index a512d0e..22b4730 100644 --- a/libraries/MySensors/core/MySensorsCore.cpp +++ b/libraries/MySensors/core/MySensorsCore.cpp @@ -73,7 +73,7 @@ void _begin() { if (before) before(); - debug(PSTR("Starting " MY_NODE_TYPE " (" MY_CAPABILITIES ", " LIBRARY_VERSION ")\n")); + debug(PSTR("Starting " MY_NODE_TYPE " (" MY_CAPABILITIES ", " MYSENSORS_LIBRARY_VERSION ")\n")); #if defined(MY_LEDS_BLINKING_FEATURE) ledsInit(); @@ -278,7 +278,7 @@ void sendHeartbeat(void) { } void present(uint8_t childSensorId, uint8_t sensorType, const char *description, bool enableAck) { - _sendRoute(build(_msgTmp, _nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(childSensorId==NODE_SENSOR_ID?LIBRARY_VERSION:description)); + _sendRoute(build(_msgTmp, _nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(childSensorId==NODE_SENSOR_ID?MYSENSORS_LIBRARY_VERSION:description)); } void sendSketchInfo(const char *name, const char *version, bool enableAck) { diff --git a/libraries/MySensors/core/Version.h b/libraries/MySensors/core/Version.h index fce3bc7..d61a364 100644 --- a/libraries/MySensors/core/Version.h +++ b/libraries/MySensors/core/Version.h @@ -1,11 +1,11 @@ /*** - * This file defines the Sensor library version number + * This file defines the Sensor library version number * Normally, contributors should not modify this directly * as it is managed by the MySensors Bot. */ #ifndef Version_h #define Version_h -#define LIBRARY_VERSION "2.0.0-beta" +#define MYSENSORS_LIBRARY_VERSION "2.0.0-beta" #endif