diff options
| author | Ronen Sberlo <ronen.s@twine-s.com> | 2020-08-27 15:01:52 +0300 |
|---|---|---|
| committer | Ronen Sberlo <ronen.s@twine-s.com> | 2020-08-27 15:01:52 +0300 |
| commit | d06662b0f8ae1457a59b1b3391c448408ecff49d (patch) | |
| tree | bbe59b8c3664f94515d429fc181941400213d458 /Software/Embedded_SW/Embedded/StateMachines/Initialization | |
| parent | 4e8527251f665090d5a3d9c73672f527157ffac5 (diff) | |
| download | Tango-d06662b0f8ae1457a59b1b3391c448408ecff49d.tar.gz Tango-d06662b0f8ae1457a59b1b3391c448408ecff49d.zip | |
arc head blowers and pressure sensor
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines/Initialization')
| -rw-r--r-- | Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index f20b1aa94..f6d825c20 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -231,6 +231,8 @@ 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 @@ -247,6 +249,26 @@ 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); + if ((V0[0] > 0) && (V0[0] < 2)) { + MCU_E2PromProgram(EEPROM_ORIFICE1_ZERO_VALUE, V0[0]); + MCU_E2PromProgram(EEPROM_ORIFICE1_ZERO_VALUE, V0[1]); + ReportWithPackageFilter(InitFilter,"store pressure sensor v0[0]", __FILE__,__LINE__, V0[0], RpMessage, 0, 0); + } + if ((V0[1] > 0) && (V0[1] < 2)) { + MCU_E2PromProgram(EEPROM_ORIFICE1_ZERO_VALUE, V0[1]); + ReportWithPackageFilter(InitFilter,"store pressure sensor v0[1]", __FILE__,__LINE__, 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__, V0[0], RpMessage, V0[1], 0); + } + } + Safety_Init(); InitStages++; //InitSequenceStateMachine(InitStages); @@ -459,6 +481,7 @@ uint32_t InitSequenceInitialBlowerActivation(void) WHS_MAX11614_Load_OrificeZeroValue(total1,total3); } } + HeadBlowersInit(); Voc_Sensor_Zero_Calibration(); Turn_the_Blower_On();//Turn on with the Default_Voltage @@ -535,6 +558,9 @@ uint32_t InitSequenceWaitForCooler(void) Trigger_SetWHSFanSpeed(FAN4, SmallFansCfg); Trigger_SetWHSFanSpeed(FAN5, LargeFansCfg); Trigger_SetWHSFanSpeed(FAN6, LargeFansCfg); + if (Head_Type == HEAD_TYPE_ARC) { + HeadBlowersCfg(); + } if (WHS_Type == WHS_TYPE_UNKNOWN) { InitStages++; |
