aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-02 15:16:32 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-02 15:16:32 +0300
commit3f6aecd92ceca69ffa5fc07ea0bbe93fd4097c85 (patch)
treea0e69764fe4eca3fc445f44e1f963a2a72e4327f /Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
parent3713f74d0d811b869af5522a576e36f7e6a0ed2e (diff)
downloadTango-3f6aecd92ceca69ffa5fc07ea0bbe93fd4097c85.tar.gz
Tango-3f6aecd92ceca69ffa5fc07ea0bbe93fd4097c85.zip
Embedded SW Release note - Version 1.3.8.2
File upload: prevent on job, reduce priority (watchdog) Report: packages filters introduced, please feel free to use them. robustness in communication improved large number of segments and gradient support - initial at the end of job the screw does not return back rockers - adjust values before and after loading the cart
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c')
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
index 69361bbae..972f79939 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
@@ -37,6 +37,7 @@
#include "PMR/Printing/CurrentJobResponse.pb-c.h"
#include "PMR/Printing/ResumeCurrentJobRequest.pb-c.h"
#include "PMR/Printing/ResumeCurrentJobResponse.pb-c.h"
+#include "PMR/Printing/JobUploadStrategy.pb-c.h"
#include "PMR/Printing/JobStatus.pb-c.h"
#include "PMR/Printing/AbortJobRequest.pb-c.h"
#include "PMR/Printing/AbortJobResponse.pb-c.h"
@@ -88,7 +89,7 @@ JobSegment *TSegment;
JobSpool *Tspool;
bool CopyConfigured[MAX_SYSTEM_MODULES];
char ErrorMsg[100];
-
+JobUploadStrategy uploadstrategy = JOB_UPLOAD_STRATEGY__Default;
ModuleStateEnum PrepareWaiting[MAX_SYSTEM_MODULES] = {ModuleIdle,ModuleIdle,ModuleIdle,ModuleIdle,ModuleIdle};
@@ -377,6 +378,7 @@ uint32_t ThreadJoggingFunc(int speed)
{
//load essential job prameters to enable thread running
Ticket.n_segments = 1;
+ n_segments = 1;
Ticket.segments = my_malloc(sizeof(Ticket.segments));
TSegment = my_malloc(sizeof(JobSegment));
Tspool = my_malloc(sizeof(JobSpool));
@@ -587,7 +589,7 @@ void JobRequestFunc(MessageContainer* requestContainer)
ErrorCode error = ERROR_CODE__NONE;
JobEndReasonEnum JobAlarmReason = JOB_OK;
- if (JobActive == false)
+ if (JobActive == true)
{
LOG_ERROR(JobActive, "Job started while active");
}
@@ -612,7 +614,17 @@ void JobRequestFunc(MessageContainer* requestContainer)
if (CurrentRequest!= NULL)
job_request__free_unpacked(CurrentRequest,NULL);
CurrentRequest = request;
-
+ n_segments = 0;
+ if (CurrentJob->uploadstrategy == JOB_UPLOAD_STRATEGY__JobDescriptionFile)
+ {
+ LOG_ERROR(JobActive, "Job upload strategy file");
+ uploadstrategy = JOB_UPLOAD_STRATEGY__JobDescriptionFile;
+ }
+ else
+ {
+ uploadstrategy = JOB_UPLOAD_STRATEGY__Default;
+ n_segments = CurrentJob->n_segments;
+ }
status = PASSED;
JobEndReason = JOB_OK;
JobAlarmReason = AlarmHandlingPrepareJob(CurrentJob);
@@ -649,7 +661,8 @@ void JobRequestFunc(MessageContainer* requestContainer)
}
if (status == PASSED)
{
- Report("Job Request ",__FILE__,__LINE__,Ticket->processparameters->dyeingspeed,RpWarning,Ticket->n_segments, Ticket->intersegmentlength);
+ Report("Job Request ",__FILE__,__LINE__,Ticket->processparameters->dyeingspeed,RpWarning,n_segments, Ticket->intersegmentlength);
+ OpenJobFile();
StartJob(CurrentJob);
}
}