X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fhvac-demo-binding.c;fp=binding%2Fhvac-demo-binding.c;h=3eb1876fe7ea14c16e4d392d7340b0514c0e693e;hb=377a16d4e37f864431b15a963e6984fd33c8aa0c;hp=491338031b9563c23ce37520674e62a8455fd09d;hpb=52233abc17f2238ffa4ee0a10b72376d503766b2;p=apps%2Fhvac.git diff --git a/binding/hvac-demo-binding.c b/binding/hvac-demo-binding.c index 4913380..3eb1876 100644 --- a/binding/hvac-demo-binding.c +++ b/binding/hvac-demo-binding.c @@ -148,7 +148,7 @@ static int open_can_dev() // Get original get temperature function from cpp hvacplugin code static uint8_t to_can_temp(uint8_t value) { - int result = ((0xF0 - 0x10) / 15) * value - 16; + int result = ((0xF0 - 0x10) / 15) * (value - 15) + 0x10; if (result < 0x10) result = 0x10; if (result > 0xF0)