aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW
diff options
context:
space:
mode:
authorRonen Sberlo <ronen.s@twine-s.com>2020-11-19 12:56:44 +0200
committerRonen Sberlo <ronen.s@twine-s.com>2020-11-19 12:56:44 +0200
commit412f4e542d5c66399e958e7233d04574011af4b4 (patch)
tree8e86b02b5cf2ec976e6c6c6bd97e6cd6d1e6d3d0 /Software/Embedded_SW
parent466340a97f8a158570f84fc12238101ca9c124ec (diff)
downloadTango-412f4e542d5c66399e958e7233d04574011af4b4.tar.gz
Tango-412f4e542d5c66399e958e7233d04574011af4b4.zip
stop cleaner motor if job aborted
Diffstat (limited to 'Software/Embedded_SW')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c10
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c
index 0ae017c13..59b9a56be 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c
@@ -107,6 +107,16 @@ uint32_t IDS_Cleaning_Move_Actuators()
CleaningStageCounter++;
return OK;
}
+
+uint32_t IDS_Cleaning_stop_cleaner_motor()
+{
+ TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DH_LID;
+ if (Head_Type != HEAD_TYPE_ARC)
+ return OK;
+
+ MotorStop(MotorId,Soft_Stop);
+ return OK;
+}
/*uint32_t IDS_Cleaning_Move_Rockers (int LeftRockerSpeed,int RightRockerSpeed)
{
uint32_t status = OK;
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
index 57d3ff5e2..0a8060496 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
@@ -118,5 +118,6 @@ void DispenserDataRequestFunc(MessageContainer* requestContainer);
void IDS_Start_Pid_Testing(int DispenserId);
void IDS_Stop_Pid_Testing(int DispenserId);
uint32_t cleaningMotorCBFunction (uint32_t deviceID, uint32_t Parameter1);
+uint32_t IDS_Cleaning_stop_cleaner_motor();
#endif /* MODULES_IDS_IDS_EX_H_ */
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 367b36e38..4fd273977 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -1940,6 +1940,7 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId)
IDS_Cleaning_Stop_Cleaning_Solution(NULL);
IDS_StopLubrication();
Init_CleaningStageCounter();//set the counter before relocating
+ IDS_Cleaning_stop_cleaner_motor();
HeadCard_Actuators_Relocate();
return OK;
}