From 0087c3567ff7322869fa6871e16372a49c382f38 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 20 Jun 2018 19:59:18 +0300 Subject: IDS Handling, Reports, Winder message flushing --- .../Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c') 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