Skip to content

Commit

Permalink
Update xsns_53_sml.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
gemu2015 committed Dec 13, 2024
1 parent 1833b32 commit c1c650d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tasmota/tasmota_xsns_sensor/xsns_53_sml.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,13 @@ void SML_Decode(uint8_t index) {
mbus_dval = *fp;
mp += 8;
cp += 4;
} else if (!strncmp_P(mp, PSTR("FFFFFFFF"), 8)) {
uint32_t val = (cp[0]<<0) | (cp[1]<<0) | (cp[2]<<16) | (cp[3]<<24);
float *fp = (float*)&val;
ebus_dval = *fp;
mbus_dval = *fp;
mp += 8;
cp += 4;
} else if (!strncmp_P(mp, PSTR("FFffFFff"), 8)) {
// reverse word float
uint32_t val = (cp[1]<<0) | (cp[0]<<8) | (cp[3]<<16) | (cp[2]<<24);
Expand Down

0 comments on commit c1c650d

Please sign in to comment.