mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-11 14:07:05 +03:00
Merge branch 'master' of https://github.com/GrKoR/esphome_aux_ac_component
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,4 +13,5 @@
|
|||||||
**/kitchen_ac/
|
**/kitchen_ac/
|
||||||
/examples/*/*.h
|
/examples/*/*.h
|
||||||
**/tests/test_*
|
**/tests/test_*
|
||||||
**/__pycache__
|
**/__pycache__
|
||||||
|
**/private/
|
||||||
@@ -1143,10 +1143,10 @@ class AirCon : public esphome::Component, public esphome::climate::Climate {
|
|||||||
notAPacket = notAPacket || (packet->data[0] != AC_PACKET_START_BYTE);
|
notAPacket = notAPacket || (packet->data[0] != AC_PACKET_START_BYTE);
|
||||||
|
|
||||||
String st = "";
|
String st = "";
|
||||||
char textBuf[10];
|
char textBuf[11];
|
||||||
|
|
||||||
// заполняем время получения пакета
|
// заполняем время получения пакета
|
||||||
memset(textBuf, 0, 10);
|
memset(textBuf, 0, 11);
|
||||||
sprintf(textBuf, "%010u", packet->msec);
|
sprintf(textBuf, "%010u", packet->msec);
|
||||||
st = st + textBuf + ": ";
|
st = st + textBuf + ": ";
|
||||||
|
|
||||||
@@ -1166,7 +1166,7 @@ class AirCon : public esphome::Component, public esphome::climate::Climate {
|
|||||||
// для нормальных пакетов надо заключить CRC в []
|
// для нормальных пакетов надо заключить CRC в []
|
||||||
if ((!notAPacket) && (i == packet->header->body_length+AC_HEADER_SIZE)) st += "[";
|
if ((!notAPacket) && (i == packet->header->body_length+AC_HEADER_SIZE)) st += "[";
|
||||||
|
|
||||||
memset(textBuf, 0, 10);
|
memset(textBuf, 0, 11);
|
||||||
sprintf(textBuf, "%02X", packet->data[i]);
|
sprintf(textBuf, "%02X", packet->data[i]);
|
||||||
st += textBuf;
|
st += textBuf;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user