diff --git a/src/ui/QGCRemoteControlView.cc b/src/ui/QGCRemoteControlView.cc index cfa207dab5862158a3a1a6d2a6025404063623ef..6f3c4c634accb061382da6e2f496f514b7b97224 100644 --- a/src/ui/QGCRemoteControlView.cc +++ b/src/ui/QGCRemoteControlView.cc @@ -80,9 +80,8 @@ void QGCRemoteControlView::setUASId(int id) // The UAS exists, disconnect any existing connections disconnect(uas, SIGNAL(remoteControlChannelRawChanged(int,float,float)), this, SLOT(setChannel(int,float,float))); disconnect(uas, SIGNAL(remoteControlRSSIChanged(float)), this, SLOT(setRemoteRSSI(float))); - disconnect(uas, SIGNAL(radioCalibrationRawReceived(const QPointer)), calibrationWindow, SLOT(receive(const QPointer&))); - disconnect(uas, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannelRaw(int,float))); - disconnect(uas, SIGNAL(remoteControlChannelScaledChanged(int,float,float)), calibrationWindow, SLOT(setChannelScaled(int,float))); + disconnect(uas, SIGNAL(radioCalibrationRawReceived(const QPointer&)), calibrationWindow, SLOT(receive(const QPointer&))); + disconnect(uas, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannel(int,float))); } } @@ -97,6 +96,9 @@ void QGCRemoteControlView::setUASId(int id) connect(newUAS, SIGNAL(remoteControlRSSIChanged(float)), this, SLOT(setRemoteRSSI(float))); connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), this, SLOT(setChannelRaw(int,float))); connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), this, SLOT(setChannelScaled(int,float))); + + // only connect raw channels to calibration window widget + connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannel(int,float))); } } diff --git a/src/ui/RadioCalibration/RadioCalibrationWindow.cc b/src/ui/RadioCalibration/RadioCalibrationWindow.cc index 44127cbad6132812edc5dc82281121e2b9a49c9b..6741c126eac1033d491c8e55a5191d4d32ccba07 100644 --- a/src/ui/RadioCalibration/RadioCalibrationWindow.cc +++ b/src/ui/RadioCalibration/RadioCalibrationWindow.cc @@ -52,68 +52,7 @@ RadioCalibrationWindow::RadioCalibrationWindow(QWidget *parent) : setUASId(0); } -//void RadioCalibrationWindow::setChannelRaw(int ch, float raw) -//{ -// /** this expects a particular channel to function mapping -// \todo allow run-time channel mapping -// */ -// switch (ch) -// { -// case 0: -// aileron->channelChanged(raw); -// break; -// case 1: -// elevator->channelChanged(raw); -// break; -// case 2: -// throttle->channelChanged(raw); -// break; -// case 3: -// rudder->channelChanged(raw); -// break; -// case 4: -// gyro->channelChanged(raw); -// break; -// case 5: -// pitch->channelChanged(raw); -// break; - - -// } -//} - -//void RadioCalibrationWindow::setChannelScaled(int ch, float normalized) -//{ -// FIXME James -// FIXME Bryan - -// /** this expects a particular channel to function mapping -// \todo allow run-time channel mapping -// */ -// switch (ch) -// { -// case 0: -// aileron->channelChanged(raw); -// break; -// case 1: -// elevator->channelChanged(raw); -// break; -// case 2: -// throttle->channelChanged(raw); -// break; -// case 3: -// rudder->channelChanged(raw); -// break; -// case 4: -// gyro->channelChanged(raw); -// break; -// case 5: -// pitch->channelChanged(raw); -// break; - - -// } -//} + void RadioCalibrationWindow::setChannel(int ch, float raw) { diff --git a/src/ui/RadioCalibration/RadioCalibrationWindow.h b/src/ui/RadioCalibration/RadioCalibrationWindow.h index f3041ebd1c8457861e846e7fa11e088f0625cf72..40e97e4f8e1d06906b48cb65d1d974cfeb06b510 100644 --- a/src/ui/RadioCalibration/RadioCalibrationWindow.h +++ b/src/ui/RadioCalibration/RadioCalibrationWindow.h @@ -67,9 +67,6 @@ public: public slots: void setChannel(int ch, float raw); - // @todo remove these functions if they are not needed - were added by lm on dec 14, 2010 -// void setChannelRaw(int ch, float raw); -// void setChannelScaled(int ch, float normalized); void loadFile(); void saveFile(); void send();