aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/StateMachines/Printing
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-10-31 10:16:10 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-10-31 10:16:10 +0200
commitcd18fb27a2499072f18cb0320ddeb85a0500a93e (patch)
treeb1bf1984813bc70ea4784e0e956497fd4fd35805 /Software/Embedded_SW/Embedded/StateMachines/Printing
parent4aca8247565596d6c12ba73242d599dc42887625 (diff)
downloadTango-cd18fb27a2499072f18cb0320ddeb85a0500a93e.tar.gz
Tango-cd18fb27a2499072f18cb0320ddeb85a0500a93e.zip
version 1.4.6.0 - going forward
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines/Printing')
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
index 3cdc4d1b8..1f6ff685e 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
@@ -102,7 +102,7 @@ JobUploadStrategy uploadstrategy = JOB_UPLOAD_STRATEGY__Default;
ModuleStateEnum PrepareWaiting[MAX_SYSTEM_MODULES] = {ModuleIdle,ModuleIdle,ModuleIdle,ModuleIdle,ModuleIdle};
-uint16_t job_length = 0;
+double job_length = 0.0;
/********************************************************************************************
* functions describes motor operation flow and movement state during profile execution
@@ -517,7 +517,23 @@ void ThreadJoggingRequestFunc(MessageContainer* requestContainer)
ThreadJoggingResponse response = THREAD_JOGGING_RESPONSE__INIT;
- status = ThreadJoggingFunc(request->speed);
+ if (JobIsActive() == true)
+ {
+ AbortJob(0);
+ //set the job handler to handle heaters, ids and waste in the state machine
+ Task_sleep(100); //let the job end procedure role before returning the configuration to normal.
+ usnprintf(ErrorMsg, 80,"Copy Configured T %d W %d I %d H %d W %d",CopyConfigured[Module_Thread],CopyConfigured[Module_Winder],CopyConfigured[Module_IDS],CopyConfigured[Module_Heaters],CopyConfigured[Module_Waste]);
+ Report(ErrorMsg, __FILE__, __LINE__, 0, RpWarning, 0, 0);
+
+
+ my_free(Ticket.segments);
+ my_free(TSegment);
+ my_free(Tspool);
+ }
+ else
+ {
+ status = ThreadJoggingFunc(request->speed);
+ }
responseContainer = createContainer(MESSAGE_TYPE__ThreadJoggingResponse, requestContainer->token, true, &response, &thread_jogging_response__pack, &thread_jogging_response__get_packed_size);
if (status!= OK)
@@ -536,7 +552,7 @@ void ThreadJoggingRequestFunc(MessageContainer* requestContainer)
}
void ThreadAbortJoggingFunc(void)
{
- if (JobIsActive() == true)
+/* if (JobIsActive() == true)
{
AbortJob(0);
//set the job handler to handle heaters, ids and waste in the state machine
@@ -549,7 +565,7 @@ void ThreadAbortJoggingFunc(void)
my_free(TSegment);
my_free(Tspool);
}
-
+*/
}
void ThreadAbortJoggingRequestFunc(MessageContainer* requestContainer)
{
@@ -640,7 +656,7 @@ void Stub_JobRequest(MessageContainer* requestContainer)
StubLength = Ticket->length*100;
StubLengthCounter = 0;
ustrncpy (JobToken, requestContainer->token,36);
- StubControlId = AddControlCallback( SendStubJobProgress, eOneSecond,TemplateDataReadCBFunction,0,0,0);
+ StubControlId = AddControlCallback(NULL, SendStubJobProgress, eOneSecond,TemplateDataReadCBFunction,0,0,0);
jobStatus.has_progress = true;
jobStatus.progress = 0.0;
@@ -753,9 +769,9 @@ void JobRequestFunc(MessageContainer* requestContainer)
if (JobAlarmReason ==OK)
{
n_unit_segments = n_segments;
- if ((Ticket->has_units)&&(Ticket->units > 1))
+ if ((Ticket->has_numberofunits)&&(Ticket->numberofunits > 1))
{
- n_units = Ticket->units;
+ n_units = Ticket->numberofunits;
}
if (n_units>1)
{