void Sensors::print_status() { _voted_sensors_update.print_status(); PX4_INFO("Airspeed status:"); _airspeed_validator.print(); }
void DataValidatorGroup::print() { /* print the group's state */ ECL_INFO("validator: best: %d, prev best: %d, failsafe: %s (%u events)", _curr_best, _prev_best, (_toggle_count > 0) ? "YES" : "NO", _toggle_count); DataValidator *next = _first; unsigned i = 0; while (next != nullptr) { if (next->used()) { uint32_t flags = next->state(); ECL_INFO("sensor #%u, prio: %d, state:%s%s%s%s%s%s", i, next->priority(), ((flags & DataValidator::ERROR_FLAG_NO_DATA) ? " OFF" : ""), ((flags & DataValidator::ERROR_FLAG_STALE_DATA) ? " STALE" : ""), ((flags & DataValidator::ERROR_FLAG_TIMEOUT) ? " TOUT" : ""), ((flags & DataValidator::ERROR_FLAG_HIGH_ERRCOUNT) ? " ECNT" : ""), ((flags & DataValidator::ERROR_FLAG_HIGH_ERRDENSITY) ? " EDNST" : ""), ((flags == DataValidator::ERROR_FLAG_NO_ERROR) ? " OK" : "")); next->print(); } next = next->sibling(); i++; } }