mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-25 17:23:56 -04:00
AP_Mount: storm integrates find_by_mavtype_and_compid
Note that this forces users to set their gimbal's component id while before any component id was acceptable
This commit is contained in:
parent
7c9b487779
commit
64b1277a66
@ -136,7 +136,10 @@ void AP_Mount_SToRM32::find_gimbal()
|
||||
return;
|
||||
}
|
||||
|
||||
if (GCS_MAVLINK::find_by_mavtype(MAV_TYPE_GIMBAL, _sysid, _compid, _chan)) {
|
||||
// we expect that instance 0 has compid = MAV_COMP_ID_GIMBAL, instance 1 has compid = MAV_COMP_ID_GIMBAL2, etc
|
||||
uint8_t compid = (_instance == 0) ? MAV_COMP_ID_GIMBAL : MAV_COMP_ID_GIMBAL2 + (_instance - 1);
|
||||
if (GCS_MAVLINK::find_by_mavtype_and_compid(MAV_TYPE_GIMBAL, compid, _sysid, _chan)) {
|
||||
_compid = compid;
|
||||
_initialised = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user