"VNERR" does not match beginning of message_to_send, so have to prevent it from returning due to the string compare. Also must prevent exiting the decode before the sentence has completed so that we can go on to print the error code term.
Fix bug preventing disabling of ASCII measurements
Instead of snprintf the command to message_to_send then executing run_command, allow run_command to accept a string and format spec
Add check to ensure message_to_send is greater than length 6 before attempting to read past 6
* This catches when there's a mismatch of GPSx_TYPE and EAHRS_SENSORS
when GPS is enabled
* Before this pre-arm, failure to set GPS_TYPE2 to 21 (ExternalAHRS)
resulted in silent rejection of the data in AP_GPS because the default
is off
* And fix a little logging bug
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
* This allows the backend to report more detailed errors
* Before this, many pre-arm errors were hidden by origin failure
* If pre-arm could report multiple errors, that would be ideal
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
* Add generic health and time utils
* Fix bug only checking first GNSS system
* Use common logging struct
* Improve pre-arm log checks
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
* Variances vs uncertainties may still be off
* Requires enabling the following packets in SensorConnect:
* Position Uncertainty (LLH)
* Velocity Uncertainty (NED)
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
automatically set origin to AHRS origin. This means if on boot
external AHRS is not the primary then it will use the origin from the
active backend, preventing a jump on change of backends
* Implement filter state without relying on GPS
* Implement health and initialization check based on filter state
* Fix pre-arm checks missing version
* Add version specifics to microstrain 5 log msgs
* Add utilities to microstrain packet to remove magic number array
access
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
* The VN driver was likely written before there were multiple types
* The log messages make it seem like core AHRS problems rather than
issues directly with VN
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
* If you didn't set the serial port parameter correctly, but enabled MicroStrain AHRS, it would crash on boot
* This is because AP_AHRS calls update() which calls build_packet()
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
* Move common parsing to MicroStrain_common
* Add propogation of parsed packet type back to the driver
* Rename the driver to add series-5 specifier
* Unlocks adding 7-series driver with less code duplication
* Add missing includes
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>