mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 02:03:33 +08:00
sensors: move baro aggregation to new sensors/vehicle_air_data
This commit is contained in:
@@ -137,6 +137,7 @@ public:
|
||||
|
||||
uint8_t get_instance() const { return _instance; }
|
||||
orb_id_t get_topic() const { return get_orb_meta(_orb_id); }
|
||||
ORB_PRIO get_priority() { return advertised() ? _node->get_priority() : ORB_PRIO_UNINITIALIZED; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ public:
|
||||
|
||||
uint8_t get_instance() const { return _subscription.get_instance(); }
|
||||
orb_id_t get_topic() const { return _subscription.get_topic(); }
|
||||
ORB_PRIO get_priority() { return _subscription.get_priority(); }
|
||||
|
||||
/**
|
||||
* Set the interval in microseconds
|
||||
|
||||
@@ -67,7 +67,8 @@ typedef const struct orb_metadata *orb_id_t;
|
||||
* Relevant for multi-topics / topic groups
|
||||
*/
|
||||
enum ORB_PRIO {
|
||||
ORB_PRIO_MIN = 1, // leave 0 free for other purposes, eg. marking an uninitialized value
|
||||
ORB_PRIO_UNINITIALIZED = 0,
|
||||
ORB_PRIO_MIN = 1,
|
||||
ORB_PRIO_VERY_LOW = 25,
|
||||
ORB_PRIO_LOW = 50,
|
||||
ORB_PRIO_DEFAULT = 75,
|
||||
|
||||
@@ -142,7 +142,7 @@ uORB::DeviceMaster::advertise(const struct orb_metadata *meta, bool is_advertise
|
||||
if (existing_node != nullptr &&
|
||||
(!existing_node->is_advertised() || is_single_instance_advertiser || !is_advertiser)) {
|
||||
if (is_advertiser) {
|
||||
existing_node->set_priority(priority);
|
||||
existing_node->set_priority((ORB_PRIO)priority);
|
||||
/* Set as advertised to avoid race conditions (otherwise 2 multi-instance advertisers
|
||||
* could get the same instance).
|
||||
*/
|
||||
|
||||
@@ -198,8 +198,8 @@ public:
|
||||
|
||||
uint8_t get_instance() const { return _instance; }
|
||||
|
||||
int get_priority() const { return _priority; }
|
||||
void set_priority(uint8_t priority) { _priority = priority; }
|
||||
ORB_PRIO get_priority() const { return (ORB_PRIO)_priority; }
|
||||
void set_priority(ORB_PRIO priority) { _priority = priority; }
|
||||
|
||||
/**
|
||||
* Copies data and the corresponding generation
|
||||
|
||||
Reference in New Issue
Block a user