gotthard server works

This commit is contained in:
2019-01-10 10:35:49 +01:00
parent 0a2c1d1406
commit 52785c6642
5 changed files with 7 additions and 5 deletions

View File

@@ -28,8 +28,8 @@ int ConvertToDifferentRange(int inputMin, int inputMax, int outputMin, int outpu
return FAIL;
}
double value = double((inputValue - inputMin) * (outputMax - outputMin))
/ double(inputMax - inputMin) + outputMin;
double value = (double)((inputValue - inputMin) * (outputMax - outputMin))
/ (double)(inputMax - inputMin) + outputMin;
// double to integer conversion (if decimal places, round to integer)
if ((value - (int)value) > 0.0001) {
@@ -40,3 +40,4 @@ int ConvertToDifferentRange(int inputMin, int inputMax, int outputMin, int outpu
FILE_LOG(logDEBUG1, ("\tConverted Ouput Value: %d\n", *outputValue));
return OK;
}