aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c9
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c8
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.h1
3 files changed, 14 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index f5ac6cf92..fa94614fd 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -88,14 +88,13 @@ 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;
uint32_t msec_millisecondCounter = 0;
extern bool Machine_Idle_Mode;
+uint8_t Gas_PPM_Info;
MillisecMotorDataStruc ScrewSetMaxSpeedPending = {0};
MillisecMotorDataStruc ScrewMovePending = {0};
MillisecMotorDataStruc MotorData[NUM_OF_MOTORS] = {0};
@@ -111,6 +110,7 @@ static GateMutex_Handle gateMillisecDB;
uint32_t Millisec_timerBase = TIMER1_BASE; //Timer handle
/******************** Functions ********************************************/
uint32_t Control_Delta_Position_Pass(uint32_t Current_Read,uint32_t Previous_Read);
+void CalculateVOCAlarms(void);
//**********************************************************************
/******************** CODE ********************************************/
//**********************************************************************
@@ -595,7 +595,6 @@ uint32_t MillisecLowLoop(uint32_t tick)
Read_Heaters_Current(Heater_i);
}
}
- Gas_PPM = Calculate_Gas_Power_Consumption();
for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++)
{
TemperatureCalc[Sensor_i] = MillisecCalculateTemperatures ( Sensor_i);
@@ -615,6 +614,8 @@ uint32_t MillisecLowLoop(uint32_t tick)
MotorGetStatusFromFPGA(Motor_i);
}*/
midtankDisplay = 1-midtankDisplay;
+ Gas_PPM_Info = Calculate_Gas_Power_Consumption();
+
}
if (OneHourTick)
{
@@ -720,7 +721,7 @@ uint32_t getDrawerFansStatus(void)
}
uint8_t getGasReading(void)
{
- return Gas_PPM;
+ return Gas_PPM_Info;
}
uint32_t getSystemFansStatus(void)
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index f1e19d851..a88f67d5e 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -479,6 +479,14 @@ uint32_t GetControlLowDevice_i(void)
{
return ControlLowDevice_i;
}
+ControlCBFunction GetControlCallbackFuncPtr(uint32_t ControlId)
+{
+ if (ControlArray[ControlId].ControlActive)
+ return ControlArray[ControlId].ControlCallbackPtr;
+ else
+ return NULL;
+
+}
uint32_t ControlLoop(uint32_t tick)
{
if (MaxHighDevices == 0xFF)
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.h b/Software/Embedded_SW/Embedded/Modules/Control/control.h
index 380040e34..c54909f73 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.h
@@ -47,6 +47,7 @@ int SafeRemoveHighControlCallback(uint32_t deviceId , ControlCBFunction
uint32_t TemplateDataReadCBFunction (uint32_t deviceId, uint32_t Parameter1);
uint32_t GetControlDevice_i(void);
uint32_t GetControlLowDevice_i(void);
+ControlCBFunction GetControlCallbackFuncPtr(uint32_t ControlId);
extern Task_Handle Control_Task_Handle;
extern uint32_t millisecondCounter;