mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
AP_Airspeed: make MAV_SEVERITY levels higher
This commit is contained in:
parent
6a12d3f5d9
commit
ea4c3d68d6
@ -308,7 +308,7 @@ bool AP_Airspeed::add_backend(AP_Airspeed_Backend *backend)
|
||||
const uint8_t i = num_sensors;
|
||||
sensor[num_sensors++] = backend;
|
||||
if (!sensor[i]->init()) {
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Airspeed %u init failed", i+1);
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "Airspeed %u init failed", i+1);
|
||||
delete sensor[i];
|
||||
sensor[i] = nullptr;
|
||||
}
|
||||
@ -431,7 +431,7 @@ void AP_Airspeed::init()
|
||||
break;
|
||||
}
|
||||
if (sensor[i] && !sensor[i]->init()) {
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Airspeed %u init failed", i + 1);
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "Airspeed %u init failed", i + 1);
|
||||
delete sensor[i];
|
||||
sensor[i] = nullptr;
|
||||
}
|
||||
@ -487,7 +487,7 @@ void AP_Airspeed::calibrate(bool in_startup)
|
||||
continue;
|
||||
}
|
||||
if (sensor[i] == nullptr) {
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO,"Airspeed %u not initalized, cannot cal", i+1);
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "Airspeed %u not initalized, cannot cal", i+1);
|
||||
continue;
|
||||
}
|
||||
state[i].cal.start_ms = AP_HAL::millis();
|
||||
@ -512,7 +512,7 @@ void AP_Airspeed::update_calibration(uint8_t i, float raw_pressure)
|
||||
if (AP_HAL::millis() - state[i].cal.start_ms >= 1000 &&
|
||||
state[i].cal.read_count > 15) {
|
||||
if (state[i].cal.count == 0) {
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Airspeed %u unhealthy", i + 1);
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "Airspeed %u unhealthy", i + 1);
|
||||
} else {
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Airspeed %u calibrated", i + 1);
|
||||
param[i].offset.set_and_save(state[i].cal.sum / state[i].cal.count);
|
||||
|
@ -86,7 +86,7 @@ bool AP_Airspeed_MS4525::init()
|
||||
}
|
||||
}
|
||||
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "MS4525[%u]: no sensor found", get_instance());
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "MS4525[%u]: no sensor found", get_instance());
|
||||
return false;
|
||||
|
||||
found_sensor:
|
||||
|
@ -85,7 +85,7 @@ bool AP_Airspeed_MS5525::init()
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "MS5525[%u]: no sensor found", get_instance());
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_ERROR, "MS5525[%u]: no sensor found", get_instance());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user