mirror of
https://github.com/thelsing/knx.git
synced 2025-08-17 13:47:28 +02:00
Merge branch 'master' of https://github.com/thelsing/knx
This commit is contained in:
commit
2fac57a2ff
@ -416,11 +416,11 @@ int busValueToUnsigned8(const uint8_t* payload, size_t payload_length, const Dpt
|
|||||||
switch (datatype.subGroup)
|
switch (datatype.subGroup)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
value = (uint8_t)(unsigned8FromPayload(payload, 0) * 100.0 / 255.0);
|
value = (uint8_t)round(unsigned8FromPayload(payload, 0) * 100.0 / 255.0);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
value = (uint8_t)unsigned8FromPayload(payload, 0) * 360.0 / 255.0;
|
value = (uint8_t)round(unsigned8FromPayload(payload, 0) * 360.0 / 255.0);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
|
Loading…
Reference in New Issue
Block a user