aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-11-08 11:23:48 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-11-08 11:23:48 +0200
commite67d15360ce355ac9e675079cd5d6442e3fa1905 (patch)
tree4456bc96ff49b197f52af59afbb2e2b58de95f07 /Software/Embedded_SW/Embedded
parent8cae26aa5d465477a408500ae64f2afc05859a6a (diff)
downloadTango-e67d15360ce355ac9e675079cd5d6442e3fa1905.tar.gz
Tango-e67d15360ce355ac9e675079cd5d6442e3fa1905.zip
fix bugs
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new7
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new
index ba4a5c8e0..f33a134e1 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new
@@ -32,6 +32,7 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag);
uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue);
bool ScrewCurrentDirection = false; //holds current screw direction
+bool BusyfirstCall = true; //Ignores first call after activating the screw - too early
double ScrewSpeed = 0;
double ScrewRunningTime = 0;
bool ScrewDirection = false;
@@ -210,6 +211,12 @@ uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
{
uint32_t Steps;
double temp;
+ if (BusyfirstCall)
+ {
+ BusyfirstCall = false;
+ DirectionChangeCounter++;
+ return OK;
+ }
//ScrewCurrentDirection: false moves out, true moves home
if (BusyFlag == NOTBUSY)
{
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
index f4b83a3cf..f0415fac1 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
@@ -755,7 +755,7 @@ Void jobTask(UArg arg0, UArg arg1)
if (CurrentRequest!= NULL)
job_request__free_unpacked(CurrentRequest,NULL);
CurrentRequest = NULL;
- SuspendLargeMessages = true;
+ SuspendLargeMessages = false;
//CleanState(CurrentJob);
break;
case PrintingResultsFail:
@@ -764,6 +764,7 @@ Void jobTask(UArg arg0, UArg arg1)
if (CurrentRequest!= NULL)
job_request__free_unpacked(CurrentRequest,NULL);
CurrentRequest = NULL;
+ SuspendLargeMessages = false;
//send message data as a validation error message to host
ExitState(Message.messageData);
break;