Skip to content

Commit 7374227

Browse files
committed
Allow voltage to calculate 10k Thermistor Probe temp
Add a case for the 'volt' inputType to convertValue so that the 10k Thermistor Probe calculates temperature from voltage input using the same formula as 'raw' inputType.
1 parent 9047aa5 commit 7374227

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generic/Temperature.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export class Thermistor10k extends GenericDeviceBase {
4949
device.values.resistance = (10000 * device.values.adcValue) / (device.values.maxVal - device.values.adcValue);
5050
break;
5151
case 'raw':
52+
case 'volt':
5253
device.values.resistance = 10000 * (device.values.adcValue / (device.values.maxVal - device.values.adcValue));
5354
break;
54-
5555
}
5656
switch (device.options.calcType) {
5757
case 'shart':

0 commit comments

Comments
 (0)