mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Removed openpilot hard coding from wiki buttons in GCS
This commit is contained in:
parent
faa5d0fb4a
commit
c912505798
3
Makefile
3
Makefile
@ -59,6 +59,8 @@ GCS_BIG_NAME := ${ORG_BIG_NAME} GCS
|
||||
# These should be lowercase with no spaces
|
||||
ORG_SMALL_NAME := $(call smallify,$(ORG_BIG_NAME))
|
||||
GCS_SMALL_NAME := $(call smallify,$(GCS_BIG_NAME))
|
||||
# Change this once the DNS is set to http://wiki.librepilot.org/
|
||||
WIKI_URL_ROOT := https://librepilot.atlassian.net/wiki/display/LPDOC/
|
||||
|
||||
# Set up default build configurations (debug | release)
|
||||
GCS_BUILD_CONF := release
|
||||
@ -471,6 +473,7 @@ gcs_qmake $(GCS_MAKEFILE): | $(GCS_DIR)
|
||||
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \
|
||||
'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \
|
||||
'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \
|
||||
'WIKI_URL_ROOT="$(WIKI_URL_ROOT)"' \
|
||||
'GCS_LIBRARY_BASENAME=$(libbasename)' \
|
||||
$(GCS_QMAKE_OPTS)
|
||||
|
||||
|
@ -140,6 +140,12 @@ isEmpty(ORG_BIG_NAME) {
|
||||
ORG_BIG_NAME = "$$ORG_BIG_NAME"
|
||||
}
|
||||
|
||||
isEmpty(WIKI_URL_ROOT) {
|
||||
WIKI_URL_ROOT = Unknown
|
||||
} else {
|
||||
WIKI_URL_ROOT = "$$WIKI_URL_ROOT"
|
||||
}
|
||||
|
||||
isEmpty(GCS_LIBRARY_BASENAME):GCS_LIBRARY_BASENAME = lib
|
||||
|
||||
macx {
|
||||
@ -206,6 +212,7 @@ DEFINES += ORG_BIG_NAME=$$shell_quote(\"$$ORG_BIG_NAME\")
|
||||
DEFINES += GCS_BIG_NAME=$$shell_quote(\"$$GCS_BIG_NAME\")
|
||||
DEFINES += ORG_SMALL_NAME=$$shell_quote(\"$$ORG_SMALL_NAME\")
|
||||
DEFINES += GCS_SMALL_NAME=$$shell_quote(\"$$GCS_SMALL_NAME\")
|
||||
DEFINES += WIKI_URL_ROOT=$$shell_quote(\"$$WIKI_URL_ROOT\")
|
||||
|
||||
# DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
DEFINES += QT_NO_CAST_TO_ASCII
|
||||
|
@ -1364,7 +1364,6 @@ The same value is used for all axes.</string>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:help</string>
|
||||
<string>url:http://wiki.openpilot.org/display/Doc/Camera+Stabilization+Configuration</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -147,7 +147,8 @@ void ConfigCCHWWidget::enableSaveButtons(bool enable)
|
||||
|
||||
void ConfigCCHWWidget::openHelp()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/D4AUAQ"), QUrl::StrictMode));
|
||||
QDesktopServices::openUrl(QUrl(QString(WIKI_URL_ROOT) + QString("CC+Hardware+Configuration"),
|
||||
QUrl::StrictMode));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,6 +73,7 @@ ConfigCameraStabilizationWidget::ConfigCameraStabilizationWidget(QWidget *parent
|
||||
}
|
||||
}
|
||||
|
||||
setWikiURL("Camera+Stabilisation+Configuration");
|
||||
// Load UAVObjects to widget relations from UI file
|
||||
// using objrelation dynamic property
|
||||
autoLoadWidgets();
|
||||
|
@ -214,7 +214,8 @@ void ConfigCCAttitudeWidget::startAccelCalibration()
|
||||
|
||||
void ConfigCCAttitudeWidget::openHelp()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/44Cf"), QUrl::StrictMode));
|
||||
QDesktopServices::openUrl(QUrl(QString(WIKI_URL_ROOT) + QString("CC+Attitude+Configuration"),
|
||||
QUrl::StrictMode));
|
||||
}
|
||||
|
||||
void ConfigCCAttitudeWidget::setAccelFiltering(bool active)
|
||||
|
@ -393,7 +393,8 @@ void ConfigInputWidget::resizeEvent(QResizeEvent *event)
|
||||
|
||||
void ConfigInputWidget::openHelp()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/04Cf"), QUrl::StrictMode));
|
||||
QDesktopServices::openUrl(QUrl(QString(WIKI_URL_ROOT) + QString("Input+Configuration"),
|
||||
QUrl::StrictMode));
|
||||
}
|
||||
|
||||
void ConfigInputWidget::goToWizard()
|
||||
|
@ -112,6 +112,7 @@ ConfigOPLinkWidget::ConfigOPLinkWidget(QWidget *parent) : ConfigTaskWidget(paren
|
||||
|
||||
// Request and update of the setting object.
|
||||
settingsUpdated = false;
|
||||
setWikiURL("OPLink+Configuration");
|
||||
autoLoadWidgets();
|
||||
disableMouseWheelEvents();
|
||||
updateEnableControls();
|
||||
|
@ -444,7 +444,8 @@ void ConfigOutputWidget::updateObjectsFromWidgets()
|
||||
|
||||
void ConfigOutputWidget::openHelp()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/WIGf"), QUrl::StrictMode));
|
||||
QDesktopServices::openUrl(QUrl(QString(WIKI_URL_ROOT) + QString("Output+Configuration"),
|
||||
QUrl::StrictMode));
|
||||
}
|
||||
|
||||
void ConfigOutputWidget::onBankTypeChange()
|
||||
|
@ -336,5 +336,6 @@ void ConfigRevoHWWidget::rcvrPortChanged(int index)
|
||||
|
||||
void ConfigRevoHWWidget::openHelp()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/GgDBAQ"), QUrl::StrictMode));
|
||||
QDesktopServices::openUrl(QUrl(QString(WIKI_URL_ROOT) + QString("Revolution+Configuration"),
|
||||
QUrl::StrictMode));
|
||||
}
|
||||
|
@ -334,5 +334,6 @@ void ConfigRevoNanoHWWidget::rcvrPortChanged(int index)
|
||||
|
||||
void ConfigRevoNanoHWWidget::openHelp()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/GgDBAQ"), QUrl::StrictMode));
|
||||
QDesktopServices::openUrl(QUrl(QString(WIKI_URL_ROOT) + QString("Revo+Nano+Configuration"),
|
||||
QUrl::StrictMode));
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ void ConfigStabilizationWidget::linkCheckBoxes(bool value)
|
||||
ui->basicResponsivenessCheckBox->setChecked(!value);
|
||||
ui->basicResponsivenessControls->setEnabled(!value);
|
||||
ui->advancedResponsivenessControls->setEnabled(value);
|
||||
} else if(sender() == ui->checkBoxLinkAcroFactors) {
|
||||
} else if (sender() == ui->checkBoxLinkAcroFactors) {
|
||||
processLinkedWidgets(ui->AcroFactorRollSlider);
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ ConfigTxPIDWidget::ConfigTxPIDWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
m_txpid = new Ui_TxPIDWidget();
|
||||
m_txpid->setupUi(this);
|
||||
|
||||
setWikiURL("TxPID");
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings *settings = pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if (!settings->useExpertMode()) {
|
||||
@ -300,11 +301,14 @@ static float defaultValueForPidOption(const StabilizationSettingsBankX *bank, in
|
||||
|
||||
case TxPIDSettings::PIDS_YAWEXPO:
|
||||
return bank->getStickExpo_Yaw();
|
||||
|
||||
case TxPIDSettings::PIDS_ACROROLLFACTOR:
|
||||
case TxPIDSettings::PIDS_ACROROLLPITCHFACTOR:
|
||||
return bank->getAcroInsanityFactor_Roll();
|
||||
|
||||
case TxPIDSettings::PIDS_ACROPITCHFACTOR:
|
||||
return bank->getAcroInsanityFactor_Pitch();
|
||||
|
||||
case -1: // The PID Option field was uninitialized.
|
||||
return 0.0f;
|
||||
|
||||
|
@ -457,5 +457,6 @@ void ConfigVehicleTypeWidget::updateFeedForwardUI()
|
||||
*/
|
||||
void ConfigVehicleTypeWidget::openHelp()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(tr("http://wiki.openpilot.org/x/44Cf"), QUrl::StrictMode));
|
||||
QDesktopServices::openUrl(QUrl(QString(WIKI_URL_ROOT) + QString("Vehicle+Configuration"),
|
||||
QUrl::StrictMode));
|
||||
}
|
||||
|
@ -1778,7 +1778,6 @@
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:help</string>
|
||||
<string>url:http://wiki.openpilot.org/x/hgAGAQ</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -1068,7 +1068,6 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:help</string>
|
||||
<string>url:http://wiki.openpilot.org/display/Doc/Revolution+Manual+Sensor+Calibration</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -27264,7 +27264,6 @@ border-radius: 5;</string>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:help</string>
|
||||
<string>url:http://wiki.openpilot.org/x/DAO9</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -798,7 +798,6 @@ font:bold;</string>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:help</string>
|
||||
<string>url:http://wiki.openpilot.org/x/DACiAQ</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -108,7 +108,7 @@ bool VehicleConfigurationHelper::isApplicable(UAVObject *dataObj)
|
||||
}
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VehicleConfigurationHelper::addModifiedObject(UAVDataObject *object, QString description)
|
||||
|
@ -550,6 +550,11 @@ void ConfigTaskWidget::addHelpButton(QPushButton *button, QString url)
|
||||
connect(button, SIGNAL(clicked()), this, SLOT(helpButtonPressed()));
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::setWikiURL(QString url)
|
||||
{
|
||||
m_wikiURL = url;
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::invalidateObjects()
|
||||
{
|
||||
foreach(UAVObject * obj, m_updatedObjects.keys()) {
|
||||
@ -684,7 +689,7 @@ void ConfigTaskWidget::autoLoadWidgets()
|
||||
case help_button:
|
||||
button = qobject_cast<QPushButton *>(widget);
|
||||
if (button) {
|
||||
addHelpButton(button, uiRelation.url);
|
||||
addHelpButton(button, WIKI_URL_ROOT + m_wikiURL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -155,6 +155,7 @@ public:
|
||||
m_outOfLimitsStyle = style;
|
||||
}
|
||||
void addHelpButton(QPushButton *button, QString url);
|
||||
void setWikiURL(QString url);
|
||||
void forceShadowUpdates();
|
||||
void forceConnectedState();
|
||||
virtual bool shouldObjectBeSaved(UAVObject *object);
|
||||
@ -215,6 +216,8 @@ private:
|
||||
bool m_isConnected;
|
||||
bool m_isWidgetUpdatesAllowed;
|
||||
QStringList m_objects;
|
||||
QString m_wikiURL; // Wiki address for help button
|
||||
// Concatenated with WIKI_URL_ROOT
|
||||
|
||||
QMultiHash<int, WidgetBinding *> m_reloadGroups;
|
||||
QMultiHash<QWidget *, WidgetBinding *> m_widgetBindingsPerWidget;
|
||||
|
Loading…
Reference in New Issue
Block a user