diff options
Diffstat (limited to 'Software/Embedded_SW/Embedded')
4 files changed, 23 insertions, 10 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index 7b7d4c3c2..efc156da3 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -724,7 +724,8 @@ uint32_t GetFilesRequestFunc(MessageContainer* requestContainer) } else { - f_unlink(Data[ListedFiles].fullpath); + // f_unlink(Data[ListedFiles].fullpath); + Report("file system error - format FFS", __FILE__, __LINE__, 255, RpWarning, (int)0, 0); } /*RTC_time.tm_year=(fno[i]->fdate>>9)+1980;//populate the time struct (FAT start==1980, RTC.year==0) RTC_time.tm_mon=(fno[i]->fdate>>5)&0x000F; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index d48139255..f7fb7119c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -585,12 +585,12 @@ double HeatersPrepareProgress(void) { if (MillisecGetTemperatures(HeaterId2PT100Id[i])>=HeaterCmd[i].targettemperatue) continue; - temp = MillisecGetTemperatures(HeaterId2PT100Id[i])/HeaterCmd[i].targettemperatue; + temp = (double)(MillisecGetTemperatures(HeaterId2PT100Id[i]))/(double)(HeaterCmd[i].targettemperatue); if (temp<MaxDifference) MaxDifference = temp; } } - Report("HeatersPrepareProgress" ,__FILE__,__LINE__,(int)(MaxDifference*100),RpWarning,0,0); + //Report("HeatersPrepareProgress" ,__FILE__,__LINE__,(int)(MaxDifference*100),RpWarning,0,0); return MaxDifference; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index aaa371aac..19507775e 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -481,7 +481,7 @@ c. Go to step 2.a x Segment.BrushStopsCount. if (temp<MaxDifference) MaxDifference = temp; } - Report("IdsPrepareProgress" ,__FILE__,__LINE__,(int)(MaxDifference*100),RpWarning,0,0); + //Report("IdsPrepareProgress" ,__FILE__,__LINE__,(int)(MaxDifference*100),RpWarning,0,0); return MaxDifference; } diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index aef2af830..bbb75328b 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -214,8 +214,6 @@ static ReturnCode PrepareState(void *JobDetails) usnprintf(ErrorMsg, 80,"Configured Thrd %d Wind %d IDS %d Heat %d WHS %d",Configured[Module_Thread],Configured[Module_Winder],Configured[Module_IDS],Configured[Module_Heaters],Configured[Module_Waste]); Report(ErrorMsg, __FILE__, __LINE__, 0, RpWarning, 0, 0); - prepare_state = true; - if (Configured[Module_IDS]) { PrepareWaiting[Module_IDS] = ModuleWaiting; @@ -263,6 +261,7 @@ static ReturnCode PrepareState(void *JobDetails) } if (Configured[Module_Waste]) Waste_Prepare(); + prepare_state = true; return retcode; } @@ -1154,11 +1153,14 @@ void SendCleaningJobProgress(double ProcessedLength, int SegmentId, bool done, c } } +double heaterRatio = 1.00; +double dispenserRatio = 1.00 ; +float wfcf_count = 0; +double prepare_progress = 0.0; void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Message) { MessageContainer responseContainer; uint8_t* container_buffer; - //int len; //static msdid = 0; //int length = (int)(ProcessedLength*100); @@ -1175,9 +1177,19 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes if (prepare_state == true) { - double prepare_progress = 0.9*HeatersPrepareProgress()+0.1*IdsPrepareProgress(); - Report("prepare_progress" ,__FILE__,__LINE__,(int)(prepare_progress*100),RpWarning,0,0); - } + heaterRatio = HeatersPrepareProgress(); + dispenserRatio = IdsPrepareProgress(); + if ((heaterRatio>0.99)&&(dispenserRatio>0.99)) + { + wfcf_count+=1.00; + Report("prepare_progress wfcf" ,__FILE__,(int)(wfcf_count),(int)(heaterRatio*100),RpWarning,(int)(dispenserRatio*100),0); + } + prepare_progress = (0.9*heaterRatio)+(0.08*dispenserRatio) + (0.02*wfcf_count/25.0); + Report("prepare_progress" ,__FILE__,(int)(prepare_progress*1000),(int)(heaterRatio*1000),RpWarning,(int)(dispenserRatio*1000),0); + } + else + wfcf_count = 0; + double totlength = 0; if (JobToken[0] != 0) |
