sdp3x issue I2C general call reset if alone

This commit is contained in:
Daniel Agar
2021-09-15 13:15:13 -04:00
parent 3d56836850
commit 34ccd5c99f
7 changed files with 68 additions and 3 deletions
@@ -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();