From 09acf407dc5f432a2c293bde6ebf103b28af2549 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 3 Nov 2020 12:08:14 +0200 Subject: bugs, mostly in arc head init --- .../StateMachines/Initialization/InitSequence.c | 168 +++++++++++---------- 1 file changed, 92 insertions(+), 76 deletions(-) (limited to 'Software/Embedded_SW/Embedded/StateMachines') diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 0c007f755..c1362e220 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -83,6 +83,7 @@ uint32_t InitSequenceMachineReadyToDye(void); uint32_t InitSequenceStateMachine( INIT_SEQUENCE_STAGES_ENUM ReadValue); uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage); int InitFailures = 0; +extern double PressureSensorV0[2]; MACHINE_STATE_STAGES_ENUM GetMachineState(void) { @@ -230,12 +231,13 @@ uint32_t InitSequenceMidTankCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag } uint32_t InitSequenceBlowerCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) { - double V0[2] = {0.0, 0.0}; if (SafeRemoveControlCallback(HWControlId, InitSequenceBlowerCallBackFunction )==OK) HWControlId = 0xFF; else Report("Remove control callback failed",__FILE__,__LINE__,(int)HWControlId,RpWarning,(int)InitSequenceBlowerCallBackFunction,0); + + Turn_the_Blower_On();//Turn on with the Default_Voltage if (BlowerCfg.heatingvoltage) Control_Voltage_To_Blower(BlowerCfg.heatingvoltage); @@ -248,31 +250,6 @@ uint32_t InitSequenceBlowerCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) waste_seq_step1();// include 1Sec delay <- to open !!!! - if (Head_Type == HEAD_TYPE_ARC) { - if (ResetReason & SYSCTL_CAUSE_POR) { - V0[0] = PressureSensorInit(0); - V0[1] = PressureSensorInit(1); - ReportWithPackageFilter(InitFilter,"read pressure sensor v0[0],v0[1]", __FILE__,__LINE__, (int)V0[0], RpMessage, (int)V0[1], 0); - if (V0[0] > 1000) { - MCU_E2PromProgram(EEPROM_ORIFICE1_ZERO_VALUE, V0[0]); - ReportWithPackageFilter(InitFilter,"store pressure sensor v0[0]", __FILE__,__LINE__, (int)V0[0], RpMessage, 0, 0); - } else { - MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE, &V0[0]); - ReportWithPackageFilter(InitFilter,"load from EEPROM", __FILE__,__LINE__, (int)V0[0], RpMessage, 0, 0); - } - if (V0[1] > 1000) { - MCU_E2PromProgram(EEPROM_ORIFICE1_ZERO_VALUE, V0[1]); - ReportWithPackageFilter(InitFilter,"store pressure sensor v0[1]", __FILE__,__LINE__, (int)V0[1], RpMessage, 0, 0); - } else { - MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE, &V0[1]); - ReportWithPackageFilter(InitFilter,"load from EEPROM", __FILE__,__LINE__, (int)V0[1], RpMessage, 0, 0); - } - } else { - MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE, &V0[0]); - MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE, &V0[1]); - ReportWithPackageFilter(InitFilter,"load initial values from EEPROM", __FILE__,__LINE__, (int)V0[0], RpMessage, (int)V0[1], 0); - } - } Safety_Init(); InitStages++; @@ -433,70 +410,109 @@ uint32_t InitSequencePowerManagementInit(void) // InitStages++; return OK; } -uint32_t InitSequenceInitialBlowerActivation(void) +uint32_t InitSequenceWHSAirFlowCalibration(void) { - SetMachineState(MACHINE_STATE_INITIAL_BLOWER_ACTIVATION); int i,total1=0,total2=0,total3=0; uint32_t ZeroValue; uint16_t value = 0; - //WHS_Start_Blower_Control_Closed_Loop(0.0); - WHS_enable_control_loop(false); - if (WHS_Type == WHS_TYPE_NEW) + + if (ResetReason & SYSCTL_CAUSE_POR) { - if (ResetReason & SYSCTL_CAUSE_POR) + for (i=0;i<8;i++) { - Control_Voltage_To_Blower(1); //stop the blower - Task_sleep (1000); - for (i=0;i<8;i++) - { - Trigger_WHS_MAX11614_Read_allADC(); - Task_sleep (100); - get_orf_1(&value); - total1+=value; - get_orf_2(&value); - total2+=value; - get_orf_3(&value); - total3+=value; - ReportWithPackageFilter(InitFilter,"load initial orifice value", __FILE__,total1,total2, RpMessage, total3, 0); - Task_sleep(100); - } - total1/=8; - total2/=8; - total3/=8; - MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE,&ZeroValue); - if ((total1>800)&&(total1<2000)) - { - MCU_E2PromProgram(EEPROM_ORIFICE1_ZERO_VALUE,total1); - } - else - total1 = ZeroValue; - ReportWithPackageFilter(InitFilter,"store initial orifice 1 value", __FILE__,EEPROM_ORIFICE1_ZERO_VALUE,total1, RpMessage, ZeroValue, 0); - MCU_E2PromRead(EEPROM_ORIFICE3_ZERO_VALUE,&ZeroValue); - if ((total3>1000)&&(total3<1500)) - { - MCU_E2PromProgram(EEPROM_ORIFICE3_ZERO_VALUE,total3); - } - else - total3 = ZeroValue; - ReportWithPackageFilter(InitFilter,"store initial orifice 3 value", __FILE__,EEPROM_ORIFICE3_ZERO_VALUE,total3, RpMessage, ZeroValue, 0); - WHS_MAX11614_Load_OrificeZeroValue(total1,total2,total3); + Trigger_WHS_MAX11614_Read_allADC(); + Task_sleep (100); + get_orf_1(&value); + total1+=value; + get_orf_2(&value); + total2+=value; + get_orf_3(&value); + total3+=value; + ReportWithPackageFilter(InitFilter,"load initial orifice value", __FILE__,total1,total2, RpMessage, total3, 0); + Task_sleep(100); + } + total1/=8; + total2/=8; + total3/=8; + MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE,&ZeroValue); + if ((total1>800)&&(total1<2000)) + { + MCU_E2PromProgram(EEPROM_ORIFICE1_ZERO_VALUE,total1); } else + total1 = ZeroValue; + ReportWithPackageFilter(InitFilter,"store initial orifice 1 value", __FILE__,EEPROM_ORIFICE1_ZERO_VALUE,total1, RpMessage, ZeroValue, 0); + MCU_E2PromRead(EEPROM_ORIFICE3_ZERO_VALUE,&ZeroValue); + if ((total3>1000)&&(total3<1500)) { - MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE,&total1); - MCU_E2PromRead(EEPROM_ORIFICE3_ZERO_VALUE,&total3); - ReportWithPackageFilter(InitFilter,"load initial values from EEPROM", __FILE__,0,total3, RpMessage, total1, 0); - WHS_MAX11614_Load_OrificeZeroValue(total1,total1,total3); + MCU_E2PromProgram(EEPROM_ORIFICE3_ZERO_VALUE,total3); + } + else + total3 = ZeroValue; + ReportWithPackageFilter(InitFilter,"store initial orifice 3 value", __FILE__,EEPROM_ORIFICE3_ZERO_VALUE,total3, RpMessage, ZeroValue, 0); + WHS_MAX11614_Load_OrificeZeroValue(total1,total2,total3); + } + else + { + MCU_E2PromRead(EEPROM_ORIFICE1_ZERO_VALUE,&total1); + MCU_E2PromRead(EEPROM_ORIFICE3_ZERO_VALUE,&total3); + ReportWithPackageFilter(InitFilter,"load initial values from EEPROM", __FILE__,0,total3, RpMessage, total1, 0); + WHS_MAX11614_Load_OrificeZeroValue(total1,total1,total3); + } + return OK; + +} +uint32_t InitSequenceArcAirflowCalibration(void) +{ + double V0[2] = {0.0, 0.0}; + if (ResetReason & SYSCTL_CAUSE_POR) { + V0[0] = PressureSensorInit(0); + V0[1] = PressureSensorInit(1); + ReportWithPackageFilter(InitFilter,"read pressure sensor v0[0],v0[1]", __FILE__,__LINE__, (int)V0[0], RpMessage, (int)V0[1], 0); + if (V0[0] > 1000) { + MCU_E2PromProgram(EEPROM_PRESSURE_SENSOR_V0_0, V0[0]); + ReportWithPackageFilter(InitFilter,"store pressure sensor v0[0]", __FILE__,__LINE__, (int)V0[0], RpMessage, 0, 0); + } else { + MCU_E2PromRead(EEPROM_PRESSURE_SENSOR_V0_0, &V0[0]); + ReportWithPackageFilter(InitFilter,"load from EEPROM", __FILE__,__LINE__, (int)V0[0], RpMessage, 0, 0); } + if (V0[1] > 1000) { + MCU_E2PromProgram(EEPROM_PRESSURE_SENSOR_V0_1, V0[1]); + ReportWithPackageFilter(InitFilter,"store pressure sensor v0[1]", __FILE__,__LINE__, (int)V0[1], RpMessage, 0, 0); + } else { + MCU_E2PromRead(EEPROM_PRESSURE_SENSOR_V0_1, &V0[1]); + ReportWithPackageFilter(InitFilter,"load from EEPROM", __FILE__,__LINE__, (int)V0[1], RpMessage, 0, 0); + } + } else { + MCU_E2PromRead(EEPROM_PRESSURE_SENSOR_V0_0, &V0[0]); + MCU_E2PromRead(EEPROM_PRESSURE_SENSOR_V0_1, &V0[1]); + ReportWithPackageFilter(InitFilter,"load initial values from EEPROM", __FILE__,__LINE__, (int)V0[0], RpMessage, (int)V0[1], 0); } + PressureSensorV0[0] = V0[0]; + PressureSensorV0[1] = V0[1]; + return OK; +} +uint32_t InitSequenceInitialBlowerActivation(void) +{ + WHS_enable_control_loop(false); + Turn_the_Blower_On();//Turn on with the Default_Voltage + Control_Voltage_To_Blower(1); //stop the blower HeadBlowersInit(); + Task_sleep (1000); + + if (WHS_Type == WHS_TYPE_NEW) + { + InitSequenceWHSAirFlowCalibration(); + } + if (Head_Type == HEAD_TYPE_ARC) + { + InitSequenceArcAirflowCalibration(); + } + Voc_Sensor_Zero_Calibration(); + SetMachineState(MACHINE_STATE_INITIAL_BLOWER_ACTIVATION); - Turn_the_Blower_On();//Turn on with the Default_Voltage -// if (BlowerCfg.voltage) -// Control_Voltage_To_Blower(BlowerCfg.voltage); -// else - Control_Voltage_To_Blower(4200); + Control_Voltage_To_Blower(4200); Set_All_WHS_Fans(200); Report("AddControlCallback INIT",__FILE__,__LINE__,(int)HWControlId,RpWarning,(int)InitStages,0); HWControlId = AddControlCallback("Init Blower", InitSequenceBlowerCallBackFunction, 10* eOneSecond, TemplateDataReadCBFunction,0,0, 0 ); -- cgit v1.3.1 From 7c5013e09cafac9a7f027b5b9b8d1352cb794d24 Mon Sep 17 00:00:00 2001 From: Ronen Sberlo Date: Tue, 3 Nov 2020 13:29:53 +0200 Subject: fix read from eeprom --- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c | 6 +++--- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h | 2 +- .../Embedded/StateMachines/Initialization/InitSequence.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/StateMachines') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c index af82cdd9f..3c626ac22 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c @@ -54,7 +54,7 @@ extern uint16_t Head_Fan_Tach[2]; extern uint8_t Head_Fan_PWM_Command[2]; -double PressureSensorV0[2] = {0.0, 0.0}; +uint32_t PressureSensorV0[2] = {0, 0}; uint8_t HeadBlowersCloseLoopTime[2] = {2, 2}; uint8_t HeadBlowersEnable = 1; uint8_t BlowerIdToSensorId[2] = {HEAD_PT100_ZONE_5_0X84_0, HEAD_PT100_ZONE_7_0X86_0}; //HEAD_FAN_RIGHT, HEAD_FAN_LEFT @@ -343,9 +343,9 @@ void HeadBlowersCfg() } } -double PressureSensorInit(int blowerId) +uint32_t PressureSensorInit(int blowerId) { - double V0; + uint32_t V0; V0 = MillisecGetTemperatures(BlowerIdToSensorId[blowerId]); V0 /= 10; return V0; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h index 2c675606b..a23abf559 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h @@ -46,7 +46,7 @@ void HeatersControlStop(void); uint32_t Heaters_Init(void); double PressureSensorGetPressure(uint8_t SensorId); int HeadBlowersGetRPM(uint8_t fanId); -double PressureSensorInit(); +uint32_t PressureSensorInit(); void HeadBlowersInit(); uint32_t HeadBlowerPidRequestMessage(void* request, int BlowerId); void HeadBlowersCfg(); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index c1362e220..5d2bf2922 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -83,7 +83,7 @@ uint32_t InitSequenceMachineReadyToDye(void); uint32_t InitSequenceStateMachine( INIT_SEQUENCE_STAGES_ENUM ReadValue); uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage); int InitFailures = 0; -extern double PressureSensorV0[2]; +extern uint32_t PressureSensorV0[2]; MACHINE_STATE_STAGES_ENUM GetMachineState(void) { @@ -464,7 +464,7 @@ uint32_t InitSequenceWHSAirFlowCalibration(void) } uint32_t InitSequenceArcAirflowCalibration(void) { - double V0[2] = {0.0, 0.0}; + uint32_t V0[2] = {0, 0}; if (ResetReason & SYSCTL_CAUSE_POR) { V0[0] = PressureSensorInit(0); V0[1] = PressureSensorInit(1); -- cgit v1.3.1 From a567f6686212a66cbe9f825f8f72e218c7362bcf Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 4 Nov 2020 13:07:16 +0200 Subject: some small fixes (tunnel air flow, power up messages, persistent OFF alarms) --- .../Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c | 2 -- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 2 +- .../Embedded_SW/Embedded/Modules/General/process.c | 6 +++- .../Embedded/Modules/Heaters/Heaters_print.c | 8 ++--- .../Embedded/Software Release Notes.txt | 3 ++ .../StateMachines/Initialization/InitSequence.c | 38 ++++++++++++++++++---- 6 files changed, 44 insertions(+), 15 deletions(-) (limited to 'Software/Embedded_SW/Embedded/StateMachines') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c index 495f27652..00502d3ba 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c @@ -905,8 +905,6 @@ void Pumps_Control(PUMPS_ENUM Pump_Id, bool Direction) //1 - OPEN, 0 - CLOSE ?? //F1_GPO_Reg.bits.F1_GPO_WASTECH_PUMP2 = Direction; SecondaryPumpActive = Direction; } - else - LOG_ERROR(WHS_Type,"Pump activated on new whs"); break; case WHS_WTANKPUMP2: #ifndef EVALUATION_BOARD diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 127ccbabf..4a93c6aab 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -1080,7 +1080,7 @@ void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value) if (AlarmItem[Alarm_i].EventType == AlarmId) { //if (0) // PERSISTENT ALARM - if ((AlarmItem[Alarm_i].isPersistent == true)) // PERSISTENT ALARM simulate + if ((AlarmItem[Alarm_i].isPersistent == true)&&(value == true)) // PERSISTENT ALARM simulate Currently looking for "true" value, otherwise the currently existing OFF event appears { if (PersistentEventsResponse.events == NULL) PersistentEventsResponse.events = (Event **)my_malloc(sizeof(Event*)*(PersistentEventsResponse.n_events+1)); diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.c b/Software/Embedded_SW/Embedded/Modules/General/process.c index eef1d6985..872f772e2 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/process.c +++ b/Software/Embedded_SW/Embedded/Modules/General/process.c @@ -41,7 +41,7 @@ double dryerairflow = 5.0; double pressurebuildup = 0; double dryerzone1temp = 0; int32_t tableindex = 0; -double headBlowersFlow[2] = {1.0,1.0}; +double headBlowersFlow[2] = {1.5,1.5}; double dryerbufferMeters = 0; double dryerbufferCentimeters = 0; @@ -133,6 +133,10 @@ uint32_t HandleProcessParameters(ProcessParameters* ProcessParams,bool saveData) { if (ProcessParams->has_headairflow == false) ProcessParams->headairflow = headairflow; + if (ProcessParams->has_lblowerflow == false) + ProcessParams->lblowerflow = headBlowersFlow[HEAD_FAN_LEFT]; + if (ProcessParams->has_rblowerflow == false) + ProcessParams->rblowerflow = headBlowersFlow[HEAD_FAN_RIGHT]; if (ProcessParams->has_feedertension == false) ProcessParams->feedertension = feedertension; if (ProcessParams->has_windertension == false) diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index e702d7072..84013add6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -560,8 +560,8 @@ uint32_t HeatersSingleHeaterEnd(int HeaterId) } DeActivateHeater(HEATER_TYPE__DryerMainHeater); DeActivateHeater(HEATER_TYPE__DryerSecondaryHeater); - //Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerMainHeater]); - //Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerSecondaryHeater]); + Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerMainHeater]); + Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerSecondaryHeater]); HeaterPIDConfig[HeaterId].m_SetParam = 0; HeaterCmd[HeaterId].targettemperatue = 0; HeaterReady[HeaterId] = true; @@ -1449,8 +1449,8 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) } }*/ HeaterReady[index] = true; - //Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerMainHeater]); - //Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerSecondaryHeater]); + Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerMainHeater]); + Disable_Reading_Heaters_Current(HeaterId2CurrentId[HEATER_TYPE__DryerSecondaryHeater]); } return OK; diff --git a/Software/Embedded_SW/Embedded/Software Release Notes.txt b/Software/Embedded_SW/Embedded/Software Release Notes.txt index 341cf3a48..2a692d068 100644 --- a/Software/Embedded_SW/Embedded/Software Release Notes.txt +++ b/Software/Embedded_SW/Embedded/Software Release Notes.txt @@ -3,6 +3,9 @@ Embedded SW Release note - Version 1.5.1(3) - Pack 3 preparations for persistent alarms support configurable voltage hysteresis improve spike temperature handling (discard readvalue 0) +fix tunnel pressure calculation +support standby request +waste prepare failure - fix report Embedded SW Release note - Version 1.5.1(2) - Pack 3 ============================================================= diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 5d2bf2922..40315e623 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -91,8 +91,11 @@ MACHINE_STATE_STAGES_ENUM GetMachineState(void) } void SetMachineState(MACHINE_STATE_STAGES_ENUM NewState) { - MachineStateDetail = NewState; - PowerUpUpdate(NewState); + if (MachineStateDetail != NewState) + { + MachineStateDetail = NewState; + PowerUpUpdate(NewState); + } } void StopInitSequence(void) { @@ -146,7 +149,7 @@ uint32_t InitScheduler(uint32_t IfIndex, uint32_t BusyFlag) StoredInitStages = InitStages; InitSequenceStateMachine(InitStages); } - PowerUpUpdate(MachineStateDetail); + //PowerUpUpdate(MachineStateDetail); return OK; } /*******************************************************************************************************/ @@ -748,6 +751,14 @@ uint32_t InitSequenceStateMachine( INIT_SEQUENCE_STAGES_ENUM ReadValue) return OK; } char PowerUpToken[36+1] = {0}; +//char init_string[100]; +uint32_t PowerUpLoadControlId = 0xFF; +uint32_t PowerUpUpdateCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) +{ + + PowerUpUpdate(MachineStateDetail); + return OK; +} uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage) { uint32_t status = NOT_SUPPORTED; @@ -762,7 +773,7 @@ uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage) if (PowerUpToken[0] == 0) return OK; - Report("PowerUpUpdate",__FILE__,last,InitStages,RpWarning,(int)stage,0); + //Report("PowerUpUpdate",__FILE__,last,InitStages,RpWarning,(int)stage,0); response.has_state = true; response.has_progresspercentage = true; @@ -874,7 +885,8 @@ uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage) Error = ERROR_CODE__POWER_UP_NO_CFG_FILE; break; } - //Report("PowerUpUpdate",__FILE__,last,(int)response.progresspercentage,RpWarning,(int)stage,0); + //usnprintf(init_string, 80, "PowerUpUpdate token %s",PowerUpToken); + Report("PowerUpUpdate",__FILE__,InitStages,(int)response.progresspercentage,RpWarning,(int)stage,0); responseContainer = createContainer(MESSAGE_TYPE__StartPowerUpResponse, PowerUpToken, last, &response, &start_power_up_response__pack, &start_power_up_response__get_packed_size); responseContainer.has_continuous = true; responseContainer.continuous = true; @@ -891,8 +903,18 @@ uint32_t PowerUpUpdate(MACHINE_STATE_STAGES_ENUM stage) SendChars((char*)container_buffer, container_size); //MessageContainer responseContainer; + if (last == true) + { + if (PowerUpLoadControlId!= 0xFF) + { + RemoveControlCallback(PowerUpLoadControlId, PowerUpUpdateCallBackFunction); + PowerUpLoadControlId = 0xFF; + } + } return status; } + + uint32_t PowerUpUpdateFunc(MessageContainer* requestContainer) { uint32_t status = NOT_SUPPORTED; @@ -900,11 +922,13 @@ uint32_t PowerUpUpdateFunc(MessageContainer* requestContainer) // MachineUpdateInitParams InitParams; - Report("PowerUpUpdateFunc",__FILE__,__LINE__,(int)0,RpWarning,(int)0,0); StartPowerUpRequest* request = start_power_up_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); ustrncpy (PowerUpToken, requestContainer->token,36); + //usnprintf(init_string, 80, "PowerUpUpdateFunc token %s",PowerUpToken); + Report("PowerUpUpdateFunc",__FILE__,__LINE__,(int)0,RpWarning,(int)0,0); + PowerUpLoadControlId = AddControlCallback("PowerUpLoad", PowerUpUpdateCallBackFunction, 2* eOneSecond, TemplateDataReadCBFunction,0,0, 0 ); - PowerUpUpdate(MachineStateDetail); + //PowerUpUpdate(MachineStateDetail); start_power_up_request__free_unpacked(request,NULL); return status; } -- cgit v1.3.1 From 2f01062dca5a8e1bb9388cd4420d39125ebd3561 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 5 Nov 2020 17:15:49 +0200 Subject: alarm handling improved, including fan alarms --- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 10 +- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h | 1 + .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 181 ++++++++------------- .../Embedded/Modules/Control/MillisecTask.c | 25 +-- .../Embedded/Modules/Heaters/Heaters_Blowers.c | 7 +- .../Embedded/Modules/Stubs_Handler/Progress.c | 13 ++ .../StateMachines/Initialization/InitSequence.c | 2 +- 7 files changed, 110 insertions(+), 129 deletions(-) (limited to 'Software/Embedded_SW/Embedded/StateMachines') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 95651eba2..0b308408c 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -350,15 +350,15 @@ uint32_t Dryer_Read_Blower_Tach() return RPM; } */ +uint32_t Drayer_Fan_Speed_RPM = 0; +uint32_t Get_Dryer_Fan_Tacho() +{ + return Drayer_Fan_Speed_RPM; +} uint32_t Read_Dryer_Fan_Tacho() { - - uint32_t Drayer_Fan_Speed_RPM = 0; - Drayer_Fan_Speed_RPM = Calculate_Tacho_Fan_Speed(FPGA_Freq, 12, F1_Prescaler1_reg5, F1_Tacho_reg8); - - return Drayer_Fan_Speed_RPM; } diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h index e660b450a..121211c69 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h @@ -15,6 +15,7 @@ void Control_Dryer_Fan_PWM(uint8_t PWM_Command_Precent); void Machine_Idle_Breathing_Led(); uint32_t Read_Dryer_Fan_Tacho(); +uint32_t Get_Dryer_Fan_Tacho(); void Set_Speed_Sensor_TypeII_Registers(uint32_t Counter, uint32_t Prescaler); uint32_t Read_Speed_Sensor_TypeII(); diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 4a93c6aab..e736d45ea 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -1,3 +1,4 @@ + /* * AlarmHandling.c @@ -491,14 +492,14 @@ uint32_t AlarmHandlingLoadFile(void) { FileAlarmItem[F_count].AlarmDirection = AlarmParametersTable->alarmitem[i]->alarmdirection; FileAlarmItem[F_count].AlarmDirection = AlarmParametersTable->alarmitem[i]->alarmdirection; - FileAlarmItem[F_count].Frequency = AlarmParametersTable->alarmitem[i]->frequency; //1/10/100/1000 + //FileAlarmItem[F_count].Frequency = AlarmParametersTable->alarmitem[i]->frequency; //1/10/100/1000 FileAlarmItem[F_count].AlarmSource = AlarmParametersTable->alarmitem[i]->alarmsource; FileAlarmItem[F_count].DeviceId = AlarmParametersTable->alarmitem[i]->deviceid; FileAlarmItem[F_count].ModuleDeviceId = AlarmParametersTable->alarmitem[i]->moduledeviceid; FileAlarmItem[F_count].AlarmValue = AlarmParametersTable->alarmitem[i]->alarmvalue; FileAlarmItem[F_count].AlarmDirection = AlarmParametersTable->alarmitem[i]->alarmdirection; FileAlarmItem[F_count].Severity = AlarmParametersTable->alarmitem[i]->severity; - FileAlarmItem[F_count].Predecessor = AlarmParametersTable->alarmitem[i]->predecessor; + //FileAlarmItem[F_count].Predecessor = AlarmParametersTable->alarmitem[i]->predecessor; FileAlarmItem[F_count].DebounceValue = AlarmParametersTable->alarmitem[i]->debouncevalue; FileAlarmItem[F_count].EventType = AlarmParametersTable->alarmitem[i]->eventtype; FileAlarmItem[F_count].isPersistent = AlarmParametersTable->alarmitem[i]->ispersistent; @@ -1213,29 +1214,8 @@ uint32_t AlarmHandlingLoop(uint32_t tick) if (AlarmItem[Alarm_i].AlarmSource > ALARM_SOURCE_TYPE__FluidLevelAlarm) continue; AlarmCounter++; - if (tick%AlarmItem[Alarm_i].Frequency == 0) + switch (AlarmItem[Alarm_i].AlarmSource) { - switch (AlarmItem[Alarm_i].AlarmSource) - { - /*case ALARM_SOURCE_TYPE__TemperatureAlarm: - ivalue = MillisecGetTemperatures((TEMPERATURE_SENSOR_ID_ENUM)AlarmItem[Alarm_i].DeviceId); - if (AlarmItem[Alarm_i].AlarmDirection == true) - { - if (ivalue/100 >= AlarmItem[Alarm_i].AlarmValue) - { - //LOG_ERROR (ivalue/100,"Temperature spike"); - Status = true; - } - } - else - { - if (ivalue/100 <= AlarmItem[Alarm_i].AlarmValue) - { - //LOG_ERROR (ivalue/100,"iTemperature spike"); - Status = true; - } - } - break;*/ case ALARM_SOURCE_TYPE__CoversAlarm: if (CheckTamperAlarms) { @@ -1261,14 +1241,6 @@ uint32_t AlarmHandlingLoop(uint32_t tick) if (CheckHardLimitAlarms) { Status = AlarmState[Alarm_i].Status; - /*if (AlarmItem[Alarm_i].AlarmDirection == true) - { - value = Get_Notification_Disp_UP(AlarmItem[Alarm_i].DeviceId); - } - else - { - value = Get_Notification_Disp_Down(AlarmItem[Alarm_i].DeviceId); - } polling in the safety */ } else { @@ -1422,21 +1394,6 @@ uint32_t AlarmHandlingLoop(uint32_t tick) default: Status = false; } - /*value = MotorGetStatus((TimerMotors_t)AlarmItem[Alarm_i].DeviceId); - if (AlarmItem[Alarm_i].AlarmDirection == true) - { - if (value && AlarmItem[Alarm_i].AlarmValue) - { - Status = true; - } - } - else - { - if ((value && AlarmItem[Alarm_i].AlarmValue)==false) - { - Status = true; - } - }*/ } } else @@ -1473,7 +1430,7 @@ uint32_t AlarmHandlingLoop(uint32_t tick) case ALARM_SOURCE_TYPE__TachoAlarm: // add by shai Status = false; - if (CheckTamperAlarms) + if (CheckMotorAlarms) { // ReportWithPackageFilter(AlarmFilter,"------------FANS_RPM[Alarm_i]----------------", __FILE__,__LINE__,Alarm_i, RpMessage, value, 0); @@ -1560,16 +1517,19 @@ uint32_t AlarmHandlingLoop(uint32_t tick) } else { - value = Read_Dryer_Fan_Tacho(); + + value = Get_Dryer_Fan_Tacho(); if (AlarmItem[Alarm_i].Severity == DEBUG_LOG_CATEGORY__Critical ) - if ((AlarmItem[Alarm_i].AlarmDirection == UNDER_VALUE) && (value == DRYER_FAN_STOP)) + { + if (value == DRYER_FAN_STOP) { Status = true; - //ReportWithPackageFilter(AlarmFilter,"----------- DRYER FAN RPM Error----------------", __FILE__,__LINE__,0, RpMessage, value, 0); } + //ReportWithPackageFilter(AlarmFilter,"----------- DRYER FAN RPM ----------------", __FILE__,__LINE__,msec_millisecondCounter, RpMessage, value, 0); + } else if (AlarmItem[Alarm_i].Severity == DEBUG_LOG_CATEGORY__Warning) { - if ((AlarmItem[Alarm_i].AlarmDirection == UNDER_VALUE) && (value < DRYER_FAN_MIN_RPM)) + if ((value>0)&&(value < DRYER_FAN_MIN_RPM)) { Status = true; //ReportWithPackageFilter(AlarmFilter,"----------- DRYER FAN RPM Error----------------", __FILE__,__LINE__,0, RpMessage, value, 0); @@ -1621,78 +1581,77 @@ uint32_t AlarmHandlingLoop(uint32_t tick) break; default: break; - } //switch - if (AlarmItem[Alarm_i].DebounceValue > 0) //handle debouncing + } //switch + if (AlarmItem[Alarm_i].DebounceValue > 0) //handle debouncing + { + if (Status == true) //increase counter { - if (Status == true) //increase counter + AlarmState[Alarm_i].DebounceCounter++; + if (AlarmState[Alarm_i].Status == false) // alarm is not set yet { - AlarmState[Alarm_i].DebounceCounter++; - if (AlarmState[Alarm_i].Status == false) // alarm is not set yet + if (AlarmState[Alarm_i].DebounceCounter < AlarmItem[Alarm_i].DebounceValue) //had not reached the debounce value { - if (AlarmState[Alarm_i].DebounceCounter < AlarmItem[Alarm_i].DebounceValue) //had not reached the debounce value - { - Status = false; //do not set the alarm - } //else alarm will be set - } - else // alarm is already set - { - AlarmState[Alarm_i].DebounceCounter = AlarmItem[Alarm_i].DebounceValue; // do not go over the debounce value - } + Status = false; //do not set the alarm + } //else alarm will be set } - else //status == false - decrease counter + else // alarm is already set { - AlarmState[Alarm_i].DebounceCounter--; - if (AlarmState[Alarm_i].Status == true) // alarm is set - { - if (AlarmState[Alarm_i].DebounceCounter > 0) // had not reached zero yet - { - Status = true; // do not reset the alarm yet - } // else reset the alarm - } - else // if the alarm is off - { - AlarmState[Alarm_i].DebounceCounter = 0; //do not go below 0 - } + AlarmState[Alarm_i].DebounceCounter = AlarmItem[Alarm_i].DebounceValue; // do not go over the debounce value } } - /*if (AlarmItem[Alarm_i].Predecessor!=0xFF) - { - if (AlarmState[AlarmItem[Alarm_i].Predecessor].Status == true) //higher hierarchy alarm is on - Status = false; - }*/ - if (Status != AlarmState[Alarm_i].Status) //change in alarm Status + else //status == false - decrease counter { - if (Status == true) // alarm on + AlarmState[Alarm_i].DebounceCounter--; + if (AlarmState[Alarm_i].Status == true) // alarm is set { - // report the alarm! - AlarmState[Alarm_i].EventPtr = my_malloc (sizeof(Event)); - if (AlarmState[Alarm_i].EventPtr) + if (AlarmState[Alarm_i].DebounceCounter > 0) // had not reached zero yet { - event__init(AlarmState[Alarm_i].EventPtr); - AlarmState[Alarm_i].EventPtr->has_type = true; - AlarmState[Alarm_i].EventPtr->type = AlarmItem[Alarm_i].EventType; - AlarmState[Alarm_i].EventPtr->message = NULL;//AlarmItem[Alarm_i].EventName; - } - AlarmState[Alarm_i].Status = true; - AlarmHandlingConsequentActions(Alarm_i, AlarmItem[Alarm_i].Severity); - ReportWithPackageFilter(AlarmFilter,"Alarm ON ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); + Status = true; // do not reset the alarm yet + } // else reset the alarm } - else // alarm off + else // if the alarm is off { - ReportWithPackageFilter(AlarmFilter,"Alarm OFF ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, 0, Alarm_i); - if (AlarmState[Alarm_i].EventPtr) - { - //ROM_IntMasterDisable(); - Save_Alarm_i = Alarm_i; - Save_Alarm_ptr = AlarmState[Alarm_i].EventPtr; - Save_Alarm_Type = AlarmItem[Alarm_i].EventType; - my_free(AlarmState[Alarm_i].EventPtr); - AlarmState[Alarm_i].EventPtr = NULL; - //ROM_IntMasterEnable(); - } - AlarmState[Alarm_i].Status = false; - AlarmHandlingConsequentActions(Alarm_i, DEBUG_LOG_CATEGORY__Info); + AlarmState[Alarm_i].DebounceCounter = 0; //do not go below 0 + } + } + } + /*if (AlarmItem[Alarm_i].Predecessor!=0xFF) + { + if (AlarmState[AlarmItem[Alarm_i].Predecessor].Status == true) //higher hierarchy alarm is on + Status = false; + }*/ + if (Status != AlarmState[Alarm_i].Status) //change in alarm Status + { + if (Status == true) // alarm on + { + // report the alarm! + AlarmState[Alarm_i].EventPtr = my_malloc (sizeof(Event)); + if (AlarmState[Alarm_i].EventPtr) + { + event__init(AlarmState[Alarm_i].EventPtr); + AlarmState[Alarm_i].EventPtr->has_type = true; + AlarmState[Alarm_i].EventPtr->type = AlarmItem[Alarm_i].EventType; + AlarmState[Alarm_i].EventPtr->message = NULL;//AlarmItem[Alarm_i].EventName; + } + AlarmState[Alarm_i].Status = true; + AlarmHandlingConsequentActions(Alarm_i, AlarmItem[Alarm_i].Severity); + ReportWithPackageFilter(AlarmFilter,"Alarm ON ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i); + } + else // alarm off + { + ReportWithPackageFilter(AlarmFilter,"Alarm OFF ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, 0, Alarm_i); + if (AlarmState[Alarm_i].EventPtr) + { + //ROM_IntMasterDisable(); + Save_Alarm_i = Alarm_i; + Save_Alarm_ptr = AlarmState[Alarm_i].EventPtr; + Save_Alarm_Type = AlarmItem[Alarm_i].EventType; + my_free(AlarmState[Alarm_i].EventPtr); + AlarmState[Alarm_i].EventPtr = NULL; + //ROM_IntMasterEnable(); } + AlarmState[Alarm_i].Status = false; + AlarmHandlingConsequentActions(Alarm_i, DEBUG_LOG_CATEGORY__Info); } } } diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 689219583..1057ddbc3 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -610,21 +610,21 @@ uint32_t MillisecLowLoop(uint32_t tick) //call all modules Millisec functions //test dancers and speed encoders //check all callback units (state machine waiting for completion of a change) - bool Ten_msTick, Fifty_msTick, Hundred_msTick , m20msecTick,m70msecTick,m90msecTick, Onesecond_Tick,Tensecond_Tick,OneMinute_Tick,TenMinutes_Tick,OneHourTick,Gradient_Tick; - bool O700Millisecond_Tick,O200Millisecond_Tick,O400Millisecond_Tick,O500Millisecond_Tick,O600Millisecond_Tick; + bool Ten_msTick, Fifty_msTick, Hundred_msTick , m20msecTick,m90msecTick, Onesecond_Tick,Tensecond_Tick,OneMinute_Tick,TenMinutes_Tick,OneHourTick,Gradient_Tick; + bool O700Millisecond_Tick,O200Millisecond_Tick,O400Millisecond_Tick,O500Millisecond_Tick,O600Millisecond_Tick,O800Millisecond_Tick; //bool O100Millisecond_Tick,O200Millisecond_Tick,O400Millisecond_Tick,O500Millisecond_Tick,O600Millisecond_Tick,O800Millisecond_Tick,O900Millisecond_Tick; Ten_msTick = (tick%eTenMillisecond == 0) ?true:false; Fifty_msTick = (tick%eHundredMillisecond == 40) ?true:false; //eFiftyMillisecond Hundred_msTick = (tick%eHundredMillisecond == 0) ?true:false; m20msecTick = (tick%eHundredMillisecond == 20) ?true:false; - m70msecTick = (tick%eHundredMillisecond == 70) ?true:false; + //m70msecTick = (tick%eHundredMillisecond == 70) ?true:false; m90msecTick = (tick%eHundredMillisecond == 90) ?true:false; O700Millisecond_Tick = (tick%eOneSecond == 700) ?true:false; O200Millisecond_Tick = (tick%eOneSecond == 200) ?true:false; O400Millisecond_Tick = (tick%eOneSecond == 400) ?true:false; O500Millisecond_Tick = (tick%eOneSecond == 500) ?true:false; O600Millisecond_Tick = (tick%eOneSecond == 600) ?true:false; - //O800Millisecond_Tick = (tick%eOneSecond == 800) ?true:false; + O800Millisecond_Tick = (tick%eOneSecond == 800) ?true:false; //O900Millisecond_Tick = (tick%eOneSecond == 900) ?true:false; Gradient_Tick = (tick%400 == 0) ?true:false; Onesecond_Tick = (tick%eOneSecond == 0) ?true:false; @@ -660,10 +660,10 @@ uint32_t MillisecLowLoop(uint32_t tick) Trigger_PT100_Read();//call every 50mSec (minimum delay 30mSec) //Set_HeadCard_PT100();//call every 50mSec (minimum delay 30mSec) } - if(m70msecTick) + /*if(m70msecTick) { AlarmHandling_ControlTrigger(0,0); - } + }*/ if (m90msecTick) { for (Sensor_i = StartPT100;Sensor_i < MAX_HEAD_CARD_TEMP_SENS_ID;Sensor_i++) @@ -717,14 +717,11 @@ uint32_t MillisecLowLoop(uint32_t tick) } if (Gradient_Tick) DispensersCollectionCall(); - if (O700Millisecond_Tick) - { - Trigger_Heater_Current_Read(); - } if (O200Millisecond_Tick) { Trigger_WHS_MAX11614_Read_allADC(); FPGA_GetAllDispensersValveBusyOCD(); + Read_Dryer_Fan_Tacho(); temp = Read_Fans_Tacho(); DrawerFansStatus = temp & 0x1F; SystemFansStatus = temp & 0xE0; @@ -755,6 +752,14 @@ uint32_t MillisecLowLoop(uint32_t tick) } } } + if (O700Millisecond_Tick) + { + Trigger_Heater_Current_Read(); + } + if (O800Millisecond_Tick) + { + AlarmHandling_ControlTrigger(0,0); + } if (Onesecond_Tick) { //char Lenstr[160]; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c index ba4749f13..59a0aee51 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c @@ -316,14 +316,15 @@ void HeadBlowersControlLoop () int blowerId; static int count[2] = {0, 0}; - ArcHeadAlarms(); - if (GetMachineState() < MACHINE_STATE_WAIT_FOR_COOLER) return; //do not start before controller is initialized and running if (!HeadBlowersEnable) { return; } + + ArcHeadAlarms(); + for (blowerId = 0; blowerId <= 1; blowerId++) { if (count[blowerId] == HeadBlowersCloseLoopTime[blowerId]) { count[blowerId] = 0; @@ -377,6 +378,8 @@ double PressureSensorGetPressure(uint8_t SensorId) V0 = PressureSensorV0[FanId]; Vm = (double)(MillisecGetTemperatures(SensorId)); Vm /= 10.0; + if ((Vm - V0 + 22)<0) + return 0.0; Q = sqrt(Vm - V0 + 22) * PRESSURE_SENSOR_CP - PRESSURE_SENSOR_B; return Q; } diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index b9b916eb6..5b216d25c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -1233,6 +1233,19 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) response.has_progress = true; } else + if(request->amount == 0xB23) //Set loading arm cycles + { + REPORT_MSG(request->delay,"Control dryer fan tacho"); + if (request->delay>0) + Control_Dryer_Fan(START,request->delay);//use START or STOP, 0 - 100%(); + else + Control_Dryer_Fan(STOP,0);//use START or STOP, 0 - 100%(); + Task_sleep(1000); + + response.progress = (double)Get_Dryer_Fan_Tacho(); + response.has_progress = true; + } + else if(request->amount == 0xC3) //suspend I2C task { if (request->delay == 0) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 40315e623..d5e125337 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -249,7 +249,7 @@ uint32_t InitSequenceBlowerCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) WHS_enable_control_loop(true); WHS_Set_SetPoint_Q_value(headairflow); - AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_INITIAL_BLOWER_FAILED,OFF); //handle alarm detection and operation + //AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_INITIAL_BLOWER_FAILED,OFF); //handle alarm detection and operation waste_seq_step1();// include 1Sec delay <- to open !!!! -- cgit v1.3.1 From 55dffe48de95cb51b3a1a30e2ffc4336ec3bb2b2 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 8 Nov 2020 10:27:23 +0200 Subject: attempt thread logging support, some logs in IDS. --- .../Embedded_SW/Embedded/Communication/Container.c | 3 + .../Communication/PMR/Common/MessageType.pb-c.c | 26 ++++---- .../Communication/PMR/Common/MessageType.pb-c.h | 2 + .../EmbeddedParameters/AlarmHandlingItem.pb-c.c | 66 ++++++-------------- .../EmbeddedParameters/AlarmHandlingItem.pb-c.h | 6 +- .../AttemptThreadJoggingRequest.pb-c.c | 72 ++++++++++++++++++++++ .../AttemptThreadJoggingRequest.pb-c.h | 70 +++++++++++++++++++++ .../AttemptThreadJoggingResponse.pb-c.c | 72 ++++++++++++++++++++++ .../AttemptThreadJoggingResponse.pb-c.h | 70 +++++++++++++++++++++ Software/Embedded_SW/Embedded/DataDef.h | 6 +- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 20 +++--- Software/Embedded_SW/Embedded/Modules/IFS/ifs.c | 2 +- .../Embedded/Modules/Stubs_Handler/Progress.c | 8 +++ .../Embedded/Modules/Thread/ThreadLoad.c | 46 ++++++++++++++ .../Embedded/Modules/Thread/Thread_ex.h | 2 + .../Embedded/Modules/Thread/Thread_print.c | 22 ++++--- .../Embedded/StateMachines/Printing/JobSTM.c | 9 ++- .../Embedded/StateMachines/Printing/PrintingSTM.h | 1 + 18 files changed, 422 insertions(+), 81 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h (limited to 'Software/Embedded_SW/Embedded/StateMachines') diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c index 5bed0bcdc..b386ae20f 100644 --- a/Software/Embedded_SW/Embedded/Communication/Container.c +++ b/Software/Embedded_SW/Embedded/Communication/Container.c @@ -491,6 +491,9 @@ void receive_callback(char* buffer, size_t length) case MESSAGE_TYPE__StopThreadLoadingRequest: StopThreadLoadingFunc(requestContainer); break; + case MESSAGE_TYPE__AttemptThreadJoggingRequest: + AttemptThreadJoggingFunc(requestContainer); + break; case MESSAGE_TYPE__StubDispenserEEpromRequest: StubDispenserEEpromRequestFunc(requestContainer); break; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c index d7fe911c1..4b8277d75 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "MessageType.pb-c.h" -static const ProtobufCEnumValue message_type__enum_values_by_number[269] = +static const ProtobufCEnumValue message_type__enum_values_by_number[271] = { { "", "", 0 }, { "", "", 1 }, @@ -272,6 +272,8 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[269] = { "", "", 11005 }, { "", "", 11006 }, { "", "", 11007 }, + { "", "", 11008 }, + { "", "", 11009 }, { "", "", 12000 }, { "", "", 12001 }, { "", "", 13000 }, @@ -280,9 +282,9 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[269] = { "", "", 13003 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 114},{2000, 135},{2044, 175},{3000, 177},{4000, 191},{5000, 199},{6000, 203},{7000, 209},{8000, 233},{9000, 241},{10000, 245},{11000, 255},{12000, 263},{13000, 265},{0, 269} +{0, 0},{3, 2},{1000, 114},{2000, 135},{2044, 175},{3000, 177},{4000, 191},{5000, 199},{6000, 203},{7000, 209},{8000, 233},{9000, 241},{10000, 245},{11000, 255},{12000, 265},{13000, 267},{0, 271} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[271] = { { "", 189 }, { "", 190 }, @@ -294,6 +296,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 252 }, { "", 231 }, { "", 232 }, + { "", 263 }, + { "", 264 }, { "", 2 }, { "", 3 }, { "", 175 }, @@ -344,8 +348,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 210 }, { "", 131 }, { "", 132 }, - { "", 267 }, - { "", 268 }, + { "", 269 }, + { "", 270 }, { "", 223 }, { "", 224 }, { "", 221 }, @@ -375,8 +379,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 122 }, { "", 4 }, { "", 5 }, - { "", 265 }, - { "", 266 }, + { "", 267 }, + { "", 268 }, { "", 161 }, { "", 162 }, { "", 185 }, @@ -407,8 +411,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { "", 166 }, { "", 187 }, { "", 188 }, - { "", 263 }, - { "", 264 }, + { "", 265 }, + { "", 266 }, { "", 241 }, { "", 242 }, { "", 245 }, @@ -561,9 +565,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "", "", "", - 269, + 271, message_type__enum_values_by_number, - 269, + 271, message_type__enum_values_by_name, 16, message_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h index cacc241b3..133d64f2d 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h @@ -283,6 +283,8 @@ typedef enum _MessageType { MESSAGE_TYPE__StopThreadLoadingResponse = 11005, MESSAGE_TYPE__TryThreadLoadingRequest = 11006, MESSAGE_TYPE__TryThreadLoadingResponse = 11007, + MESSAGE_TYPE__AttemptThreadJoggingRequest = 11008, + MESSAGE_TYPE__AttemptThreadJoggingResponse = 11009, MESSAGE_TYPE__StartInkFillingStatusRequest = 12000, MESSAGE_TYPE__StartInkFillingStatusResponse = 12001, MESSAGE_TYPE__PutDataStoreItemRequest = 13000, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c index 2ed0ef818..7f25525ff 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.c @@ -52,7 +52,7 @@ void alarm_handling_item__free_unpacked assert(message->base.descriptor == &alarm_handling_item__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] = +static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[10] = { { "", @@ -71,18 +71,6 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(AlarmHandlingItem, has_frequency), - offsetof(AlarmHandlingItem, frequency), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_deviceid), offsetof(AlarmHandlingItem, deviceid), NULL, @@ -92,7 +80,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 4, + 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_moduledeviceid), @@ -104,7 +92,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 5, + 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_alarmvalue), @@ -116,7 +104,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 6, + 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(AlarmHandlingItem, has_alarmdirection), @@ -128,7 +116,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 7, + 6, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_ENUM, offsetof(AlarmHandlingItem, has_severity), @@ -140,19 +128,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 8, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(AlarmHandlingItem, has_predecessor), - offsetof(AlarmHandlingItem, predecessor), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "", - 9, + 7, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(AlarmHandlingItem, has_debouncevalue), @@ -164,7 +140,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 10, + 8, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_ENUM, offsetof(AlarmHandlingItem, has_eventtype), @@ -176,7 +152,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 11, + 9, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ @@ -188,7 +164,7 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, { "", - 12, + 10, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(AlarmHandlingItem, has_ispersistent), @@ -200,23 +176,21 @@ static const ProtobufCFieldDescriptor alarm_handling_item__field_descriptors[12] }, }; static const unsigned alarm_handling_item__field_indices_by_name[] = { - 5, /* field[5] = AlarmDirection */ + 4, /* field[4] = AlarmDirection */ 0, /* field[0] = AlarmSource */ - 4, /* field[4] = AlarmValue */ - 8, /* field[8] = DebounceValue */ - 2, /* field[2] = DeviceId */ - 10, /* field[10] = EventName */ - 9, /* field[9] = EventType */ - 1, /* field[1] = Frequency */ - 11, /* field[11] = IsPersistent */ - 3, /* field[3] = ModuleDeviceId */ - 7, /* field[7] = Predecessor */ - 6, /* field[6] = Severity */ + 3, /* field[3] = AlarmValue */ + 6, /* field[6] = DebounceValue */ + 1, /* field[1] = DeviceId */ + 8, /* field[8] = EventName */ + 7, /* field[7] = EventType */ + 9, /* field[9] = IsPersistent */ + 2, /* field[2] = ModuleDeviceId */ + 5, /* field[5] = Severity */ }; static const ProtobufCIntRange alarm_handling_item__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 12 } + { 0, 10 } }; const ProtobufCMessageDescriptor alarm_handling_item__descriptor = { @@ -226,7 +200,7 @@ const ProtobufCMessageDescriptor alarm_handling_item__descriptor = "", "", sizeof(AlarmHandlingItem), - 12, + 10, alarm_handling_item__field_descriptors, alarm_handling_item__field_indices_by_name, 1, alarm_handling_item__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h index f69c7b96d..635c38544 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/AlarmHandlingItem.pb-c.h @@ -31,8 +31,6 @@ struct _AlarmHandlingItem ProtobufCMessage base; protobuf_c_boolean has_alarmsource; AlarmSourceType alarmsource; - protobuf_c_boolean has_frequency; - uint32_t frequency; protobuf_c_boolean has_deviceid; uint32_t deviceid; protobuf_c_boolean has_moduledeviceid; @@ -43,8 +41,6 @@ struct _AlarmHandlingItem protobuf_c_boolean alarmdirection; protobuf_c_boolean has_severity; DebugLogCategory severity; - protobuf_c_boolean has_predecessor; - uint32_t predecessor; protobuf_c_boolean has_debouncevalue; uint32_t debouncevalue; protobuf_c_boolean has_eventtype; @@ -55,7 +51,7 @@ struct _AlarmHandlingItem }; #define ALARM_HANDLING_ITEM__INIT \ { PROTOBUF_C_MESSAGE_INIT (&alarm_handling_item__descriptor) \ - , 0, ALARM_SOURCE_TYPE__TemperatureAlarm, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, DEBUG_LOG_CATEGORY__Info, 0, 0, 0, 0, 0, EVENT_TYPE__None, NULL, 0, 0 } + , 0, ALARM_SOURCE_TYPE__TemperatureAlarm, 0, 0, 0, 0, 0, 0, 0, 0, 0, DEBUG_LOG_CATEGORY__Info, 0, 0, 0, EVENT_TYPE__None, NULL, 0, 0 } /* AlarmHandlingItem methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.c new file mode 100644 index 000000000..78659ae90 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "AttemptThreadJoggingRequest.pb-c.h" +void attempt_thread_jogging_request__init + (AttemptThreadJoggingRequest *message) +{ + static const AttemptThreadJoggingRequest init_value = ATTEMPT_THREAD_JOGGING_REQUEST__INIT; + *message = init_value; +} +size_t attempt_thread_jogging_request__get_packed_size + (const AttemptThreadJoggingRequest *message) +{ + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t attempt_thread_jogging_request__pack + (const AttemptThreadJoggingRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t attempt_thread_jogging_request__pack_to_buffer + (const AttemptThreadJoggingRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +AttemptThreadJoggingRequest * + attempt_thread_jogging_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (AttemptThreadJoggingRequest *) + protobuf_c_message_unpack (&attempt_thread_jogging_request__descriptor, + allocator, len, data); +} +void attempt_thread_jogging_request__free_unpacked + (AttemptThreadJoggingRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &attempt_thread_jogging_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define attempt_thread_jogging_request__field_descriptors NULL +#define attempt_thread_jogging_request__field_indices_by_name NULL +#define attempt_thread_jogging_request__number_ranges NULL +const ProtobufCMessageDescriptor attempt_thread_jogging_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(AttemptThreadJoggingRequest), + 0, + attempt_thread_jogging_request__field_descriptors, + attempt_thread_jogging_request__field_indices_by_name, + 0, attempt_thread_jogging_request__number_ranges, + (ProtobufCMessageInit) attempt_thread_jogging_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.h new file mode 100644 index 000000000..366498be8 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingRequest.proto */ + +#ifndef PROTOBUF_C_AttemptThreadJoggingRequest_2eproto__INCLUDED +#define PROTOBUF_C_AttemptThreadJoggingRequest_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _AttemptThreadJoggingRequest AttemptThreadJoggingRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _AttemptThreadJoggingRequest +{ + ProtobufCMessage base; +}; +#define ATTEMPT_THREAD_JOGGING_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&attempt_thread_jogging_request__descriptor) \ + } + + +/* AttemptThreadJoggingRequest methods */ +void attempt_thread_jogging_request__init + (AttemptThreadJoggingRequest *message); +size_t attempt_thread_jogging_request__get_packed_size + (const AttemptThreadJoggingRequest *message); +size_t attempt_thread_jogging_request__pack + (const AttemptThreadJoggingRequest *message, + uint8_t *out); +size_t attempt_thread_jogging_request__pack_to_buffer + (const AttemptThreadJoggingRequest *message, + ProtobufCBuffer *buffer); +AttemptThreadJoggingRequest * + attempt_thread_jogging_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void attempt_thread_jogging_request__free_unpacked + (AttemptThreadJoggingRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*AttemptThreadJoggingRequest_Closure) + (const AttemptThreadJoggingRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor attempt_thread_jogging_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_AttemptThreadJoggingRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.c new file mode 100644 index 000000000..d75845c99 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "AttemptThreadJoggingResponse.pb-c.h" +void attempt_thread_jogging_response__init + (AttemptThreadJoggingResponse *message) +{ + static const AttemptThreadJoggingResponse init_value = ATTEMPT_THREAD_JOGGING_RESPONSE__INIT; + *message = init_value; +} +size_t attempt_thread_jogging_response__get_packed_size + (const AttemptThreadJoggingResponse *message) +{ + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t attempt_thread_jogging_response__pack + (const AttemptThreadJoggingResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t attempt_thread_jogging_response__pack_to_buffer + (const AttemptThreadJoggingResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +AttemptThreadJoggingResponse * + attempt_thread_jogging_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (AttemptThreadJoggingResponse *) + protobuf_c_message_unpack (&attempt_thread_jogging_response__descriptor, + allocator, len, data); +} +void attempt_thread_jogging_response__free_unpacked + (AttemptThreadJoggingResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &attempt_thread_jogging_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define attempt_thread_jogging_response__field_descriptors NULL +#define attempt_thread_jogging_response__field_indices_by_name NULL +#define attempt_thread_jogging_response__number_ranges NULL +const ProtobufCMessageDescriptor attempt_thread_jogging_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(AttemptThreadJoggingResponse), + 0, + attempt_thread_jogging_response__field_descriptors, + attempt_thread_jogging_response__field_indices_by_name, + 0, attempt_thread_jogging_response__number_ranges, + (ProtobufCMessageInit) attempt_thread_jogging_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h new file mode 100644 index 000000000..e7324b29b --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: AttemptThreadJoggingResponse.proto */ + +#ifndef PROTOBUF_C_AttemptThreadJoggingResponse_2eproto__INCLUDED +#define PROTOBUF_C_AttemptThreadJoggingResponse_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _AttemptThreadJoggingResponse AttemptThreadJoggingResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _AttemptThreadJoggingResponse +{ + ProtobufCMessage base; +}; +#define ATTEMPT_THREAD_JOGGING_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&attempt_thread_jogging_response__descriptor) \ + } + + +/* AttemptThreadJoggingResponse methods */ +void attempt_thread_jogging_response__init + (AttemptThreadJoggingResponse *message); +size_t attempt_thread_jogging_response__get_packed_size + (const AttemptThreadJoggingResponse *message); +size_t attempt_thread_jogging_response__pack + (const AttemptThreadJoggingResponse *message, + uint8_t *out); +size_t attempt_thread_jogging_response__pack_to_buffer + (const AttemptThreadJoggingResponse *message, + ProtobufCBuffer *buffer); +AttemptThreadJoggingResponse * + attempt_thread_jogging_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void attempt_thread_jogging_response__free_unpacked + (AttemptThreadJoggingResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*AttemptThreadJoggingResponse_Closure) + (const AttemptThreadJoggingResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor attempt_thread_jogging_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_AttemptThreadJoggingResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index e128094a5..755e5a962 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -26,7 +26,8 @@ //#define FOUR_WINDERS #ifdef FOUR_WINDERS -#define BTSR_NO_TFU +#define BTSR_NO_FEEDER_TFU +#define BTSR_NO_PULLER_TFU #endif //#define USE_POWERSTEP01 -NA @@ -35,7 +36,8 @@ //#define VAC_TEST #define DISPENSER_VALVES_OPEN //#define USE_TUNNEL_PT100 -//#define BTSR_NO_TFU +//#define BTSR_NO_FEEDER_TFU +//#define BTSR_NO_PULLER_TFU //#define IGNORE_SPIKE //#define SPECIAL_DISPENSERS extern bool Special_Dispensers; diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 5b6ad643d..fcd1c05a2 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -591,7 +591,10 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl { DispenserTotalPrepareSteps[i]+=(CurrentDispenserSpeed[i]*PRESSURE_READ_TIME_GAP/eOneSecond); HW_Motor_Id = DispenserIdToMotorId[i]; - + if ((DispenserTotalPrepareSteps[i]>TargetNumberOfStepsPreRun)&&(DispenserTotalPrepareSteps[i]<(TargetNumberOfStepsPreRun+InitialDispenserSpeed))) + { + ReportWithPackageFilter(IDSFilter,"IDS dispenser pre-run ended",__FILE__,i,(int)DispenserTotalPrepareSteps[i],RpWarning,(int)(pressure*100),0); + } if (DispenserTotalPrepareSteps[i]= DispenserPrepareTimeout) { @@ -730,7 +736,7 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl } } }//for - usnprintf(IdMessage, 80,"WFCF %d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",WFCF,CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"WFCF %d K %d,C %d,M %d,Y %d,TI %d",WFCF,CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, DispenserBuildTimeCounter, RpWarning, WFCF, 0); @@ -788,7 +794,7 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl JobEndSequence = false; if ((pressurebuildup>0.1)&&(pressurebuildup<4.5)) { - ReportWithPackageFilter(IDSFilter,"Setting pressure from RML feeder tension",__FILE__,__LINE__,(int)(pressurebuildup*100),RpWarning,(int)(DispenserPreparePressure*100),0); + ReportWithPackageFilter(IDSFilter,"Setting pressure from RML pressure buildup",__FILE__,__LINE__,(int)(pressurebuildup*100),RpWarning,(int)(DispenserPreparePressure*100),0); DispenserPreparePressure = pressurebuildup; } if (JobTicket->headcleaningparameters) @@ -1081,7 +1087,7 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl } } }//for - usnprintf(IdMessage, 80,"Presegment Prepare D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"Presegment Prepare K %d,C %d,M %d,Y %d,TI %d",CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); @@ -1283,7 +1289,7 @@ uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback); //SendJobProgress(0.0, 0, false, IdsMessage);*/ } }//for - usnprintf(IdMessage, 80,"Presegment WFCF %d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",WFCF,CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"Presegment WFCF %d K %d,C %d,M %d,Y %d,TI %d",WFCF,CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, FileBrushStop->index, RpWarning, lInterSegmentLength, 0); } @@ -1610,7 +1616,7 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) } } //for } - usnprintf(IdMessage, 80,"IDS_StartBrushStop %d/%d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",FileBrushStop->index,SegmentNumOfBrushStops,CurrentDispenserSpeed[0], + usnprintf(IdMessage, 80,"IDS_StartBrushStop %d/%d K %d,C %d,M %d,Y %d,TI %d",FileBrushStop->index,SegmentNumOfBrushStops,CurrentDispenserSpeed[0], CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]); ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, SegmentNumOfBrushStops, FileBrushStop->index, RpWarning,(int)FileBrushStop->offsetmeters, 0); diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c index b2498ee7f..329357ed4 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c @@ -335,7 +335,7 @@ void midTankStateMachine(void) if (midTankCartColor == MIDTANK_8) { - CartridgeInkTimeout = CARTRIDGE_INK_TIMEOUT*4; + CartridgeInkTimeout = CARTRIDGE_INK_TIMEOUT*10; CartridgeCheckTime = FIVE_SECONDS*3; } // set valve selection diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index 5b216d25c..e694810d7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -1246,6 +1246,14 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) response.has_progress = true; } else + if(request->amount == 0xB24) //Set loading arm cycles + { + REPORT_MSG(request->delay,"AttemptThreadJoggingFunc"); + AttemptThreadJoggingFunc(1); + response.progress = 0xb24; + response.has_progress = true; + } + else if(request->amount == 0xC3) //suspend I2C task { if (request->delay == 0) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 63072e4d8..1d310cf01 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -49,6 +49,7 @@ #include "PMR/ThreadLoading/TryThreadLoadingResponse.pb-c.h" #include "PMR/ThreadLoading/StopThreadLoadingRequest.pb-c.h" #include "PMR/ThreadLoading/StopThreadLoadingResponse.pb-c.h" +#include "PMR/ThreadLoading/AttemptThreadJoggingResponse.pb-c.h" //#include //#include @@ -1597,3 +1598,48 @@ uint32_t StopThreadLoadingFunc(MessageContainer* requestContainer) return OK; } +uint8_t attemptJogCounter = 0; +#define ATTEMPT_JOG_TIMEOUT 18 +char AttemptJoggingToken[36+1] = {0}; + +uint32_t AttemptThreadJoggingCallback(uint32_t index, uint32_t ReadValue) +{ + AttemptThreadJoggingResponse response = ATTEMPT_THREAD_JOGGING_RESPONSE__INIT; + MessageContainer responseContainer; + + attemptJogCounter++; + Report("AttemptThreadJoggingCallback",__FILE__,attemptJogCounter,JobEndReason,RpWarning,(int)JobIsActive(),0); + if (attemptJogCountertoken,36); + Report("AttemptThreadJoggingFunc",__FILE__,__LINE__,0xFF,RpWarning,(int)ATTEMPT_JOG_TIMEOUT,0); + LoadingControlId = AddControlCallback("Load jog",AttemptThreadJoggingCallback, eOneSecond,TemplateDataReadCBFunction,0,0,0); + ThreadJoggingFunc(30); + return OK; +} + diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 0861b677b..43938c871 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -88,6 +88,8 @@ uint32_t StartThreadLoadingFunc(MessageContainer* requestContainer); uint32_t ContinueThreadLoadingFunc(MessageContainer* requestContainer); uint32_t StopThreadLoadingFunc(MessageContainer* requestContainer); uint32_t TryThreadLoadingFunc(MessageContainer* requestContainer); +uint32_t AttemptThreadJoggingFunc(MessageContainer* requestContainer); + void ThreadCheckArcHeadCovers(void); uint32_t Thread_Load_End(void); uint32_t ThreadLoadingRestartReport(void); //sending after a failure in the finalizing stage diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index bc4e6cb8f..8d41f3b9a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -337,7 +337,7 @@ uint32_t PoolerThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) }**/ //} -#ifdef BTSR_NO_TFU +#ifdef BTSR_NO_PULLER_TFU if (CurrentControlledSpeed[WINDER_MOTOR]>100) length = dyeingspeed/10; #endif @@ -917,7 +917,7 @@ uint32_t Release_Right_TFU_TensionCallback(uint32_t deviceID, uint32_t BusyFlag) uint32_t Release_Right_TFU_Tension() { uint32_t status = OK; -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU if (RTFU_Up == true) { Report("Release_Right_TFU_Tension",__FILE__,__LINE__,HARDWARE_MOTOR_TYPE__MOTO_RDANCER,RpMessage,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].pulseperround/4,0); @@ -931,7 +931,7 @@ int SecondFeederCorrection = 4; int PrepareWaitCount = 0; uint32_t Adjust_Right_TFU_Tension_2nd_Callback(uint32_t MotorId, uint32_t ReadValue) { -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU MotorStop (HARDWARE_MOTOR_TYPE__MOTO_RDANCER,Soft_Stop); //per L6470 errata between mov and run commands Report("Adjust_Right_TFU_Tension_2ndCallback x more steps",__FILE__,__LINE__,MotorId,RpMessage,SecondFeederCorrection,0); if (JobIsActive()==false) @@ -955,7 +955,7 @@ uint32_t Adjust_Right_TFU_Tension_2nd_Callback(uint32_t MotorId, uint32_t ReadVa } uint32_t Adjust_Right_TFU_Tension_Callback(uint32_t MotorId, uint32_t ReadValue) { -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU Report("Adjust_Right_TFU_Tension_Callback",__FILE__,__LINE__,MotorId,RpMessage,0,0); MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RDANCER, 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize,SecondFeederCorrection* MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].microstep, Adjust_Right_TFU_Tension_2nd_Callback,1000); RTFU_Up = true; @@ -966,7 +966,7 @@ uint32_t Adjust_Right_TFU_Tension_Callback(uint32_t MotorId, uint32_t ReadValue) uint32_t Adjust_Right_TFU_Tension(double tension) { uint32_t status = OK; -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU if (tension > 0.5) //0 = lower position, 1 = high position { if (FPGA_Read_limit_Switches(GPI_LS_RDANCER_UP) == NO_LIMIT) @@ -1093,11 +1093,13 @@ uint32_t ThreadPrepareState(void *JobDetails) IntersegmentLength = JobTicket->intersegmentlength; PrepareWaitCount = 0; -#ifndef BTSR_NO_TFU status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__LeftDancer, windertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Winder",__FILE__,HARDWARE_DANCER_TYPE__LeftDancer,PrepareWaitCount,RpWarning,(int)windertension,0); +#ifndef BTSR_NO_PULLER_TFU status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__MiddleDancer, pullertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Puller",__FILE__,HARDWARE_DANCER_TYPE__MiddleDancer,PrepareWaitCount,RpWarning,(int)pullertension,0); +#endif +#ifndef BTSR_NO_FEEDER_TFU status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__RightDancer, feedertension); ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Feeder",__FILE__,HARDWARE_DANCER_TYPE__RightDancer,PrepareWaitCount,RpWarning,(int)feedertension,0); #endif @@ -1219,7 +1221,7 @@ uint32_t ThreadPrepareState(void *JobDetails) ///////////////////////////////////////////////////// MotorSetDirection((TimerMotors_t)HW_Motor_Id,MotorsCfg[HW_Motor_Id].directionthreadwize); -#ifndef BTSR_NO_TFU +#ifndef BTSR_NO_FEEDER_TFU if (Motor_i == FEEDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled { ReportWithPackageFilter(ThreadFilter,"Feeder Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); @@ -1233,6 +1235,7 @@ uint32_t ThreadPrepareState(void *JobDetails) SpeedControlId = AddControlCallback(NULL,ThreadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); } #endif +#ifndef BTSR_NO_PULLER_TFU if (Motor_i == POOLER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled { ReportWithPackageFilter(ThreadFilter,"Puller Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); @@ -1246,7 +1249,8 @@ uint32_t ThreadPrepareState(void *JobDetails) PoolerLengthCalculationMultiplier = (MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulleyradius*2*PI)/(MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].pulseperround*MotorsCfg[ThreadMotorIdToMotorId[Motor_i]].microstep); PoolerSpeedControlId = AddControlCallback(NULL,PoolerThreadLengthCBFunction, eHundredMillisecond,MotorGetPositionFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); } -#ifndef BTSR_NO_TFU +#endif +#ifndef BTSR_NO_FEEDER_TFU if (Motor_i == FEEDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled { if (ControlIdtoMotorId[Motor_i] != 0xFF) @@ -1261,6 +1265,8 @@ uint32_t ThreadPrepareState(void *JobDetails) //AddControlCallback(NULL,ThreadControlSpeedReadFunction, eHundredMillisecond,MotorGetSpeedFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); #endif } +#endif +#ifndef BTSR_NO_PULLER_TFU if (Motor_i == POOLER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will n//ot be controlled { if (ControlIdtoMotorId[Motor_i] != 0xFF) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 155d84fdb..82601a162 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -184,6 +184,13 @@ bool JobIsActive(void) return retcode; }*/ +ErrorCode getJobError_to_ErrorCode(JobEndReasonEnum JobError) +{ + if (JobError