diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-08-16 23:31:55 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-08-16 23:31:55 +0300 |
| commit | 5260452ded0983a5f71692625cafe2f2897178ef (patch) | |
| tree | a89af9721ab9534d98591d4c57983b50f1469c2e /Software/Embedded_SW/Embedded/StateMachines | |
| parent | ccb92223657ac5a21af5aa21d309d9924d9a0fd8 (diff) | |
| download | Tango-5260452ded0983a5f71692625cafe2f2897178ef.tar.gz Tango-5260452ded0983a5f71692625cafe2f2897178ef.zip | |
some changes before 1.4.6.42/ mostly moving delay.c to utilities
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines')
3 files changed, 9 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index 776d55080..04cc389ef 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -501,6 +501,8 @@ uint32_t PowerOffPowerOff(void) REPORT_MSG (10-i, "Power off in x seconds"); Task_sleep (1000); } + CloseLogFile(); + ControlStop(); MillisecStop(); HeatersEnd(); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 33face713..8bce76ccf 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -151,6 +151,7 @@ bool JobResumed = false; char JobToken[36+1]={0}; bool JobAbortedByUser = false; +ThreadParameters SavedThreadParameters; //////////////////////////////////////////////////////////////////////////// void StartJob(void *JobDetails); @@ -425,6 +426,7 @@ uint32_t ThreadJoggingFunc(int speed) Tspool->rotationsperpassage = 3.1415926*2; Tspool->has_limitswitchstartpointoffset = false; Ticket.spool = Tspool; + Ticket.threadparameters = &SavedThreadParameters; CurrentJob = &Ticket; InternalWindingConfigMessage(Tspool); JoggingJobActive = true; @@ -608,6 +610,7 @@ uint32_t ThreadCleaningJob(int speed) Tspool->rotationsperpassage = 3.1415926*2; Tspool->has_limitswitchstartpointoffset = false; Ticket.spool = Tspool; + Ticket.threadparameters = &SavedThreadParameters; CurrentJob = &Ticket; job_length = CurrentJob->length + dryerbufferMeters; @@ -958,6 +961,7 @@ void JobRequestFunc(MessageContainer* requestContainer) { Report("Job Request ",__FILE__,__LINE__,Ticket->processparameters->dyeingspeed,RpWarning,n_segments, Ticket->intersegmentlength); memcpy(&Configured,&JobConfigured,sizeof(JobConfigured)); + memcpy(&SavedThreadParameters,&Ticket->threadparameters,sizeof(SavedThreadParameters)); StartJob(CurrentJob); } } @@ -1352,6 +1356,7 @@ Void jobTask(UArg arg0, UArg arg1) //uint16_t length; //Clock_setTimeout(HostKAClock, 1000); //Clock_start(HostKAClock); + memset(&SavedThreadParameters,0,sizeof(SavedThreadParameters)); JobmsgQ = Mailbox_create(MAX_MSG_LEN, 20, NULL,NULL); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c index b874e5eaf..f39bf9f01 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c @@ -254,6 +254,8 @@ JobDescriptionFileBrushStop *GetNextBrushStopFromJobFile() { readbBytes += ImmediateRead; BrushStop = job_description_file_brush_stop__unpack(NULL, BrushStopSize, BrushStopPtr); + if (BrushStop == NULL) + Report("brush_stop__unpack error!",__FILE__,BrushStopSize,(int)readbBytes,RpWarning,(int)ImmediateRead,0); }//brushstop malloc ok else { |
