Enable MEAS Airspeed voltage_correction based on ADC_SCALED_V5_SENSE not CONFIG_ARCH_BOARD_xxx

ADC_SCALED_V5_SENSE is defined and derived based on HW that provides
    and adc input that samples the V5 Rail or in the case of FMUv5 the
    V5 supply.
This commit is contained in:
David Sidrane
2017-01-13 14:02:08 -10:00
committed by Lorenz Meier
parent 26b1e1fe0c
commit fa6ad99aba
+2 -3
View File
@@ -335,8 +335,7 @@ MEASAirspeed::cycle()
void
MEASAirspeed::voltage_correction(float &diff_press_pa, float &temperature)
{
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V2) || defined(CONFIG_ARCH_BOARD_PX4FMU_V4) \
|| defined(CONFIG_ARCH_BOARD_MINDPX_V2)
#if defined(ADC_SCALED_V5_SENSE)
if (_t_system_power == -1) {
_t_system_power = orb_subscribe(ORB_ID(system_power));
@@ -390,7 +389,7 @@ MEASAirspeed::voltage_correction(float &diff_press_pa, float &temperature)
}
temperature -= voltage_diff * temp_slope;
#endif // defined(CONFIG_ARCH_BOARD_PX4FMU_V2) || defined(CONFIG_ARCH_BOARD_PX4FMU_V4)
#endif // defined(ADC_SCALED_V5_SENSE)
}
/**