summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tempmodule/main.ino2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tempmodule/main.ino b/src/tempmodule/main.ino
index 3f4be39..2cec574 100644
--- a/src/tempmodule/main.ino
+++ b/src/tempmodule/main.ino
@@ -241,5 +241,5 @@ static int get_temperature(int res)
/* Returns the last 0-10 part of the temperature, in 0.1°K. */
static int get_temp_subrange(short a, short b, int res)
{
- return (res - a.res) * 100 / (b.res - a.res);
+ return (res - a) * 100 / (b - a);
}