diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-20 19:59:18 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-20 19:59:18 +0300 |
| commit | 0087c3567ff7322869fa6871e16372a49c382f38 (patch) | |
| tree | 8642cdf67a65a11938f05499164f3f6a8ba7f510 /Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | |
| parent | 65d898feb5cadb4bf421f03e40ef3f3109c881a6 (diff) | |
| download | Tango-0087c3567ff7322869fa6871e16372a49c382f38.tar.gz Tango-0087c3567ff7322869fa6871e16372a49c382f38.zip | |
IDS Handling, Reports, Winder message flushing
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 67de0271f..3066153ab 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -192,6 +192,18 @@ int32_t MillisecSetMotorSpeed(TimerMotors_t MotorId, unsigned long Data, int Len return OK; } +int MillisecFlushMsgQ(TimerMotors_t MotorId) +{ + MillisecMotorDataStruc MotorData = {0}; + int pend = Mailbox_getNumPendingMsgs(MotorsMsgQ[MotorId]); + int i; + if (pend) + { + for (i=0;i<pend;i++) + Mailbox_pend(MotorsMsgQ[MotorId] , &MotorData, BIOS_NO_WAIT); + } + return pend; +} int32_t MillisecWriteToMotor(TimerMotors_t MotorId, unsigned long Data, int Length, MSecFptr Callback) { MillisecMotorDataStruc MotorData = {0}; @@ -354,6 +366,7 @@ uint32_t MillisecLoop(uint32_t tick) { for (Sensor_i = 0;Sensor_i < MAX_SYSTEM_DISPENSERS;Sensor_i++) CalculateDispenserPressure(Sensor_i); + FPGA_GetAllDispensersValveBusyOCD(); } /* OLD CODE |
