diff --git a/CREDITS.txt b/CREDITS.txt index 71abed57d..4146236e7 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -199,3 +199,6 @@ D: Russian translation of the GCS N: Brian Webb D: Modem lead developer M: OP Modems + +N: Dmitriy Zaitsev +D: AeroSim-RC HiTL plugin diff --git a/KNOWN_ISSUES.txt b/KNOWN_ISSUES.txt index 9dab0c133..b6ad70dfc 100644 --- a/KNOWN_ISSUES.txt +++ b/KNOWN_ISSUES.txt @@ -13,3 +13,5 @@ following URL: http://bugs.openpilot.org/browse/OP-XXX + [OP-732] Import UAV Settings for inactive modules crashes the running firmware (board restarts). Workaround: update firmware, power cycle, enable modules, power cycle, import configuration. + [OP-747] Board infinitely reboots itself after firmware upgrade (settings erase firmware is a workaround). ++ [OP-723] GCS uses the system language ot the 1st run. After restart it uses English (can be changed later). ++ [OP-725] GCS camera stab config error message disappears too fast (but config error is cleared as it should) diff --git a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml index f8ffa2fd6..9b066072b 100644 --- a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml +++ b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml @@ -6,7 +6,7 @@ <Description>Default configuration</Description> <Details>Default configuration built to work on all screen sizes</Details> <ExpertMode>false</ExpertMode> - <OverrideLanguage>en_AU</OverrideLanguage> + <OverrideLanguage>C</OverrideLanguage> <SaveSettingsOnExit>true</SaveSettingsOnExit> <SettingsWindowHeight>700</SettingsWindowHeight> <SettingsWindowWidth>800</SettingsWindowWidth> @@ -2666,27 +2666,18 @@ </side0> <side1> <side0> - <side0> - <classId>LoggingGadget</classId> - <type>uavGadget</type> - </side0> - <side1> - <classId>GpsDisplayGadget</classId> - <gadget> - <activeConfiguration>Flight GPS</activeConfiguration> - </gadget> - <type>uavGadget</type> - </side1> - <splitterOrientation>2</splitterOrientation> - <splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAcAAAAAIAAAHo)</splitterSizes> - <type>splitter</type> + <classId>LoggingGadget</classId> + <type>uavGadget</type> </side0> <side1> - <classId>DebugGadget</classId> + <classId>GpsDisplayGadget</classId> + <gadget> + <activeConfiguration>Flight GPS</activeConfiguration> + </gadget> <type>uavGadget</type> </side1> <splitterOrientation>2</splitterOrientation> - <splitterSizes>@Variant(AAAACQAAAAIAAAACAAAB3wAAAAIAAAEp)</splitterSizes> + <splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAVAAAAAIAAAGu)</splitterSizes> <type>splitter</type> </side1> <splitterOrientation>1</splitterOrientation> diff --git a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml index 57d287c63..a8dd2df63 100644 --- a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml +++ b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS_wide.xml @@ -8,6 +8,7 @@ <SaveSettingsOnExit>true</SaveSettingsOnExit> <SettingsWindowHeight>700</SettingsWindowHeight> <SettingsWindowWidth>800</SettingsWindowWidth> + <OverrideLanguage>C</OverrideLanguage> <UDPMirror>false</UDPMirror> <Description>Wide configuration</Description> <Details>Default configuration built for wide screens (17"up)</Details> @@ -2645,27 +2646,18 @@ </side0> <side1> <side0> - <side0> - <classId>LoggingGadget</classId> - <type>uavGadget</type> - </side0> - <side1> - <classId>GpsDisplayGadget</classId> - <gadget> - <activeConfiguration>Flight GPS</activeConfiguration> - </gadget> - <type>uavGadget</type> - </side1> - <splitterOrientation>2</splitterOrientation> - <splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAcAAAAAIAAAHo)</splitterSizes> - <type>splitter</type> + <classId>LoggingGadget</classId> + <type>uavGadget</type> </side0> <side1> - <classId>DebugGadget</classId> + <classId>GpsDisplayGadget</classId> + <gadget> + <activeConfiguration>Flight GPS</activeConfiguration> + </gadget> <type>uavGadget</type> </side1> <splitterOrientation>2</splitterOrientation> - <splitterSizes>@Variant(AAAACQAAAAIAAAACAAAB3wAAAAIAAAEp)</splitterSizes> + <splitterSizes>@Variant(AAAACQAAAAIAAAACAAAAVAAAAAIAAAGu)</splitterSizes> <type>splitter</type> </side1> <splitterOrientation>1</splitterOrientation> diff --git a/ground/openpilotgcs/src/app/main.cpp b/ground/openpilotgcs/src/app/main.cpp index 9d4010165..a5fe5ca8a 100644 --- a/ground/openpilotgcs/src/app/main.cpp +++ b/ground/openpilotgcs/src/app/main.cpp @@ -241,6 +241,11 @@ int main(int argc, char **argv) #ifdef Q_OS_LINUX QApplication::setAttribute(Qt::AA_X11InitThreads, true); #endif + + //Set the default locale to EN, if this is not set the system locale will be used + //and as of now we dont want that behaviour. + QLocale::setDefault(QLocale::English); + QApplication::setGraphicsSystem("raster"); SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv); diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp index 406ef469f..b31a14f09 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp @@ -285,7 +285,7 @@ void ConfigGadgetWidget::updatePipXStatus(UAVObject *object) icon->addFile(":/configgadget/images/pipx-selected.png", QSize(), QIcon::Selected, QIcon::Off); QWidget *qwd = new ConfigPipXtremeWidget(this); - ftw->insertTab(ConfigGadgetWidget::pipxtreme, qwd, *icon, QString("PipXtreme")); + ftw->insertTab(ConfigGadgetWidget::pipxtreme, qwd, *icon, QString("OPLink")); pipxConnected = true; } } diff --git a/ground/openpilotgcs/src/plugins/coreplugin/CREDITS.html b/ground/openpilotgcs/src/plugins/coreplugin/CREDITS.html index e61d5f9ed..f9b5e601c 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/CREDITS.html +++ b/ground/openpilotgcs/src/plugins/coreplugin/CREDITS.html @@ -4,8 +4,7 @@ Without the work of the people in this file OpenPilot would not be what it is to <p>It is sorted alphabetically by name</p> -<pre> -Connor Abbott +<pre>Connor Abbott David Ankers Sergiy Anikeyev Pedro Assuncao @@ -75,6 +74,7 @@ Brian Webb Justin Welander Mat Wellington Kendal Wells +Dmitriy Zaitsev </pre> </html> diff --git a/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h b/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h index 2117843b8..b57a2dbb5 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/coreconstants.h @@ -35,8 +35,6 @@ namespace Constants { #define GCS_VERSION_MAJOR 1 #define GCS_VERSION_MINOR 0 #define GCS_VERSION_RELEASE 0 -const char * const GCS_VERSION_TYPE = "Alpha"; -const char * const GCS_VERSION_CODENAME = "Pascal"; #define STRINGIFY_INTERNAL(x) #x #define STRINGIFY(x) STRINGIFY_INTERNAL(x) @@ -46,18 +44,34 @@ const char * const GCS_VERSION_CODENAME = "Pascal"; "." STRINGIFY(GCS_VERSION_RELEASE) const char * const GCS_VERSION_LONG = GCS_VERSION; -const char * const GCS_AUTHOR = "OpenPilot Project"; -const char * const GCS_YEAR = "2012"; -const char * const GCS_HELP = "http://wiki.openpilot.org"; #ifdef GCS_REVISION -const char * const GCS_REVISION_STR = STRINGIFY(GCS_REVISION); +const char * const GCS_REVISION_STR = GCS_REVISION; +#else +const char * const GCS_REVISION_STR = "N/A"; +#endif + +#ifdef GCS_YEAR +const char * const GCS_YEAR_STR = GCS_YEAR; +#else +const char * const GCS_YEAR_STR = "2013"; +#endif + +#ifdef GCS_ORIGIN +const char * const GCS_ORIGIN_STR = GCS_ORIGIN; +#else +const char * const GCS_ORIGIN_STR = "unknown repository"; +#endif + +#ifdef UAVO_HASH const char * const UAVOSHA1_STR = STRINGIFY(UAVO_HASH); #else -const char * const GCS_REVISION_STR = ""; const char * const UAVOSHA1_STR = ""; #endif +const char * const GCS_AUTHOR = "The OpenPilot Project"; +const char * const GCS_HELP = "http://wiki.openpilot.org"; + #undef GCS_VERSION #undef STRINGIFY #undef STRINGIFY_INTERNAL diff --git a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.cpp b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.cpp index c48f5a6a6..715b95e88 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.cpp @@ -10,47 +10,47 @@ importSettings::importSettings(QWidget *parent) : ui(new Ui::importSettings) { ui->setupUi(this); - connect(ui->cbConfigs,SIGNAL(currentIndexChanged(int)),this,SLOT(updateDetails(int))); - connect(ui->btnLoad,SIGNAL(clicked()),this,SLOT(accept())); - QTimer::singleShot(500,this,SLOT(repaint())); + connect(ui->cbConfigs, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDetails(int))); + connect(ui->btnLoad, SIGNAL(clicked()), this, SLOT(accept())); + QTimer::singleShot(500, this, SLOT(repaint())); } + void importSettings::loadFiles(QString path) { QDir myDir(path); QStringList filters; filters << "*.xml"; QStringList list = myDir.entryList(filters,QDir::Files); - int x=0; - foreach(QString fileStr, list) - { - fileInfo * info=new fileInfo; - QSettings settings(path+QDir::separator()+fileStr, XmlConfig::XmlSettingsFormat); + int x = 0; + foreach(QString fileStr, list) { + fileInfo *info = new fileInfo; + QSettings settings(path+QDir::separator() + fileStr, XmlConfig::XmlSettingsFormat); settings.beginGroup("General"); - info->description=settings.value("Description","None").toString(); - info->details=settings.value("Details","None").toString(); + info->description = settings.value("Description", "None").toString(); + info->details = settings.value("Details", "None").toString(); settings.endGroup(); - info->file=path+QDir::separator()+fileStr; + info->file = path + QDir::separator() + fileStr; configList.insert(x,info); - ui->cbConfigs->addItem(info->description,x); + ui->cbConfigs->addItem(info->description, x); ++x; } } void importSettings::updateDetails(int index) { - fileInfo * info=configList.value(ui->cbConfigs->itemData(index).toInt()); + fileInfo *info = configList.value(ui->cbConfigs->itemData(index).toInt()); ui->lblDetails->setText(info->details); } + QString importSettings::choosenConfig() { - fileInfo * info=configList.value(ui->cbConfigs->itemData(ui->cbConfigs->currentIndex()).toInt()); + fileInfo *info = configList.value(ui->cbConfigs->itemData(ui->cbConfigs->currentIndex()).toInt()); return info->file; } importSettings::~importSettings() { - foreach(fileInfo * info,configList.values()) - { + foreach(fileInfo * info,configList.values()) { delete info; } delete ui; diff --git a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.h b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.h index 58e5e8e44..8bf5f303f 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/importsettings.h @@ -1,3 +1,4 @@ + #ifndef IMPORTSETTINGS_H #define IMPORTSETTINGS_H @@ -10,8 +11,7 @@ class importSettings; class importSettings : public QDialog { Q_OBJECT - struct fileInfo - { + struct fileInfo { QString file; QString description; QString details; @@ -23,9 +23,11 @@ public: void loadFiles(QString path); QString choosenConfig(); + private: Ui::importSettings *ui; QMap<int,fileInfo*> configList; + private slots: void updateDetails(int); }; diff --git a/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp b/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp index dc74094a5..000156d70 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp @@ -266,18 +266,15 @@ void MainWindow::modeChanged(Core::IMode */*mode*/) void MainWindow::extensionsInitialized() { - - QSettings* qs = m_settings; - QSettings * settings; + QSettings *qs = m_settings; + QSettings *settings; QString commandLine; - if ( ! qs->allKeys().count() ){ - foreach(QString str,qApp->arguments()) - { - if(str.contains("configfile")) - { - qDebug()<<"ass"; - commandLine=str.split("=").at(1); - qDebug()<<commandLine; + if ( ! qs->allKeys().count() ) { + foreach(QString str, qApp->arguments()) { + if(str.contains("configfile")) { + qDebug() << "ass"; + commandLine = str.split("=").at(1); + qDebug() << commandLine; } } QDir directory(QCoreApplication::applicationDirPath()); @@ -289,37 +286,34 @@ void MainWindow::extensionsInitialized() directory.cd("share"); directory.cd("openpilotgcs"); #endif - directory.cd("default_configurations"); + directory.cd("default_configurations"); - qDebug() << "Looking for default config files in: " + directory.absolutePath(); - bool showDialog=true; + qDebug() << "Looking for default config files in: " + directory.absolutePath(); + bool showDialog = true; QString filename; - if(!commandLine.isEmpty()) - { - if(QFile::exists(directory.absolutePath()+QDir::separator()+commandLine)) - { - filename=directory.absolutePath()+QDir::separator()+commandLine; - qDebug()<<"Load configuration from command line"; - settings=new QSettings(filename, XmlConfig::XmlSettingsFormat); - showDialog=false; + if(!commandLine.isEmpty()) { + if(QFile::exists(directory.absolutePath() + QDir::separator()+commandLine)) { + filename = directory.absolutePath() + QDir::separator()+commandLine; + qDebug() << "Load configuration from command line"; + settings = new QSettings(filename, XmlConfig::XmlSettingsFormat); + showDialog = false; } } - if(showDialog) - { - importSettings * dialog=new importSettings(this); + if(showDialog) { + importSettings *dialog = new importSettings(this); dialog->loadFiles(directory.absolutePath()); dialog->exec(); - filename=dialog->choosenConfig(); - settings=new QSettings(filename, XmlConfig::XmlSettingsFormat); + filename = dialog->choosenConfig(); + settings = new QSettings(filename, XmlConfig::XmlSettingsFormat); delete dialog; } - qs=settings; - qDebug() << "Load default config from resource "<<filename; + qs = settings; + qDebug() << "Load default config from resource " << filename; } qs->beginGroup("General"); - m_config_description=qs->value("Description","none").toString(); - m_config_details=qs->value("Details","none").toString(); - m_config_stylesheet=qs->value("StyleSheet","none").toString(); + m_config_description=qs->value("Description", "none").toString(); + m_config_details=qs->value("Details", "none").toString(); + m_config_stylesheet=qs->value("StyleSheet", "none").toString(); loadStyleSheet(m_config_stylesheet); qs->endGroup(); m_uavGadgetInstanceManager = new UAVGadgetInstanceManager(this); @@ -799,16 +793,6 @@ void MainWindow::registerDefaultActions() mhelp->addAction(cmd, Constants::G_HELP_ABOUT); #endif - //About Plugins Action - tmpaction = new QAction(QIcon(Constants::ICON_PLUGIN), tr("About &Plugins..."), this); - cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext); - mhelp->addAction(cmd, Constants::G_HELP_ABOUT); - tmpaction->setEnabled(true); -#ifdef Q_WS_MAC - cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); -#endif - connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins())); - // About GCS Action #ifdef Q_WS_MAC tmpaction = new QAction(QIcon(Constants::ICON_OPENPILOT), tr("About &OpenPilot GCS"), this); // it's convention not to add dots to the about menu @@ -823,6 +807,16 @@ void MainWindow::registerDefaultActions() #endif connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutOpenPilotGCS())); + //About Plugins Action + tmpaction = new QAction(QIcon(Constants::ICON_PLUGIN), tr("About &Plugins..."), this); + cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext); + mhelp->addAction(cmd, Constants::G_HELP_ABOUT); + tmpaction->setEnabled(true); +#ifdef Q_WS_MAC + cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); +#endif + connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins())); + //Credits Action tmpaction = new QAction(QIcon(Constants::ICON_PLUGIN), tr("About &Authors..."), this); cmd = am->registerAction(tmpaction, Constants::ABOUT_AUTHORS, m_globalContext); diff --git a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp index 70a125d3b..6beb36570 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.cpp @@ -59,16 +59,7 @@ VersionDialog::VersionDialog(QWidget *parent) QGridLayout *layout = new QGridLayout(this); layout->setSizeConstraint(QLayout::SetFixedSize); - QString version = QLatin1String(GCS_VERSION_LONG); - version += QDate(2007, 25, 10).toString(Qt::SystemLocaleDate); - - QString ideRev; -#ifdef GCS_REVISION - //: This gets conditionally inserted as argument %8 into the description string. - ideRev = tr("From revision %1<br/>").arg(QString::fromLatin1(GCS_REVISION_STR).left(60)); -#endif - QString uavoHashStr; - #ifdef UAVO_HASH +#ifdef UAVO_HASH //: This gets conditionally inserted as argument %11 into the description string. QByteArray uavoHashArray; QString uavoHash = QString::fromLatin1(Core::Constants::UAVOSHA1_STR); @@ -85,31 +76,41 @@ VersionDialog::VersionDialog(QWidget *parent) { gcsUavoHashStr.append(QString::number(i,16).right(2)); } - uavoHashStr = tr("UAVO hash %1<br/>").arg(gcsUavoHashStr); - #endif + QString uavoHashStr = gcsUavoHashStr; +#else + QString uavoHashStr = "N/A"; +#endif const QString description = tr( - "<h3>OpenPilot GCS %1 %9 (%10)</h3>" - "Based on Qt %2 (%3 bit)<br/>" + "<h3>OpenPilot Ground Control Station</h3>" + "GCS Revision: <b>%1</b><br/>" + "UAVO Hash: %2<br/>" "<br/>" - "Built on %4 at %5<br />" + "Built from %3<br/>" + "Built on %4 at %5<br/>" + "Based on Qt %6 (%7 bit)<br/>" "<br/>" - "%8" + "© %8, 2010-%9. All rights reserved.<br/>" "<br/>" - "%11" + "<small>This program is free software; you can redistribute it and/or modify<br/>" + "it under the terms of the GNU General Public License as published by<br/>" + "the Free Software Foundation; either version 3 of the License, or<br/>" + "(at your option) any later version.<br/>" "<br/>" - "Copyright 2010-%6 %7. All rights reserved.<br/>" - "<br/>" - "<small>This program is free software; you can redistribute it and/or modify<br/>" - "it under the terms of the GNU General Public License as published by<br/>" - "the Free Software Foundation; either version 3 of the License, or<br/>" - "(at your option) any later version.<br/><br/>" "The program is provided AS IS with NO WARRANTY OF ANY KIND, " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " - "PARTICULAR PURPOSE.</small><br/>") - .arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize), - QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(GCS_YEAR), - (QLatin1String(GCS_AUTHOR)), ideRev).arg(QLatin1String(GCS_VERSION_TYPE), QLatin1String(GCS_VERSION_CODENAME), uavoHashStr); + "PARTICULAR PURPOSE.</small>" + ).arg( + QString::fromLatin1(GCS_REVISION_STR).left(60), // %1 + uavoHashStr, // %2 + QLatin1String(GCS_ORIGIN_STR), // $3 + QLatin1String(__DATE__), // %4 + QLatin1String(__TIME__), // %5 + QLatin1String(QT_VERSION_STR), // %6 + QString::number(QSysInfo::WordSize), // %7 + QLatin1String(GCS_AUTHOR), // %8 + QLatin1String(GCS_YEAR_STR) // %9 + ); QLabel *copyRightLabel = new QLabel(description); copyRightLabel->setWordWrap(true); diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/controllerpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/controllerpage.cpp index deed9d6eb..7601fff62 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/controllerpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/controllerpage.cpp @@ -123,7 +123,7 @@ void ControllerPage::setupBoardTypes() ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D); ui->boardTypeCombo->addItem(tr("OpenPilot Revolution"), SetupWizard::CONTROLLER_REVO); //ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1); - ui->boardTypeCombo->addItem(tr("OpenPilot PipX Radio Modem"), SetupWizard::CONTROLLER_PIPX); + ui->boardTypeCombo->addItem(tr("OpenPilot OPLink Radio Modem"), SetupWizard::CONTROLLER_PIPX); //ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1); } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp index c0061d83d..3e6b6916b 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp @@ -148,7 +148,7 @@ QString SetupWizard::getSummaryText() summary.append(tr("OpenPilot Revolution")); break; case CONTROLLER_PIPX: - summary.append(tr("OpenPilot PipX Radio Modem")); + summary.append(tr("OpenPilot OPLink Radio Modem")); break; default: summary.append(tr("Unknown")); diff --git a/ground/openpilotgcs/src/plugins/uavobjectutil/devicedescriptorstruct.h b/ground/openpilotgcs/src/plugins/uavobjectutil/devicedescriptorstruct.h index 886ebe649..dfb158189 100644 --- a/ground/openpilotgcs/src/plugins/uavobjectutil/devicedescriptorstruct.h +++ b/ground/openpilotgcs/src/plugins/uavobjectutil/devicedescriptorstruct.h @@ -22,7 +22,7 @@ public: return QString("OpenPilot INS"); break; case 0x0301://PipX - return QString("PipXtreme"); + return QString("OPLink"); break; case 0x0401://Coptercontrol return QString("CopterControl"); diff --git a/make/scripts/version-info.py b/make/scripts/version-info.py index 7e7c22d58..924cf18fb 100644 --- a/make/scripts/version-info.py +++ b/make/scripts/version-info.py @@ -158,6 +158,20 @@ class Repo: else: return clean + def label(self): + """Return package label (tag if defined, or date-hash if no tag)""" + if self._tag == None: + return ''.join([self.time('%Y%m%d'), "-", self.hash(8, 'untagged'), self.dirty()]) + else: + return ''.join([self.tag(''), self.dirty()]) + + def revision(self): + """Return full revison string (tag if defined, or branch:hash date time if no tag)""" + if self._tag == None: + return ''.join([self.branch('no-branch'), ":", self.hash(8, 'no-hash'), self.dirty(), self.time(' %Y%m%d %H:%M')]) + else: + return ''.join([self.tag(''), self.dirty()]) + def info(self): """Print some repository info""" print "path: ", self.path() @@ -169,6 +183,8 @@ class Repo: print "branch: ", self.branch() print "commit tag: ", self.tag('') print "dirty: ", self.dirty('yes', 'no') + print "label: ", self.label() + print "revision: ", self.revision() def file_from_template(tpl_name, out_name, dict): """Create or update file from template using dictionary @@ -380,10 +396,15 @@ string given. TAG = r.tag(''), TAG_OR_BRANCH = r.tag(r.branch('unreleased')), TAG_OR_HASH8 = r.tag(r.hash(8, 'untagged')), + LABEL = r.label(), + REVISION = r.revision(), DIRTY = r.dirty(), FWTAG = xtrim(r.tag(r.branch('unreleased')), r.dirty(), 25), UNIXTIME = r.time(), DATE = r.time('%Y%m%d'), + DAY=r.time('%d'), + MONTH=r.time('%m'), + YEAR=r.time('%Y'), DATETIME = r.time('%Y%m%d %H:%M'), BOARD_TYPE = args.type, BOARD_REVISION = args.revision, diff --git a/make/templates/gcsversioninfotemplate.h b/make/templates/gcsversioninfotemplate.h index 7b7dc8100..04d45d580 100644 --- a/make/templates/gcsversioninfotemplate.h +++ b/make/templates/gcsversioninfotemplate.h @@ -25,8 +25,16 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define GCS_REVISION ${TAG_OR_BRANCH}:${HASH8}${DIRTY} ${DATETIME} -#define UAVO_HASH "{ ${UAVOSHA1} }" +#ifndef _GCSVERSIONINFO_H +#define _GCSVERSIONINFO_H + +#define GCS_REVISION "${REVISION}" +#define GCS_YEAR "${YEAR}" +#define GCS_ORIGIN "${ORIGIN}" +#define UAVO_HASH "{ ${UAVOSHA1} }" + +#endif // _GCSVERSIONINFO_H + /** * @} */ diff --git a/package/Makefile b/package/Makefile index f7e2d1568..495431da8 100644 --- a/package/Makefile +++ b/package/Makefile @@ -14,13 +14,7 @@ ROOT_DIR := $(realpath $(WHEREAMI)/../) # Set up some macros BUILD_DIR := $(ROOT_DIR)/build VERSION_CMD := python $(ROOT_DIR)/make/scripts/version-info.py --path="$(ROOT_DIR)" -# If there is a tag, use it for label instead of date-hash string -PACKAGE_TAG := $(shell $(VERSION_CMD) --format=\$${TAG}) -ifneq ($(PACKAGE_TAG),) -PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${TAG}\$${DIRTY}) -else -PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${DATE}-\$${TAG_OR_HASH8}\$${DIRTY}) -endif +PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${LABEL}) PACKAGE_DIR := $(BUILD_DIR)/package-$(PACKAGE_LBL) FW_DIR := $(PACKAGE_DIR)/firmware-$(PACKAGE_LBL) BL_DIR := $(FW_DIR)/bootloaders