diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-08-25 10:08:01 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-08-25 10:08:01 +0300 |
| commit | 338edba081dba2a2aefb634811be1cc84ec93d64 (patch) | |
| tree | 0021538796c254a8eab8527e8461a2e831e68c1c /Software/Embedded_SW/Embedded/StateMachines | |
| parent | 49ddda1cc22d6cbb72f499b37e5db32c95252dfa (diff) | |
| download | Tango-338edba081dba2a2aefb634811be1cc84ec93d64.tar.gz Tango-338edba081dba2a2aefb634811be1cc84ec93d64.zip | |
merge
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines')
5 files changed, 13 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 815b153d1..f20b1aa94 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -242,7 +242,7 @@ uint32_t InitSequenceBlowerCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) Control_Voltage_To_Blower(3000); WHS_enable_control_loop(true); - WHS_Set_SetPoint_Q_value(headairflow*2/3); + WHS_Set_SetPoint_Q_value(headairflow); AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_INITIAL_BLOWER_FAILED,OFF); //handle alarm detection and operation waste_seq_step1();// include 1Sec delay <- to open !!!! diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c index 3a60a761b..5d512cb9b 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c @@ -120,7 +120,7 @@ void PowerIdleSetIdle(void) Control_Voltage_To_Blower(BlowerCfg.heatingvoltage); else Control_Voltage_To_Blower(BlowerCfg.voltage-500); - WHS_Set_SetPoint_Q_value(headairflow/2); + WHS_Set_SetPoint_Q_value(headairflow); } SetMachineStatus(MACHINE_STATE__Sleep); if (Auto_Shutdown_Bypass == false) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index 776d55080..73d93a7b2 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -256,7 +256,7 @@ uint32_t PowerOffHeatersOff(void) if (HandleProcessParameters(&ProcessParametersClear,false)!= OK) { LOG_ERROR (PowerOffMachineState, "Turn Off Heaters failed"); - return ERROR; + //return ERROR; } PowerOffMachineState++; @@ -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..52aac94f5 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c @@ -142,7 +142,6 @@ FRESULT RewindJobFile() FRESULT CloseJobFile() { Fresult = f_close(JobRequestFileHandle); -#warning trying not to hold the semaphore and enable the PPC/MS to work on several files simultaneously readbBytes = 0; ImmediateRead = 0; @@ -254,6 +253,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 { @@ -310,7 +311,7 @@ uint32_t PrintingHWConfiguration(void *Configuration) if ((IFS_Availability[1] == IFS_RECOGNIZED_INIT_PASSED)&&(IFS_Availability[2] == IFS_RECOGNIZED_INIT_PASSED)) //ifs installed -check cartridges Configured[Module_Waste] = true; - if (request->n_motors < HARDWARE_MOTOR_TYPE__MOTO_SPARE1_1) + if (request->n_motors) { for (i = 0; i < request->n_motors ; i++) { |
