diff --git a/src/AutoPilotPlugins/APM/APMSubMotorComponent.qml b/src/AutoPilotPlugins/APM/APMSubMotorComponent.qml index f824487ff3e5020471478ea87eae79fac12b20ed..5be901587009488b7ac776407e7b1f99026aae4f 100644 --- a/src/AutoPilotPlugins/APM/APMSubMotorComponent.qml +++ b/src/AutoPilotPlugins/APM/APMSubMotorComponent.qml @@ -168,6 +168,8 @@ SetupPage { onToggled: { if (controller.vehicle.armed) { timer.stop() + enabled = false + coolDownTimer.start() } controller.vehicle.armed = checked @@ -183,6 +185,8 @@ SetupPage { safetySwitch.checked = armed if (!armed) { timer.stop() + safetySwitch.enabled = false + coolDownTimer.start() } else { timer.start() } @@ -198,7 +202,14 @@ SetupPage { text: qsTr("Slide this switch to arm the vehicle and enable the motor test (CAUTION!)") } } // Row - + Row { + QGCLabel { + id: cooldownLabel + visible: coolDownTimer.running + color: qgcPal.warningText + text: qsTr("A 10 second coooldown is required before testing again, please stand by...") + } + } // Repeats the command signal and updates the checkbox every 50 ms Timer { id: timer @@ -219,6 +230,15 @@ SetupPage { } } } + Timer { + id: coolDownTimer + interval: 11000 + repeat: false + + onTriggered: { + safetySwitch.enabled = true + } + } } // Column } // Component } // SetupPahe