From 84b70e56170acb5d4ae07af9b09daa18341b09cc Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <67171972+IoTManagerProject@users.noreply.github.com> Date: Thu, 1 Dec 2022 15:35:22 +0100 Subject: [PATCH] =?UTF-8?q?=D0=B3=D0=B5=D0=B9=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/MySensorsData.h | 12 ---------- src/MySensorsData.cpp | 52 ----------------------------------------- 2 files changed, 64 deletions(-) delete mode 100644 include/MySensorsData.h delete mode 100644 src/MySensorsData.cpp 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