Merge branch 'EdgeTX:2.4' into 2.4
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ['PayPal.Me/opentx']
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help the OpenTX team to improve OpenTX
|
||||
about: Create a report to help the EdgeTX team to improve EdgeTX
|
||||
|
||||
---
|
||||
*Before submitting, search the open issue if there is already a report of the bug*
|
||||
@@ -14,10 +14,6 @@ A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
@@ -26,6 +22,6 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**General information**
|
||||
- OpenTX version (e.g. 2.1.23 or N123)
|
||||
- Hardware (e.g. Frsky X9D+ or 9X Pro)
|
||||
- OpenTX Companion (e.g. 2.1.23 on Ubuntu 16.04)
|
||||
- EdgeTX version (e.g. 2.4.0 or nightly and #commit number)
|
||||
- Hardware (e.g. Frsky X9D+ or RM TX12S)
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
---
|
||||
name: Help
|
||||
about: Problems or question of using OpenTX
|
||||
about: Problems or question of using EdgeTX
|
||||
|
||||
---
|
||||
|
||||
The issue tracker here is for devlopment of OpenTX. This is not a
|
||||
The issue tracker here is for devlopment of EdgeTX. This is not a
|
||||
support site, only a bug tracking system. Please use support groups
|
||||
like [rcgroups](https://rcgroups.com/) or
|
||||
[openrcforum](https://www.openrcforums.com/forum/). See also our
|
||||
[manual](https://opentx.gitbooks.io/manual-for-opentx-2-2/).
|
||||
like [rcgroups](https://rcgroups.com/), [Discord](https://discord.gg/wF9wUKnZ6H)
|
||||
or [Facebook](https://www.facebook.com/groups/edgetx).
|
||||
|
||||
For quick questions you can also join our general chat.
|
||||
|
||||
Issues that fall into the category of asking for help, will be
|
||||
generally closed as invalid without an answer.
|
||||
Issues that fall into the category of asking for help may be re-directed
|
||||
to the other support platforms or answered directly if time permits.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project to make OpenTX even better
|
||||
about: Suggest an idea to make EdgeTX even better!
|
||||
|
||||
---
|
||||
*Before suggesting a new feature here, please search the open issue if there is already a request for the feature*
|
||||
*Before suggesting a new feature here, please search the open issue if there is already a request for the feature.
|
||||
You can add your comment there, or react so that we know know much interest there is in the feature request.*
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
@@ -6,11 +6,13 @@ on:
|
||||
- '2.4'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '2.4'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
-2269
File diff suppressed because it is too large
Load Diff
@@ -223,7 +223,6 @@ set(companion_SRCS
|
||||
burnconfigdialog.cpp
|
||||
multimodelprinter.cpp
|
||||
comparedialog.cpp
|
||||
creditsdialog.cpp
|
||||
releasenotesdialog.cpp
|
||||
releasenotesfirmwaredialog.cpp
|
||||
customizesplashdialog.cpp
|
||||
@@ -257,7 +256,6 @@ set(companion_MOC_HDRS
|
||||
comparedialog.h
|
||||
printdialog.h
|
||||
logsdialog.h
|
||||
creditsdialog.h
|
||||
releasenotesdialog.h
|
||||
releasenotesfirmwaredialog.h
|
||||
customizesplashdialog.h
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<qresource prefix="/">
|
||||
<file>images/customize.png</file>
|
||||
<file alias="icon.png">images/icon.png</file>
|
||||
<file>../../CREDITS.txt</file>
|
||||
<file>../releasenotes.txt</file>
|
||||
<file>images/screenshot.png</file>
|
||||
<file>images/splash.png</file>
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "creditsdialog.h"
|
||||
#include "ui_htmldialog.h"
|
||||
#include "helpers.h"
|
||||
#include <QFile>
|
||||
|
||||
CreditsDialog::CreditsDialog(QWidget * parent):
|
||||
QDialog(parent),
|
||||
ui(new Ui::HtmlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowTitle(tr("OpenTX Contributors"));
|
||||
setWindowIcon(CompanionIcon("contributors.png"));
|
||||
|
||||
QString str = "<html>" \
|
||||
"<head>" \
|
||||
" <style type=\"text/css\">" \
|
||||
" .normal { font-weight:normal;color:#000000;vertical-align:top;font-size:10px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
|
||||
" .bold { font-weight:bold;color:#C00000;vertical-align:top;font-size:10px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
|
||||
" .title { font-weight:bold;color:#000000;font-size:14px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
|
||||
" </style>" \
|
||||
"</head>"
|
||||
"<body class=\"normal\">";
|
||||
|
||||
foreach(CreditsSection section, readCredits()) {
|
||||
str.append(formatTable(sectionTitle(section.title), section.names, 3));
|
||||
}
|
||||
|
||||
str.append("<table><tr><td class=\"normal\"> </td></tr>" \
|
||||
" <tr><td class=\"normal\">" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "<br/></td></tr>" \
|
||||
"</table>");
|
||||
|
||||
#if 0
|
||||
QFile blacklist(":/BLACKLIST.txt");
|
||||
if (blacklist.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QStringList names;
|
||||
names << blacklist.readAll();
|
||||
str.append(formatTable(tr("OpenTX Blacklist"), names, 1));
|
||||
}
|
||||
#endif
|
||||
|
||||
str.append("</body></html>");
|
||||
ui->textEditor->setHtml(str);
|
||||
ui->textEditor->scroll(0, 0);
|
||||
ui->textEditor->setOpenExternalLinks(true);
|
||||
}
|
||||
|
||||
CreditsDialog::~CreditsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QList<CreditsDialog::CreditsSection> CreditsDialog::readCredits()
|
||||
{
|
||||
QFile credits(":/CREDITS.txt");
|
||||
QList<CreditsSection> result;
|
||||
if (credits.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
while (!credits.atEnd()) {
|
||||
QByteArray line = credits.readLine().trimmed();
|
||||
if (line.size() >= 2) {
|
||||
if (line.startsWith("[") && line.endsWith("]")) {
|
||||
result.push_back(CreditsSection(line.mid(1, line.size() - 2)));
|
||||
} else {
|
||||
result.back().addName(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QString CreditsDialog::sectionTitle(const QString & title)
|
||||
{
|
||||
if (title == "Main developers")
|
||||
return tr("Main developers");
|
||||
else if (title == "Translators")
|
||||
return tr("Translators");
|
||||
else if (title == "Companies and projects who have donated to OpenTX")
|
||||
return tr("Companies and projects who have donated to OpenTX");
|
||||
else if (title == "People who have donated to OpenTX")
|
||||
return tr("People who have donated to OpenTX");
|
||||
else
|
||||
return tr("Other contributors");
|
||||
}
|
||||
|
||||
QString CreditsDialog::formatTable(const QString & title, const QStringList & names, int columns)
|
||||
{
|
||||
const float cwidth = 100.0 / columns;
|
||||
QString str = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>" \
|
||||
" <tr><td class=\"normal\"> </td></tr>" \
|
||||
" <tr><td class=\"title\">" + title + "</td></tr>" \
|
||||
"</table>";
|
||||
|
||||
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
|
||||
|
||||
int column = 0;
|
||||
foreach(QString name, names) {
|
||||
if (column == 0) {
|
||||
str.append("<tr>");
|
||||
}
|
||||
QString trclass = name.contains("monthly") ? "bold" : "normal";
|
||||
str.append(QString("<td width=\"%1%\" class=\"%2\">%3</td>").arg(cwidth).arg(trclass).arg(name.trimmed().replace("monthly", tr("monthly"))));
|
||||
if (++column == columns) {
|
||||
str.append("</tr>");
|
||||
column = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (column != 0) {
|
||||
str.append("</tr>");
|
||||
}
|
||||
|
||||
str.append("</table>");
|
||||
return str;
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _CREDITSDIALOG_H_
|
||||
#define _CREDITSDIALOG_H_
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class HtmlDialog;
|
||||
}
|
||||
|
||||
class CreditsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
class CreditsSection
|
||||
{
|
||||
public:
|
||||
CreditsSection(const QString & title):
|
||||
title(title)
|
||||
{
|
||||
}
|
||||
|
||||
void addName(const QString & name)
|
||||
{
|
||||
names.push_back(name);
|
||||
}
|
||||
|
||||
QString title;
|
||||
QStringList names;
|
||||
};
|
||||
|
||||
public:
|
||||
explicit CreditsDialog(QWidget * parent = 0);
|
||||
~CreditsDialog();
|
||||
|
||||
private:
|
||||
Ui::HtmlDialog * ui;
|
||||
QList<CreditsSection> readCredits();
|
||||
QString sectionTitle(const QString & title);
|
||||
QString formatTable(const QString & title, const QStringList & names, int colums);
|
||||
};
|
||||
|
||||
#endif // _CREDITSDIALOG_H_
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "downloaddialog.h"
|
||||
#include "printdialog.h"
|
||||
#include "version.h"
|
||||
#include "creditsdialog.h"
|
||||
#include "releasenotesdialog.h"
|
||||
#include "releasenotesfirmwaredialog.h"
|
||||
#include "customizesplashdialog.h"
|
||||
@@ -868,13 +867,6 @@ void MainWindow::fwPrefs()
|
||||
dialog->deleteLater();
|
||||
}
|
||||
|
||||
void MainWindow::contributors()
|
||||
{
|
||||
CreditsDialog * dialog = new CreditsDialog(this);
|
||||
dialog->exec();
|
||||
dialog->deleteLater();
|
||||
}
|
||||
|
||||
void MainWindow::sdsync()
|
||||
{
|
||||
// remember user-selectable options for duration of session TODO: save to settings
|
||||
@@ -1230,8 +1222,7 @@ void MainWindow::retranslateUi(bool showMsg)
|
||||
trAct(burnConfigAct, tr("Configure Communications..."), tr("Configure software for communicating with the Radio"));
|
||||
trAct(writeBUToRadioAct, tr("Write Backup to Radio"), tr("Write Backup from file to Radio"));
|
||||
trAct(readBUToFileAct, tr("Backup Radio to File"), tr("Save a complete backup file of all settings and model data in the Radio"));
|
||||
trAct(contributorsAct, tr("Contributors..."), tr("A tribute to those who have contributed to OpenTX and Companion"));
|
||||
|
||||
|
||||
trAct(createProfileAct, tr("Add Radio Profile"), tr("Create a new Radio Settings Profile"));
|
||||
trAct(copyProfileAct, tr("Copy Current Radio Profile"), tr("Duplicate current Radio Settings Profile"));
|
||||
trAct(deleteProfileAct, tr("Delete Current Radio Profile..."), tr("Delete the current Radio Settings Profile"));
|
||||
@@ -1306,8 +1297,7 @@ void MainWindow::createActions()
|
||||
aboutAct = addAct("information.png", SLOT(about()));
|
||||
openDocURLAct = addAct("changelog.png", SLOT(openDocURL()));
|
||||
changelogAct = addAct("changelog.png", SLOT(changelog()));
|
||||
contributorsAct = addAct("contributors.png", SLOT(contributors()));
|
||||
|
||||
|
||||
// these two get assigned menus in createMenus()
|
||||
recentFilesAct = addAct("recentdocument.png");
|
||||
profilesMenuAct = addAct("profiles.png");
|
||||
@@ -1315,7 +1305,6 @@ void MainWindow::createActions()
|
||||
exitAct->setMenuRole(QAction::QuitRole);
|
||||
aboutAct->setMenuRole(QAction::AboutRole);
|
||||
appPrefsAct->setMenuRole(QAction::PreferencesRole);
|
||||
contributorsAct->setMenuRole(QAction::ApplicationSpecificRole);
|
||||
openDocURLAct->setMenuRole(QAction::ApplicationSpecificRole);
|
||||
checkForUpdatesAct->setMenuRole(QAction::ApplicationSpecificRole);
|
||||
changelogAct->setMenuRole(QAction::ApplicationSpecificRole);
|
||||
@@ -1402,8 +1391,7 @@ void MainWindow::createMenus()
|
||||
helpMenu->addSeparator();
|
||||
helpMenu->addAction(changelogAct);
|
||||
helpMenu->addSeparator();
|
||||
helpMenu->addAction(contributorsAct);
|
||||
|
||||
|
||||
recentFilesMenu = new QMenu(this);
|
||||
recentFilesMenu->setToolTipsVisible(true);
|
||||
for ( int i = 0; i < g.historySize(); ++i) {
|
||||
|
||||
@@ -111,7 +111,6 @@ class MainWindow : public QMainWindow
|
||||
void readBackup();
|
||||
void burnConfig();
|
||||
void burnList();
|
||||
void contributors();
|
||||
void sdsync();
|
||||
void changelog();
|
||||
void customizeSplash();
|
||||
@@ -200,7 +199,6 @@ class MainWindow : public QMainWindow
|
||||
QAction *appPrefsAct;
|
||||
QAction *fwPrefsAct;
|
||||
QAction *checkForUpdatesAct;
|
||||
QAction *contributorsAct;
|
||||
QAction *sdsyncAct;
|
||||
QAction *changelogAct;
|
||||
QAction *compareAct;
|
||||
|
||||
@@ -89,7 +89,8 @@ void Layout::adjustLayout()
|
||||
(hasTopbar() ? 1 << 0 : 0) |
|
||||
(hasSliders() ? 1 << 1 : 0) |
|
||||
(hasTrims() ? 1 << 2 : 0) |
|
||||
(hasFlightMode() ? 1 << 3 : 0);
|
||||
(hasFlightMode() ? 1 << 3 : 0) |
|
||||
(isMirrored() ? 1 << 4 : 0);
|
||||
|
||||
if (checkSettings == decorationSettings) {
|
||||
// everything ok, exit!
|
||||
|
||||
@@ -168,7 +168,7 @@ class LogicalSwitchEditPage: public Page
|
||||
new StaticText(logicalSwitchOneWindow, grid.getLabelSlot(), STR_V2);
|
||||
int16_t v2_min = 0, v2_max = 0;
|
||||
getMixSrcRange(cs->v1, v2_min, v2_max);
|
||||
v2Edit = new NumberEdit(logicalSwitchOneWindow, grid.getFieldSlot(), 0, MAX_LS_DELAY, GET_SET_DEFAULT(cs->v2));
|
||||
v2Edit = new NumberEdit(logicalSwitchOneWindow, grid.getFieldSlot(), v2_min, v2_max, GET_SET_DEFAULT(cs->v2));
|
||||
v2Edit->setDisplayHandler([=](BitmapBuffer * dc, LcdFlags flags, int32_t value) {
|
||||
drawSourceCustomValue(dc, FIELD_PADDING_LEFT, FIELD_PADDING_TOP, cs->v1, (cs->v1 <= MIXSRC_LAST_CH ? calc100toRESX(value) : value), flags);
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ class SensorButton : public Button {
|
||||
{
|
||||
TelemetryItem &telemetryItem = telemetryItems[index];
|
||||
|
||||
if (telemetryItem.isFresh())
|
||||
if (telemetryItem.isAvailable())
|
||||
dc->drawSolidFilledRect(2, 2, rect.w - 4, rect.h - 4, HIGHLIGHT_COLOR);
|
||||
else
|
||||
dc->drawSolidFilledRect(2, 2, rect.w - 4, rect.h - 4, FIELD_BGCOLOR);
|
||||
|
||||
@@ -109,7 +109,7 @@ class SpecialFunctionEditPage : public Page
|
||||
STR_VALUE);
|
||||
auto choice =
|
||||
new Choice(specialFunctionOneWindow, grid.getFieldSlot(), 0,
|
||||
NUM_STICKS + 1, GET_SET_DEFAULT(CFN_PARAM(cfn)));
|
||||
NUM_STICKS + 1, GET_SET_DEFAULT(CFN_CH_INDEX(cfn)));
|
||||
choice->setTextHandler([=](int32_t value) {
|
||||
if (value == 0)
|
||||
return std::string(STR_STICKS);
|
||||
|
||||
@@ -300,8 +300,8 @@ void ViewMainDecoration::createTrims()
|
||||
VERTICAL_SLIDERS_HEIGHT
|
||||
};
|
||||
|
||||
trims[TRIMS_LV] = new MainViewVerticalTrim(this, r, 1);
|
||||
trims[TRIMS_RV] = new MainViewVerticalTrim(this, r, 2);
|
||||
trims[TRIMS_LV] = new MainViewVerticalTrim(this, r, 2);
|
||||
trims[TRIMS_RV] = new MainViewVerticalTrim(this, r, 1);
|
||||
}
|
||||
|
||||
void ViewMainDecoration::createFlightMode()
|
||||
|
||||
@@ -37,7 +37,9 @@ class ModelBitmapWidget: public Widget
|
||||
if (buffer &&
|
||||
((buffer->width() != width()) || (buffer->height() != height()) ||
|
||||
(deps_hash != getHash()))) {
|
||||
|
||||
loadBitmap();
|
||||
deps_hash = getHash();
|
||||
}
|
||||
|
||||
// big space to draw
|
||||
@@ -84,18 +86,19 @@ class ModelBitmapWidget: public Widget
|
||||
std::string filename = std::string(g_model.header.bitmap);
|
||||
std::string fullpath = std::string(BITMAPS_PATH PATH_SEPARATOR) + filename;
|
||||
|
||||
std::unique_ptr<BitmapBuffer> bitmap(BitmapBuffer::loadBitmap(fullpath.c_str()));
|
||||
if (!bitmap) {
|
||||
TRACE("could not load bitmap '%s'", filename.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!buffer || (buffer->width() != width()) || (buffer->height() != height())) {
|
||||
buffer.reset(new BitmapBuffer(BMP_RGB565, width(), height()));
|
||||
}
|
||||
|
||||
buffer->clear(DEFAULT_BGCOLOR);
|
||||
buffer->drawScaledBitmap(bitmap.get(), 0, 38, width(), height() - 38);
|
||||
if (!filename.empty()) {
|
||||
std::unique_ptr<BitmapBuffer> bitmap(BitmapBuffer::loadBitmap(fullpath.c_str()));
|
||||
if (!bitmap) {
|
||||
TRACE("could not load bitmap '%s'", filename.c_str());
|
||||
return;
|
||||
}
|
||||
buffer->drawScaledBitmap(bitmap.get(), 0, 38, width(), height() - 38);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ void writeHeader()
|
||||
TelemetrySensor & sensor = g_model.telemetrySensors[i];
|
||||
if (sensor.logs) {
|
||||
memset(label, 0, sizeof(label));
|
||||
zchar2str(label, sensor.label, TELEM_LABEL_LEN);
|
||||
strncpy(label, sensor.label, TELEM_LABEL_LEN);
|
||||
uint8_t unit = sensor.unit;
|
||||
if (unit == UNIT_CELLS ) unit = UNIT_VOLTS;
|
||||
if (UNIT_RAW < unit && unit < UNIT_FIRST_VIRTUAL) {
|
||||
|
||||
@@ -919,7 +919,8 @@ static int luaGetFlightMode(lua_State * L)
|
||||
}
|
||||
lua_pushnumber(L, mode);
|
||||
char name[sizeof(g_model.flightModeData[0].name)+1];
|
||||
zchar2str(name, g_model.flightModeData[mode].name, sizeof(g_model.flightModeData[0].name));
|
||||
strncpy(name, g_model.flightModeData[mode].name, sizeof(g_model.flightModeData[0].name));
|
||||
name[sizeof(g_model.flightModeData[0].name)] = '\0';
|
||||
lua_pushstring(L, name);
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ void checkModelIdUnique(uint8_t index, uint8_t module)
|
||||
name = strAppendUnsigned(name+strlen(name), i + 1, 2);
|
||||
}
|
||||
else {
|
||||
name += zchar2str(name, modelHeaders[i].name, LEN_MODEL_NAME);
|
||||
name = strAppend(name, modelHeaders[i].name, LEN_MODEL_NAME);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -312,9 +312,8 @@ char * getSwitchWarningString(char * dest, swsrc_t idx)
|
||||
char * getSwitchName(char * dest, swsrc_t idx)
|
||||
{
|
||||
div_t swinfo = switchInfo(idx);
|
||||
if (ZEXIST(g_eeGeneral.switchNames[swinfo.quot])) {
|
||||
dest += zchar2str(dest, g_eeGeneral.switchNames[swinfo.quot], LEN_SWITCH_NAME);
|
||||
// TODO tous zchar2str
|
||||
if (g_eeGeneral.switchNames[swinfo.quot][0] != '\0') {
|
||||
dest = strAppend(dest, g_eeGeneral.switchNames[swinfo.quot], LEN_SWITCH_NAME);
|
||||
}
|
||||
else {
|
||||
*dest++ = 'S';
|
||||
@@ -404,7 +403,8 @@ char * getSwitchPositionName(char * dest, swsrc_t idx)
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
zchar2str(s, g_model.telemetrySensors[idx-SWSRC_FIRST_SENSOR].label, TELEM_LABEL_LEN);
|
||||
strncpy(s, g_model.telemetrySensors[idx-SWSRC_FIRST_SENSOR].label, TELEM_LABEL_LEN);
|
||||
s[TELEM_LABEL_LEN] = '\0';
|
||||
}
|
||||
|
||||
return dest;
|
||||
@@ -419,7 +419,7 @@ char * getSourceString(char * dest, mixsrc_t idx)
|
||||
idx -= MIXSRC_FIRST_INPUT;
|
||||
*dest = CHAR_INPUT;
|
||||
if (strlen(g_model.inputNames[idx])) {
|
||||
memset(dest + 1, 0, LEN_INPUT_NAME);
|
||||
memset(dest + 1, 0, LEN_INPUT_NAME+1);
|
||||
strncpy(dest + 1, g_model.inputNames[idx], LEN_INPUT_NAME);
|
||||
}
|
||||
else {
|
||||
@@ -473,8 +473,8 @@ char * getSourceString(char * dest, mixsrc_t idx)
|
||||
}
|
||||
else if (idx <= MIXSRC_LAST_SWITCH) {
|
||||
idx -= MIXSRC_FIRST_SWITCH;
|
||||
if (ZEXIST(g_eeGeneral.switchNames[idx])) {
|
||||
zchar2str(dest, g_eeGeneral.switchNames[idx], LEN_SWITCH_NAME);
|
||||
if (g_eeGeneral.switchNames[idx][0] != '\0') {
|
||||
strncpy(dest, g_eeGeneral.switchNames[idx], LEN_SWITCH_NAME);
|
||||
dest[LEN_SWITCH_NAME] = '\0';
|
||||
}
|
||||
else {
|
||||
@@ -497,8 +497,8 @@ char * getSourceString(char * dest, mixsrc_t idx)
|
||||
getStringAtIndex(dest, STR_VSRCRAW, idx-MIXSRC_Rud+1-MAX_LOGICAL_SWITCHES-MAX_TRAINER_CHANNELS-MAX_OUTPUT_CHANNELS-MAX_GVARS);
|
||||
}
|
||||
else if (idx <= MIXSRC_LAST_TIMER) {
|
||||
if(ZEXIST(g_model.timers[idx-MIXSRC_FIRST_TIMER].name)) {
|
||||
zchar2str(dest,g_model.timers[idx-MIXSRC_FIRST_TIMER].name, LEN_TIMER_NAME);
|
||||
if(g_model.timers[idx-MIXSRC_FIRST_TIMER].name[0] != '\0') {
|
||||
strncpy(dest,g_model.timers[idx-MIXSRC_FIRST_TIMER].name, LEN_TIMER_NAME);
|
||||
dest[LEN_TIMER_NAME] = '\0';
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
## Bash script to setup EdgeTX v2.4 development environment on Ubuntu 20.04.
|
||||
## Bash script to setup EdgeTX v2.4 development environment on Ubuntu 20.04 running on bare-metal or in a virtual machine.
|
||||
## Does NOT work with WSL/WSL2 under Windows 10!
|
||||
## Let it run as normal user and when asked, give sudo credentials
|
||||
|
||||
PAUSEAFTEREACHLINE="false"
|
||||
|
||||
Reference in New Issue
Block a user