diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-08-15 10:45:25 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-08-15 10:45:25 +0300 |
| commit | ce51bf994fa0896018544698a60fd0740a05293b (patch) | |
| tree | 42d30252b3a6f7e19a0378251e05630834e6d60f /Software/Embedded_SW/Embedded/Modules/Control | |
| parent | 733f0ce4feef6b7dc4151ffe0f896efb53640314 (diff) | |
| parent | 723e2b8854db8c409268f31ab76f5252211ec494 (diff) | |
| download | Tango-ce51bf994fa0896018544698a60fd0740a05293b.tar.gz Tango-ce51bf994fa0896018544698a60fd0740a05293b.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
3 files changed, 18 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 063d7c823..fa94614fd 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -39,6 +39,7 @@ #include "modules/thread/thread_ex.h" #include "modules/ids/ids_ex.h" +#include "modules/Diagnostics/Diagnostics.h" #include "drivers/Flash_Memory/Flash_Memory.h" #include "drivers/Flash_Memory/fatfs/ff.h" @@ -87,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}; @@ -110,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 ********************************************/ //********************************************************************** @@ -594,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); @@ -613,6 +613,9 @@ uint32_t MillisecLowLoop(uint32_t tick) if (isMotorConfigured(Motor_i)) MotorGetStatusFromFPGA(Motor_i); }*/ + midtankDisplay = 1-midtankDisplay; + Gas_PPM_Info = Calculate_Gas_Power_Consumption(); + } if (OneHourTick) { @@ -718,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..ca76ec8e1 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.h @@ -47,6 +47,9 @@ 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); + +ControlCBFunction GetControlCallbackFuncPtr(uint32_t ControlId); extern Task_Handle Control_Task_Handle; extern uint32_t millisecondCounter; |
