mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 10:23:34 +08:00
uORB remove unnecessary priority from each subscriber
This commit is contained in:
committed by
Lorenz Meier
parent
297c1b777b
commit
526fa9e9dd
@@ -175,6 +175,7 @@ public:
|
||||
unsigned int published_message_count() const { return _generation; }
|
||||
const struct orb_metadata *get_meta() const { return _meta; }
|
||||
|
||||
int get_priority() const { return _priority; }
|
||||
void set_priority(uint8_t priority) { _priority = priority; }
|
||||
|
||||
protected:
|
||||
@@ -196,9 +197,6 @@ private:
|
||||
int flags; /**< lowest 8 bits: priority of publisher, 9. bit: update_reported bit */
|
||||
UpdateIntervalData *update_interval; /**< if null, no update interval */
|
||||
|
||||
int priority() const { return flags & 0xff; }
|
||||
void set_priority(uint8_t prio) { flags = (flags & ~0xff) | prio; }
|
||||
|
||||
bool update_reported() const { return flags & (1 << 8); }
|
||||
void set_update_reported(bool update_reported_flag) { flags = (flags & ~(1 << 8)) | (((int)update_reported_flag) << 8); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user