aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-11-03 12:08:14 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-11-03 12:08:14 +0200
commit09acf407dc5f432a2c293bde6ebf103b28af2549 (patch)
treeca240db202dc66c03d05dd46e2e34777254cf2de /Software
parent612f456f46ebf6726dd1aa2b0fe1476a72011d3a (diff)
downloadTango-09acf407dc5f432a2c293bde6ebf103b28af2549.tar.gz
Tango-09acf407dc5f432a2c293bde6ebf103b28af2549.zip
bugs, mostly in arc head init
Diffstat (limited to 'Software')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c17
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.h4
-rw-r--r--Software/Embedded_SW/Embedded/Embedded.cfg2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c7
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c6
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c2
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c168
10 files changed, 118 insertions, 95 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index 9f5a27eeb..ab651f7de 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {1,5,1,2};
+TangoVersion_t _gTangoVersion = {1,5,1,3};
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c
index 6c2d54111..335aab113 100644
--- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c
+++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c
@@ -199,7 +199,7 @@ bool WHS_PT100_config(TEMPERATURE_SENSOR_ID_ENUM SensorId)
//ADS122_WriteAllReg(uint8_t i2cbus, WHS_chip_address i2cadd, D_ADS122C04_TempSensConfigStruc *p_writeValue);
}
-bool WHS_PT100_Get(TEMPERATURE_SENSOR_ID_ENUM SensorId, uint8_t *value )
+bool WHS_PT100_Get(TEMPERATURE_SENSOR_ID_ENUM SensorId, uint32_t *value )
{
bool Status = OK;
switch (SensorId)
@@ -225,7 +225,7 @@ bool WHS_PT100_Get(TEMPERATURE_SENSOR_ID_ENUM SensorId, uint8_t *value )
}
-bool WHS_PT100_Read(TEMPERATURE_SENSOR_ID_ENUM SensorId)
+uint32_t WHS_PT100_Read(TEMPERATURE_SENSOR_ID_ENUM SensorId)
{
bool Status = OK;
uint32_t Temperatures = 0;
@@ -267,7 +267,10 @@ bool WHS_PT100_Read(TEMPERATURE_SENSOR_ID_ENUM SensorId)
break;
}
- return Status;
+ if (Status == OK)
+ return Temperatures;
+ else
+ return (uint32_t)Status;
}
bool Test_WHS_PT100_ADC()
@@ -277,10 +280,10 @@ bool Test_WHS_PT100_ADC()
//status |= WHS_PT100_InitConfigReg();
- status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_1_0X80_0);
- status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_3_0X82_0);
- status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_2_0X80_1);
- status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_4_0X82_1);
+ //status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_1_0X80_0);
+ //status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_3_0X82_0);
+ //status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_2_0X80_1);
+ //status |= WHS_PT100_Read(/*TEMPERATURE_SENSOR_ID_ENUM*/ WHS_PT100_4_0X82_1);
return status;
}
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.h
index ab09f0e9d..78900af52 100644
--- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.h
+++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.h
@@ -25,8 +25,8 @@ extern uint32_t was_Data_ADC_Head;
bool WHS_PT100_InitConfigReg();
bool WHS_PT100_ControlMux_Before_Reading(TEMPERATURE_SENSOR_ID_ENUM SensorId);
-bool WHS_PT100_Read(TEMPERATURE_SENSOR_ID_ENUM SensorId);
-bool WHS_PT100_Get(TEMPERATURE_SENSOR_ID_ENUM SensorId, uint8_t *value );
+uint32_t WHS_PT100_Read(TEMPERATURE_SENSOR_ID_ENUM SensorId);
+bool WHS_PT100_Get(TEMPERATURE_SENSOR_ID_ENUM SensorId, uint32_t *value );
bool Test_WHS_PT100_ADC();
#endif /* DRIVERS_I2C_COMMUNICATION_WHS_CARD_PT100_PT100_ADC_H_ */
diff --git a/Software/Embedded_SW/Embedded/Embedded.cfg b/Software/Embedded_SW/Embedded/Embedded.cfg
index cce6b3440..7fdf21819 100644
--- a/Software/Embedded_SW/Embedded/Embedded.cfg
+++ b/Software/Embedded_SW/Embedded/Embedded.cfg
@@ -19,7 +19,7 @@ var Task = xdc.useModule('ti.sysbios.knl.Task');
var HeapTrack = xdc.useModule('ti.sysbios.heaps.HeapTrack');
//var Memory = xdc.useModule('xdc.runtime.Memory');
-BIOS.heapSize = 60000; // bios heapmem
+BIOS.heapSize = 68000; // bios heapmem
//Memory.defaultHeapSize = 20000;
//Program.heap = 40000;
//Program.stack = 4096;
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
index eb855fd4a..b159897aa 100644
--- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
+++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
@@ -923,8 +923,8 @@ void DiagnosticOneSecCollection(void)
tempFlow = HeadFlowMeter;
}*/
WasteLevel = GetWHSWasteTankLevelMiliLiter()/1000;//change from ml to litter
- static double InitCounter = 60.0;
- if ((GetMachineState()<MACHINE_STATE_NO_PROCESS_PARAMS) &&(GetMachineState()>=MACHINE_STATE_WAIT_FOR_COOLER))
+ static double InitCounter = 85.0;
+ if (GetMachineState()<=MACHINE_STATE_WAIT_FOR_COOLER)
{
InitCounter-=1.0;
if(InitCounter<0)InitCounter = 0;
diff --git a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c
index a0b1b30c2..5c41d03f3 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c
@@ -157,6 +157,7 @@ int MachineUpdateResponseFunc(void)
else
return ERROR;
+ // Report("Sending machine state",__FILE__,__LINE__,(int)MachineStatus.state,RpWarning,(int)MachineStatus.overalltemperature,0);
responseContainer = /*MachineUpdate*/createContainer(MESSAGE_TYPE__StartMachineStatusUpdateResponse, MachineUpdateToken, false, &response, &start_machine_status_update_response__pack, &start_machine_status_update_response__get_packed_size);
responseContainer.has_continuous = true;
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c
index 4a43485cd..af82cdd9f 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_Blowers.c
@@ -345,9 +345,10 @@ void HeadBlowersCfg()
double PressureSensorInit(int blowerId)
{
- PressureSensorV0[blowerId] = MillisecGetTemperatures(BlowerIdToSensorId[blowerId]);
- PressureSensorV0[blowerId] /= 10;
- return PressureSensorV0[blowerId];
+ double V0;
+ V0 = MillisecGetTemperatures(BlowerIdToSensorId[blowerId]);
+ V0 /= 10;
+ return V0;
}
int HeadBlowersGetRPM(uint8_t blowerId)
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index d2fd74256..c8cab116f 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -1608,9 +1608,9 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers)
}
} //for
}
- usnprintf(IdMessage, 80,"IDS_StartBrushStop %d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",WFCF,CurrentDispenserSpeed[0],
+ usnprintf(IdMessage, 80,"IDS_StartBrushStop %d/%d D1 %d,D2 %d,D3 %d,D4 %d,D5 %d",FileBrushStop->index,SegmentNumOfBrushStops,CurrentDispenserSpeed[0],
CurrentDispenserSpeed[1],CurrentDispenserSpeed[2],CurrentDispenserSpeed[3],CurrentDispenserSpeed[4]);
- ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, __LINE__, FileBrushStop->index, RpWarning,n_dispensers, 0);
+ ReportWithPackageFilter(IDSFilter,IdMessage, __FILE__, SegmentNumOfBrushStops, FileBrushStop->index, RpWarning,(int)FileBrushStop->offsetmeters, 0);
}
uint32_t IDSBrushStopRestartCallback(uint32_t IfIndex, uint32_t readValue)
@@ -1676,7 +1676,7 @@ uint32_t IDSBrushStopRestartCallback(uint32_t IfIndex, uint32_t readValue)
IDS_StartBrushStop(n_dispensers, Dispensers);
}
JobBrushStopId++;
- ReportWithPackageFilter(IDSFilter,"brushstop",__FILE__,__LINE__,(int)JobBrushStopId,RpMessage,(int)SegmentNumOfBrushStops,0);
+ //ReportWithPackageFilter(IDSFilter,"brushstop",__FILE__,__LINE__,(int)JobBrushStopId,RpMessage,(int)SegmentNumOfBrushStops,0);
if (JobBrushStopId >= SegmentNumOfBrushStops)
{
ReportWithPackageFilter(IDSFilter,"last brushstop",__FILE__,__LINE__,(int)JobBrushStopId,RpWarning,(int)SegmentNumOfBrushStops,0);
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c
index 5471397aa..25fb8e962 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c
@@ -608,6 +608,8 @@ uint32_t Waste_PrepareCallbak(uint32_t IfIndex, uint32_t ReadValue)
{
SafeRemoveControlCallback(WasteReadyControlId,Waste_PrepareCallbak);
WasteReadyControlId = 0xFF;
+ JobEndReason = JOB_PRESSURE_ALARM;
+ usnprintf(AlarmReasonStr, 100, "Module waste prepare - air flow not stabilized");
Report("Module waste prepare failed!", __FILE__, __LINE__, headready, RpMessage, headready, 0);
PrepareReady(Module_Waste,ModuleFail);
}
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 );