mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 14:57:16 +00:00
fix vbus signed word
This commit is contained in:
parent
89e3851903
commit
3845708acc
@ -1976,7 +1976,7 @@ void SML_Decode(uint8_t index) {
|
||||
} else {
|
||||
// low word
|
||||
if (usign) ebus_dval = vbus_get_septet(cp) & 0xffff;
|
||||
else (int16_t)(vbus_get_septet(cp) & 0xffff);
|
||||
else ebus_dval = (int16_t)(vbus_get_septet(cp) & 0xffff);
|
||||
}
|
||||
break;
|
||||
case 'b':
|
||||
@ -2993,10 +2993,14 @@ uint8_t hflg=0;
|
||||
}
|
||||
|
||||
float SML_GetVal(uint32_t index) {
|
||||
if (index<1 && index>SML_MAX_VARS) { index = 1;}
|
||||
if (index < 1 || index > SML_MAX_VARS) { index = 1;}
|
||||
return meter_vars[index-1];
|
||||
}
|
||||
|
||||
char *SML_GetSVal(uint32_t index) {
|
||||
if (index < 1 || index > MAX_METERS) { index = 1;}
|
||||
return &meter_id[index - 1][0];
|
||||
}
|
||||
#endif // USE_SML_SCRIPT_CMD
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user