Browse Source

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.
sbg
David Sidrane 8 years ago committed by Lorenz Meier
parent
commit
fa6ad99aba
  1. 5
      src/drivers/meas_airspeed/meas_airspeed.cpp

5
src/drivers/meas_airspeed/meas_airspeed.cpp

@ -335,8 +335,7 @@ MEASAirspeed::cycle()
void void
MEASAirspeed::voltage_correction(float &diff_press_pa, float &temperature) MEASAirspeed::voltage_correction(float &diff_press_pa, float &temperature)
{ {
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V2) || defined(CONFIG_ARCH_BOARD_PX4FMU_V4) \ #if defined(ADC_SCALED_V5_SENSE)
|| defined(CONFIG_ARCH_BOARD_MINDPX_V2)
if (_t_system_power == -1) { if (_t_system_power == -1) {
_t_system_power = orb_subscribe(ORB_ID(system_power)); _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; temperature -= voltage_diff * temp_slope;
#endif // defined(CONFIG_ARCH_BOARD_PX4FMU_V2) || defined(CONFIG_ARCH_BOARD_PX4FMU_V4) #endif // defined(ADC_SCALED_V5_SENSE)
} }
/** /**

Loading…
Cancel
Save