APM-134: Secondary Mag health#219
Conversation
|
Preliminary review. Not tested yet. |
|
|
||
| /// Return the health of a compass | ||
| bool healthy(uint8_t i) const { return _get_state(Priority(i)).healthy; } | ||
| bool healthy(void) const { return healthy(0); } |
There was a problem hiding this comment.
Is this function used in contexts that check whether the primary compass is healthy? If so, would it make sense to avoid touching that logic and write an all_healthy() function instead?
There was a problem hiding this comment.
Actually, looking at the code again now I don't think this change to healthy() is needed because the healthy mask that gets reported in the named value int you added doesn't use this, right?
There was a problem hiding this comment.
This function "compass.healthy()" is used in arming check and in the system status sensor_health. If any one compass is down it will be 0/false. At the same time, a new NAMED_INT_VALUE is sent COMPHEALTH which is also a bitmask where the bit is the health of each compass.
There was a problem hiding this comment.
Here are all the places that uses "compass.healthy()"
Do we require all of those use cases to require all compass to be healthy? That was my assumption with this PR.
https://github.com/matternet/ardupilot/blob/mttr-rebase-4.0/ArduCopter/AP_Arming.cpp#L620
https://github.com/matternet/ardupilot/blob/mttr-rebase-4.0/ArduCopter/Log.cpp#L268
https://github.com/matternet/ardupilot/blob/mttr-rebase-4.0/libraries/AP_Arming/AP_Arming.cpp#L394
https://github.com/matternet/ardupilot/blob/mttr-rebase-4.0/libraries/GCS_MAVLink/GCS.cpp#L137
There was a problem hiding this comment.
@dat-tran-matternet You're right -- we require all compasses to be healthy in each of those cases. Thank you for clarifying 👍
* APM-124: Change bootloader serial port to SERIAL_1 from SERIAL_5 The Flight Management Computer (FMC) connects to Ardupilot on SERIAL_1. This changes the booloader serial port from SERIAL_5 to SERIAL_1 so the FMC can update the Ardupilot's firmware using uploader.py. * APM-134: Secondary Mag health (#219) * APM-134: Secondary Mag health * AP_Compass: added register checking for AK09916 mode this allows AK09916 on I2C to recover from a power outage in flight * APM-138 Add SBAS disable option for test - added option to disable SBAS for GPS1, GPS2, or both - SBAS disabled via RC - add GNSS param defaults * AP_GPS: fixed switch to incorrect GPS from blended (#223) * AP_GPS: fixed switch to incorrect GPS from blended new GPS could have been about to time out * Bugfix/apm 144 gps2 low sats alert (#226) * AP_NavEKF2 AP_NavEKF3: Fix set alert for GPS1 and GPS2 in sat check Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> * updated output to properly report SBAS status Co-authored-by: Dat Tran <dat.tran@matternet.us> Co-authored-by: dat-tran-matternet <79175627+dat-tran-matternet@users.noreply.github.com> Co-authored-by: Andrew Tridgell <andrew@tridgell.net> Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> Co-authored-by: Alice Zielman <alice@matternet.us>
* APM-124: Change bootloader serial port to SERIAL_1 from SERIAL_5 The Flight Management Computer (FMC) connects to Ardupilot on SERIAL_1. This changes the booloader serial port from SERIAL_5 to SERIAL_1 so the FMC can update the Ardupilot's firmware using uploader.py. * APM-134: Secondary Mag health (#219) * APM-134: Secondary Mag health * AP_Compass: added register checking for AK09916 mode this allows AK09916 on I2C to recover from a power outage in flight * APM-138 Add SBAS disable option for test - added option to disable SBAS for GPS1, GPS2, or both - SBAS disabled via RC - add GNSS param defaults * AP_GPS: fixed switch to incorrect GPS from blended (#223) * AP_GPS: fixed switch to incorrect GPS from blended new GPS could have been about to time out * Bugfix/apm 144 gps2 low sats alert (#226) * AP_NavEKF2 AP_NavEKF3: Fix set alert for GPS1 and GPS2 in sat check Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> * updated output to properly report SBAS status Co-authored-by: Dat Tran <dat.tran@matternet.us> Co-authored-by: dat-tran-matternet <79175627+dat-tran-matternet@users.noreply.github.com> Co-authored-by: Andrew Tridgell <andrew@tridgell.net> Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> Co-authored-by: Alice Zielman <alice@matternet.us>
* APM-124: Change bootloader serial port to SERIAL_1 from SERIAL_5 The Flight Management Computer (FMC) connects to Ardupilot on SERIAL_1. This changes the booloader serial port from SERIAL_5 to SERIAL_1 so the FMC can update the Ardupilot's firmware using uploader.py. * APM-134: Secondary Mag health (#219) * APM-134: Secondary Mag health * AP_Compass: added register checking for AK09916 mode this allows AK09916 on I2C to recover from a power outage in flight * APM-138 Add SBAS disable option for test - added option to disable SBAS for GPS1, GPS2, or both - SBAS disabled via RC - add GNSS param defaults * AP_GPS: fixed switch to incorrect GPS from blended (#223) * AP_GPS: fixed switch to incorrect GPS from blended new GPS could have been about to time out * Bugfix/apm 144 gps2 low sats alert (#226) * AP_NavEKF2 AP_NavEKF3: Fix set alert for GPS1 and GPS2 in sat check Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> * updated output to properly report SBAS status Co-authored-by: Dat Tran <dat.tran@matternet.us> Co-authored-by: dat-tran-matternet <79175627+dat-tran-matternet@users.noreply.github.com> Co-authored-by: Andrew Tridgell <andrew@tridgell.net> Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> Co-authored-by: Alice Zielman <alice@matternet.us>
* APM-124: Change bootloader serial port to SERIAL_1 from SERIAL_5 The Flight Management Computer (FMC) connects to Ardupilot on SERIAL_1. This changes the booloader serial port from SERIAL_5 to SERIAL_1 so the FMC can update the Ardupilot's firmware using uploader.py. * APM-134: Secondary Mag health (#219) * APM-134: Secondary Mag health * AP_Compass: added register checking for AK09916 mode this allows AK09916 on I2C to recover from a power outage in flight * APM-138 Add SBAS disable option for test - added option to disable SBAS for GPS1, GPS2, or both - SBAS disabled via RC - add GNSS param defaults * AP_GPS: fixed switch to incorrect GPS from blended (#223) * AP_GPS: fixed switch to incorrect GPS from blended new GPS could have been about to time out * Bugfix/apm 144 gps2 low sats alert (#226) * AP_NavEKF2 AP_NavEKF3: Fix set alert for GPS1 and GPS2 in sat check Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> * updated output to properly report SBAS status Co-authored-by: Dat Tran <dat.tran@matternet.us> Co-authored-by: dat-tran-matternet <79175627+dat-tran-matternet@users.noreply.github.com> Co-authored-by: Andrew Tridgell <andrew@tridgell.net> Co-authored-by: zalice <48697569+zalice@users.noreply.github.com> Co-authored-by: Alice Zielman <alice@matternet.us>
No description provided.