diff --git a/include/MySensorsData.h b/include/MySensorsData.h deleted file mode 100644 index 7b9f8fc4..00000000 --- a/include/MySensorsData.h +++ /dev/null @@ -1,12 +0,0 @@ -#include "Global.h" -#ifdef MYSENSORS -#define MY_DEBUG -#define MY_RADIO_RF24 -#define MY_RF24_PA_LEVEL RF24_PA_HIGH // RF24_PA_MIN, RF24_PA_LOW, RF24_PA_HIGH, RF24_PA_MAX -//#define MY_ENCRYPTION_SIMPLE_PASSWD "XpenBam" -//#define MY_RF24_DATARATE RF24_2MBPS -#define MY_GATEWAY_SERIAL -#include "MySensors.h" -extern void receive(const MyMessage &message); -extern String parseToString(const MyMessage &message); -#endif \ No newline at end of file diff --git a/src/MySensorsData.cpp b/src/MySensorsData.cpp deleted file mode 100644 index 113f3923..00000000 --- a/src/MySensorsData.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "Global.h" -#include "classes/IoTItem.h" -#include "Arduino.h" -#include "MySensorsData.h" - -#ifdef MYSENSORS - -void receive(const MyMessage& message) { - String inMsg = String(message.getSender()) + "," + // node-id - String(message.getSensor()) + "," + // child-sensor-id - String(message.getType()) + "," + // type of var - String(message.getCommand()) + "," + // command - parseToString(message) + ";"; // value - - SerialPrint("i", F("MySensorsGate"), inMsg); - - mysensorBuf += inMsg; -} - -String parseToString(const MyMessage& message) { - String value = "error"; - switch (message.getPayloadType()) { - case 0: // Payload type is string - value = message.getString(); - return value; - case 1: // Payload type is byte - value = String(message.getByte()); - return value; - case 2: // Payload type is INT16 - value = String(message.getInt()); - return value; - case 3: // Payload type is UINT16 - value = String(message.getUInt()); - return value; - case 4: // Payload type is INT32 - value = String(message.getInt()); - return value; - case 5: // Payload type is UINT32 - value = String(message.getUInt()); - return value; - case 6: // Payload type is binary - value = String(message.getBool()); - return value; - case 7: // Payload type is float32 - value = String(message.getFloat()); - return value; - default: - return value; - } -} - -#endif \ No newline at end of file