diff options
| author | Avi Levkovich <avi@twine-s.com> | 2019-03-07 17:08:42 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2019-03-07 17:08:42 +0200 |
| commit | 7256fe1c07cf5ecbe485c3cdac238b88dfc2cd1d (patch) | |
| tree | c3dd4234b9499f913ddf3aee79b3adc65644f650 /Software/Embedded_SW/Embedded/Modules | |
| parent | 09f93935c9b8b3e758d3539a8d5f84cd17f615c0 (diff) | |
| download | Tango-7256fe1c07cf5ecbe485c3cdac238b88dfc2cd1d.tar.gz Tango-7256fe1c07cf5ecbe485c3cdac238b88dfc2cd1d.zip | |
Add system fans + read the tacho of the new small drawer fans
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 12 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index db6624fd4..8e4a36e62 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -84,6 +84,8 @@ typedef struct MillisecMessage{ uint32_t Dancer_Data[NUM_OF_DANCERS] = {0}; float Speed_Data = 0; uint32_t DrawerFansStatus = 0; +uint32_t SystemFansStatus = 0; + bool watchdogCriticalAlarm = false; @@ -445,7 +447,7 @@ uint32_t MillisecLoop(uint32_t tick) } uint32_t MillisecLowLoop(uint32_t tick) { - uint8_t Motor_i,Disp_i,Heater_i; + uint8_t Motor_i,Disp_i,Heater_i,temp; TEMPERATURE_SENSOR_ID_ENUM Sensor_i; //static int temp=0; @@ -497,7 +499,9 @@ uint32_t MillisecLowLoop(uint32_t tick) //Read_MidTank_Pressure_Sensor(Disp_i); } FPGA_GetAllDispensersValveBusyOCD(); - DrawerFansStatus = Read_Fans_Tacho(); + temp = Read_Fans_Tacho(); + DrawerFansStatus = temp & 0x1F; + SystemFansStatus = temp & 0xE0; KeepAliveOneSecondCall(); for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++) { @@ -617,6 +621,10 @@ uint32_t getDrawerFansStatus(void) { return DrawerFansStatus; } +uint32_t getSystemFansStatus(void) +{ + return SystemFansStatus; +} #ifdef HUNDRED_MICROSECONDS_DANCER_READ uint32_t DancerData[NUM_OF_DANCERS]; uint32_t Control_Read_Dancer_Position(HardwareDancerType DancerId, uint32_t Parameter1, uint32_t Parameter2) diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h index 61c7df7ee..7e2af1079 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h @@ -31,6 +31,7 @@ uint32_t getADCData(int DeviceId); */ float getSensorSpeedData(void); uint32_t getDrawerFansStatus(void); +uint32_t getSystemFansStatus(void); void MillisecInit(void); void MillisecStop(void); |
