diff --git a/src/uas/PxQuadMAV.cc b/src/uas/PxQuadMAV.cc index 6deb02f..25b4135 100644 --- a/src/uas/PxQuadMAV.cc +++ b/src/uas/PxQuadMAV.cc @@ -62,6 +62,6 @@ void PxQuadMAV::sendProcessCommand(int watchdogId, int processId, unsigned int c payload.command_id = (uint8_t)command; mavlink_message_t msg; - mavlink_msg_watchdog_command_encode(sysid, compid, &msg, &payload); + mavlink_msg_watchdog_command_encode(mavlink->getSystemId(), mavlink->getComponentId(), &msg, &payload); sendMessage(msg); } diff --git a/src/ui/watchdog/WatchdogControl.cc b/src/ui/watchdog/WatchdogControl.cc index 0ba5428..a53f956 100644 --- a/src/ui/watchdog/WatchdogControl.cc +++ b/src/ui/watchdog/WatchdogControl.cc @@ -4,7 +4,7 @@ #include -WatchdogControl::WatchdogControl(UASInterface* uas, QWidget *parent) : +WatchdogControl::WatchdogControl(QWidget *parent) : QWidget(parent), mav(NULL), ui(new Ui::WatchdogControl) @@ -19,7 +19,7 @@ WatchdogControl::~WatchdogControl() void WatchdogControl::setUAS(UASInterface* uas) { - PxQuadMAV* qmav = dynamic_cast(uas); + PxQuadMAV* qmav = dynamic_cast(uas); if (qmav) { diff --git a/src/ui/watchdog/WatchdogControl.h b/src/ui/watchdog/WatchdogControl.h index f8988d2..543f0f1 100644 --- a/src/ui/watchdog/WatchdogControl.h +++ b/src/ui/watchdog/WatchdogControl.h @@ -94,7 +94,7 @@ public: QTimer* timeoutTimer_; ///< Internal timer, used to measure the time since the last heartbeat message }; - WatchdogControl(UASInterface* uas, QWidget *parent = 0); + WatchdogControl(QWidget *parent = 0); ~WatchdogControl(); static const uint16_t ALL = (uint16_t)-1; ///< A magic value for a process-ID which addresses "all processes" @@ -105,6 +105,7 @@ public slots: void updateWatchdog(int systemId, int watchdogId, unsigned int processCount); void addProcess(int systemId, int watchdogId, int processId, QString name, QString arguments, int timeout); void updateProcess(int systemId, int watchdogId, int processId, int state, bool muted, int crashed, int pid); + void setUAS(UASInterface* uas); signals: void sendProcessCommand(int watchdogId, int processId, unsigned int command);