AP_ExternalAHRS: correct VectorNAV handling of error term

This commit is contained in:
Peter Barker 2024-08-08 12:24:55 +10:00 committed by Peter Barker
parent f389549d5d
commit c3b6127b1b
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ bool AP_ExternalAHRS_VectorNav::decode_latest_term()
if (nmea.error_response) {
GCS_SEND_TEXT(MAV_SEVERITY_CRITICAL, "VectorNav received VNERR code: %s", nmea.term);
} else if (strlen(message_to_send) > 6 &&
strncmp(nmea.term, &message_to_send[6], nmea.term_offset != 0)) { // Start after "VNXXX,"
strncmp(nmea.term, &message_to_send[6], nmea.term_offset) != 0) { // Start after "VNXXX,"
return false;
}
return true;