Commit Graph
5 Commits
Author SHA1 Message Date
Peter Barker dabcf0e91c AP_Compass: make compass instance number part of AP_Compass_Backend
rather than each backend storing this itself.

This allows many methods to assume that they are working on the current instance number rather than being passed the instance number

registering the compass via the compass backend method now infers setting the device ID
2025-10-14 14:48:58 +11:00
Peter Barker 9ea20dc132 AP_Compass: add a MSP probe method which can fail
currently registering an MSP backend can't fail, so if we fail to register (e.g. out of slots) then we can end up overwriting other's data.

Add a probe method which can return nullptr on failure
2025-09-30 15:10:09 +10:00
Peter Barker 51fbd53473 AP_Compass: check return value of register_compass in AP_Compass_MSP
if we don't do this then we can end up overwriting someone else's data

... and make sure these bugs don't come back by using WARN_IF_UNUSED
2025-09-28 12:42:49 +01:00
Peter Barker 3adbaddab0 AP_Compass: regularise compass defines
start to make compass backends look like backends from our other libraries
2022-11-15 16:44:38 +11:00
yaapu 5e88a856e9 AP_Compass: support for MSP compass 2020-09-09 06:35:50 +10:00