diff --git a/prototypes/panasonic_heatpump/decode.cpp b/prototypes/panasonic_heatpump/decode_proto.cpp similarity index 99% rename from prototypes/panasonic_heatpump/decode.cpp rename to prototypes/panasonic_heatpump/decode_proto.cpp index 4c4436c..e13775d 100644 --- a/prototypes/panasonic_heatpump/decode.cpp +++ b/prototypes/panasonic_heatpump/decode_proto.cpp @@ -1,4 +1,4 @@ -#include "decode.h" +#include "decode_proto.h" int getBit1(uint8_t input) { @@ -179,7 +179,7 @@ float getPumpFlow(uint8_t input1, uint8_t input2) int PumpFlow2 = (int)input2; float PumpFlow1 = (((float)input1 - 1) / 256); float PumpFlow = PumpFlow2 + PumpFlow1; - + return PumpFlow; } @@ -189,7 +189,7 @@ float getFractional(uint8_t input, uint8_t shift) float result; int fractional = (int)((input >> shift) & 0b111) - 1; result = fractional * 0.25; - + return result; } diff --git a/prototypes/panasonic_heatpump/decode.h b/prototypes/panasonic_heatpump/decode_proto.h similarity index 97% rename from prototypes/panasonic_heatpump/decode.h rename to prototypes/panasonic_heatpump/decode_proto.h index 750d5eb..6eb48da 100644 --- a/prototypes/panasonic_heatpump/decode.h +++ b/prototypes/panasonic_heatpump/decode_proto.h @@ -5,11 +5,11 @@ #include #include -#define NUMBER_OF_MODELS 51 -#define NUMBER_OF_TOPICS 127 -#define NUMBER_OF_TOPICS_EXTRA 6 -#define NUMBER_OF_OPT_TOPICS 7 -#define MAX_TOPIC_LEN 42 +#define NUMBER_OF_MODELS_PROTO 51 +#define NUMBER_OF_TOPICS_PROTO 127 +#define NUMBER_OF_TOPICS_EXTRA_PROTO 6 +#define NUMBER_OF_OPT_TOPICS_PROTO 7 +#define MAX_TOPIC_LEN_PROTO 42 int getBit1(uint8_t input); int getBit1and2(uint8_t input); @@ -117,7 +117,7 @@ static const char *ModelNames[] = }; // stores the bytes #129 to #138 of known models in the same order as the ModelNames above -static const uint8_t KnownModels[NUMBER_OF_MODELS][10] = +static const uint8_t KnownModels[NUMBER_OF_MODELS_PROTO][10] = { 0xE2, 0xCF, 0x0B, 0x13, 0x33, 0x32, 0xD1, 0x0C, 0x16, 0x33, //0 0xE2, 0xCF, 0x0B, 0x14, 0x33, 0x42, 0xD1, 0x0B, 0x17, 0x33, //1 diff --git a/prototypes/panasonic_heatpump/heishamon_decode.xlsx b/prototypes/panasonic_heatpump/heishamon_decode.xlsx index afba72f..98bf309 100644 Binary files a/prototypes/panasonic_heatpump/heishamon_decode.xlsx and b/prototypes/panasonic_heatpump/heishamon_decode.xlsx differ