summaryrefslogtreecommitdiffstats
path: root/stm32/app/temp.c
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-05-26 15:27:53 +0100
committerfishsoupisgood <github@madingley.org>2020-05-26 15:27:53 +0100
commit8a84c531e26da5f06602e505c3591b09ea9bc741 (patch)
tree3e9aba75f64cfde45f9456f96f3a578eefa2c365 /stm32/app/temp.c
parentf0d941bef6a9b6e3af78cfc68e1f82d6b47ccb2f (diff)
downloadheating-8a84c531e26da5f06602e505c3591b09ea9bc741.tar.gz
heating-8a84c531e26da5f06602e505c3591b09ea9bc741.tar.bz2
heating-8a84c531e26da5f06602e505c3591b09ea9bc741.zip
fish
Diffstat (limited to 'stm32/app/temp.c')
-rw-r--r--stm32/app/temp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/stm32/app/temp.c b/stm32/app/temp.c
index 25a5de3..4548d01 100644
--- a/stm32/app/temp.c
+++ b/stm32/app/temp.c
@@ -4,7 +4,7 @@
#define N_SENSORS 2
#define SENSOR_INDEX_CH_RETURN 0
-#define SENSOR_INDEX_DHW_FEED 1
+#define SENSOR_INDEX_SUPPLY_INLET 1
static const Onewire_addr s_addr[N_SENSORS] = {
[0] = {{0x28, 0x60, 0x06, 0x53, 0x03, 0x00, 0x00, 0xf5}},
@@ -48,7 +48,7 @@ void temp_dispatch (void)
s_temp[sensor] = 0;
- printf ("Q1W: sensor %d temp %d\n", sensor, (s_temp[sensor] * 100) / 256);
+ printf ("Q1W: sensor %d temp %d\r\n", sensor, (s_temp[sensor] * 100) / 256);
sensor++;
@@ -70,3 +70,7 @@ uint16_t temp_ch_return (void)
{
return s_temp[SENSOR_INDEX_CH_RETURN];
}
+uint16_t temp_supply_inlet (void)
+{
+ return s_temp[SENSOR_INDEX_SUPPLY_INLET];
+}