Skip to content

Commit

Permalink
Vehicle: ignore severity of PX4 preflight messages
Browse files Browse the repository at this point in the history
We had someone change this condition out of confusion downstream and I figured out there is no message with emergency severity containing the string "preflight" in the current PX4 version. I can still check if and where they might have existed on older versions but I'd suggest to remove this since for the events it doesn't make sense to sort the text by severity.
  • Loading branch information
MaEtUgR authored Dec 4, 2024
1 parent e208322 commit 629d977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Vehicle/Vehicle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3997,7 +3997,7 @@ void Vehicle::_textMessageReceived(MAV_COMPONENT componentid, MAV_SEVERITY sever

bool skipSpoken = false;
const bool ardupilotPrearm = text.startsWith(QStringLiteral("PreArm"));
const bool px4Prearm = text.startsWith(QStringLiteral("preflight"), Qt::CaseInsensitive) && (severity >= MAV_SEVERITY::MAV_SEVERITY_CRITICAL);
const bool px4Prearm = text.startsWith(QStringLiteral("preflight"), Qt::CaseInsensitive);
if (ardupilotPrearm || px4Prearm) {
auto eventData = _events.find(componentid);
if (eventData != _events.end()) {
Expand Down

0 comments on commit 629d977

Please sign in to comment.