From 5d866914e7d9319c8b55908fac1fb91dc0b55dfd Mon Sep 17 00:00:00 2001 From: zhitm Date: Thu, 21 Dec 2023 14:45:24 +0300 Subject: [PATCH 1/3] Add directory picker --- qrutils/widgets/dirPicker.cpp | 70 +++++++++++++++++++++++++++++++++++ qrutils/widgets/dirPicker.h | 57 ++++++++++++++++++++++++++++ qrutils/widgets/widgets.pri | 2 + 3 files changed, 129 insertions(+) create mode 100644 qrutils/widgets/dirPicker.cpp create mode 100644 qrutils/widgets/dirPicker.h diff --git a/qrutils/widgets/dirPicker.cpp b/qrutils/widgets/dirPicker.cpp new file mode 100644 index 0000000000..06382eb341 --- /dev/null +++ b/qrutils/widgets/dirPicker.cpp @@ -0,0 +1,70 @@ +/* Copyright 2017 CyberTech Labs Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + +#include "dirPicker.h" +#include +#include +#include +#include +#include + +#include +#include + +using namespace qReal::ui; + + +dirPicker::dirPicker(QWidget *parent) + : QWidget(parent) +{ + mLabel = new QLabel(this); + mPathEditor = new QLineEdit(this); + QPushButton *button = new QPushButton(style()->standardIcon(QStyle::SP_DirIcon), tr("Browse..."), this); + QHBoxLayout *layout = new QHBoxLayout(this); + layout->addWidget(mLabel); + layout->addWidget(mPathEditor); + layout->addWidget(button); + connect(button, &QPushButton::clicked, this, &dirPicker::pick); +} + +void dirPicker::configure(const QString &settingsKey, const QString &title) +{ + mSettingsKey = settingsKey; + mLabel->setText(title); +} + +bool dirPicker::isSavedDirExist(){ + return QDir(SettingsManager::value(mSettingsKey).toString()).exists(); +} + +void dirPicker::save() const +{ + if (!mPathEditor->text().isEmpty() && !mSettingsKey.isEmpty()) { + SettingsManager::setValue(mSettingsKey, mPathEditor->text()); + } +} + +void dirPicker::restore() +{ + if (!mSettingsKey.isEmpty()) { + mPathEditor->setText(SettingsManager::value(mSettingsKey).toString()); + } +} + +void dirPicker::pick() +{ + QDir dirPath=QFileDialog::getExistingDirectory(this, "Get Any File"); + SettingsManager::setValue(mSettingsKey, dirPath.absolutePath()); + mPathEditor->setText(dirPath.absolutePath()); +} diff --git a/qrutils/widgets/dirPicker.h b/qrutils/widgets/dirPicker.h new file mode 100644 index 0000000000..e8a89d6e63 --- /dev/null +++ b/qrutils/widgets/dirPicker.h @@ -0,0 +1,57 @@ +/* Copyright 2017 CyberTech Labs Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + +#pragma once + +#include + +#include + +class QLabel; +class QLineEdit; + +namespace qReal { +namespace ui { + +/// Picks some image from disk, saves into settings. +class QRUTILS_EXPORT dirPicker : public QWidget +{ + Q_OBJECT + +public: + explicit dirPicker(QWidget *parent = nullptr); + + /// Sets parameters of the image picker. + void configure(const QString &settingsKey, const QString &title); + + /// Saves picked location into settings. + void save() const; + + /// Restores last picked value. + void restore(); + + bool isSavedDirExist(); + + +private slots: + void pick(); + +private: + QString mSettingsKey; + QLabel *mLabel; + QLineEdit *mPathEditor; +}; + +} +} diff --git a/qrutils/widgets/widgets.pri b/qrutils/widgets/widgets.pri index c98cbd474e..a7041c2f84 100644 --- a/qrutils/widgets/widgets.pri +++ b/qrutils/widgets/widgets.pri @@ -14,6 +14,7 @@ HEADERS += \ $$PWD/colorListEditor.h \ + $$PWD/dirPicker.h \ $$PWD/paintWidget.h \ $$PWD/painterInterface.h \ $$PWD/searchLineEdit.h \ @@ -26,6 +27,7 @@ HEADERS += \ SOURCES += \ $$PWD/colorListEditor.cpp \ + $$PWD/dirPicker.cpp \ $$PWD/paintWidget.cpp \ $$PWD/searchLineEdit.cpp \ $$PWD/consoleDock.cpp \ From 9493d4e4fa31108d13d86639b0fb92934a11d54e Mon Sep 17 00:00:00 2001 From: zhitm Date: Thu, 19 Oct 2023 17:14:41 +0300 Subject: [PATCH 2/3] Add RXE compilation on Linux for NXT --- .gitmodules | 3 +- installer/nxt-tools | 2 +- .../meta/prebuild-linux-gnu.sh | 2 +- .../meta/prebuild-win32.sh | 2 +- .../nxt/nxtOsekCGenerator/nxtFlashTool.cpp | 30 ++++++--- .../nxtOsekCGeneratorPlugin.cpp | 48 +++++++++----- .../src/nxtAdditionalPreferences.cpp | 36 ++++++++++- .../src/nxtAdditionalPreferences.h | 3 +- .../src/nxtAdditionalPreferences.ui | 62 +++++++++++++------ .../fr/plugins/robots/nxtKitInterpreter_fr.ts | 33 ++++++++-- .../fr/plugins/robots/nxtOsekCGenerator_fr.ts | 25 +++++--- qrtranslations/fr/qrutils_fr.ts | 8 +++ .../ru/plugins/robots/nxtKitInterpreter_ru.ts | 34 ++++++++-- .../ru/plugins/robots/nxtOsekCGenerator_ru.ts | 29 ++++++--- qrtranslations/ru/qrutils_ru.ts | 8 +++ 15 files changed, 245 insertions(+), 80 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3f0480529c..61f5b62379 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,7 +25,8 @@ url = https://bitbucket.org/codeimproved/qslog.git [submodule "installer/nxt-tools"] path = installer/nxt-tools - url = https://github.com/trikset/nxt-tools + url = https://github.com/zhitm/nxt-tools.git + branch = main [submodule "trik-checkapp"] path = thirdparty/checkapp/checkapp url = https://github.com/trikset/trik-checkapp diff --git a/installer/nxt-tools b/installer/nxt-tools index dff80a065f..973a173375 160000 --- a/installer/nxt-tools +++ b/installer/nxt-tools @@ -1 +1 @@ -Subproject commit dff80a065f57f4df70b44c69df54dfa2433e9009 +Subproject commit 973a173375fd4b8ec239a64c5ed61a2da232bbec diff --git a/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-linux-gnu.sh b/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-linux-gnu.sh index 19c9baa80d..83eed3b18b 100755 --- a/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-linux-gnu.sh +++ b/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-linux-gnu.sh @@ -6,4 +6,4 @@ cd "$(dirname "$0")" source "$INSTALLER_ROOT"/utils/common_utils.sh mkdir "$PWD"/../data/bin cd "$PWD"/../data/bin -rsync -a "$INSTALLER_ROOT"/nxt-tools/linux/nxt-tools ./ +rsync -a "$INSTALLER_ROOT"/nxt-tools ./ diff --git a/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-win32.sh b/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-win32.sh index 57a1ec8ca3..6a1907ba25 100644 --- a/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-win32.sh +++ b/installer/packages/trik-studio/ru.qreal.root.nxt.tools/meta/prebuild-win32.sh @@ -7,6 +7,6 @@ source "$INSTALLER_ROOT"/utils/common_utils.sh cd "$PWD"/../data -rsync -aR "$INSTALLER_ROOT"/nxt-tools/win/./nxt-tools . +rsync -aR "$INSTALLER_ROOT"/./nxt-tools . dos2unix nxt-tools/compile.sh rm -rf bin diff --git a/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtFlashTool.cpp b/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtFlashTool.cpp index 4c531e909d..45c2564342 100644 --- a/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtFlashTool.cpp +++ b/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtFlashTool.cpp @@ -27,6 +27,7 @@ #include #include #include +#include using namespace nxt; using namespace qReal; @@ -222,15 +223,26 @@ bool NxtFlashTool::uploadProgram(const QFileInfo &fileInfo) mCompileState = idle; mSource = fileInfo; -#ifdef Q_OS_WIN mCompileProcess.setWorkingDirectory(path()); - mCompileProcess.start("cmd", { "/c", path("compile.bat") - + " " + fileInfo.completeBaseName() - + " " + fileInfo.absolutePath() }); -#else - mCompileProcess.start("sh", { path("compile.sh") , fileInfo.absolutePath()}); -#endif + switch(QOperatingSystemVersion::currentType()) { + default: + break; + case QOperatingSystemVersion::OSType::Windows: { + auto pathToNxtTools = path().replace("\\", "/"); + auto line = path("compile.bat") + + " " + fileInfo.completeBaseName() + + " " + fileInfo.absolutePath() + " " + pathToNxtTools+"gnuarm"; + mCompileProcess.start("cmd", { "/c", line}); + } + break; + case QOperatingSystemVersion::OSType::Unknown: { + auto line = "./compile.sh . " + fileInfo.absolutePath() + + " GNUARM_ROOT="+SettingsManager::value("pathToArmNoneEabi").toString(); + mCompileProcess.start("/bin/bash", {"-c", line}); + } + break; + } information(tr("Uploading program started. Please don't disconnect robot during the process")); return true; } @@ -291,6 +303,10 @@ void NxtFlashTool::readNxtCompileData() "If you sure in their validness contact developers")); } else { error(tr("Could not upload program. Make sure the robot is connected and ON")); + if (QOperatingSystemVersion::currentType() == QOperatingSystemVersion::OSType::Unknown) { + error(tr("If you are using GNU/Linux visit " + "https://help.trikset.com/nxt/run-upload-programs to get instructions")); + } } } diff --git a/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtOsekCGeneratorPlugin.cpp b/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtOsekCGeneratorPlugin.cpp index e408cc20b2..d7bb07b6c5 100644 --- a/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtOsekCGeneratorPlugin.cpp +++ b/plugins/robots/generators/nxt/nxtOsekCGenerator/nxtOsekCGeneratorPlugin.cpp @@ -13,7 +13,6 @@ * limitations under the License. */ #include "nxtOsekCGeneratorPlugin.h" - #include #include #include @@ -21,7 +20,9 @@ #include #include #include +#include +#include "QsLog.h" #include "nxtOsekCMasterGenerator.h" using namespace nxt::osekC; @@ -37,6 +38,12 @@ NxtOsekCGeneratorPlugin::NxtOsekCGeneratorPlugin() , mMasterGenerator(nullptr) , mCommunicator(utils::Singleton::instance()) { + const QString key = "pathToArmNoneEabi"; + const QString defaultPath = QDir(PlatformInfo::invariantSettingsPath("pathToNxtTools")).absolutePath() + +"/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi"; + if (qReal::SettingsManager::value(key).isNull()) { + qReal::SettingsManager::setValue(key, defaultPath); + } initActions(); initHotKeyActions(); } @@ -96,7 +103,6 @@ void NxtOsekCGeneratorPlugin::onCurrentDiagramChanged(const TabInfo &info) void NxtOsekCGeneratorPlugin::init(const kitBase::KitPluginConfigurator &configurator) { RobotsGeneratorPluginBase::init(configurator); - mFlashTool.reset(new NxtFlashTool(*mMainWindowInterface->errorReporter(), *mCommunicator)); connect(&*mFlashTool, &NxtFlashTool::uploadingComplete, this, &NxtOsekCGeneratorPlugin::onUploadingComplete); } @@ -223,21 +229,31 @@ void NxtOsekCGeneratorPlugin::uploadProgram() void NxtOsekCGeneratorPlugin::checkNxtTools() { const QDir dir(PlatformInfo::invariantSettingsPath("pathToNxtTools")); - if (!dir.exists()) { + const QDir gnuarm(dir.absolutePath() + "/gnuarm"); + const QDir nexttool(dir.absolutePath() + "/nexttool"); + const QDir nxtOSEK(dir.absolutePath() + "/nxtOSEK"); + + if (!dir.exists() || !gnuarm.exists() || !nexttool.exists() || !nxtOSEK.exists()) { mNxtToolsPresent = false; + QLOG_ERROR() << "Missing" << dir.absolutePath() << "or mandatory subdirectory" << + dir.entryList(QDir::Filter::NoFilter, QDir::SortFlag::DirsFirst | QDir::SortFlag::Name); } else { - QDir gnuarm(dir.absolutePath() + "/gnuarm/bin"); - QDir nexttool(dir.absolutePath() + "/nexttool"); - QDir nxtOSEK(dir.absolutePath() + "/nxtOSEK"); - -#ifdef Q_OS_WIN - QFile compile1(dir.absolutePath() + "/compile.bat"); - QFile compile2(dir.absolutePath() + "/compile.sh"); - mNxtToolsPresent = gnuarm.exists() && nexttool.exists() && nxtOSEK.exists() - && compile1.exists() && compile2.exists(); -#else - QFile compile(dir.absolutePath() + "/compile.sh"); - mNxtToolsPresent = gnuarm.exists() && nexttool.exists() && nxtOSEK.exists() && compile.exists(); -#endif + switch(QOperatingSystemVersion::currentType()) { + default: + break; + + case QOperatingSystemVersion::OSType::Windows: { + QFile compile1(dir.absolutePath() + "/compile.bat"); + QFile compile2(dir.absolutePath() + "/compile.sh"); + mNxtToolsPresent = gnuarm.exists() && nexttool.exists() && nxtOSEK.exists() + && compile1.exists() && compile2.exists(); + } + break; + case QOperatingSystemVersion::OSType::Unknown: { + QFile compile(dir.absolutePath() + "/compile.sh"); + mNxtToolsPresent = nexttool.exists() && nxtOSEK.exists() && compile.exists(); + } + break; + } } } diff --git a/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.cpp b/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.cpp index 9967bfb4ed..ec72a69ce2 100644 --- a/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.cpp +++ b/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.cpp @@ -14,9 +14,11 @@ #include "nxtAdditionalPreferences.h" #include "ui_nxtAdditionalPreferences.h" - #include #include +#include "QsLog.h" +#include + using namespace nxt; using namespace qReal; @@ -28,6 +30,8 @@ NxtAdditionalPreferences::NxtAdditionalPreferences(const QString &realRobotName, { mUi->setupUi(this); mUi->robotImagePicker->configure("nxtRobot2DImage", tr("2D robot image:")); + mUi->compilerPicker->configure("pathToArmNoneEabi", tr("Path to arm-none-eabi:")); + setTextOnGeneratorLabel(); connect(mUi->manualComPortCheckbox, &QCheckBox::toggled , this, &NxtAdditionalPreferences::manualComPortCheckboxChecked); } @@ -37,11 +41,35 @@ NxtAdditionalPreferences::~NxtAdditionalPreferences() delete mUi; } +void NxtAdditionalPreferences::setColorOnGeneratorLabel(QColor color){ + QPalette palette = mUi->generatorLabel->palette(); + palette.setColor(mUi->generatorLabel->foregroundRole(), color); + mUi->generatorLabel->setPalette(palette); +} + +void NxtAdditionalPreferences::setTextOnGeneratorLabel(){ + if (!mUi->compilerPicker->isSavedDirExist()){ + mUi->generatorLabel->setText(tr("WARNING: Current directory doesn't exist. \nOpen " + "link" + " for instructions")); + mUi->generatorLabel->setTextFormat(Qt::RichText); + mUi->generatorLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); + mUi->generatorLabel->setOpenExternalLinks(true); + setColorOnGeneratorLabel(QColor("red")); + } + else { + mUi->generatorLabel->setText("Current directory exist."); + setColorOnGeneratorLabel(QColor("black")); + } +} + void NxtAdditionalPreferences::save() { SettingsManager::setValue("NxtBluetoothPortName", selectedPortName()); SettingsManager::setValue("NxtManualComPortCheckboxChecked", mUi->manualComPortCheckbox->isChecked()); mUi->robotImagePicker->save(); + mUi->compilerPicker->save(); + setTextOnGeneratorLabel(); emit settingsChanged(); } @@ -49,6 +77,8 @@ void NxtAdditionalPreferences::restoreSettings() { ui::ComPortPicker::populate(*mUi->comPortComboBox, "NxtBluetoothPortName"); mUi->robotImagePicker->restore(); + mUi->compilerPicker->restore(); + setTextOnGeneratorLabel(); if (mUi->comPortComboBox->count() == 0) { mUi->comPortComboBox->hide(); @@ -72,7 +102,11 @@ void NxtAdditionalPreferences::restoreSettings() void NxtAdditionalPreferences::onRobotModelChanged(kitBase::robotModel::RobotModelInterface * const robotModel) { + QLOG_DEBUG() << robotModel->name(); mUi->bluetoothSettingsGroupBox->setVisible(robotModel->name() == mBluetoothRobotName); + if (QOperatingSystemVersion::currentType() == QOperatingSystemVersion::OSType::Unknown) { + mUi->generatorSettingsGroupBox->setVisible(robotModel->name() == "NxtOsekCGeneratorRobotModel"); + } } void NxtAdditionalPreferences::manualComPortCheckboxChecked(bool state) diff --git a/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.h b/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.h index 6c678beda0..1cf777d557 100644 --- a/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.h +++ b/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.h @@ -42,7 +42,8 @@ private slots: private: QString selectedPortName() const; - + void setColorOnGeneratorLabel(QColor color); + void setTextOnGeneratorLabel(); Ui::NxtAdditionalPreferences *mUi; const QString mBluetoothRobotName; }; diff --git a/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.ui b/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.ui index 956d6cda0b..ccc144e3d5 100644 --- a/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.ui +++ b/plugins/robots/interpreters/nxtKitInterpreter/src/nxtAdditionalPreferences.ui @@ -6,8 +6,8 @@ 0 0 - 414 - 164 + 401 + 284 @@ -27,22 +27,33 @@ 0 - - + - + - Bluetooth Settings + nxtOSEK Generator Settings - + - + - COM Port: + TextLabel + + + + + + + + + + Bluetooth Settings + + @@ -53,16 +64,6 @@ - - - - COM Port: - - - - - - @@ -73,6 +74,9 @@ + + + @@ -80,6 +84,20 @@ + + + + COM Port: + + + + + + + COM Port: + + + @@ -92,6 +110,12 @@
qrutils/widgets/imagePicker.h
1 + + qReal::ui::dirPicker + QWidget +
qrutils/widgets/dirPicker.h
+ 1 +
diff --git a/qrtranslations/fr/plugins/robots/nxtKitInterpreter_fr.ts b/qrtranslations/fr/plugins/robots/nxtKitInterpreter_fr.ts index 2068664b12..885cb6aa3b 100644 --- a/qrtranslations/fr/plugins/robots/nxtKitInterpreter_fr.ts +++ b/qrtranslations/fr/plugins/robots/nxtKitInterpreter_fr.ts @@ -9,23 +9,33 @@ Configuration de NXT - + + nxtOSEK Generator Settings + + + + + TextLabel + + + + Bluetooth Settings Paramètres Bluetooth - - + + COM Port: Port série : - + No COM ports found. If you have a Bluetooth connection with active virtual COM port, please enter its name. Example: COM3 Aucu port série n'est détecté. Si vous avez une connexion Bluetooth avec un port série virtuel actif, tapez son nom. Par exemple : COM3 - + Specify COM port manually Spécifiez le port en série manuellement @@ -41,10 +51,21 @@ nxt::NxtAdditionalPreferences - + 2D robot image: + + + Path to arm-none-eabi: + + + + + WARNING: Current directory doesn't exist. +Open <a href="https://help.trikset.com/nxt/run-upload-programs">link</a> for instructions + + nxt::NxtKitInterpreterPlugin diff --git a/qrtranslations/fr/plugins/robots/nxtOsekCGenerator_fr.ts b/qrtranslations/fr/plugins/robots/nxtOsekCGenerator_fr.ts index 5283af4fe9..b7beb75141 100644 --- a/qrtranslations/fr/plugins/robots/nxtOsekCGenerator_fr.ts +++ b/qrtranslations/fr/plugins/robots/nxtOsekCGenerator_fr.ts @@ -4,7 +4,7 @@ nxt::NxtFlashTool - + Robot is already being flashed Le robot est en train d'être flashé @@ -67,7 +67,7 @@ Le téléversement est deja lancé - + Uploading program started. Please don't disconnect robot during the process Le téléversement du programme est commencé. S'il vous plait, ne déconnectéz pas le robot jusqu'à ce que le processus se termine @@ -82,7 +82,7 @@ Échec de téléversement du programme. Assurez-vous que le robot soit connecté et qu'il ne soit pas éteint - + Error in reading from firmware file: %1 @@ -112,12 +112,12 @@ Téléversement réussi - + Compilation error occured. Please check your function blocks syntax. If you sure in their validness contact developers Une erreur de compilation s'est produite. Vérifiez le syntaxe à l'intérieur des blocs "fonction". S'ils sont valides, contactez les developpeurs - + Could not open %1 for reading. @@ -147,12 +147,17 @@ - + You need to have superuser privileges to flash NXT robot - + + If you are using GNU/Linux visit https://help.trikset.com/nxt/run-upload-programs to get instructions + + + + QReal requires superuser privileges to upload programs on NXT robot QReal necessite les droits de superutilisateur pour mettre à jour le programme du robot NXT @@ -160,13 +165,13 @@ nxt::osekC::NxtOsekCGeneratorPlugin - + Generation (NXT OSEK C) Génération (NXT OSEK C) - - + + NXT tools package is not installed diff --git a/qrtranslations/fr/qrutils_fr.ts b/qrtranslations/fr/qrutils_fr.ts index d930d61d83..eacd8c6b85 100644 --- a/qrtranslations/fr/qrutils_fr.ts +++ b/qrtranslations/fr/qrutils_fr.ts @@ -507,6 +507,14 @@ + + qReal::ui::dirPicker + + + Browse... + + + utils::MetamodelGeneratorSupport diff --git a/qrtranslations/ru/plugins/robots/nxtKitInterpreter_ru.ts b/qrtranslations/ru/plugins/robots/nxtKitInterpreter_ru.ts index 0e26961090..ea120dabdb 100644 --- a/qrtranslations/ru/plugins/robots/nxtKitInterpreter_ru.ts +++ b/qrtranslations/ru/plugins/robots/nxtKitInterpreter_ru.ts @@ -21,23 +21,33 @@ USB - + Bluetooth Settings Настройки Bluetooth - - + + COM Port: COM-Порт: - + No COM ports found. If you have a Bluetooth connection with active virtual COM port, please enter its name. Example: COM3 COM-порты не найдены. Если установлено Bluetooth-соединение с активным COM-портом, пожалуйста, укажите его имя. Пример: COM3 - + + nxtOSEK Generator Settings + Настройки генерации кода nxtOSEK + + + + TextLabel + + + + Specify COM port manually Указать COM-порт вручную @@ -60,10 +70,22 @@ nxt::NxtAdditionalPreferences - + 2D robot image: Картинка робота в 2D: + + + Path to arm-none-eabi: + Путь к кросс-компилятору + + + + WARNING: Current directory doesn't exist. +Open <a href="https://help.trikset.com/nxt/run-upload-programs">link</a> for instructions + ВНИМАНИЕ: Выбранная директория не существует. + Откройте <a href="https://help.trikset.com/nxt/run-upload-programs">ссылку</a> для дальнейших инструкций + nxt::NxtKitInterpreterPlugin diff --git a/qrtranslations/ru/plugins/robots/nxtOsekCGenerator_ru.ts b/qrtranslations/ru/plugins/robots/nxtOsekCGenerator_ru.ts index 0503e4fbfa..c84652fb2e 100644 --- a/qrtranslations/ru/plugins/robots/nxtOsekCGenerator_ru.ts +++ b/qrtranslations/ru/plugins/robots/nxtOsekCGenerator_ru.ts @@ -4,7 +4,7 @@ nxt::NxtFlashTool - + Robot is already being flashed Робот уже прошивается @@ -67,7 +67,7 @@ Программа уже загружается - + Uploading program started. Please don't disconnect robot during the process Начат процесс загрузки программы в робота. Пожалуйста, не отсоединяйте робота, пока процесс не будет завершен @@ -82,7 +82,7 @@ Не удалось загрузить программу в робота. Убедитесь, что робот включен и подсоединен к компьютеру - + Error in reading from firmware file: %1 Ошибка чтения из файла с прошивкой %1 @@ -112,12 +112,12 @@ Загрузка программы завершена успешно - + Compilation error occured. Please check your function blocks syntax. If you sure in their validness contact developers Произошла ошибка компиляции. Проверьте синтаксис выражений внутри блоков "Функция";. Если Вы уверены в их корректности, обратитесь к разработчикам - + Could not open %1 for reading. Не могу открыть файл %1 для чтения. @@ -147,12 +147,21 @@ Прошиваю робота... - + You need to have superuser privileges to flash NXT robot Загрузка программы не удалась. Возможно, стоит попробовать перезапустить среду с правами суперпользователя - + Could not upload program. Make sure the robot is connected and ON. + Не удалось загрузить программу. Убедитесь, что робот подключен и включен. + + + + If you are using GNU/Linux visit https://help.trikset.com/nxt/run-upload-programs to get instructions + Если вы пользователь ОС GNU/Linux, перейдите по ссылке https://help.trikset.com/nxt/run-upload-programs для получения инструкций. + + + QReal requires superuser privileges to upload programs on NXT robot Для загрузки программ в робота требуется запустить TRIKStudio с правами администратора @@ -164,13 +173,13 @@ Файл исходного кода Lego NXT OSEK C - + Generation (NXT OSEK C) Генерация (C) - - + + NXT tools package is not installed Пакет "Инструменты NXT" не установлен diff --git a/qrtranslations/ru/qrutils_ru.ts b/qrtranslations/ru/qrutils_ru.ts index 36fc8f0fe9..dae5e5a7ec 100644 --- a/qrtranslations/ru/qrutils_ru.ts +++ b/qrtranslations/ru/qrutils_ru.ts @@ -619,6 +619,14 @@ <строка>:<столбец> + + qReal::ui::dirPicker + + + Browse... + Обзор... + + utils::MetamodelGeneratorSupport From ebdd7f5aab3aaa42f02465b2f9149ef65c27901b Mon Sep 17 00:00:00 2001 From: zhitm Date: Wed, 27 Dec 2023 15:30:04 +0300 Subject: [PATCH 3/3] Update submodule --- .gitmodules | 2 +- installer/nxt-tools | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 61f5b62379..dd7e078495 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,7 +25,7 @@ url = https://bitbucket.org/codeimproved/qslog.git [submodule "installer/nxt-tools"] path = installer/nxt-tools - url = https://github.com/zhitm/nxt-tools.git + url = https://github.com/trikset/nxt-tools.git branch = main [submodule "trik-checkapp"] path = thirdparty/checkapp/checkapp diff --git a/installer/nxt-tools b/installer/nxt-tools index 973a173375..6c4d5f1150 160000 --- a/installer/nxt-tools +++ b/installer/nxt-tools @@ -1 +1 @@ -Subproject commit 973a173375fd4b8ec239a64c5ed61a2da232bbec +Subproject commit 6c4d5f1150d8beb5004ce3b606c6134bf0fc262d