From 69a41da59eb41a681e644505d5e7814c2c4f6973 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 19 Mar 2019 18:11:46 +0200 Subject: VOC Gas sensor polling --- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 8 +++++++- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 8e4a36e62..88877f113 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -85,7 +85,7 @@ uint32_t Dancer_Data[NUM_OF_DANCERS] = {0}; float Speed_Data = 0; uint32_t DrawerFansStatus = 0; uint32_t SystemFansStatus = 0; - +uint8_t Gas_PPM = 0; bool watchdogCriticalAlarm = false; @@ -514,6 +514,7 @@ uint32_t MillisecLowLoop(uint32_t tick) { Read_Heaters_Current(Heater_i); } + Gas_PPM = Calculate_Gas_Power_Consumption(); } if (OneMinute_Tick) { @@ -621,6 +622,11 @@ uint32_t getDrawerFansStatus(void) { return DrawerFansStatus; } +uint8_t getGasReading(void) +{ + return Gas_PPM; +} + uint32_t getSystemFansStatus(void) { return SystemFansStatus; diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h index 7e2af1079..064302685 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h @@ -32,6 +32,7 @@ uint32_t getADCData(int DeviceId); float getSensorSpeedData(void); uint32_t getDrawerFansStatus(void); uint32_t getSystemFansStatus(void); +uint8_t getGasReading(void); void MillisecInit(void); void MillisecStop(void); -- cgit v1.3.1