From 124de0fe327a87aca0de1f38b7481cba51a01276 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 27 Feb 2020 17:05:48 +0200 Subject: Improvements to the WHS blower control (feature #1561) --- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 00ce306cf..5170b7cef 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -726,8 +726,8 @@ uint32_t MillisecLowLoop(uint32_t tick) if (WHS_Type == WHS_TYPE_NEW) { Trigger_WHS_PT100_Read_All(); - WHS_Blower_Avarege_ORF1(); //drier - WHS_Blower_Avarege_ORF3(); //head + WHS_Blower_Avarege(HEAD_FLOW_METER); + WHS_Blower_Avarege(DRIER_FLOW_METER); WHS_Start_Blower_Control_Closed_Loop (); } } -- cgit v1.3.1 From 95aae68e89693fb394d59d19b383571099b6d3d4 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 1 Mar 2020 09:15:06 +0200 Subject: fix file handling. set the machine state to error while waiting to the cooler --- Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c | 2 +- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 2 +- .../Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control') diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c index 1ba656657..3b5ba176d 100644 --- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c +++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c @@ -717,7 +717,7 @@ FRESULT FileWrite(void * buffer, uint16_t size,char *path, uint32_t timeout) return FR_TIMEOUT; } - Fresult = f_open(FileHandle,path,FA_WRITE | FA_OPEN_ALWAYS); + Fresult = f_open(FileHandle,path,FA_WRITE | FA_OPEN_ALWAYS|FA_CREATE_ALWAYS); if (Fresult == FR_OK) { Fresult = f_write(FileHandle,buffer,size,&Bytes ); diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 5170b7cef..da4f04f3b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -978,7 +978,7 @@ void MillisecLogInit(void) if (FileHandle == 0) Fresult = FR_DENIED; else - Fresult = f_open(FileHandle,MillisecPath,FA_WRITE | FA_OPEN_ALWAYS); + Fresult = f_open(FileHandle,MillisecPath,FA_WRITE | FA_OPEN_ALWAYS|FA_CREATE_ALWAYS); ROM_IntMasterEnable(); return ; diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 9f864c2dc..05559ffae 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -453,6 +453,7 @@ uint32_t InitSequenceDispenserPressureBuildUpTest(void) uint32_t InitSequenceWaitForCoolerCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) { MachineStateDetail = INIT_SEQUENCE_WAIT_FOR_COOLER; + SetMachineStatus(MACHINE_STATE__Ready); //prevent job while waiting for the cooler if (SafeRemoveControlCallback(HWControlId, InitSequenceWaitForCoolerCallBackFunction )==OK) HWControlId = 0xFF; @@ -477,6 +478,8 @@ uint32_t InitSequenceWaitForCooler(void) } else { + SetMachineStatus(MACHINE_STATE__Error); //prevent job while waiting for the cooler + //cold reset, wait 2 minutes for cooler start // HWControlId = AddControlCallback("Init Cooler", InitSequenceWaitForCoolerCallBackFunction, 2*eOneMinute, TemplateDataReadCBFunction,0,0, 0 ); HWControlId = AddControlCallback("Init Cooler", InitSequenceWaitForCoolerCallBackFunction, 2*eOneSecond, TemplateDataReadCBFunction,0,0, 0 ); -- cgit v1.3.1