From a24375ca716c12b4600f6c8267ac460355c6e35f Mon Sep 17 00:00:00 2001 From: James Cotton Date: Sat, 26 May 2012 03:07:36 -0500 Subject: [PATCH] Fix bug introduced with PiPX merge where the refreshWidgetsValues(UAVObject *) gained the parameter. However, objects that had overriden that method were now creating a new method and not getting called at the right time. This fixes the Output and Aircraft type panels --- ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp | 2 +- ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp | 2 +- ground/openpilotgcs/src/plugins/config/configoutputwidget.h | 2 +- .../openpilotgcs/src/plugins/config/configvehicletypewidget.cpp | 2 +- .../openpilotgcs/src/plugins/config/configvehicletypewidget.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp b/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp index c554cae31..0f050cbc2 100644 --- a/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp +++ b/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp @@ -43,7 +43,7 @@ ConfigProHWWidget::ConfigProHWWidget(QWidget *parent) : ConfigTaskWidget(parent) addUAVObjectToWidgetRelation("HwSettings","TelemetrySpeed",m_telemetry->telemetrySpeed); enableControls(false); populateWidgets(); - refreshWidgetsValues(); + refreshWidgetsValues(NULL); } ConfigProHWWidget::~ConfigProHWWidget() diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 4b2f260b8..ff0927709 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -242,7 +242,7 @@ void ConfigOutputWidget::sendChannelTest(int index, int value) /** Request the current config from the board (RC Output) */ -void ConfigOutputWidget::refreshWidgetsValues() +void ConfigOutputWidget::refreshWidgetsValues(UAVObject *) { bool dirty=isDirty(); diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.h b/ground/openpilotgcs/src/plugins/config/configoutputwidget.h index b20839aa4..4602487ba 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.h @@ -69,7 +69,7 @@ private: private slots: void stopTests(); void disableIfNotMe(UAVObject *obj); - virtual void refreshWidgetsValues(); + virtual void refreshWidgetsValues(UAVObject * obj = NULL); void updateObjectsFromWidgets(); void runChannelTests(bool state); void sendChannelTest(int index, int value); diff --git a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp index 21d47a77a..ceffdccc6 100644 --- a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp @@ -525,7 +525,7 @@ void ConfigVehicleTypeWidget::updateCustomThrottle2CurveValue(QList list /** Refreshes the current value of the SystemSettings which holds the aircraft type */ -void ConfigVehicleTypeWidget::refreshWidgetsValues() +void ConfigVehicleTypeWidget::refreshWidgetsValues(UAVObject *) { if(!allObjectsUpdated()) return; diff --git a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.h b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.h index 9c6daf16e..7d1e4ec88 100644 --- a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.h +++ b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.h @@ -76,7 +76,7 @@ private: UAVObject::Metadata accInitialData; private slots: - virtual void refreshWidgetsValues(); + virtual void refreshWidgetsValues(UAVObject * obj = NULL); void refreshFixedWingWidgetsValues(QString frameType); void refreshMultiRotorWidgetsValues(QString frameType); void refreshGroundVehicleWidgetsValues(QString frameType);