diff -r 862de87f9f89 -r cdcd07bbee30 thermferm/devices.c --- a/thermferm/devices.c Sat Apr 29 17:07:36 2017 +0200 +++ b/thermferm/devices.c Mon May 08 16:26:02 2017 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2014..2015 + * Copyright (C) 2014..2017 * * Michiel Broek * @@ -659,11 +659,11 @@ ndev->address = xstrcpy((char *)"SimBeerTemp"); ndev->description = xstrcpy((char *)"Simulated beer temperature"); break; - case 3: ndev->direction = DEVDIR_OUT_ANALOG; + case 3: ndev->direction = DEVDIR_OUT_BIN; ndev->address = xstrcpy((char *)"SimHeater"); ndev->description = xstrcpy((char *)"Simulated heater"); break; - case 4: ndev->direction = DEVDIR_OUT_ANALOG; + case 4: ndev->direction = DEVDIR_OUT_BIN; ndev->address = xstrcpy((char *)"SimCooler"); ndev->description = xstrcpy((char *)"Simulated cooler"); break; @@ -932,10 +932,10 @@ device->value = (int)((int)(simulator->room_temperature * 1000) / 500) * 500; device->timestamp = time(NULL); } else if (device->subdevice == 1) { - device->value = (int)((int)(simulator->air_temperature * 1000) / 125) * 125; + device->value = (int)((int)(simulator->air_temperature * 1000) / 62.5) * 62.5; device->timestamp = time(NULL); } else if (device->subdevice == 2) { - device->value = (int)((int)(simulator->beer_temperature * 1000) / 125) * 125; + device->value = (int)((int)(simulator->beer_temperature * 1000) / 62.5) * 62.5; device->timestamp = time(NULL); } }