mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Do not sample pressure ADC if not configured
This commit is contained in:
parent
d1cf8df2ad
commit
cd37ffd0bf
@ -1692,6 +1692,7 @@ Sensors::adc_poll(struct sensor_combined_s &raw)
|
||||
|
||||
_battery_current_timestamp = t;
|
||||
|
||||
#ifdef ADC_AIRSPEED_VOLTAGE_CHANNEL
|
||||
} else if (ADC_AIRSPEED_VOLTAGE_CHANNEL == buf_adc[i].am_channel) {
|
||||
|
||||
/* calculate airspeed, raw is the difference from */
|
||||
@ -1720,6 +1721,7 @@ Sensors::adc_poll(struct sensor_combined_s &raw)
|
||||
_diff_pres_pub = orb_advertise(ORB_ID(differential_pressure), &_diff_pres);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user