mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 18:33:36 +08:00
Removed all swapping of uORB instances
This commit is contained in:
committed by
Lorenz Meier
parent
6452b7e014
commit
4c1adc088f
@@ -117,10 +117,6 @@ private:
|
||||
#endif
|
||||
}; // End _analogBatteries
|
||||
|
||||
#if BOARD_NUMBER_BRICKS > 1
|
||||
int _battery_pub_intance0ndx {0}; /**< track the index of instance 0 */
|
||||
#endif /* BOARD_NUMBER_BRICKS > 1 */
|
||||
|
||||
perf_counter_t _loop_perf; /**< loop performance counter */
|
||||
|
||||
/**
|
||||
@@ -210,17 +206,7 @@ BatteryStatus::adc_poll()
|
||||
* VDD_5V_IN
|
||||
*/
|
||||
selected_source = b;
|
||||
# if BOARD_NUMBER_BRICKS > 1
|
||||
|
||||
/* Move the selected_source to instance 0 */
|
||||
if (_battery_pub_intance0ndx != selected_source) {
|
||||
_analogBatteries[_battery_pub_intance0ndx]->swapUorbAdvert(
|
||||
*_analogBatteries[selected_source]
|
||||
);
|
||||
_battery_pub_intance0ndx = selected_source;
|
||||
}
|
||||
|
||||
# endif /* BOARD_NUMBER_BRICKS > 1 */
|
||||
}
|
||||
|
||||
/* look for specific channels and process the raw voltage to measurement data */
|
||||
|
||||
Reference in New Issue
Block a user