From dee982787439eea46d03624c1f69a38eb13a50ee Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 27 Dec 2020 20:29:55 +0200 Subject: prepare percentage --- .../Embedded/Common/SWUpdate/FileSystem.c | 3 ++- .../Embedded/Modules/Heaters/Heaters_print.c | 4 ++-- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 2 +- .../Embedded/StateMachines/Printing/JobSTM.c | 24 ++++++++++++++++------ 4 files changed, 23 insertions(+), 10 deletions(-) (limited to 'Software/Embedded_SW') 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 (temp0.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) -- cgit v1.3.1