mirror of
https://github.com/eddyem/BTA_utils.git
synced 2025-12-06 10:45:14 +03:00
fixed bug with signed data in modbus meteo
This commit is contained in:
parent
47b1e8465f
commit
0d40ee1f15
@ -190,7 +190,7 @@ params_ans check_meteo_params(){
|
|||||||
}else if(size == ANS_LEN){
|
}else if(size == ANS_LEN){
|
||||||
ctr = 30;
|
ctr = 30;
|
||||||
DBG("answer");
|
DBG("answer");
|
||||||
uint16_t val = buffer[3] << 8 | buffer[4];
|
int16_t val = buffer[3] << 8 | buffer[4];
|
||||||
int prval = 1;
|
int prval = 1;
|
||||||
float f = (float)val / 10.f;
|
float f = (float)val / 10.f;
|
||||||
switch(lastpar){
|
switch(lastpar){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user