diff --git a/src/AutoPilotPlugins/APM/APMFollowComponent.qml b/src/AutoPilotPlugins/APM/APMFollowComponent.qml index 1b4b93e19981e580243e3e9e92a17bf3514c5f06..8cd35ce0ef11193ab8e40e1381ca388974571129 100644 --- a/src/AutoPilotPlugins/APM/APMFollowComponent.qml +++ b/src/AutoPilotPlugins/APM/APMFollowComponent.qml @@ -49,13 +49,15 @@ SetupPage { property int _followComboMaintainIndex: 0 property int _followComboSpecifyIndex: 1 property bool _followMaintain: followPositionCombo.currentIndex === _followComboMaintainIndex - property bool _isFollowMeSetup: _followEnabled.rawValue == 1 && _followParamsAvailable && _followOffsetType.rawValue == 1 && (_roverFirmware || (!_roverFirmware && _followAltitudeType.rawValue == 1)) && _followSysId.rawValue == 0 + property bool _isFollowMeSetup: _followEnabled.rawValue == 1 && _followParamsAvailable && _followOffsetType.rawValue == _followOffsetTypeHeadingRelative && _followSysId.rawValue == 0 property bool _roverFirmware: controller.roverFirmware - readonly property int _followYawBehaviorNone: 0 - readonly property int _followYawBehaviorFace: 1 - readonly property int _followYawBehaviorSame: 2 - readonly property int _followYawBehaviorFlight: 3 + readonly property int _followYawBehaviorNone: 0 + readonly property int _followYawBehaviorFace: 1 + readonly property int _followYawBehaviorSame: 2 + readonly property int _followYawBehaviorFlight: 3 + readonly property int _followOffsetTypeHeadingRelative: 1 + readonly property int _followAltitudeTypeRelative: 1 Component.onCompleted: _setUIFromParams() @@ -89,7 +91,7 @@ SetupPage { _followOffsetType.rawValue = 1 // Relative to vehicle _followSysId.rawValue = 0 // Follow first message sent if (!_roverFirmware) { - _followAltitudeType.rawValue = 1 // Altitude is relative + _followAltitudeType.rawValue = _followAltitudeTypeRelative } controller.distance.value = controller.distance.defaultValue