mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
fix #50
This commit is contained in:
parent
d3788d3ee4
commit
5855f35eef
@ -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