diff --git a/src/AutoPilotPlugins/PX4/PowerComponent.qml b/src/AutoPilotPlugins/PX4/PowerComponent.qml index 59fa2e0dc8715fbf06351fa88e89408485cf300f..150b4cddafaa11aa57448f3c009745c74766044b 100644 --- a/src/AutoPilotPlugins/PX4/PowerComponent.qml +++ b/src/AutoPilotPlugins/PX4/PowerComponent.qml @@ -277,9 +277,14 @@ QGCView { } QGCButton { - text: "Configure" + text: "Start Configuration" onClicked: controller.busConfigureActuators() } + + QGCButton { + text: "End Configuration" + onClicked: controller.StopBusConfigureActuators() + } } } diff --git a/src/AutoPilotPlugins/PX4/PowerComponentController.cc b/src/AutoPilotPlugins/PX4/PowerComponentController.cc index bcd085a517d1c0ac5b918ba63983866ccd5bf8cb..d9cd80fb04fa3100bc9eb939aa3a23984f0932a8 100644 --- a/src/AutoPilotPlugins/PX4/PowerComponentController.cc +++ b/src/AutoPilotPlugins/PX4/PowerComponentController.cc @@ -55,6 +55,12 @@ void PowerComponentController::busConfigureActuators(void) _uas->startBusConfig(UASInterface::StartBusConfigActuators); } +void PowerComponentController::stopBusConfigureActuators(void) +{ + disconnect(_uas, &UASInterface::textMessageReceived, this, &PowerComponentController::_handleUASTextMessage); + _uas->startBusConfig(UASInterface::EndBusConfigActuators); +} + void PowerComponentController::_stopCalibration(void) { disconnect(_uas, &UASInterface::textMessageReceived, this, &PowerComponentController::_handleUASTextMessage); diff --git a/src/AutoPilotPlugins/PX4/PowerComponentController.h b/src/AutoPilotPlugins/PX4/PowerComponentController.h index 6e1b9388ffa9b9915289833f267835660fa428f9..5e608c7ca141af3012196b9d01921674a771c441 100644 --- a/src/AutoPilotPlugins/PX4/PowerComponentController.h +++ b/src/AutoPilotPlugins/PX4/PowerComponentController.h @@ -44,6 +44,7 @@ public: Q_INVOKABLE void calibrateEsc(void); Q_INVOKABLE void busConfigureActuators(void); + Q_INVOKABLE void stopBusConfigureActuators(void); signals: void oldFirmware(void);