mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-15 07:51:35 +08:00
sdp3x issue I2C general call reset if alone
This commit is contained in:
@@ -122,6 +122,8 @@ protected:
|
||||
bool Init(const wq_config_t &config);
|
||||
void Deinit();
|
||||
|
||||
bool alone() { return _wq && (_wq->count() <= 1); }
|
||||
|
||||
float elapsed_time() const;
|
||||
float average_rate() const;
|
||||
float average_interval() const;
|
||||
|
||||
@@ -73,6 +73,8 @@ public:
|
||||
|
||||
void print_status(bool last = false);
|
||||
|
||||
size_t count();
|
||||
|
||||
// WorkQueues sorted numerically by relative priority (-1 to -255)
|
||||
bool operator<=(const WorkQueue &rhs) const { return _config.relative_priority >= rhs.get_config().relative_priority; }
|
||||
|
||||
|
||||
@@ -204,6 +204,11 @@ void WorkQueue::Run()
|
||||
PX4_DEBUG("%s: exiting", _config.name);
|
||||
}
|
||||
|
||||
size_t WorkQueue::count()
|
||||
{
|
||||
return _work_items.size();
|
||||
}
|
||||
|
||||
void WorkQueue::print_status(bool last)
|
||||
{
|
||||
const size_t num_items = _work_items.size();
|
||||
|
||||
Reference in New Issue
Block a user