From a391142a20ab2c47a4ac6c1f6a7f3b77f04b4a92 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 20 Feb 2020 11:40:51 +0200 Subject: fix init heating and midtank reading (semaphore and task) --- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 fe350d78d..ff0353b23 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -671,6 +671,7 @@ uint32_t MillisecLowLoop(uint32_t tick) } if (O200Millisecond_Tick) { + Trigger_WHS_MAX11614_Read_allADC(); FPGA_GetAllDispensersValveBusyOCD(); temp = Read_Fans_Tacho(); DrawerFansStatus = temp & 0x1F; @@ -692,6 +693,7 @@ uint32_t MillisecLowLoop(uint32_t tick) } if (O600Millisecond_Tick) { + Trigger_WHSReadAllFanTacho (); if (RapidPressureRead == false) { for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++) @@ -721,19 +723,17 @@ uint32_t MillisecLowLoop(uint32_t tick) } } Trigger_WHS_PT100_Read_All(); - Trigger_WHS_MAX11614_Read_allADC(); WHS_Blower_Avarege_ORF1(); //drier WHS_Blower_Avarege_ORF3(); //head - Trigger_WHSReadAllFanTacho (); WHS_Start_Blower_Control_Closed_Loop (); } if (OneMinute_Tick) { - Trigger_MidTank_Pressure_Read(); - /*for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++) + //Trigger_MidTank_Pressure_Read(); + for (Disp_i = 0;Disp_i < MAX_SYSTEM_DISPENSERS;Disp_i++) { Read_MidTank_Pressure_Sensor(Disp_i); - }*/ + } // MachineUpdateResponseFunc(); /* for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++) { -- cgit v1.3.1 From 53daee7d858e4795d681ebd8641bd370eb36dadc Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 20 Feb 2020 14:05:26 +0200 Subject: bugs fix - job abort --- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 11 +++++++---- Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c | 2 +- 2 files changed, 8 insertions(+), 5 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 ff0353b23..1cc8e766b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -722,10 +722,13 @@ uint32_t MillisecLowLoop(uint32_t tick) PressureCalc[Disp_i] = MillisecCalculatePressures(Disp_i); } } - Trigger_WHS_PT100_Read_All(); - WHS_Blower_Avarege_ORF1(); //drier - WHS_Blower_Avarege_ORF3(); //head - WHS_Start_Blower_Control_Closed_Loop (); + if (WHS_Type == WHS_TYPE_NEW) + { + Trigger_WHS_PT100_Read_All(); + WHS_Blower_Avarege_ORF1(); //drier + WHS_Blower_Avarege_ORF3(); //head + WHS_Start_Blower_Control_Closed_Loop (); + } } if (OneMinute_Tick) { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 7eb621c81..f295f2475 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -930,7 +930,6 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes responseContainer.has_continuous = true; responseContainer.continuous = true; - container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); if (done == true) { if(JobEndReason != JOB_OK) @@ -945,6 +944,7 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes responseContainer.error = ERROR_CODE__CONTINUOUS_RESPONSE_ABORTED; } } + container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); if (container_buffer) { size_t container_size = message_container__pack(&responseContainer, container_buffer); -- cgit v1.3.1