aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-10-03 10:04:11 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-10-03 10:04:11 +0300
commit2ccc5a2e78f306d3c434c764e34509d4db92d8d8 (patch)
tree399f8c061fa698c36d06da9ebc101d65b02df26e /Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
parentb9e2c008322ce474ce6e0b18da9a786c128de8d9 (diff)
parenta6496a02892d653a70bc9e0d37856b1a7d3cd74b (diff)
downloadTango-2ccc5a2e78f306d3c434c764e34509d4db92d8d8.tar.gz
Tango-2ccc5a2e78f306d3c434c764e34509d4db92d8d8.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index c59a95180..c68156e68 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
@@ -567,13 +567,13 @@
{
REPORT_MSG(LoadStages, "Thread UnLoad State Machine step");
LoadArmInfo.LoadArmRounds = 0;
- uint32_t numberOfSteps = 0;
+ //uint32_t numberOfSteps = 0;
//Start Feeder Pid, Rotate Loading Arm Counter Thread Direction X Circles According To Rml. Feeder Speed Is 40
SetOriginMotorSpeed(19);
// OriginalMotorSpd_2PPS[FEEDER_MOTOR] = 1000;
// CurrentControlledSpeed[FEEDER_MOTOR] = 1000;
- numberOfSteps = MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulseperround*LoadArmInfo.LoadArmRounds*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].microstep*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulleyradius;
+ //numberOfSteps = MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulseperround*LoadArmInfo.LoadArmRounds*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].microstep*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulleyradius;
MotorControlConfig[POOLER_MOTOR].m_params.MAX = 1;
MotorControlConfig[POOLER_MOTOR].m_params.MIN = MotorsControl[POOLER_MOTOR].outputproportionalpowerlimit*-1;
MotorControlConfig[POOLER_MOTOR].m_params.Kd = MotorsControl[POOLER_MOTOR].derivativetime;
@@ -719,6 +719,11 @@
}
uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue)
{
+ if (JobIsActive())
+ {
+ Report("ThreadLoadButton called on job",__FILE__,__LINE__,LoadStages,RpMessage,ReadValue,0);
+ return ERROR;
+ }
Report("ThreadLoadButton",__FILE__,__LINE__,LoadStages,RpMessage,ReadValue,0);
if (LoadStages > ReadValue)
{