From e12fa66462007f3d18be7e9042f1d7d3053f7fa9 Mon Sep 17 00:00:00 2001 From: Paul Derbyshire Date: Tue, 13 Aug 2019 19:39:28 +0200 Subject: [PATCH] tests --- src/ems-esp.cpp | 2 +- src/ems.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index 485607c15..f7543156e 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -4,7 +4,7 @@ * Paul Derbyshire - https://github.com/proddy/EMS-ESP * * See ChangeLog.md for history - * See README.md for Acknowledgments + * See wiki at https://github.com/proddy/EMS-ESP/Wiki for Acknowledgments */ // local libraries diff --git a/src/ems.cpp b/src/ems.cpp index 2e1ebcb80..2346e4575 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -17,7 +17,7 @@ uint8_t _TEST_DATA_max = ArraySize(TEST_DATA); #endif -// myESP for logging to telnet and serial +// MyESP class for logging to telnet and serial #define myDebug(...) myESP.myDebug(__VA_ARGS__) #define myDebug_P(...) myESP.myDebug_P(__VA_ARGS__) @@ -625,7 +625,7 @@ void _ems_sendTelegram() { // complete the rest of the header depending on EMS or EMS+ if (EMS_TxTelegram.type > 0xFF) { - // EMS 2.0 / emsplus + // EMS 2.0 / EMS+ EMS_TxTelegram.data[2] = 0xFF; // fixed value indicating an extended message EMS_TxTelegram.data[3] = EMS_TxTelegram.offset; EMS_TxTelegram.data[4] = EMS_TxTelegram.dataValue; // for read its #bytes to return, for write it the value to set @@ -2470,7 +2470,6 @@ void ems_setThermostatTemp(float temperature, uint8_t temptype) { EMS_TxTelegram.type = EMS_TYPE_RC30Set; EMS_TxTelegram.offset = EMS_OFFSET_RC30Set_temp; EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC30StatusMessage; - } else if (model_id == EMS_MODEL_RC300) { EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet; // for 3000 and 1010, e.g. 0B 10 FF (0A | 08) 01 89 2B // check mode @@ -2510,6 +2509,10 @@ void ems_setThermostatTemp(float temperature, uint8_t temptype) { } } + // TODO XXX hack, please remove + EMS_TxTelegram.type = EMS_TYPE_RCPLUSSet; // for 3000 and 1010, e.g. 0B 10 FF (0A | 08) 01 89 2B + EMS_TxTelegram.offset = 0x08; // auto offset + EMS_TxTelegram.length = EMS_MIN_TELEGRAM_LENGTH; EMS_TxTelegram.dataValue = (uint8_t)((float)temperature * (float)2); // value * 2 EMS_TxTelegram.type_validate = EMS_TxTelegram.type;