v5 - adding preassure sensor (lid status)

This commit is contained in:
2024-05-02 09:58:56 +02:00
parent 213ee88c7a
commit 427106670b
6 changed files with 2647 additions and 4061 deletions

View File

@ -160,20 +160,40 @@ PRIVATE VOID vTask( PVOID arg )
{
flTempData[ADCD_eWater] = flConvertADCData( u16ADC_data );
} else {
if( (u8error & ADCD_STATUS_DATA_ERROR) == ADCD_STATUS_DATA_ERROR ){
if( (u8error & ADCD_STATUS_DATA_ERROR) == ADCD_STATUS_DATA_ERROR ){
/** @todo call error handler temp data */
} else if( (u8error & ADCD_SPI_FAILURE) == ADCD_SPI_FAILURE ){
if( (u8error & ADCD_FAULT_HIGHTHRESH) == ADCD_FAULT_HIGHTHRESH ){
flTempData[ADCD_eWater] = 4200.0f;
}else if( (u8error & ADCD_FAULT_LOWTHRESH) == ADCD_FAULT_LOWTHRESH ){
flTempData[ADCD_eWater] = -273.16f;
}else if( (u8error & ADCD_FAULT_REFINLOW) == ADCD_FAULT_REFINLOW ){
flTempData[ADCD_eWater] = -273.16f;
}else if( (u8error & ADCD_FAULT_REFINHIGH) == ADCD_FAULT_REFINHIGH ){
flTempData[ADCD_eWater] = -273.16f;
}else if( (u8error & ADCD_FAULT_RTDINLOW) == ADCD_FAULT_RTDINLOW ){
flTempData[ADCD_eWater] = -273.16f;
}else if( (u8error & ADCD_FAULT_OVUV) == ADCD_FAULT_OVUV ){
flTempData[ADCD_eWater] = -273.16f;
} else {
flTempData[ADCD_eWater] = -273.16f;
}
/** @todo call error handler onchip spi failure */
/** @todo call error handler temp data */
} else if( (u8error & ADCD_SPI_FAILURE) == ADCD_SPI_FAILURE ){
flTempData[ADCD_eWater] = -273.16f;
/** @todo call error handler onchip spi failure */
} else {
flTempData[ADCD_eWater] = -273.16f;
}
u8error = 0;
boOK = TRUE;
}
flTempData[ADCD_eWater] = -273.16f;
u8error = 0;
boOK = TRUE;
}
boOK &= ADCD_boReadData( ADCD_eModule, &u8error, &u16ADC_data );
@ -183,16 +203,35 @@ PRIVATE VOID vTask( PVOID arg )
flTempData[ADCD_eModule] = flConvertADCData( u16ADC_data );
} else {
if( (u8error & ADCD_STATUS_DATA_ERROR) == ADCD_STATUS_DATA_ERROR ){
if( (u8error & ADCD_FAULT_HIGHTHRESH) == ADCD_FAULT_HIGHTHRESH ){
flTempData[ADCD_eModule] = 4200.0f;
}else if( (u8error & ADCD_FAULT_LOWTHRESH) == ADCD_FAULT_LOWTHRESH ){
flTempData[ADCD_eModule] = -273.16f;
}else if( (u8error & ADCD_FAULT_REFINLOW) == ADCD_FAULT_REFINLOW ){
flTempData[ADCD_eModule] = -273.16f;
}else if( (u8error & ADCD_FAULT_REFINHIGH) == ADCD_FAULT_REFINHIGH ){
flTempData[ADCD_eModule] = -273.16f;
}else if( (u8error & ADCD_FAULT_RTDINLOW) == ADCD_FAULT_RTDINLOW ){
flTempData[ADCD_eModule] = -273.16f;
}else if( (u8error & ADCD_FAULT_OVUV) == ADCD_FAULT_OVUV ){
flTempData[ADCD_eModule] = -273.16f;
} else {
flTempData[ADCD_eModule] = -273.16f;
}
/** @todo call error handler temp data */
} else if( (u8error & ADCD_SPI_FAILURE) == ADCD_SPI_FAILURE ){
flTempData[ADCD_eModule] = -273.16f;
/** @todo call error handler onchip spi failure */
} else {
flTempData[ADCD_eModule] = -273.16f;
}
flTempData[ADCD_eModule] = -273.16f;
u8error = 0;
boOK = TRUE;