Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Introduce a temperature offset config option

Thank you Stan Bach <stanislasbach@gmail.com> for the suggestion!
  • Loading branch information...
commit 89998784f622623893925c56caeecb753841cec2 1 parent 29f3839
Ângelo Arrifano miknix authored
Showing with 9 additions and 0 deletions.
  1. +1 −0  drivers/temperature.c
  2. +8 −0 tools/config.py
1  drivers/temperature.c
View
@@ -67,6 +67,7 @@ void temperature_init(void)
{
temperature.value = adc12_single_conversion(REFVSEL_0,
ADC12SHT0_8, ADC12INCH_10);
+ temperature.offset = CONFIG_TEMPERATURE_OFFSET;
adcresult[0] = temperature.value;
adcresult[1] = temperature.value;
8 tools/config.py
View
@@ -143,6 +143,14 @@
"type": "info"
}
+DATA["CONFIG_TEMPERATURE_OFFSET"] = {
+ "name": "Compensation offset",
+ "type": "text",
+ "default": "-260",
+ "ifndef": True,
+ "help": "Compensate the sensor raw output value with this offset",
+}
+
DATA["CONFIG_TEMPERATURE_METRIC"] = {
"name": "Show in degrees C",
"default": True,
Please sign in to comment.
Something went wrong with that request. Please try again.