aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-06-20 19:59:18 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-06-20 19:59:18 +0300
commit0087c3567ff7322869fa6871e16372a49c382f38 (patch)
tree8642cdf67a65a11938f05499164f3f6a8ba7f510 /Software/Embedded_SW/Embedded/Modules/Control
parent65d898feb5cadb4bf421f03e40ef3f3109c881a6 (diff)
downloadTango-0087c3567ff7322869fa6871e16372a49c382f38.tar.gz
Tango-0087c3567ff7322869fa6871e16372a49c382f38.zip
IDS Handling, Reports, Winder message flushing
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c13
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h1
2 files changed, 14 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
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
index cf49e697a..807b81e98 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
@@ -19,6 +19,7 @@ int32_t MillisecSetMotorSpeed(TimerMotors_t MotorId, unsigned long Data, int Len
int32_t MillisecReadFromMotor(TimerMotors_t MotorId, unsigned long Data, int Length, MSecFptr Callback);
int32_t MillisecReadFromTempSensor(uint32_t TempSensorId, MSecFptr Callback);
+int MillisecFlushMsgQ(TimerMotors_t MotorId);
uint32_t getMotorStatusData(int MotorId);
uint32_t getMotorSpeedData(int MotorId);