From e5bd4aae30455510bdcdb492a34794c0747d7900 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 11 Jun 2020 15:06:31 +0300 Subject: Version 1.4.6.31: init failures - stop init until new version loaded / FSE arrives. read / write main CPU data (embedded parameters); VOC read to diagnostics; --- .../Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 2 ++ .../Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c | 3 ++- .../Embedded_SW/Embedded/Modules/General/GeneralHardware.c | 14 +++----------- Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index a6380c188..c61f9e719 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -789,6 +789,7 @@ uint32_t MillisecLowLoop(uint32_t tick) Gas_PPM_Info = Calculate_Gas_Power_Consumption();*/ // ReportWithPackageFilter(ThreadFilter,"waste tank calculate level",__FILE__,__LINE__,(int)(GetWHSWasteTankLevelMiliLiter()*1000),RpWarning,(int) msec_millisecondCounter,0); //Trigger_WHS_MAX11614_Read_allADC(); + Trigger_WHS_MAX11614_Read_Gas_Sensor(); #ifdef CONTROL_DEBUG ResetControlTime(); #endif @@ -807,6 +808,7 @@ uint32_t MillisecLowLoop(uint32_t tick) { waste_seq_step1();// include 1Sec delay <- to open !!!! } + //Trigger_WHS_MAX11614_Read_Gas_Sensor(); } //ROM_IntMasterEnable(); diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 2ff1588f2..79dd2899f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -53,6 +53,7 @@ #include "diagnostics.h" #include +#include extern F2_CTRL_REG F2_CTRL_Reg; @@ -676,7 +677,7 @@ void DiagnosticOneMinuteCollection(void) } } - VOC_Sensor = (double) getGasReading(); + VOC_Sensor = (double) Get_latest_Gas_Sensor_value(); DiagnosticsMonitor.n_filterdeltapressure = 1; DiagnosticsMonitor.filterdeltapressure = &VOC_Sensor; DiagnosticsMonitor.n_gassensor = 1; diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index ae946ce1d..915869c34 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -397,12 +397,12 @@ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest) LOG_ERROR (0, "Wrong Data Allocation"); return ERROR; } - /*if (InitFailures > 3) + if (InitFailures > 3) { Report("HWConfigurationInit repeated failure",__FILE__,__LINE__,(int)InitFailures,RpWarning,(int)EEPROM_INIT_FAILURE_COUNTER,0); - AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED,ON); + AlarmHandlingSetAlarm (EVENT_TYPE__POWER_UP_BIT_FAILURE,ON); return ERROR; - }*/ + } HardwareConfiguration *request = UploadRequest->hardwareconfiguration; @@ -628,14 +628,6 @@ uint32_t MidTankDataSetupFunc(MessageContainer* requestContainer) b = Slope_B[i]; Report("MidTankData Read", __FILE__,__LINE__,(int)(a*1000), RpMessage, (int)(b*1000), 0); } - //debug only - /* - Task_sleep(1000); - //MCU_E2PromSerialNumProgram ("Take me to the sky"); - memset (Serial,0,20); - MCU_E2PromSerialNumRead(&Serial); - Report(Serial, __FILE__,__LINE__,22, RpMessage, 21, 0); - */ MidTankDataSetupResponse response = MID_TANK_DATA_SETUP_RESPONSE__INIT; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index c1d547f59..aec2988a2 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -53,7 +53,7 @@ //#include static char* LoadStagesStr[15] = { /*00*/ "Initialization", - /*01*/ "heating stop", + /*01*/ "Heating stop", /*02*/ "Rockers opening", /*03*/ "Drier unloading", /*04*/ "Lids opening", -- cgit v1.3.1