mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 01:04:19 +08:00
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:
committed by
Lorenz Meier
parent
26b1e1fe0c
commit
fa6ad99aba
@@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user