Merge pull request #1670 from gebart/pr/lwm2m-decimal-point
oma-lwm2m: Handle text/plain floatfix numbers without decimal point
This commit is contained in:
commit
562a33aa16
|
@ -100,6 +100,11 @@ lwm2m_plain_text_read_float32fix(const uint8_t *inbuf, size_t len,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(dot == 0) {
|
||||||
|
integerpart = counter;
|
||||||
|
counter = 0;
|
||||||
|
frac = 1;
|
||||||
|
}
|
||||||
*value = integerpart << bits;
|
*value = integerpart << bits;
|
||||||
if(frac > 1) {
|
if(frac > 1) {
|
||||||
*value += ((counter << bits) / frac);
|
*value += ((counter << bits) / frac);
|
||||||
|
|
Loading…
Reference in a new issue