Merge pull request #6016 from opentx/schwabe/removeAVR
Remove a lot more AVR specific code
This commit is contained in:
+1
-15
@@ -11,7 +11,6 @@ env:
|
||||
# - QT_BASE=56
|
||||
- QT_BASE=57
|
||||
# - GCC_ARM=/opt/gcc-arm-none-eabi/bin
|
||||
- AVR_FLAVORS="AVR9X 9X GRUVIN9X MEGA2560"
|
||||
- PYTHONPATH=${PYTHONPATH}:/usr/lib/python3/dist-packages
|
||||
matrix:
|
||||
#
|
||||
@@ -20,10 +19,6 @@ env:
|
||||
#
|
||||
# - FLAVOR=ALL
|
||||
- FLAVOR=DEFAULT
|
||||
# - FLAVOR=AVR9X
|
||||
# - FLAVOR=9X
|
||||
# - FLAVOR=GRUVIN9X
|
||||
# - FLAVOR=MEGA2560
|
||||
- FLAVOR=ARM9X
|
||||
# - FLAVOR=AR9X
|
||||
# - FLAVOR=SKY9X
|
||||
@@ -54,20 +49,11 @@ before_install:
|
||||
|
||||
install:
|
||||
- sudo apt-get --yes --force-yes install curl libmpfr4 libmpc3 libfox-1.6-dev libgtest-dev
|
||||
- |
|
||||
if [[ " ${AVR_FLAVORS} " =~ " ${FLAVOR} " || ${FLAVOR} == "ALL" ]]; then
|
||||
wget --quiet https://launchpad.net/ubuntu/+source/gcc-avr/1:4.9.2+Atmel3.5.0-1/+build/8403710/+files/gcc-avr_4.9.2+Atmel3.5.0-1_amd64.deb
|
||||
wget --quiet https://launchpad.net/ubuntu/+source/avr-libc/1:1.8.0+Atmel3.5.0-1/+build/8435473/+files/avr-libc_1.8.0+Atmel3.5.0-1_all.deb
|
||||
wget --quiet https://launchpad.net/ubuntu/+source/binutils-avr/2.25+Atmel3.5.0-2/+build/8435474/+files/binutils-avr_2.25+Atmel3.5.0-2_amd64.deb
|
||||
sudo dpkg --install gcc-avr_4.9.2+Atmel3.5.0-1_amd64.deb avr-libc_1.8.0+Atmel3.5.0-1_all.deb binutils-avr_2.25+Atmel3.5.0-2_amd64.deb
|
||||
fi
|
||||
if [[ ! " ${AVR_FLAVORS} " =~ " ${FLAVOR} " || ${FLAVOR} == "ALL" ]]; then
|
||||
sudo apt-get --yes --force-yes install gcc-arm-none-eabi
|
||||
- sudo apt-get --yes --force-yes install gcc-arm-none-eabi
|
||||
# Trying to build with gcc-arm 4.7 isn't working because it can't find the compiler, despite adding to PATH (in commit-tests.sh) by defining GCC_ARM above
|
||||
# - wget --quiet https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q3-update/+download/gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2
|
||||
# - tar xjf gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2
|
||||
# - mv gcc-arm-none-eabi-4_7-2013q3 /opt/gcc-arm-none-eabi
|
||||
fi
|
||||
- sudo apt-get install --yes --force-yes -qq qt${QT_BASE}base qt${QT_BASE}multimedia qt${QT_BASE}svg qt${QT_BASE}tools; source /opt/qt${QT_BASE}/bin/qt${QT_BASE}-env.sh
|
||||
|
||||
script:
|
||||
|
||||
@@ -23,7 +23,6 @@ set(modeledit_SRCS
|
||||
channels.cpp
|
||||
logicalswitches.cpp
|
||||
customfunctions.cpp
|
||||
# templates.cpp
|
||||
mixerslistwidget.cpp
|
||||
# node.cpp ## node and edge are built in common lib because also used by simulator
|
||||
# edge.cpp ## commenting them here avoids a "duplicate target" warning eg. from ninja
|
||||
@@ -36,7 +35,6 @@ set(modeledit_HDRS
|
||||
channels.h
|
||||
logicalswitches.h
|
||||
customfunctions.h
|
||||
# templates.h
|
||||
mixerslistwidget.h
|
||||
# node.h
|
||||
)
|
||||
|
||||
@@ -1,896 +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 "templates.h"
|
||||
|
||||
#define CHANNEL_ORDER(x) generalSettings.getDefaultStick(x)
|
||||
#define CC(x) (CHANNEL_ORDER(x)) //need to invert this to work with dest
|
||||
// TODO ICC is GeneralSettings::getDefaultChannel(unsigned int stick)
|
||||
|
||||
void ModelEdit::setCurve(uint8_t c, int8_t ar[])
|
||||
{
|
||||
int len=sizeof(ar)/sizeof(int8_t);
|
||||
|
||||
if (firmware->getCapability(NumCurves)>c) {
|
||||
if (len<9) {
|
||||
model.curves[c].count=5;
|
||||
model.curves[c].custom=false;
|
||||
for (int i=0; i< 5; i++) {
|
||||
model.curves[c].points[i].y=ar[i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
model.curves[c].count=5;
|
||||
model.curves[c].custom=false;
|
||||
for (int i=0; i< 5; i++) {
|
||||
model.curves[c].points[i].y=ar[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Templates::Templates(QWidget * parent, ModelData & model):
|
||||
QWidget(parent),
|
||||
model(model)
|
||||
{
|
||||
QGridLayout * gridLayout = new QGridLayout(this);
|
||||
QListWidget * templateList = new QListWidget(this);
|
||||
gridLayout->addWidget(templateList, 0, 0, 1, 1);
|
||||
|
||||
templateList->addItem(tr("Simple 4-CH"));
|
||||
templateList->addItem(tr("T-Cut"));
|
||||
templateList->addItem(tr("Sticky T-Cut"));
|
||||
templateList->addItem(tr("V-Tail"));
|
||||
templateList->addItem(tr("Elevon\\Delta"));
|
||||
templateList->addItem(tr("Heli Setup"));
|
||||
templateList->addItem(tr("Heli Setup with gyro gain control"));
|
||||
templateList->addItem(tr("Gyro gain control"));
|
||||
templateList->addItem(tr("Heli Setup (Futaba's channel assignment style)"));
|
||||
templateList->addItem(tr("Heli Setup with gyro gain control (Futaba's channel assignment style)"));
|
||||
templateList->addItem(tr("Gyro gain control (Futaba's channel assignment style)"));
|
||||
templateList->addItem(tr("Servo Test"));
|
||||
templateList->addItem(tr("MultiCopter"));
|
||||
templateList->addItem(tr("Use Model Config Wizard"));
|
||||
|
||||
connect(templateList, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(doubleClicked(QModelIndex)));
|
||||
}
|
||||
|
||||
Templates::~Templates()
|
||||
{
|
||||
}
|
||||
|
||||
void Templates::setSwitch(unsigned int idx, unsigned int func, int v1, int v2)
|
||||
{
|
||||
g_model.logicalSw[idx-1].func = func;
|
||||
g_model.logicalSw[idx-1].val1 = v1;
|
||||
g_model.logicalSw[idx-1].val2 = v2;
|
||||
}
|
||||
|
||||
void Templates::onDoubleClicked(QModelIndex index)
|
||||
{
|
||||
QString text = ui->templateList->item(index.row())->text();
|
||||
if (index.row()==13) {
|
||||
uint64_t result=0xffffffff;
|
||||
modelConfigDialog *mcw = new modelConfigDialog(radioData, &result, this);
|
||||
mcw->exec();
|
||||
if (result!=0xffffffff) {
|
||||
applyNumericTemplate(result);
|
||||
updateSettings();
|
||||
tabMixes();
|
||||
}
|
||||
} else {
|
||||
int res = QMessageBox::question(this,tr("Apply Template?"),tr("Apply template \"%1\"?").arg(text),QMessageBox::Yes | QMessageBox::No);
|
||||
if(res!=QMessageBox::Yes) return;
|
||||
applyTemplate(index.row());
|
||||
updateSettings();
|
||||
tabMixes();
|
||||
}
|
||||
}
|
||||
|
||||
void Templates::applyNumericTemplate(uint64_t tpl)
|
||||
{
|
||||
clearCurves();
|
||||
clearExpos(false);
|
||||
clearMixes(false);
|
||||
int8_t heli_ar1[] = {-100, -20, 30, 70, 90};
|
||||
int8_t heli_ar2[] = {80, 70, 60, 70, 100};
|
||||
int8_t heli_ar3[] = {100, 90, 80, 90, 100};
|
||||
int8_t heli_ar4[] = {-30, -15, 0, 50, 100};
|
||||
int8_t heli_ar5[] = {-100, -50, 0, 50, 100};
|
||||
bool rx[10];
|
||||
for (int i=0; i<10 ; i++) {
|
||||
rx[i]=false;
|
||||
}
|
||||
int thrsw=firmware->getCapability(GetThrSwitch);
|
||||
MixData *md = &model.mixData[0];
|
||||
uint8_t spo2ch=(tpl & 0x0F);
|
||||
tpl>>=4;
|
||||
uint8_t spo1ch=(tpl & 0x0F);
|
||||
tpl>>=4;
|
||||
uint8_t fla2ch=(tpl & 0x0F);
|
||||
tpl>>=4;
|
||||
uint8_t fla1ch=(tpl & 0x0F);
|
||||
tpl>>=4;
|
||||
uint8_t rud2ch=(tpl & 0x0F);
|
||||
tpl>>=4;
|
||||
uint8_t ele2ch=(tpl & 0x0F);
|
||||
tpl>>=4;
|
||||
uint8_t ail2ch=(tpl & 0x0F);
|
||||
tpl>>=4;
|
||||
uint8_t chstyle=(tpl & 0x03);
|
||||
tpl>>=2;
|
||||
uint8_t gyro=(tpl & 0x03);
|
||||
tpl>>=2;
|
||||
uint8_t tailtype=(tpl & 0x03);
|
||||
tpl>>=2;
|
||||
uint8_t swashtype=(tpl & 0x07);
|
||||
tpl>>=3;
|
||||
uint8_t ruddertype=(tpl & 0x03);
|
||||
tpl>>=2;
|
||||
uint8_t spoilertype=(tpl & 0x3);
|
||||
tpl>>=2;
|
||||
uint8_t flaptype=(tpl & 0x03);
|
||||
tpl>>=2;
|
||||
uint8_t ailerontype=(tpl & 0x03);
|
||||
tpl>>=2;
|
||||
uint8_t enginetype=(tpl & 0x03);
|
||||
tpl>>=2;
|
||||
uint8_t modeltype=(tpl & 0x03);
|
||||
|
||||
#define ICC(x) icc[(x)-1]
|
||||
uint8_t icc[4] = {0};
|
||||
for(uint8_t i=1; i<=4; i++) //generate inverse array
|
||||
for(uint8_t j=1; j<=4; j++) if(CC(i)==j) icc[j-1]=i;
|
||||
|
||||
int ailerons;
|
||||
int flaps;
|
||||
int throttle;
|
||||
int spoilers;
|
||||
int elevators;
|
||||
int rudders;
|
||||
int sign;
|
||||
uint8_t rxch;
|
||||
switch (modeltype) {
|
||||
case 0:
|
||||
ailerons=ailerontype;
|
||||
flaps=flaptype;
|
||||
throttle=1;
|
||||
switch (tailtype) {
|
||||
case 0:
|
||||
case 1:
|
||||
rudders=1;
|
||||
elevators=1;
|
||||
break;
|
||||
case 2:
|
||||
rudders=1;
|
||||
elevators=2;
|
||||
break;
|
||||
}
|
||||
rxch=ICC(STK_RUD);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
if (tailtype==1) {
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
}
|
||||
rx[rxch-1]=true;
|
||||
rxch=ICC(STK_ELE);
|
||||
if (tailtype==1) {
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
}
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
rxch=ICC(STK_THR);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
if (ail2ch > 0) {
|
||||
rx[ail2ch-1]=true;
|
||||
}
|
||||
if (ele2ch > 0) {
|
||||
rx[ele2ch-1]=true;
|
||||
}
|
||||
if (fla1ch > 0) {
|
||||
rx[fla1ch-1]=true;
|
||||
}
|
||||
if (fla2ch > 0) {
|
||||
rx[fla2ch-1]=true;
|
||||
}
|
||||
if (ailerons>0) {
|
||||
rxch=ICC(STK_AIL);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
}
|
||||
if (ailerons>1) {
|
||||
if (ail2ch==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(ail2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
if (elevators>1) {
|
||||
if (ele2ch==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();;strncpy(md->name, tr("ELE2").toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
md=setDest(ele2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();;strncpy(md->name, tr("ELE2").toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
if (flaps>0) {
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< flaps; i++) {
|
||||
sign*=-1;
|
||||
int index;
|
||||
if (i==0) {
|
||||
index=fla1ch;
|
||||
} else {
|
||||
index=fla2ch;
|
||||
}
|
||||
if (index==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
setCurve(CURVE5(1),heli_ar1);
|
||||
setCurve(CURVE5(2),heli_ar2);
|
||||
setCurve(CURVE5(3),heli_ar3);
|
||||
setCurve(CURVE5(4),heli_ar4);
|
||||
setCurve(CURVE5(5),heli_ar5);
|
||||
setCurve(CURVE5(6),heli_ar5);
|
||||
switch (swashtype) {
|
||||
case 0:
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_90;
|
||||
break;
|
||||
case 1:
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
break;
|
||||
case 2:
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120X;
|
||||
break;
|
||||
case 3:
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_140;
|
||||
break;
|
||||
case 4:
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_NONE;
|
||||
break;
|
||||
}
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
|
||||
if (chstyle==0) {
|
||||
if (swashtype!=4) {
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6);
|
||||
} else {
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6);
|
||||
}
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
switch (gyro) {
|
||||
case 1:
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
case 2:
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (swashtype!=4) {
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6);
|
||||
} else {
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6);
|
||||
}
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
switch (gyro) {
|
||||
case 1:
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
case 2:
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
break;
|
||||
case 2:
|
||||
ailerons=ailerontype;
|
||||
flaps=flaptype;
|
||||
spoilers=spoilertype;
|
||||
throttle=enginetype;
|
||||
switch (tailtype) {
|
||||
case 0:
|
||||
case 1:
|
||||
rudders=1;
|
||||
elevators=1;
|
||||
break;
|
||||
case 2:
|
||||
rudders=1;
|
||||
elevators=2;
|
||||
break;
|
||||
}
|
||||
if (throttle==1) {
|
||||
rxch=ICC(STK_THR);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
}
|
||||
rxch=ICC(STK_RUD);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
if (tailtype==1) {
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
}
|
||||
rx[rxch-1]=true;
|
||||
rxch=ICC(STK_ELE);
|
||||
if (tailtype==1) {
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
}
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
if (ail2ch > 0) {
|
||||
rx[ail2ch-1]=true;
|
||||
}
|
||||
if (ele2ch > 0) {
|
||||
rx[ele2ch-1]=true;
|
||||
}
|
||||
if (fla1ch > 0) {
|
||||
rx[fla1ch-1]=true;
|
||||
}
|
||||
if (fla2ch > 0) {
|
||||
rx[fla2ch-1]=true;
|
||||
}
|
||||
if (spo1ch > 0) {
|
||||
rx[spo1ch-1]=true;
|
||||
}
|
||||
if (spo2ch > 0) {
|
||||
rx[spo2ch-1]=true;
|
||||
}
|
||||
|
||||
if (ailerons>0) {
|
||||
rxch=ICC(STK_AIL);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
}
|
||||
if (ailerons>1) {
|
||||
if (ail2ch==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(ail2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
if (elevators>1) {
|
||||
if (ele2ch==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE2").toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(ele2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE2").toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
if (flaps>0) {
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< flaps; i++) {
|
||||
sign*=-1;
|
||||
int index;
|
||||
if (i==0) {
|
||||
index=fla1ch;
|
||||
} else {
|
||||
index=fla2ch;
|
||||
}
|
||||
if (index==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
if (spoilers>0) {
|
||||
md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6); md->speedUp=4;;md->speedDown=4;
|
||||
md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6);md->speedUp=4;md->speedDown=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< spoilers; i++) {
|
||||
sign*=-1;
|
||||
int index;
|
||||
if (i==0) {
|
||||
index=spo1ch;
|
||||
} else {
|
||||
index=spo2ch;
|
||||
}
|
||||
if (index==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 11); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("SPOIL%1").arg(i+1).toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 11); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("SPOIL%1").arg(i+1).toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
flaps=flaptype;
|
||||
throttle=enginetype;
|
||||
rudders=ruddertype;
|
||||
if (throttle==1) {
|
||||
rxch=ICC(STK_THR);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
}
|
||||
rxch=ICC(STK_ELE);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
rxch=ICC(STK_AIL);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
if (rudders>0) {
|
||||
rxch=ICC(STK_RUD);
|
||||
md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6);
|
||||
rx[rxch-1]=true;
|
||||
}
|
||||
if (rud2ch > 0) {
|
||||
rx[rud2ch-1]=true;
|
||||
}
|
||||
if (fla1ch > 0) {
|
||||
rx[fla1ch-1]=true;
|
||||
}
|
||||
if (fla2ch > 0) {
|
||||
rx[fla2ch-1]=true;
|
||||
}
|
||||
if (rudders>1) {
|
||||
if (rud2ch==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD2").toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(rud2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD2").toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
if (flaps>0) {
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4;
|
||||
}
|
||||
sign=-1;
|
||||
for (uint8_t i=0; i< flaps; i++) {
|
||||
sign*=-1;
|
||||
int index;
|
||||
if (i==0) {
|
||||
index=fla1ch;
|
||||
} else {
|
||||
index=fla2ch;
|
||||
}
|
||||
if (index==0) {
|
||||
for (int j=0; j<10 ; j++) {
|
||||
if (!rx[j]) {
|
||||
md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->speedUp=4; md->speedDown=4; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6);
|
||||
rx[j]=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->speedUp=4; md->speedDown=4; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
updateHeliTab();
|
||||
updateCurvesTab();
|
||||
if (modeltype==1 && swashtype!=4) {
|
||||
ui->tabWidget->setCurrentIndex(1);
|
||||
} else {
|
||||
ui->tabWidget->setCurrentIndex(4);
|
||||
}
|
||||
resizeEvent();
|
||||
}
|
||||
|
||||
void Templates::applyTemplate(uint8_t idx)
|
||||
{
|
||||
int8_t heli_ar1[] = {-100, -20, 30, 70, 90};
|
||||
int8_t heli_ar2[] = {80, 70, 60, 70, 100};
|
||||
int8_t heli_ar3[] = {100, 90, 80, 90, 100};
|
||||
int8_t heli_ar4[] = {-30, -15, 0, 50, 100};
|
||||
int8_t heli_ar5[] = {-100, -50, 0, 50, 100};
|
||||
|
||||
int thrsw=firmware->getCapability(GetThrSwitch);
|
||||
MixData *md = &model.mixData[0];
|
||||
|
||||
//CC(STK) -> vSTK
|
||||
//ICC(vSTK) -> STK
|
||||
#define ICC(x) icc[(x)-1]
|
||||
uint8_t icc[4] = {0};
|
||||
for(uint8_t i=1; i<=4; i++) //generate inverse array
|
||||
for(uint8_t j=1; j<=4; j++) if(CC(i)==j) icc[j-1]=i;
|
||||
|
||||
|
||||
uint8_t j = 0;
|
||||
|
||||
//Simple 4-Ch
|
||||
if(idx==j++) {
|
||||
if (md->destCh)
|
||||
clearMixes();
|
||||
md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();
|
||||
}
|
||||
|
||||
//T-Cut
|
||||
if(idx==j++) {
|
||||
md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
}
|
||||
|
||||
//sticky t-cut
|
||||
if(idx==j++) {
|
||||
md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_VIRTUAL, 12); md->mltpx=MLTPX_REP;
|
||||
md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_CH, 13); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_VIRTUAL, 11); md->mltpx=MLTPX_REP;
|
||||
md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
setSwitch(0xB, LS_FN_VNEG, RawSource(SOURCE_TYPE_STICK, 2).toValue(), -99);
|
||||
setSwitch(0xC, LS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 13).toValue(), 0);
|
||||
updateSwitchesTab();
|
||||
}
|
||||
|
||||
//V-Tail
|
||||
if(idx==j++) {
|
||||
clearMixes();
|
||||
md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();
|
||||
}
|
||||
|
||||
//Elevon\\Delta
|
||||
if(idx==j++) {
|
||||
clearMixes();
|
||||
md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();
|
||||
md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();
|
||||
}
|
||||
|
||||
//Heli Setup
|
||||
if(idx==j++) {
|
||||
clearMixes(); //This time we want a clean slate
|
||||
clearCurves();
|
||||
|
||||
// Set up Mixes
|
||||
// 3 cyclic channels
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();
|
||||
|
||||
// rudder
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA);
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA);
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
|
||||
// set up Curves
|
||||
setCurve(CURVE5(1),heli_ar1);
|
||||
setCurve(CURVE5(2),heli_ar2);
|
||||
setCurve(CURVE5(3),heli_ar3);
|
||||
setCurve(CURVE5(4),heli_ar4);
|
||||
setCurve(CURVE5(5),heli_ar5);
|
||||
setCurve(CURVE5(6),heli_ar5);
|
||||
|
||||
// make sure curves are redrawn
|
||||
updateHeliTab();
|
||||
updateCurvesTab();
|
||||
resizeEvent();
|
||||
}
|
||||
|
||||
//Heli Setup gyro gain control
|
||||
if(idx==j++) {
|
||||
clearMixes(); //This time we want a clean slate
|
||||
clearCurves();
|
||||
|
||||
// Set up Mixes
|
||||
// 3 cyclic channels
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();
|
||||
|
||||
// rudder
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA); md->sOffset=100;
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
|
||||
// set up Curves
|
||||
setCurve(CURVE5(1),heli_ar1);
|
||||
setCurve(CURVE5(2),heli_ar2);
|
||||
setCurve(CURVE5(3),heli_ar3);
|
||||
setCurve(CURVE5(4),heli_ar4);
|
||||
setCurve(CURVE5(5),heli_ar5);
|
||||
setCurve(CURVE5(6),heli_ar5);
|
||||
|
||||
// make sure curves are redrawn
|
||||
updateHeliTab();
|
||||
updateCurvesTab();
|
||||
resizeEvent();
|
||||
}
|
||||
|
||||
// gyro gain control
|
||||
if(idx==j++) {
|
||||
int res = QMessageBox::question(this,tr("Clear Mixes?"),tr("Really clear existing mixes on CH6?"),QMessageBox::Yes | QMessageBox::No);
|
||||
if(res!=QMessageBox::Yes) return;
|
||||
// first clear mix on ch6
|
||||
bool found=true;
|
||||
while (found) {
|
||||
found=false;
|
||||
for (int i=0; i< firmware->getCapability(Mixes); i++) {
|
||||
if (model.mixData[i].destCh==6) {
|
||||
gm_deleteMix(i);
|
||||
found=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA); md->sOffset=100;
|
||||
}
|
||||
|
||||
//Heli Setup futaba style
|
||||
if(idx==j++) {
|
||||
clearMixes(); //This time we want a clean slate
|
||||
clearCurves();
|
||||
|
||||
// Set up Mixes
|
||||
// 3 cyclic channels
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();
|
||||
|
||||
// rudder
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA);
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA);
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
|
||||
// set up Curves
|
||||
setCurve(CURVE5(1),heli_ar1);
|
||||
setCurve(CURVE5(2),heli_ar2);
|
||||
setCurve(CURVE5(3),heli_ar3);
|
||||
setCurve(CURVE5(4),heli_ar4);
|
||||
setCurve(CURVE5(5),heli_ar5);
|
||||
setCurve(CURVE5(6),heli_ar5);
|
||||
|
||||
// make sure curves are redrawn
|
||||
updateHeliTab();
|
||||
updateCurvesTab();
|
||||
resizeEvent();
|
||||
}
|
||||
|
||||
// Heli setup futaba style with gyro gain control
|
||||
if(idx==j++) {
|
||||
clearMixes(); //This time we want a clean slate
|
||||
clearCurves();
|
||||
|
||||
// Set up Mixes
|
||||
// 3 cyclic channels
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();
|
||||
md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();
|
||||
|
||||
// rudder
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();
|
||||
|
||||
// throttle
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA); md->sOffset=100;
|
||||
|
||||
// collective
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF;
|
||||
|
||||
model.swashRingData.type = HELI_SWASH_TYPE_120;
|
||||
model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10);
|
||||
|
||||
// set up Curves
|
||||
setCurve(CURVE5(1),heli_ar1);
|
||||
setCurve(CURVE5(2),heli_ar2);
|
||||
setCurve(CURVE5(3),heli_ar3);
|
||||
setCurve(CURVE5(4),heli_ar4);
|
||||
setCurve(CURVE5(5),heli_ar5);
|
||||
setCurve(CURVE5(6),heli_ar5);
|
||||
|
||||
// make sure curves are redrawn
|
||||
updateHeliTab();
|
||||
updateCurvesTab();
|
||||
resizeEvent();
|
||||
}
|
||||
|
||||
// gyro gain control futaba style
|
||||
if(idx==j++) {
|
||||
int res = QMessageBox::question(this,tr("Clear Mixes?"),tr("Really clear existing mixes on CH5?"),QMessageBox::Yes | QMessageBox::No);
|
||||
if(res!=QMessageBox::Yes) return;
|
||||
// first clear mix on ch6
|
||||
bool found=true;
|
||||
while (found) {
|
||||
found=false;
|
||||
for (int i=0; i< firmware->getCapability(Mixes); i++) {
|
||||
if (model.mixData[i].destCh==5) {
|
||||
gm_deleteMix(i);
|
||||
found=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,-Board::SWITCH_GEA); md->sOffset=100;
|
||||
md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(Board::SWITCH_TYPE_SWITCH,Board::SWITCH_GEA); md->sOffset=100;
|
||||
}
|
||||
|
||||
//Servo Test
|
||||
if(idx==j++) {
|
||||
md=setDest(15); md->srcRaw=RawSource(SOURCE_TYPE_CH, 15); md->weight= 100; md->speedUp = 8; md->speedDown = 8; md->swtch=RawSwitch();
|
||||
md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_CUSTOM_SWITCH, 0); md->weight= 110; md->swtch=RawSwitch();
|
||||
md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-110; md->swtch=RawSwitch(Board::SWITCH_TYPE_VIRTUAL, 2); md->mltpx=MLTPX_REP;
|
||||
md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight= 110; md->swtch=RawSwitch(Board::SWITCH_TYPE_VIRTUAL, 3); md->mltpx=MLTPX_REP;
|
||||
setSwitch(1, LS_FN_LESS, RawSource(SOURCE_TYPE_CH, 14).toValue(), RawSource(SOURCE_TYPE_CH, 15).toValue());
|
||||
setSwitch(2, LS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 14).toValue(), 105);
|
||||
setSwitch(3, LS_FN_VNEG, RawSource(SOURCE_TYPE_CH, 14).toValue(), -105);
|
||||
|
||||
// redraw switches tab
|
||||
updateSwitchesTab();
|
||||
}
|
||||
|
||||
//MultiCopter
|
||||
if(idx==j++) {
|
||||
if (md->destCh)
|
||||
clearMixes();
|
||||
md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=50; md->swtch=RawSwitch(); //CH1 AIL
|
||||
md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-50; md->swtch=RawSwitch(); //CH2 ELE
|
||||
md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); //CH3 THR
|
||||
md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); //CH4 RUD
|
||||
}
|
||||
}
|
||||
|
||||
MixData* Templates::setDest(uint8_t dch)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
while ((g_model.mixData[i].destCh<=dch) && (g_model.mixData[i].destCh) && (i<firmware->getCapability(Mixes))) i++;
|
||||
if(i==firmware->getCapability(Mixes)) return &g_model.mixData[0];
|
||||
|
||||
memmove(&g_model.mixData[i+1],&g_model.mixData[i],
|
||||
(firmware->getCapability(Mixes)-(i+1))*sizeof(MixData) );
|
||||
memset(&g_model.mixData[i],0,sizeof(MixData));
|
||||
g_model.mixData[i].destCh = dch;
|
||||
return &g_model.mixData[i];
|
||||
}
|
||||
@@ -1,43 +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 _TEMPLATES_H_
|
||||
#define _TEMPLATES_H_
|
||||
|
||||
#include <QtWidgets>
|
||||
#include "eeprominterface.h"
|
||||
|
||||
class Templates : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Templates(QWidget *parent, ModelData & model);
|
||||
~Templates();
|
||||
|
||||
private slots:
|
||||
void onDoubleClicked(QModelIndex index);
|
||||
|
||||
private:
|
||||
void applyNumericTemplate(uint64_t tpl);
|
||||
ModelData & model;
|
||||
};
|
||||
|
||||
#endif // _TEMPLATES_H_
|
||||
@@ -69,9 +69,6 @@ set(EEPROM_VARIANT 0)
|
||||
set(GVARS_VARIANT 1)
|
||||
set(FRSKY_VARIANT 2)
|
||||
set(3POS_VARIANT 4)
|
||||
set(MAVLINK_VARIANT 8)
|
||||
set(M2561_VARIANT 16384)
|
||||
set(M128_VARIANT 32768)
|
||||
|
||||
set(FIRMWARE_DEPENDENCIES firmware_translations)
|
||||
|
||||
@@ -153,12 +150,6 @@ if(RAMBACKUP)
|
||||
set(SRC ${SRC} storage/rambackup.cpp storage/rlc.cpp)
|
||||
endif()
|
||||
|
||||
if(TEMPLATES)
|
||||
add_definitions(-DTEMPLATES)
|
||||
set(SRC ${SRC} templates.cpp)
|
||||
set(GUI_SRC ${GUI_SRC} model_templates.cpp)
|
||||
endif()
|
||||
|
||||
if(NOT LUA STREQUAL NO)
|
||||
add_definitions(-DLUA)
|
||||
if(LUA_COMPILER)
|
||||
@@ -344,12 +335,8 @@ if(GUI)
|
||||
foreach(FILE ${GUI_SRC})
|
||||
set(SRC ${SRC} gui/${GUI_DIR}/${FILE})
|
||||
endforeach()
|
||||
if(ARCH STREQUAL ARM)
|
||||
set(SRC
|
||||
${SRC}
|
||||
gui/gui_common_arm.cpp
|
||||
set(SRC ${SRC} gui/gui_common_arm.cpp
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
foreach(FILE ${TARGET_SRC})
|
||||
|
||||
+1
-1
@@ -108,4 +108,4 @@ uint8_t crc8(const uint8_t * ptr, uint32_t len)
|
||||
crc = crc8tab[crc ^ *ptr++];
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,26 +69,6 @@
|
||||
#define MAX_INPUTS 32
|
||||
#define MAX_TRAINER_CHANNELS 16
|
||||
#define MAX_TELEMETRY_SENSORS 32
|
||||
#elif defined(CPUM2560) || defined(CPUM2561)
|
||||
#define MAX_MODELS 30
|
||||
#define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
|
||||
#define MAX_FLIGHT_MODES 6
|
||||
#define MAX_MIXERS 32
|
||||
#define MAX_EXPOS 16
|
||||
#define MAX_LOGICAL_SWITCHES 12
|
||||
#define MAX_SPECIAL_FUNCTIONS 24 // number of functions assigned to switches
|
||||
#define MAX_TRAINER_CHANNELS 8
|
||||
#define MAX_TELEMETRY_SENSORS 0
|
||||
#elif defined(CPUM128)
|
||||
#define MAX_MODELS 30
|
||||
#define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
|
||||
#define MAX_FLIGHT_MODES 5
|
||||
#define MAX_MIXERS 32
|
||||
#define MAX_EXPOS 14
|
||||
#define MAX_LOGICAL_SWITCHES 12
|
||||
#define MAX_SPECIAL_FUNCTIONS 24 // number of functions assigned to switches
|
||||
#define MAX_TRAINER_CHANNELS 8
|
||||
#define MAX_TELEMETRY_SENSORS 0
|
||||
#else
|
||||
#define MAX_MODELS 16
|
||||
#define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
|
||||
|
||||
+9
-42
@@ -27,11 +27,6 @@
|
||||
#include "dataconstants.h"
|
||||
#include "definitions.h"
|
||||
|
||||
#define ARM_FIELD(x) x;
|
||||
#define AVR_FIELD(x)
|
||||
|
||||
#define N_PCBSTD_FIELD(x) x;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define N_TARANIS_FIELD(x)
|
||||
#define TARANIS_FIELD(x) x;
|
||||
@@ -354,19 +349,6 @@ PACK(struct FrSkyTelemetryData {
|
||||
});
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MAVLINK Telemetry structure
|
||||
*/
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
PACK(struct MavlinkTelemetryData {
|
||||
uint8_t rc_rssi_scale:4;
|
||||
uint8_t pc_rssi_en:1;
|
||||
uint8_t spare1:3;
|
||||
uint8_t spare2[3];
|
||||
});
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Telemetry Sensor structure
|
||||
*/
|
||||
@@ -569,21 +551,17 @@ PACK(struct CustomScreenData {
|
||||
PACK(struct ModelData {
|
||||
ModelHeader header;
|
||||
TimerData timers[MAX_TIMERS];
|
||||
AVR_FIELD(uint8_t protocol:3)
|
||||
ARM_FIELD(uint8_t telemetryProtocol:3)
|
||||
uint8_t telemetryProtocol:3;
|
||||
uint8_t thrTrim:1; // Enable Throttle Trim
|
||||
AVR_FIELD(int8_t ppmNCH:4)
|
||||
ARM_FIELD(uint8_t noGlobalFunctions:1)
|
||||
ARM_FIELD(uint8_t displayTrims:2)
|
||||
ARM_FIELD(uint8_t ignoreSensorIds:1)
|
||||
uint8_t noGlobalFunctions:1;
|
||||
uint8_t displayTrims:2;
|
||||
uint8_t ignoreSensorIds:1;
|
||||
int8_t trimInc:3; // Trim Increments
|
||||
uint8_t disableThrottleWarning:1;
|
||||
ARM_FIELD(uint8_t displayChecklist:1)
|
||||
AVR_FIELD(uint8_t pulsePol:1)
|
||||
uint8_t displayChecklist:1;
|
||||
uint8_t extendedLimits:1;
|
||||
uint8_t extendedTrims:1;
|
||||
uint8_t throttleReversed:1;
|
||||
AVR_FIELD(int8_t ppmDelay)
|
||||
BeepANACenter beepANACenter;
|
||||
MixData mixData[MAX_MIXERS];
|
||||
LimitData limitData[MAX_OUTPUT_CHANNELS];
|
||||
@@ -597,8 +575,6 @@ PACK(struct ModelData {
|
||||
SwashRingData swashR;
|
||||
FlightModeData flightModeData[MAX_FLIGHT_MODES];
|
||||
|
||||
AVR_FIELD(int8_t ppmFrameLength) // 0=22.5ms (10ms-30ms) 0.5ms increments
|
||||
|
||||
NOBACKUP(uint8_t thrTraceSrc);
|
||||
|
||||
SWITCHES_WARNING_DATA
|
||||
@@ -609,7 +585,7 @@ PACK(struct ModelData {
|
||||
|
||||
MODELDATA_EXTRA
|
||||
|
||||
ARM_FIELD(NOBACKUP(TelemetrySensor telemetrySensors[MAX_TELEMETRY_SENSORS]))
|
||||
NOBACKUP(TelemetrySensor telemetrySensors[MAX_TELEMETRY_SENSORS];)
|
||||
|
||||
TARANIS_PCBX9E_FIELD(uint8_t toplcdTimer)
|
||||
|
||||
@@ -760,18 +736,15 @@ PACK(struct RadioData {
|
||||
NOBACKUP(int8_t timezone:5);
|
||||
NOBACKUP(uint8_t adjustRTC:1);
|
||||
NOBACKUP(uint8_t inactivityTimer);
|
||||
AVR_FIELD(uint8_t mavbaud:3)
|
||||
ARM_FIELD(uint8_t telemetryBaudrate:3)
|
||||
uint8_t telemetryBaudrate:3;
|
||||
SPLASH_MODE; /* 3bits */
|
||||
NOBACKUP(int8_t hapticMode:2); // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||
AVR_FIELD(uint8_t blOffBright:4)
|
||||
AVR_FIELD(uint8_t blOnBright:4)
|
||||
ARM_FIELD(int8_t switchesDelay)
|
||||
int8_t switchesDelay;
|
||||
NOBACKUP(uint8_t lightAutoOff);
|
||||
NOBACKUP(uint8_t templateSetup); // RETA order for receiver channels
|
||||
NOBACKUP(int8_t PPM_Multiplier);
|
||||
NOBACKUP(int8_t hapticLength);
|
||||
N_HORUS_FIELD(N_TARANIS_FIELD(N_PCBSTD_FIELD(uint8_t reNavigation)));
|
||||
N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t reNavigation));
|
||||
N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t stickReverse));
|
||||
NOBACKUP(int8_t beepLength:3);
|
||||
NOBACKUP(int8_t hapticStrength:3);
|
||||
@@ -888,14 +861,8 @@ static inline void check_struct()
|
||||
CHKSIZE(ModelHeader, 11);
|
||||
CHKTYPE(CurveData, 1);
|
||||
|
||||
// AVR
|
||||
#if defined(CPUM2560) || defined(CPUM2561)
|
||||
CHKSIZE(ExpoData, 5);
|
||||
CHKSIZE(MixData, 10);
|
||||
#else
|
||||
CHKSIZE(MixData, 9);
|
||||
CHKSIZE(ExpoData, 4);
|
||||
#endif
|
||||
|
||||
CHKSIZE(CustomFunctionData, 3);
|
||||
CHKSIZE(TimerData, 3);
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
#define __NOINIT
|
||||
#endif
|
||||
|
||||
typedef int32_t int24_t;
|
||||
|
||||
#if __GNUC__
|
||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||
#else
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#include "view_mavlink.h"
|
||||
#endif
|
||||
|
||||
uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const pm_char * str, uint8_t delay)
|
||||
{
|
||||
|
||||
@@ -67,19 +67,18 @@ void onMainViewMenu(const char * result);
|
||||
void menuFirstCalib(event_t event);
|
||||
void menuMainView(event_t event);
|
||||
void menuViewTelemetryFrsky(event_t event);
|
||||
void menuViewTelemetryMavlink(event_t event);
|
||||
void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomFunctionsContext * functionsContext);
|
||||
|
||||
enum MenuRadioIndexes
|
||||
{
|
||||
MENU_RADIO_SETUP,
|
||||
CASE_SDCARD(MENU_RADIO_SD_MANAGER)
|
||||
CASE_CPUARM(MENU_RADIO_SPECIAL_FUNCTIONS)
|
||||
MENU_RADIO_SPECIAL_FUNCTIONS,
|
||||
MENU_RADIO_TRAINER,
|
||||
MENU_RADIO_VERSION,
|
||||
MENU_RADIO_SWITCHES_TEST,
|
||||
MENU_RADIO_ANALOGS_TEST,
|
||||
CASE_CPUARM(MENU_RADIO_HARDWARE)
|
||||
MENU_RADIO_HARDWARE,
|
||||
MENU_RADIO_CALIBRATION,
|
||||
MENU_RADIO_PAGES_COUNT
|
||||
};
|
||||
@@ -97,12 +96,12 @@ void menuRadioCalibration(event_t event);
|
||||
static const MenuHandlerFunc menuTabGeneral[] PROGMEM = {
|
||||
menuRadioSetup,
|
||||
CASE_SDCARD(menuRadioSdManager)
|
||||
CASE_CPUARM(menuRadioSpecialFunctions)
|
||||
menuRadioSpecialFunctions,
|
||||
menuRadioTrainer,
|
||||
menuRadioVersion,
|
||||
menuRadioDiagKeys,
|
||||
menuRadioDiagAnalogs,
|
||||
CASE_CPUARM(menuRadioHardware)
|
||||
menuRadioHardware,
|
||||
menuRadioCalibration
|
||||
};
|
||||
|
||||
@@ -114,16 +113,14 @@ enum MenuModelIndexes {
|
||||
MENU_MODEL_INPUTS,
|
||||
MENU_MODEL_MIXES,
|
||||
MENU_MODEL_OUTPUTS,
|
||||
CASE_CURVES(MENU_MODEL_CURVES)
|
||||
MENU_MODEL_CURVES,
|
||||
MENU_MODEL_LOGICAL_SWITCHES,
|
||||
MENU_MODEL_SPECIAL_FUNCTIONS,
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
MENU_MODEL_CUSTOM_SCRIPTS,
|
||||
#endif
|
||||
CASE_FRSKY(MENU_MODEL_TELEMETRY_FRSKY)
|
||||
CASE_MAVLINK(MENU_MODEL_TELEMETRY_MAVLINK)
|
||||
CASE_CPUARM(MENU_MODEL_DISPLAY)
|
||||
CASE_TEMPLATES(MENU_MODEL_TEMPLATES)
|
||||
MENU_MODEL_DISPLAY,
|
||||
MENU_MODEL_PAGES_COUNT
|
||||
};
|
||||
|
||||
@@ -143,7 +140,6 @@ void menuModelLogicalSwitches(event_t event);
|
||||
void menuModelSpecialFunctions(event_t event);
|
||||
void menuModelCustomScripts(event_t event);
|
||||
void menuModelTelemetryFrsky(event_t event);
|
||||
void menuModelTelemetryMavlink(event_t event);
|
||||
void menuModelDisplay(event_t event);
|
||||
void menuModelTemplates(event_t event);
|
||||
void menuModelGVarOne(event_t event);
|
||||
@@ -156,16 +152,14 @@ static const MenuHandlerFunc menuTabModel[] PROGMEM = {
|
||||
menuModelExposAll,
|
||||
menuModelMixAll,
|
||||
menuModelLimits,
|
||||
CASE_CURVES(menuModelCurvesAll)
|
||||
menuModelCurvesAll,
|
||||
menuModelLogicalSwitches,
|
||||
menuModelSpecialFunctions,
|
||||
#if defined(LUA_MODEL_SCRIPTS)
|
||||
menuModelCustomScripts,
|
||||
#endif
|
||||
CASE_FRSKY(menuModelTelemetryFrsky)
|
||||
CASE_MAVLINK(menuModelTelemetryMavlink)
|
||||
CASE_CPUARM(menuModelDisplay)
|
||||
CASE_TEMPLATES(menuModelTemplates)
|
||||
menuModelDisplay,
|
||||
};
|
||||
|
||||
void menuStatisticsView(event_t event);
|
||||
|
||||
@@ -1,139 +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 "opentx.h"
|
||||
|
||||
void menuModelCurveOne(event_t event)
|
||||
{
|
||||
TITLE(STR_MENUCURVE);
|
||||
lcdDrawNumber(PSIZE(TR_MENUCURVE)*FW+1, 0, s_curveChan+1, INVERS|LEFT);
|
||||
DISPLAY_PROGRESS_BAR(20*FW+1);
|
||||
|
||||
CurveInfo crv = curveInfo(s_curveChan);
|
||||
|
||||
switch (event) {
|
||||
case EVT_ENTRY:
|
||||
s_editMode = 1;
|
||||
break;
|
||||
|
||||
CASE_EVT_ROTARY_BREAK
|
||||
case EVT_KEY_BREAK(KEY_ENTER):
|
||||
if (s_editMode <= 0)
|
||||
menuHorizontalPosition = 0;
|
||||
if (s_editMode == 1 && crv.custom)
|
||||
s_editMode = 2;
|
||||
else
|
||||
s_editMode = 1;
|
||||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
if (s_editMode <= 0) {
|
||||
if (int8_t(++menuHorizontalPosition) > 4)
|
||||
menuHorizontalPosition = -4;
|
||||
for (uint8_t i=0; i<crv.points; i++)
|
||||
crv.crv[i] = (i-(crv.points/2)) * int8_t(menuHorizontalPosition) * 50 / (crv.points-1);
|
||||
storageDirty(EE_MODEL);
|
||||
killEvents(event);
|
||||
}
|
||||
break;
|
||||
|
||||
case EVT_KEY_BREAK(KEY_EXIT):
|
||||
if (s_editMode > 0) {
|
||||
if (--s_editMode == 0)
|
||||
menuHorizontalPosition = 0;
|
||||
}
|
||||
else {
|
||||
popMenu();
|
||||
}
|
||||
break;
|
||||
|
||||
/* CASE_EVT_ROTARY_LEFT */
|
||||
case EVT_KEY_REPT(KEY_LEFT):
|
||||
case EVT_KEY_FIRST(KEY_LEFT):
|
||||
if (s_editMode==1 && menuHorizontalPosition>0) menuHorizontalPosition--;
|
||||
if (s_editMode <= 0) {
|
||||
if (crv.custom) {
|
||||
moveCurve(s_curveChan, -crv.points+2);
|
||||
}
|
||||
else if (crv.points > MIN_POINTS_PER_CURVE) {
|
||||
moveCurve(s_curveChan, -1, (crv.points+1)/2);
|
||||
}
|
||||
else {
|
||||
AUDIO_WARNING2();
|
||||
}
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
/* CASE_EVT_ROTARY_RIGHT */
|
||||
case EVT_KEY_REPT(KEY_RIGHT):
|
||||
case EVT_KEY_FIRST(KEY_RIGHT):
|
||||
if (s_editMode==1 && menuHorizontalPosition<(crv.points-1)) menuHorizontalPosition++;
|
||||
if (s_editMode <= 0) {
|
||||
if (!crv.custom) {
|
||||
moveCurve(s_curveChan, crv.points-2, crv.points);
|
||||
}
|
||||
else if (crv.points < MAX_POINTS_PER_CURVE) {
|
||||
if (moveCurve(s_curveChan, 1)) {
|
||||
for (int8_t i=crv.points+crv.points-2; i>=0; i--) {
|
||||
if (i%2)
|
||||
crv.crv[i] = (crv.crv[i/2] + crv.crv[1+i/2]) / 2;
|
||||
else
|
||||
crv.crv[i] = crv.crv[i/2];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
AUDIO_WARNING2();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
lcdDrawTextAlignedLeft(7*FH, STR_TYPE);
|
||||
uint8_t attr = (s_editMode <= 0 ? INVERS : 0);
|
||||
lcdDrawNumber(5*FW-2, 7*FH, crv.points, LEFT|attr);
|
||||
lcdDrawText(lcdLastRightPos, 7*FH, crv.custom ? PSTR("pt'") : PSTR("pt"), attr);
|
||||
|
||||
drawCurve();
|
||||
|
||||
if (s_editMode>0) {
|
||||
uint8_t i = menuHorizontalPosition;
|
||||
point_t point = getPoint(i);
|
||||
|
||||
if (s_editMode==1 || !BLINK_ON_PHASE) {
|
||||
// do selection square
|
||||
lcdDrawFilledRect(point.x-1, point.y-2, 5, 5, SOLID, FORCE);
|
||||
lcdDrawFilledRect(point.x, point.y-1, 3, 3, SOLID);
|
||||
}
|
||||
|
||||
int8_t x = -100 + 200*i/(crv.points-1);
|
||||
if (crv.custom && i>0 && i<crv.points-1) x = crv.crv[crv.points+i-1];
|
||||
lcdDrawText(7, 2*FH, PSTR("x=")); lcdDrawNumber(7+2*FW, 2*FH, x, LEFT);
|
||||
lcdDrawText(7, 3*FH, PSTR("y=")); lcdDrawNumber(7+2*FW, 3*FH, crv.crv[i], LEFT);
|
||||
lcdDrawRect(3, 1*FH+4, 7*FW-2, 3*FH-2);
|
||||
|
||||
if (p1valdiff || event==EVT_KEY_FIRST(KEY_DOWN) || event==EVT_KEY_FIRST(KEY_UP) || event==EVT_KEY_REPT(KEY_DOWN) || event==EVT_KEY_REPT(KEY_UP))
|
||||
CHECK_INCDEC_MODELVAR(event, crv.crv[i], -100, 100); // edit Y on up/down
|
||||
|
||||
if (i>0 && i<crv.points-1 && s_editMode==2 && (event==EVT_KEY_FIRST(KEY_LEFT) || event==EVT_KEY_FIRST(KEY_RIGHT) || event==EVT_KEY_REPT(KEY_LEFT) || event==EVT_KEY_REPT(KEY_RIGHT)))
|
||||
CHECK_INCDEC_MODELVAR(event, crv.crv[crv.points+i-1], i==1 ? -99 : crv.crv[crv.points+i-2]+1, i==crv.points-2 ? 99 : crv.crv[crv.points+i]-1); // edit X on left/right
|
||||
}
|
||||
}
|
||||
@@ -60,8 +60,8 @@ enum ExposFields {
|
||||
EXPO_FIELD_SCALE,
|
||||
EXPO_FIELD_WEIGHT,
|
||||
EXPO_FIELD_OFFSET,
|
||||
CASE_CURVES(EXPO_FIELD_CURVE_LABEL)
|
||||
CASE_CURVES(EXPO_FIELD_CURVE)
|
||||
EXPO_FIELD_CURVE_LABEL,
|
||||
EXPO_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(EXPO_FIELD_FLIGHT_MODES_LABEL)
|
||||
CASE_FLIGHT_MODES(EXPO_FIELD_FLIGHT_MODES)
|
||||
EXPO_FIELD_SWITCH,
|
||||
@@ -75,7 +75,7 @@ void menuModelExpoOne(event_t event)
|
||||
ExpoData * ed = expoAddress(s_currIdx);
|
||||
drawSource(PSIZE(TR_MENUINPUTS)*FW+FW, 0, MIXSRC_FIRST_INPUT+ed->chn, 0);
|
||||
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {0, 0, 0, ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW, 0, 0, CASE_CURVES(LABEL(Curve)) CASE_CURVES(1) CASE_FLIGHT_MODES(LABEL(Flight Mode)) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {0, 0, 0, ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW, 0, 0, LABEL(Curve), 1, CASE_FLIGHT_MODES(LABEL(Flight Mode)) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
|
||||
int8_t sub = menuVerticalPosition;
|
||||
|
||||
@@ -121,7 +121,6 @@ void menuModelExpoOne(event_t event)
|
||||
ed->offset = GVAR_MENU_ITEM(EXPO_ONE_2ND_COLUMN, y, ed->offset, -100, 100, RIGHT | attr, 0, event);
|
||||
break;
|
||||
|
||||
#if defined(CURVES)
|
||||
case EXPO_FIELD_CURVE_LABEL:
|
||||
lcdDrawTextAlignedLeft(y, STR_CURVE);
|
||||
break;
|
||||
@@ -129,7 +128,6 @@ void menuModelExpoOne(event_t event)
|
||||
case EXPO_FIELD_CURVE:
|
||||
editCurveRef(EXPO_ONE_2ND_COLUMN, y, ed->curve, s_editMode > 0 ? event : 0, RIGHT | attr);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
case EXPO_FIELD_FLIGHT_MODES_LABEL:
|
||||
|
||||
@@ -217,10 +217,10 @@ bool swapExpoMix(uint8_t expo, uint8_t &idx, uint8_t up)
|
||||
}
|
||||
|
||||
enum ExposFields {
|
||||
CASE_CPUARM(EXPO_FIELD_NAME)
|
||||
EXPO_FIELD_NAME,
|
||||
EXPO_FIELD_WEIGHT,
|
||||
EXPO_FIELD_EXPO,
|
||||
CASE_CURVES(EXPO_FIELD_CURVE)
|
||||
EXPO_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(EXPO_FIELD_FLIGHT_MODES)
|
||||
EXPO_FIELD_SWITCH,
|
||||
EXPO_FIELD_SIDE,
|
||||
@@ -234,7 +234,7 @@ void menuModelExpoOne(event_t event)
|
||||
ExpoData * ed = expoAddress(s_currIdx);
|
||||
drawSource(7*FW+FW/2, 0, MIXSRC_Rud+ed->chn, 0);
|
||||
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {CASE_CPUARM(0) 0, 0, CASE_CURVES(CURVE_ROWS) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {0, 0, 0, CURVE_ROWS, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
|
||||
int8_t sub = menuVerticalPosition;
|
||||
|
||||
@@ -263,7 +263,6 @@ void menuModelExpoOne(event_t event)
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(CURVES)
|
||||
case EXPO_FIELD_CURVE:
|
||||
lcdDrawTextAlignedLeft(y, STR_CURVE);
|
||||
if (ed->curveMode!=MODE_EXPO || ed->curveParam==0) {
|
||||
@@ -281,7 +280,6 @@ void menuModelExpoOne(event_t event)
|
||||
lcdDrawText(EXPO_ONE_2ND_COLUMN-3*FW, y, STR_NA, attr);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
case EXPO_FIELD_FLIGHT_MODES:
|
||||
@@ -315,12 +313,12 @@ void menuModelExpoOne(event_t event)
|
||||
}
|
||||
|
||||
enum MixFields {
|
||||
CASE_CPUARM(MIX_FIELD_NAME)
|
||||
MIX_FIELD_NAME,
|
||||
MIX_FIELD_SOURCE,
|
||||
MIX_FIELD_WEIGHT,
|
||||
MIX_FIELD_OFFSET,
|
||||
MIX_FIELD_TRIM,
|
||||
CASE_CURVES(MIX_FIELD_CURVE)
|
||||
MIX_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(MIX_FIELD_FLIGHT_PHASE)
|
||||
MIX_FIELD_SWITCH,
|
||||
MIX_FIELD_WARNING,
|
||||
@@ -385,16 +383,12 @@ void menuModelMixOne(event_t event)
|
||||
putsChn(lcdLastRightPos+1*FW, 0, md2->destCh+1,0);
|
||||
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
#if defined(CURVES)
|
||||
if ((menuVerticalPosition == MIX_FIELD_TRIM && md2->srcRaw > NUM_STICKS) || (menuVerticalPosition == MIX_FIELD_CURVE && md2->curveMode == MODE_CURVE))
|
||||
#else
|
||||
if (menuVerticalPosition == MIX_FIELD_TRIM && md2->srcRaw > NUM_STICKS)
|
||||
#endif
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, 0, CASE_CURVES(0) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/})
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {0, 0, 0, 0, 0, 0, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/})
|
||||
else
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, 1, CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {0, 0, 0, 0, 1, 1, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
#else
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, 1, CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {0, 0, 0, 0, 1, 1, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
#endif
|
||||
|
||||
int8_t sub = menuVerticalPosition;
|
||||
@@ -447,7 +441,6 @@ void menuModelMixOne(event_t event)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(CURVES)
|
||||
case MIX_FIELD_CURVE:
|
||||
{
|
||||
drawFieldLabel(COLUMN_X, y, STR_CURVE);
|
||||
@@ -480,7 +473,6 @@ void menuModelMixOne(event_t event)
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(FLIGHT_MODES)
|
||||
case MIX_FIELD_FLIGHT_PHASE:
|
||||
md2->flightModes = editFlightModes(COLUMN_X+MIXES_2ND_COLUMN, y, event, md2->flightModes, attr);
|
||||
|
||||
@@ -26,7 +26,7 @@ enum MixFields {
|
||||
MIX_FIELD_WEIGHT,
|
||||
MIX_FIELD_OFFSET,
|
||||
MIX_FIELD_TRIM,
|
||||
CASE_CURVES(MIX_FIELD_CURVE)
|
||||
MIX_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(MIX_FIELD_FLIGHT_MODE)
|
||||
MIX_FIELD_SWITCH,
|
||||
MIX_FIELD_WARNING,
|
||||
@@ -88,7 +88,7 @@ void menuModelMixOne(event_t event)
|
||||
MixData * md2 = mixAddress(s_currIdx) ;
|
||||
putsChn(PSIZE(TR_MIXER)*FW+FW, 0, md2->destCh+1,0);
|
||||
|
||||
SUBMENU(STR_MIXER, MIX_FIELD_COUNT, {0, 0, 0, 0, 0, CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU(STR_MIXER, MIX_FIELD_COUNT, {0, 0, 0, 0, 0, 1, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
|
||||
int8_t sub = menuVerticalPosition;
|
||||
int8_t editMode = s_editMode;
|
||||
@@ -137,12 +137,10 @@ void menuModelMixOne(event_t event)
|
||||
if (attr) md2->carryTrim = !checkIncDecModel(event, !md2->carryTrim, 0, 1);
|
||||
break;
|
||||
|
||||
#if defined(CURVES)
|
||||
case MIX_FIELD_CURVE:
|
||||
lcdDrawTextAlignedLeft(y, STR_CURVE);
|
||||
editCurveRef(MIXES_2ND_COLUMN, y, md2->curve, event, attr);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
case MIX_FIELD_FLIGHT_MODE:
|
||||
|
||||
@@ -1,203 +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 "opentx.h"
|
||||
|
||||
enum MenuModelOutputsItems {
|
||||
ITEM_OUTPUTS_OFFSET,
|
||||
ITEM_OUTPUTS_MIN,
|
||||
ITEM_OUTPUTS_MAX,
|
||||
ITEM_OUTPUTS_DIRECTION,
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
ITEM_OUTPUTS_PPM_CENTER,
|
||||
#endif
|
||||
#if defined(PPM_LIMITS_SYMETRICAL)
|
||||
ITEM_OUTPUTS_SYMETRICAL,
|
||||
#endif
|
||||
ITEM_OUTPUTS_COUNT,
|
||||
ITEM_OUTPUTS_MAXROW = ITEM_OUTPUTS_COUNT-1
|
||||
};
|
||||
|
||||
#if defined(PPM_UNIT_US)
|
||||
#define LIMITS_MIN_POS 12*FW+1
|
||||
#else
|
||||
#define LIMITS_MIN_POS 12*FW-2
|
||||
#endif
|
||||
|
||||
#define LIMITS_OFFSET_POS 8*FW
|
||||
|
||||
#if defined(PPM_LIMITS_SYMETRICAL)
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
#define LIMITS_MAX_POS 15*FW+3
|
||||
#define LIMITS_REVERT_POS 16*FW-1
|
||||
#define LIMITS_PPM_CENTER_POS 20*FW+1
|
||||
#else
|
||||
#define LIMITS_DIRECTION_POS 12*FW+4
|
||||
#define LIMITS_MAX_POS 16*FW+4
|
||||
#define LIMITS_REVERT_POS 17*FW
|
||||
#endif
|
||||
#else
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
#define LIMITS_MAX_POS 16*FW
|
||||
#define LIMITS_REVERT_POS 17*FW-2
|
||||
#define LIMITS_PPM_CENTER_POS 21*FW+2
|
||||
#else
|
||||
#define LIMITS_MAX_POS 17*FW
|
||||
#define LIMITS_REVERT_POS 18*FW
|
||||
#define LIMITS_DIRECTION_POS 12*FW+5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LIMITS_CURVE_POS 17*FW+1
|
||||
#define LIMITS_MIN_MAX_OFFSET 100
|
||||
#define CONVERT_US_MIN_MAX(x) ((int16_t(x)*128)/25)
|
||||
#define MIN_MAX_ATTR attr
|
||||
|
||||
#if defined(PPM_UNIT_US)
|
||||
#define SET_MIN_MAX(x, val) x = ((val)*250)/128
|
||||
#define MIN_MAX_DISPLAY(x) CONVERT_US_MIN_MAX(x)
|
||||
#else
|
||||
#define MIN_MAX_DISPLAY(x) ((int8_t)(x))
|
||||
#endif
|
||||
|
||||
void menuModelLimits(event_t event)
|
||||
{
|
||||
uint8_t sub = menuVerticalPosition - HEADER_LINE;
|
||||
|
||||
if (sub < MAX_OUTPUT_CHANNELS) {
|
||||
#if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_UNIT_US)
|
||||
lcdDrawNumber(13*FW, 0, PPM_CH_CENTER(sub)+channelOutputs[sub]/2, RIGHT);
|
||||
lcdDrawText(13*FW, 0, STR_US);
|
||||
#else
|
||||
lcdDrawNumber(13*FW, 0, calcRESXto1000(channelOutputs[sub]), RIGHT|PREC1);
|
||||
#endif
|
||||
}
|
||||
|
||||
MENU(STR_MENULIMITS, menuTabModel, MENU_MODEL_OUTPUTS, HEADER_LINE+MAX_OUTPUT_CHANNELS+1, { HEADER_LINE_COLUMNS ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, 0});
|
||||
|
||||
if (warningResult) {
|
||||
warningResult = 0;
|
||||
LimitData * ld = limitAddress(sub);
|
||||
ld->revert = !ld->revert;
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
|
||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
|
||||
uint8_t k = i+menuVerticalOffset;
|
||||
|
||||
if (k == MAX_OUTPUT_CHANNELS) {
|
||||
// last line available - add the "copy trim menu" line
|
||||
LcdFlags attr = (sub==MAX_OUTPUT_CHANNELS) ? INVERS : 0;
|
||||
lcdDrawText(CENTER_OFS, y, STR_TRIMS2OFFSETS, NO_HIGHLIGHT() ? 0 : attr);
|
||||
if (attr) {
|
||||
s_editMode = 0;
|
||||
if (event == EVT_KEY_LONG(KEY_ENTER)) {
|
||||
START_NO_HIGHLIGHT();
|
||||
killEvents(event);
|
||||
moveTrimsToOffsets(); // if highlighted and menu pressed - move trims to offsets
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
LimitData * ld = limitAddress(k);
|
||||
|
||||
#if !defined(PPM_CENTER_ADJUSTABLE)
|
||||
int16_t v = (ld->revert) ? -LIMIT_OFS(ld) : LIMIT_OFS(ld);
|
||||
char swVal = '-'; // '-', '<', '>'
|
||||
if ((channelOutputs[k] - v) > 50) swVal = (ld->revert ? 127 : 126); // Switch to raw inputs? - remove trim!
|
||||
if ((channelOutputs[k] - v) < -50) swVal = (ld->revert ? 126 : 127);
|
||||
putsChn(0, y, k+1, 0);
|
||||
lcdDrawChar(LIMITS_DIRECTION_POS, y, swVal);
|
||||
#endif
|
||||
|
||||
limit_min_max_t limit = (g_model.extendedLimits ? LIMIT_EXT_MAX : 100);
|
||||
|
||||
putsChn(0, y, k+1, IS_LINE_SELECTED(sub, k) ? INVERS : 0);
|
||||
|
||||
for (uint8_t j=0; j<ITEM_OUTPUTS_COUNT; j++) {
|
||||
uint8_t attr = ((sub==k && menuHorizontalPosition==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
uint8_t active = (attr && (s_editMode>0 || p1valdiff)) ;
|
||||
if (active) STICK_SCROLL_DISABLE();
|
||||
switch (j) {
|
||||
case ITEM_OUTPUTS_OFFSET:
|
||||
#if defined(PPM_UNIT_US)
|
||||
lcdDrawNumber(LIMITS_OFFSET_POS, y, ((int32_t)ld->offset*128) / 25, attr|PREC1|RIGHT);
|
||||
#else
|
||||
lcdDrawNumber(LIMITS_OFFSET_POS, y, ld->offset, attr|PREC1|RIGHT);
|
||||
#endif
|
||||
if (active) {
|
||||
ld->offset = checkIncDec(event, ld->offset, -1000, 1000, EE_MODEL|NO_INCDEC_MARKS);
|
||||
}
|
||||
else if (attr && event==EVT_KEY_LONG(KEY_MENU)) {
|
||||
copySticksToOffset(k);
|
||||
s_editMode = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ITEM_OUTPUTS_MIN:
|
||||
lcdDrawNumber(LIMITS_MIN_POS, y, MIN_MAX_DISPLAY(ld->min-LIMITS_MIN_MAX_OFFSET), MIN_MAX_ATTR|RIGHT);
|
||||
if (active) {
|
||||
ld->min = LIMITS_MIN_MAX_OFFSET + checkIncDec(event, ld->min-LIMITS_MIN_MAX_OFFSET, -limit, 0, EE_MODEL);
|
||||
}
|
||||
break;
|
||||
|
||||
case ITEM_OUTPUTS_MAX:
|
||||
lcdDrawNumber(LIMITS_MAX_POS, y, MIN_MAX_DISPLAY(ld->max+LIMITS_MIN_MAX_OFFSET), MIN_MAX_ATTR|RIGHT);
|
||||
if (active) {
|
||||
ld->max = -LIMITS_MIN_MAX_OFFSET + checkIncDec(event, ld->max+LIMITS_MIN_MAX_OFFSET, 0, +limit, EE_MODEL);
|
||||
}
|
||||
break;
|
||||
|
||||
case ITEM_OUTPUTS_DIRECTION:
|
||||
{
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
lcdDrawChar(LIMITS_REVERT_POS, y, ld->revert ? 127 : 126, attr);
|
||||
#else
|
||||
lcdDrawTextAtIndex(LIMITS_REVERT_POS, y, STR_MMMINV, ld->revert, attr);
|
||||
#endif
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, ld->revert, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
case ITEM_OUTPUTS_PPM_CENTER:
|
||||
lcdDrawNumber(LIMITS_PPM_CENTER_POS, y, PPM_CENTER+ld->ppmCenter, RIGHT|attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR(event, ld->ppmCenter, -PPM_CENTER_MAX, +PPM_CENTER_MAX);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(PPM_LIMITS_SYMETRICAL)
|
||||
case ITEM_OUTPUTS_SYMETRICAL:
|
||||
lcdDrawChar(LCD_W-FW, y, ld->symetrical ? '=' : '^', attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, ld->symetrical, 1);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,29 +39,29 @@ uint8_t getSwitchWarningsCount()
|
||||
enum MenuModelSetupItems {
|
||||
ITEM_MODEL_NAME,
|
||||
ITEM_MODEL_TIMER1,
|
||||
CASE_CPUARM(ITEM_MODEL_TIMER1_NAME)
|
||||
CASE_PERSISTENT_TIMERS(ITEM_MODEL_TIMER1_PERSISTENT)
|
||||
ITEM_MODEL_TIMER1_NAME,
|
||||
ITEM_MODEL_TIMER1_PERSISTENT,
|
||||
ITEM_MODEL_TIMER1_MINUTE_BEEP,
|
||||
ITEM_MODEL_TIMER1_COUNTDOWN_BEEP,
|
||||
ITEM_MODEL_TIMER2,
|
||||
CASE_CPUARM(ITEM_MODEL_TIMER2_NAME)
|
||||
CASE_PERSISTENT_TIMERS(ITEM_MODEL_TIMER2_PERSISTENT)
|
||||
ITEM_MODEL_TIMER2_NAME,
|
||||
ITEM_MODEL_TIMER2_PERSISTENT,
|
||||
ITEM_MODEL_TIMER2_MINUTE_BEEP,
|
||||
ITEM_MODEL_TIMER2_COUNTDOWN_BEEP,
|
||||
CASE_CPUARM(ITEM_MODEL_TIMER3)
|
||||
CASE_CPUARM(ITEM_MODEL_TIMER3_NAME)
|
||||
CASE_CPUARM(ITEM_MODEL_TIMER3_PERSISTENT)
|
||||
CASE_CPUARM(ITEM_MODEL_TIMER3_MINUTE_BEEP)
|
||||
CASE_CPUARM(ITEM_MODEL_TIMER3_COUNTDOWN_BEEP)
|
||||
ITEM_MODEL_TIMER3,
|
||||
ITEM_MODEL_TIMER3_NAME,
|
||||
ITEM_MODEL_TIMER3_PERSISTENT,
|
||||
ITEM_MODEL_TIMER3_MINUTE_BEEP,
|
||||
ITEM_MODEL_TIMER3_COUNTDOWN_BEEP,
|
||||
ITEM_MODEL_EXTENDED_LIMITS,
|
||||
ITEM_MODEL_EXTENDED_TRIMS,
|
||||
CASE_CPUARM(ITEM_MODEL_DISPLAY_TRIMS)
|
||||
ITEM_MODEL_DISPLAY_TRIMS,
|
||||
ITEM_MODEL_TRIM_INC,
|
||||
ITEM_MODEL_THROTTLE_REVERSED,
|
||||
ITEM_MODEL_THROTTLE_TRACE,
|
||||
ITEM_MODEL_THROTTLE_TRIM,
|
||||
CASE_CPUARM(ITEM_MODEL_PREFLIGHT_LABEL)
|
||||
CASE_CPUARM(ITEM_MODEL_CHECKLIST_DISPLAY)
|
||||
ITEM_MODEL_PREFLIGHT_LABEL,
|
||||
ITEM_MODEL_CHECKLIST_DISPLAY,
|
||||
ITEM_MODEL_THROTTLE_WARNING,
|
||||
ITEM_MODEL_SWITCHES_WARNING,
|
||||
#if defined(PCBTARANIS)
|
||||
@@ -69,7 +69,7 @@ enum MenuModelSetupItems {
|
||||
ITEM_MODEL_POTS_WARNING,
|
||||
#endif
|
||||
ITEM_MODEL_BEEP_CENTER,
|
||||
CASE_CPUARM(ITEM_MODEL_USE_GLOBAL_FUNCTIONS)
|
||||
ITEM_MODEL_USE_GLOBAL_FUNCTIONS,
|
||||
#if defined(PCBTARANIS)
|
||||
ITEM_MODEL_INTERNAL_MODULE_LABEL,
|
||||
ITEM_MODEL_INTERNAL_MODULE_MODE,
|
||||
@@ -166,7 +166,7 @@ enum MenuModelSetupItems {
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES (HEADER_LINE+ITEM_MODEL_SETUP_MAX)
|
||||
#define POT_WARN_ITEMS() ((g_model.potsWarnMode) ? (uint8_t)(NUM_POTS+NUM_SLIDERS) : (uint8_t)0)
|
||||
#define TIMER_ROWS 2, 0, CASE_PERSISTENT_TIMERS(0) 0, 0
|
||||
#define TIMER_ROWS 2, 0, 0, 0, 0
|
||||
#if defined(PCBSKY9X) && !defined(REVA)
|
||||
#define EXTRA_MODULE_ROWS LABEL(ExtraModule), 1, 2,
|
||||
#else
|
||||
@@ -252,8 +252,8 @@ void menuModelSetup(event_t event)
|
||||
0, // Throttle reverse
|
||||
0, // Throttle trace source
|
||||
0, // Throttle trim
|
||||
CASE_CPUARM(LABEL(PreflightCheck))
|
||||
CASE_CPUARM(0) // Checklist
|
||||
LABEL(PreflightCheck),
|
||||
0, // Checklist
|
||||
0, // Throttle warning
|
||||
SW_WARN_ROWS, // Switch warning
|
||||
POT_WARN_ITEMS(), // Pot warning
|
||||
@@ -279,7 +279,7 @@ void menuModelSetup(event_t event)
|
||||
EXTRA_MODULE_ROWS
|
||||
TRAINER_ROWS });
|
||||
#else
|
||||
MENU_TAB({ HEADER_LINE_COLUMNS 0, TIMER_ROWS, TIMER_ROWS, TIMER_ROWS, 0, 1, 0, 0, 0, 0, 0, CASE_CPUARM(LABEL(PreflightCheck)) CASE_CPUARM(0) 0, NUM_SWITCHES-1, NUM_STICKS+NUM_POTS+NUM_SLIDERS+NUM_ROTARY_ENCODERS-1, 0,
|
||||
MENU_TAB({ HEADER_LINE_COLUMNS 0, TIMER_ROWS, TIMER_ROWS, TIMER_ROWS, 0, 1, 0, 0, 0, 0, 0, LABEL(PreflightCheck), 0, 0, NUM_SWITCHES-1, NUM_STICKS+NUM_POTS+NUM_SLIDERS+NUM_ROTARY_ENCODERS-1, 0,
|
||||
LABEL(ExternalModule),
|
||||
EXTERNAL_MODULE_MODE_ROWS,
|
||||
MULTIMODULE_SUBTYPE_ROWS(EXTERNAL_MODULE)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "opentx.h"
|
||||
|
||||
enum MenuModelTelemetryFrskyItems {
|
||||
CASE_CPUARM(ITEM_TELEMETRY_PROTOCOL_TYPE)
|
||||
ITEM_TELEMETRY_PROTOCOL_TYPE,
|
||||
#if defined(REVX)
|
||||
ITEM_TELEMETRY_INVERTED_SERIAL,
|
||||
#endif
|
||||
|
||||
@@ -56,11 +56,11 @@ enum MenuRadioSetupItems {
|
||||
CASE_AUDIO(ITEM_SETUP_BEEP_MODE)
|
||||
CASE_BUZZER(ITEM_SETUP_BUZZER_MODE)
|
||||
CASE_VOICE(ITEM_SETUP_SPEAKER_VOLUME)
|
||||
CASE_CPUARM(ITEM_SETUP_BEEP_VOLUME)
|
||||
ITEM_SETUP_BEEP_VOLUME,
|
||||
ITEM_SETUP_BEEP_LENGTH,
|
||||
CASE_AUDIO(ITEM_SETUP_SPEAKER_PITCH)
|
||||
CASE_CPUARM(ITEM_SETUP_WAV_VOLUME)
|
||||
CASE_CPUARM(ITEM_SETUP_BACKGROUND_VOLUME)
|
||||
ITEM_SETUP_WAV_VOLUME,
|
||||
ITEM_SETUP_BACKGROUND_VOLUME,
|
||||
CASE_VARIO_CPUARM(ITEM_SETUP_VARIO_LABEL)
|
||||
CASE_VARIO_CPUARM(ITEM_SETUP_VARIO_VOLUME)
|
||||
CASE_VARIO_CPUARM(ITEM_SETUP_VARIO_PITCH)
|
||||
@@ -78,25 +78,24 @@ enum MenuRadioSetupItems {
|
||||
ITEM_SETUP_INACTIVITY_ALARM,
|
||||
ITEM_SETUP_MEMORY_WARNING,
|
||||
ITEM_SETUP_ALARM_WARNING,
|
||||
CASE_CPUARM(ITEM_SETUP_RSSI_POWEROFF_ALARM)
|
||||
ITEM_SETUP_RSSI_POWEROFF_ALARM,
|
||||
IF_ROTARY_ENCODERS(ITEM_SETUP_RE_NAVIGATION)
|
||||
ITEM_SETUP_BACKLIGHT_LABEL,
|
||||
ITEM_SETUP_BACKLIGHT_MODE,
|
||||
ITEM_SETUP_BACKLIGHT_DELAY,
|
||||
CASE_CPUARM(ITEM_SETUP_BRIGHTNESS)
|
||||
ITEM_SETUP_BRIGHTNESS,
|
||||
CASE_PWM_BACKLIGHT(ITEM_SETUP_BACKLIGHT_BRIGHTNESS_OFF)
|
||||
CASE_PWM_BACKLIGHT(ITEM_SETUP_BACKLIGHT_BRIGHTNESS_ON)
|
||||
ITEM_SETUP_FLASH_BEEP,
|
||||
CASE_SPLASH_PARAM(ITEM_SETUP_DISABLE_SPLASH)
|
||||
CASE_GPS(ITEM_SETUP_TIMEZONE)
|
||||
CASE_CPUARM(ITEM_SETUP_ADJUST_RTC)
|
||||
ITEM_SETUP_ADJUST_RTC,
|
||||
CASE_GPS(ITEM_SETUP_GPSFORMAT)
|
||||
CASE_PXX(ITEM_SETUP_COUNTRYCODE)
|
||||
CASE_CPUARM(ITEM_SETUP_LANGUAGE)
|
||||
CASE_CPUARM(ITEM_SETUP_IMPERIAL)
|
||||
ITEM_SETUP_LANGUAGE,
|
||||
ITEM_SETUP_IMPERIAL,
|
||||
IF_FAI_CHOICE(ITEM_SETUP_FAI)
|
||||
CASE_MAVLINK(ITEM_MAVLINK_BAUD)
|
||||
CASE_CPUARM(ITEM_SETUP_SWITCHES_DELAY)
|
||||
ITEM_SETUP_SWITCHES_DELAY,
|
||||
CASE_STM32(ITEM_SETUP_USB_MODE)
|
||||
ITEM_SETUP_RX_CHANNEL_ORD,
|
||||
ITEM_SETUP_STICK_MODE_LABELS,
|
||||
@@ -132,7 +131,7 @@ void menuRadioSetup(event_t event)
|
||||
}
|
||||
#endif
|
||||
|
||||
MENU(STR_MENURADIOSETUP, menuTabGeneral, MENU_RADIO_SETUP, HEADER_LINE+ITEM_SETUP_MAX, { HEADER_LINE_COLUMNS CASE_RTCLOCK(2) CASE_RTCLOCK(2) CASE_BATTGRAPH(1) LABEL(SOUND), CASE_AUDIO(0) CASE_BUZZER(0) CASE_VOICE(0) CASE_CPUARM(0) CASE_CPUARM(0) CASE_CPUARM(0) 0, CASE_AUDIO(0) CASE_VARIO_CPUARM(LABEL(VARIO)) CASE_VARIO_CPUARM(0) CASE_VARIO_CPUARM(0) CASE_VARIO_CPUARM(0) CASE_VARIO_CPUARM(0) CASE_HAPTIC(LABEL(HAPTIC)) CASE_HAPTIC(0) CASE_HAPTIC(0) CASE_HAPTIC(0) 0, LABEL(ALARMS), 0, CASE_CAPACITY(0) CASE_PCBSKY9X(0) 0, 0, 0, CASE_CPUARM(0) IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, CASE_CPUARM(0) CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, CASE_SPLASH_PARAM(0) CASE_GPS(0) CASE_CPUARM(0) CASE_GPS(0) CASE_PXX(0) CASE_CPUARM(0) CASE_CPUARM(0) IF_FAI_CHOICE(0) CASE_MAVLINK(0) CASE_CPUARM(0) CASE_STM32(0) 0, COL_TX_MODE, 0, 1/*to force edit mode*/});
|
||||
MENU(STR_MENURADIOSETUP, menuTabGeneral, MENU_RADIO_SETUP, HEADER_LINE+ITEM_SETUP_MAX, { HEADER_LINE_COLUMNS CASE_RTCLOCK(2) CASE_RTCLOCK(2) CASE_BATTGRAPH(1) LABEL(SOUND), CASE_AUDIO(0) CASE_BUZZER(0) CASE_VOICE(0) 0, 0, 0, 0, CASE_AUDIO(0) CASE_VARIO_CPUARM(LABEL(VARIO)) CASE_VARIO_CPUARM(0) CASE_VARIO_CPUARM(0) CASE_VARIO_CPUARM(0) CASE_VARIO_CPUARM(0) CASE_HAPTIC(LABEL(HAPTIC)) CASE_HAPTIC(0) CASE_HAPTIC(0) CASE_HAPTIC(0) 0, LABEL(ALARMS), 0, CASE_CAPACITY(0) CASE_PCBSKY9X(0) 0, 0, 0, 0, IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, 0, CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, CASE_SPLASH_PARAM(0) CASE_GPS(0) 0, CASE_GPS(0) CASE_PXX(0) 0, 0, IF_FAI_CHOICE(0) 0, CASE_STM32(0) 0, COL_TX_MODE, 0, 1/*to force edit mode*/});
|
||||
|
||||
if (event == EVT_ENTRY) {
|
||||
reusableBuffer.generalSettings.stickMode = g_eeGeneral.stickMode;
|
||||
@@ -518,11 +517,6 @@ void menuRadioSetup(event_t event)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
case ITEM_MAVLINK_BAUD:
|
||||
g_eeGeneral.mavbaud = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUD_LABEL, STR_MAVLINK_BAUDS, g_eeGeneral.mavbaud, 0, 7, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_SETUP_SWITCHES_DELAY:
|
||||
lcdDrawTextAlignedLeft(y, STR_SWITCHES_DELAY);
|
||||
|
||||
@@ -398,17 +398,6 @@ void menuMainView(event_t event)
|
||||
case EVT_KEY_TELEMETRY:
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
chainMenu(menuViewTelemetryFrsky);
|
||||
#elif defined(TELEMETRY_JETI)
|
||||
JETI_EnableRXD(); // enable JETI-Telemetry reception
|
||||
chainMenu(menuViewTelemetryJeti);
|
||||
#elif defined(TELEMETRY_ARDUPILOT)
|
||||
ARDUPILOT_EnableRXD(); // enable ArduPilot-Telemetry reception
|
||||
chainMenu(menuViewTelemetryArduPilot);
|
||||
#elif defined(TELEMETRY_NMEA)
|
||||
NMEA_EnableRXD(); // enable NMEA-Telemetry reception
|
||||
chainMenu(menuViewTelemetryNMEA);
|
||||
#elif defined(TELEMETRY_MAVLINK)
|
||||
chainMenu(menuViewTelemetryMavlink);
|
||||
#else
|
||||
chainMenu(menuStatisticsDebug);
|
||||
#endif
|
||||
|
||||
@@ -1,512 +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.
|
||||
*/
|
||||
|
||||
/*! \file view_mavlink.cpp
|
||||
* Mavlink menu
|
||||
* Contains the menu specific code for Mavlink support.
|
||||
*/
|
||||
|
||||
#include "view_mavlink.h"
|
||||
|
||||
#define VIEW_MAVLINK_2ND_COLUMN (LCD_W-6*FW-3)
|
||||
|
||||
uint8_t MAVLINK_menu = MENU_INFO;
|
||||
|
||||
/*! \brief Top Mavlink Menu definition
|
||||
* \details Registers button events and handles that info. Buttons select menus,
|
||||
* these are launched from the MAVLINK_menu switch statement. Setup menu is
|
||||
* lanuched by the menu button. On exit (with exit button) the mavlink
|
||||
* extension is reinitialized.
|
||||
*/
|
||||
void menuViewTelemetryMavlink(event_t event) {
|
||||
|
||||
switch (event) // new event received, branch accordingly
|
||||
{
|
||||
case EVT_ENTRY:
|
||||
MAVLINK_menu = MENU_INFO;
|
||||
break;
|
||||
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
if (MAVLINK_menu > 0)
|
||||
MAVLINK_menu--;
|
||||
else
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
if (MAVLINK_menu < MAX_MAVLINK_MENU - 1)
|
||||
MAVLINK_menu++;
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_MENU):
|
||||
return;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (MAVLINK_menu) {
|
||||
case MENU_INFO:
|
||||
menuTelemetryMavlinkInfos();
|
||||
break;
|
||||
case MENU_MODE:
|
||||
menuTelemetryMavlinkFlightMode();
|
||||
break;
|
||||
case MENU_BATT:
|
||||
menuTelemetryMavlinkBattery();
|
||||
break;
|
||||
case MENU_NAV:
|
||||
menuTelemetryMavlinkNavigation();
|
||||
break;
|
||||
case MENU_GPS:
|
||||
menuTelemetryMavlinkGPS();
|
||||
break;
|
||||
#ifdef DUMP_RX_TX
|
||||
case MENU_DUMP_TX:
|
||||
case MENU_DUMP_RX:
|
||||
menuTelemetryMavlinkDump(event);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*! \brief Float variable display helper
|
||||
* \param x x position on the screen
|
||||
* \param y y position on the screen
|
||||
* \param val value to display
|
||||
* \param percis precision to display
|
||||
* \param mode Use one of the defines in lcd.h line 81
|
||||
* \details The maximum value is 9999. The position is the position of the ones, see below for explanation "*" marks
|
||||
* the x position.
|
||||
* \verbatim
|
||||
*
|
||||
9999.9999 \endverbatim
|
||||
*/
|
||||
void lcd_outdezFloat(uint8_t x, uint8_t y, float val, uint8_t precis, uint8_t mode) {
|
||||
char c;
|
||||
int16_t lnum = val;
|
||||
uint8_t x1 = x;
|
||||
val -= lnum;
|
||||
uint8_t xinc = FWNUM;
|
||||
if (mode & DBLSIZE)
|
||||
xinc *= 2;
|
||||
|
||||
int8_t i = 0;
|
||||
lnum = abs(lnum);
|
||||
for (; i < 4; i++) {
|
||||
c = (lnum % 10) + '0';
|
||||
x1 -= xinc;
|
||||
lcdDrawChar(x1, y, c, mode);
|
||||
lnum /= 10;
|
||||
if (lnum == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (lnum != 0) {
|
||||
// Error number too big
|
||||
x1 = x;
|
||||
for (i = 0; i < 4; i++) {
|
||||
x1 -= FW;
|
||||
lcdDrawChar(x1, y, '?', mode);
|
||||
}
|
||||
} else {
|
||||
if (val < 0) {
|
||||
val = -val;
|
||||
x1 -= xinc;
|
||||
lcdDrawChar(x1, y, '-', mode);
|
||||
}
|
||||
if (precis)
|
||||
{
|
||||
uint8_t y_temp = y;
|
||||
if (mode & DBLSIZE)
|
||||
y_temp += FH;
|
||||
lcdDrawChar(x, y_temp, '.', (mode & (~DBLSIZE)));
|
||||
x -= (xinc / 2);
|
||||
}
|
||||
for (i = 0; i < precis; i++) {
|
||||
val *= 10;
|
||||
int a = val;
|
||||
c = a + '0';
|
||||
x += xinc;
|
||||
lcdDrawChar(x, y, c, mode);
|
||||
val -= a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Fightmode string printer
|
||||
* \details Decodes the flight mode from Mavlink custom mode enum to a string.
|
||||
* This funtion can handle ArduPilot and ArduCoper code.
|
||||
* To support new autopilot pilots add a STR_MAVLINK_... to the translations,
|
||||
* and if requred a lut (see arduplane for examle) if there are unused modes
|
||||
* in the sequence.
|
||||
*/
|
||||
|
||||
void print_mav_mode(uint8_t x, uint8_t y, uint32_t custom_mode, uint8_t attr) //, const char * mode_text_p)
|
||||
{
|
||||
uint8_t mode = (uint8_t) custom_mode;
|
||||
switch (telemetry_data.type_autopilot) {
|
||||
case MAVLINK_ARDUCOPTER:
|
||||
lcdDrawTextAtIndex(x,y,STR_MAVLINK_AC_MODES,mode,attr);
|
||||
break;
|
||||
case MAVLINK_ARDUPLANE:
|
||||
lcdDrawTextAtIndex(x,y,STR_MAVLINK_AP_MODES,ap_modes_lut[custom_mode],attr);
|
||||
break;
|
||||
default:
|
||||
lcdDrawText (FW, y, PSTR("INV. MAV TYPE"), attr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Menu header
|
||||
* \details Small helper function to print the standard header on the screen.
|
||||
*/
|
||||
void mav_title(const pm_char * s, uint8_t index)
|
||||
{
|
||||
lcdDrawText(0, 0, PSTR("MAVLINK"), INVERS);
|
||||
lcdDrawText(10 * FW, 0, s);
|
||||
drawScreenIndex(index, MAX_MAVLINK_MENU, INVERS);
|
||||
lcdDrawChar(7 * FW, 0, (mav_heartbeat > 0) ? '*' : ' ');
|
||||
if (telemetry_data.active)
|
||||
lcdDrawChar(8 * FW, 0, 'A', BLINK);
|
||||
}
|
||||
|
||||
/*! \brief Global info menu
|
||||
* \details Quick status overview menu. The menu should contain current mode,
|
||||
* armed | disarmed, battery status and RSSI info. Menu must be clean and
|
||||
* readable with a quick glance.
|
||||
* \todo Make menu as described as above.
|
||||
*/
|
||||
void menuTelemetryMavlinkInfos(void) {
|
||||
|
||||
mav_title(STR_MAVLINK_INFOS, MAVLINK_menu);
|
||||
|
||||
uint8_t x1, x2, xnum, y;
|
||||
x1 = FW;
|
||||
x2 = 7 * FW;
|
||||
xnum = x2 + 5 * FWNUM;
|
||||
y = FH;
|
||||
/*
|
||||
char * ptr = mav_statustext;
|
||||
for (uint8_t j = 0; j < LEN_STATUSTEXT; j++) {
|
||||
if (*ptr == 0) {
|
||||
lcdDrawChar(x1, y, ' ');
|
||||
} else {
|
||||
lcdDrawChar(x1, y, *ptr++);
|
||||
}
|
||||
x1 += FW;
|
||||
}
|
||||
x1 = FW;
|
||||
y += FH;
|
||||
*/
|
||||
if (telemetry_data.status) {
|
||||
|
||||
lcdDrawSizedText(x1, y, STR_MAVLINK_MODE, 4, 0);
|
||||
if (telemetry_data.active)
|
||||
lcdDrawSizedText(x2, y, PSTR("A"), 1, 0);
|
||||
lcdDrawNumber(xnum, y, telemetry_data.mode, 0);
|
||||
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, PSTR("BATT"));
|
||||
lcdDrawNumber(xnum, y, telemetry_data.vbat, PREC1, 5);
|
||||
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, PSTR("DROP"));
|
||||
lcdDrawNumber(xnum, y, telemetry_data.packet_drop, 0);
|
||||
/* y += FH;
|
||||
lcdDrawText(x1, y, PSTR("FIX"));
|
||||
lcdDrawNumber(xnum, y, telemetry_data.packet_fixed, 0);
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, PSTR("MAV Comp"));
|
||||
lcdDrawNumber(xnum, y, telemetry_data.mav_compid, 0);
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, PSTR("MAV Sys"));
|
||||
lcdDrawNumber(xnum, y, telemetry_data.mav_sysid, 0);
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, PSTR("Rad Comp"));
|
||||
lcdDrawNumber(xnum, y, telemetry_data.radio_compid, 0);
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, PSTR("Rad Sys"));
|
||||
lcdDrawNumber(xnum, y, telemetry_data.radio_sysid, 0);
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Flight mode menu
|
||||
* \details Clear display of current flight mode.
|
||||
* \todo Add functionality to change flight mode.
|
||||
*/
|
||||
void menuTelemetryMavlinkFlightMode(void) {
|
||||
|
||||
mav_title(STR_MAVLINK_MODE, MAVLINK_menu);
|
||||
|
||||
uint8_t x, y;
|
||||
x = 0;
|
||||
y = FH;
|
||||
|
||||
lcdDrawText(x, y, STR_MAVLINK_CUR_MODE);
|
||||
y += FH;
|
||||
print_mav_mode(FW, y, telemetry_data.custom_mode, DBLSIZE);
|
||||
y += 2 * FH;
|
||||
|
||||
char * ptr = mav_statustext;
|
||||
for (uint8_t j = 0; j < LEN_STATUSTEXT; j++) {
|
||||
if (*ptr == 0) {
|
||||
lcdDrawChar(x, y, ' ');
|
||||
} else {
|
||||
lcdDrawChar(x, y, *ptr++);
|
||||
}
|
||||
x += FW;
|
||||
}
|
||||
y += FH;
|
||||
x = 0;
|
||||
|
||||
if (telemetry_data.active)
|
||||
lcdDrawText (FW, y, STR_MAVLINK_ARMED, DBLSIZE);
|
||||
}
|
||||
|
||||
/*! \brief Batterystatus dislplay
|
||||
* \details Shows flight batery status.
|
||||
* Also RC and PC RSSI are in this menu.
|
||||
*/
|
||||
void menuTelemetryMavlinkBattery(void) {
|
||||
|
||||
mav_title(STR_MAVLINK_BAT_MENU_TITLE, MAVLINK_menu);
|
||||
|
||||
uint8_t x, y, ynum;
|
||||
x = 7 * FWNUM;
|
||||
// x = xnum + 0 * FW;
|
||||
ynum = 2 * FH;
|
||||
y = 3 * FH;
|
||||
|
||||
lcdDrawText(0, 1*FH, STR_MAVLINK_BATTERY_LABEL);
|
||||
|
||||
lcdDrawNumber(x, ynum, telemetry_data.vbat, (DBLSIZE | PREC1 | UNSIGN));
|
||||
lcdDrawText(x, y, PSTR("V"));
|
||||
x += 4 * (2 * FWNUM);
|
||||
lcdDrawNumber(x, ynum, telemetry_data.ibat, (DBLSIZE | PREC1 | UNSIGN));
|
||||
lcdDrawText(x, y, PSTR("A"));
|
||||
x += 4 * (2 * FWNUM);
|
||||
lcdDrawNumber(x, ynum, telemetry_data.rem_bat, (DBLSIZE | UNSIGN));
|
||||
lcdDrawText(x, y, PSTR("%"));
|
||||
y += FH;
|
||||
ynum += 3 * FH;
|
||||
|
||||
x = 0;
|
||||
lcdDrawText(x, y, STR_MAVLINK_RC_RSSI_LABEL);
|
||||
lcdDrawNumber(x + 7 * FWNUM, ynum, telemetry_data.rc_rssi, (DBLSIZE | UNSIGN));
|
||||
lcdDrawText(x + 7 * FWNUM, ynum + FH, PSTR("%"));
|
||||
if (g_model.mavlink.pc_rssi_en)
|
||||
{
|
||||
x += 8 * (2 * FWNUM);
|
||||
lcdDrawText(x, y, STR_MAVLINK_PC_RSSI_LABEL);
|
||||
lcdDrawNumber(x + 7 * FWNUM, ynum, telemetry_data.pc_rssi, (DBLSIZE));
|
||||
lcdDrawText(x + 7 * FWNUM, ynum + FH, PSTR("%"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*! \brief Navigation dislplay
|
||||
* \details Shows Navigation telemetry.
|
||||
* Altitude in this menu is the relative (to the home location) altitude. This
|
||||
* is the same altitude used by the waypoints.
|
||||
* \todo Add a similar menu to fly back to the home location.
|
||||
*/
|
||||
void menuTelemetryMavlinkNavigation(void) {
|
||||
|
||||
mav_title(STR_MAVLINK_NAV_MENU_TITLE, MAVLINK_menu);
|
||||
|
||||
uint8_t x, y, ynum;
|
||||
x = 7 * FWNUM;
|
||||
// x = xnum + 0 * FW;
|
||||
ynum = 2 * FH;
|
||||
y = FH;
|
||||
|
||||
|
||||
x = 0;
|
||||
lcdDrawText(x, y, STR_MAVLINK_COURSE);
|
||||
lcdDrawNumber(x + 7 * FWNUM, ynum, telemetry_data.course, (DBLSIZE | UNSIGN));
|
||||
lcdDrawText(x + 7 * FWNUM, ynum, PSTR("o"));
|
||||
x += 8 * (2 * FWNUM);
|
||||
lcdDrawText(x, y, STR_MAVLINK_HEADING);
|
||||
lcdDrawNumber(x + 7 * FWNUM, ynum, telemetry_data.heading, (DBLSIZE | UNSIGN));
|
||||
lcdDrawText(x + 7 * FWNUM, ynum, PSTR("o"));
|
||||
y += 3 * FH;
|
||||
ynum += 3 * FH;
|
||||
|
||||
x = 0;
|
||||
lcdDrawText(x, y, STR_MAVLINK_BEARING);
|
||||
lcdDrawNumber(x + 7 * FWNUM, ynum, telemetry_data.bearing, (DBLSIZE | UNSIGN));
|
||||
lcdDrawText(x + 7 * FWNUM, ynum, PSTR("o"));
|
||||
x += 8 * (2 * FWNUM);
|
||||
lcdDrawText(x, y, STR_MAVLINK_ALTITUDE);
|
||||
lcd_outdezFloat(x + 4 * FWNUM - 1, ynum, telemetry_data.loc_current.rel_alt, 1, (DBLSIZE));
|
||||
lcdDrawText(x + 7 * FWNUM, ynum + FH, PSTR("m"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*! \brief GPS information menu
|
||||
* \details Menu gives a lot of info from the gps like fix type, position,
|
||||
* attitude, heading and velocity. Text is small and the user must focus to
|
||||
* read it.
|
||||
* \todo Text is small. Should we do something about this or leaf it like this.
|
||||
* I don't think will be used much when a user is concentrated on flying.
|
||||
*/
|
||||
void menuTelemetryMavlinkGPS(void) {
|
||||
mav_title(STR_MAVLINK_GPS, MAVLINK_menu);
|
||||
|
||||
uint8_t x1, x2, xnum, xnum2, y;
|
||||
x1 = FW;
|
||||
x2 = x1 + 12 * FW;
|
||||
xnum = 7 * FW + 3 * FWNUM;
|
||||
xnum2 = xnum + 11 * FWNUM;
|
||||
y = FH;
|
||||
|
||||
lcdDrawSizedText(x1, y, STR_MAVLINK_GPS, 3, 0);
|
||||
if (telemetry_data.fix_type < 2) {
|
||||
lcdDrawSizedText(xnum, y, STR_MAVLINK_NO_FIX, 6, 0);
|
||||
} else {
|
||||
lcdDrawNumber(xnum, y, telemetry_data.fix_type, 0, 3);
|
||||
lcdDrawText(xnum, y, PSTR("D"));
|
||||
}
|
||||
lcdDrawText(x2, y, STR_MAVLINK_SAT);
|
||||
lcdDrawNumber(xnum2, y, telemetry_data.satellites_visible, 0, 2);
|
||||
|
||||
// if (telemetry_data.fix_type > 0) {
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, STR_MAVLINK_HDOP);
|
||||
lcd_outdezFloat(xnum, y, telemetry_data.eph, 2);
|
||||
|
||||
y += FH;
|
||||
lcdDrawText(x1, y, STR_MAVLINK_LAT);
|
||||
lcd_outdezFloat(xnum, y, telemetry_data.loc_current.lat, 2);
|
||||
|
||||
lcdDrawSizedText(x2, y, STR_MAVLINK_LON, 3, 0);
|
||||
lcd_outdezFloat(xnum2, y, telemetry_data.loc_current.lon, 2);
|
||||
|
||||
y += FH;
|
||||
lcdDrawSizedText(x1, y, STR_MAVLINK_ALTITUDE, 3, 0);
|
||||
lcdDrawNumber(xnum, y, telemetry_data.loc_current.gps_alt, 0);
|
||||
|
||||
y += FH;
|
||||
lcdDrawSizedText(x1, y, STR_MAVLINK_COURSE, 6, 0);
|
||||
lcd_outdezFloat(xnum, y, telemetry_data.course, 2);
|
||||
|
||||
y += FH;
|
||||
lcdDrawSizedText(x1, y, PSTR("V"), 1, 0);
|
||||
lcdDrawNumber(xnum, y, telemetry_data.v, 0);
|
||||
//}
|
||||
}
|
||||
|
||||
#ifdef DUMP_RX_TX
|
||||
//! \brief Display one byte as hex.
|
||||
void lcd_outhex2(uint8_t x, uint8_t y, uint8_t val) {
|
||||
x += FWNUM * 2;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
x -= FWNUM;
|
||||
char c = val & 0xf;
|
||||
c = c > 9 ? c + 'A' - 10 : c + '0';
|
||||
lcdDrawChar(x, y, c, c >= 'A' ? CONDENSED : 0);
|
||||
val >>= 4;
|
||||
}
|
||||
}
|
||||
|
||||
//! \brief Hex dump of the current mavlink message.
|
||||
void menuTelemetryMavlinkDump(event_t event) {
|
||||
uint8_t x = 0;
|
||||
uint8_t y = FH;
|
||||
uint16_t count = 0;
|
||||
uint16_t bufferLen = 0;
|
||||
uint8_t *ptr = NULL;
|
||||
switch (MAVLINK_menu) {
|
||||
case MENU_DUMP_RX:
|
||||
mav_dump_rx = 1;
|
||||
mav_title(PSTR("RX"), MAVLINK_menu);
|
||||
bufferLen = mavlinkRxBufferCount;
|
||||
ptr = mavlinkRxBuffer;
|
||||
break;
|
||||
|
||||
case MENU_DUMP_TX:
|
||||
mav_title(PSTR("TX"), MAVLINK_menu);
|
||||
bufferLen = serialTxBufferCount;
|
||||
ptr = ptrTxISR;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
for (uint16_t var = 0; var < bufferLen; var++) {
|
||||
uint8_t byte = *ptr++;
|
||||
lcd_outhex2(x, y, byte);
|
||||
x += 2 * FW;
|
||||
count++;
|
||||
if (count > 8) {
|
||||
count = 0;
|
||||
x = 0;
|
||||
y += FH;
|
||||
if (y == (6 * FH))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*! \brief Mavlink General setup menu.
|
||||
* \details Setup menu for generic mavlink settings.
|
||||
* Current menu items
|
||||
* - RC RSSI scale item. Used to adjust the scale of the RSSI indicator to match
|
||||
* the actual rssi value
|
||||
* - PC RSSI enable item. Can be used to dissable PC RSSI display if not used.
|
||||
* This funcion is called from the model setup menus, not directly by the
|
||||
* telemetry menus
|
||||
*/
|
||||
void menuModelTelemetryMavlink(event_t event) {
|
||||
|
||||
MENU(STR_MAVMENUSETUP_TITLE, menuTabModel, MENU_MODEL_TELEMETRY_MAVLINK, ITEM_MAVLINK_MAX + 1, {0, 0, 1/*to force edit mode*/});
|
||||
|
||||
uint8_t sub = menuVerticalPosition - 1;
|
||||
|
||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||
uint8_t y = 1 + 1*FH + i*FH;
|
||||
uint8_t k = i+menuVerticalOffset;
|
||||
uint8_t blink = ((s_editMode>0) ? BLINK|INVERS : INVERS);
|
||||
uint8_t attr = (sub == k ? blink : 0);
|
||||
switch(k) {
|
||||
case ITEM_MAVLINK_RC_RSSI_SCALE:
|
||||
lcdDrawTextAlignedLeft(y, STR_MAVLINK_RC_RSSI_SCALE_LABEL);
|
||||
lcdDrawNumber(VIEW_MAVLINK_2ND_COLUMN, y, (25 + g_model.mavlink.rc_rssi_scale * 5), attr|LEFT);
|
||||
lcdDrawChar(lcdLastRightPos, y, '%');
|
||||
if (attr) CHECK_INCDEC_MODELVAR(event, g_model.mavlink.rc_rssi_scale, 0, 15);
|
||||
break;
|
||||
case ITEM_MAVLINK_PC_RSSI_EN:
|
||||
g_model.mavlink.pc_rssi_en = editCheckBox(g_model.mavlink.pc_rssi_en,
|
||||
VIEW_MAVLINK_2ND_COLUMN,
|
||||
y,
|
||||
STR_MAVLINK_PC_RSSI_EN_LABEL,
|
||||
attr,
|
||||
event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,78 +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.
|
||||
*/
|
||||
|
||||
/*! \file view_mavlink.h
|
||||
* Mavlink menu include file
|
||||
*/
|
||||
|
||||
#ifndef _VIEW_MAVLINK_H_
|
||||
#define _VIEW_MAVLINK_H_
|
||||
|
||||
#include "opentx.h"
|
||||
#include "telemetry/mavlink.h"
|
||||
|
||||
#define APSIZE (BSS | DBLSIZE)
|
||||
|
||||
void menuViewTelemetryMavlink(event_t event);
|
||||
void lcd_outdezFloat(uint8_t x, uint8_t y, float val, uint8_t precis, uint8_t mode = 0);
|
||||
void mav_title(const pm_char * s, uint8_t index);
|
||||
void menuTelemetryMavlinkInfos(void);
|
||||
void menuTelemetryMavlinkFlightMode(void);
|
||||
void menuTelemetryMavlinkBattery(void);
|
||||
void menuTelemetryMavlinkNavigation(void);
|
||||
void menuTelemetryMavlinkGPS(void);
|
||||
#ifdef DUMP_RX_TX
|
||||
void lcd_outhex2(uint8_t x, uint8_t y, uint8_t val);
|
||||
void menuTelemetryMavlinkDump(event_t event);
|
||||
#endif
|
||||
|
||||
/*! \brief Mavlink menu enumerator
|
||||
* \details Used to create a readable case statement for the
|
||||
* \link menuTelemetryMavlink menuTelemetryMavlink \endlink funtion.
|
||||
*/
|
||||
enum mavlink_menu_ {
|
||||
MENU_INFO = 0, //
|
||||
MENU_MODE,
|
||||
MENU_BATT,
|
||||
MENU_NAV,
|
||||
MENU_GPS, //
|
||||
#ifdef DUMP_RX_TX
|
||||
MENU_DUMP_RX, //
|
||||
MENU_DUMP_TX, //
|
||||
#endif
|
||||
MAX_MAVLINK_MENU
|
||||
};
|
||||
|
||||
//! \brief Pointer array to mavlink settings menus.
|
||||
const MenuHandlerFunc menuTabMav[] PROGMEM = {
|
||||
menuViewTelemetryMavlink
|
||||
};
|
||||
|
||||
//! \brief Mavlink setup menu configuration items list.
|
||||
enum menuMavlinkSetupItems {
|
||||
ITEM_MAVLINK_RC_RSSI_SCALE,
|
||||
ITEM_MAVLINK_PC_RSSI_EN,
|
||||
ITEM_MAVLINK_MAX
|
||||
};
|
||||
|
||||
//! \brief Menu index varible, initialized on info menu.
|
||||
extern uint8_t MAVLINK_menu;
|
||||
|
||||
#endif // _VIEW_MAVLINK_H_
|
||||
@@ -28,7 +28,7 @@ const MenuHandlerFunc menuTabModel[] = {
|
||||
menuModelExposAll,
|
||||
menuModelMixAll,
|
||||
menuModelLimits,
|
||||
CASE_CURVES(menuModelCurvesAll)
|
||||
menuModelCurvesAll,
|
||||
#if defined(GVARS) && defined(FLIGHT_MODES)
|
||||
CASE_GVARS(menuModelGVars)
|
||||
#endif
|
||||
@@ -38,7 +38,6 @@ const MenuHandlerFunc menuTabModel[] = {
|
||||
menuModelCustomScripts,
|
||||
#endif
|
||||
CASE_FRSKY(menuModelTelemetryFrsky)
|
||||
CASE_MAVLINK(menuModelTelemetryMavlink)
|
||||
menuModelDisplay
|
||||
};
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ enum MenuModelIndexes {
|
||||
MENU_MODEL_INPUTS,
|
||||
MENU_MODEL_MIXES,
|
||||
MENU_MODEL_OUTPUTS,
|
||||
CASE_CURVES(MENU_MODEL_CURVES)
|
||||
MENU_MODEL_CURVES,
|
||||
CASE_GVARS(MENU_MODEL_GVARS)
|
||||
MENU_MODEL_LOGICAL_SWITCHES,
|
||||
MENU_MODEL_SPECIAL_FUNCTIONS,
|
||||
@@ -101,7 +101,6 @@ enum MenuModelIndexes {
|
||||
MENU_MODEL_CUSTOM_SCRIPTS,
|
||||
#endif
|
||||
MENU_MODEL_TELEMETRY_FRSKY,
|
||||
CASE_MAVLINK(MENU_MODEL_TELEMETRY_MAVLINK)
|
||||
MENU_MODEL_DISPLAY,
|
||||
MENU_MODEL_PAGES_COUNT
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@ enum ExposFields {
|
||||
EXPO_FIELD_SCALE,
|
||||
EXPO_FIELD_WEIGHT,
|
||||
EXPO_FIELD_OFFSET,
|
||||
CASE_CURVES(EXPO_FIELD_CURVE)
|
||||
EXPO_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(EXPO_FIELD_FLIGHT_MODES)
|
||||
EXPO_FIELD_SWITCH,
|
||||
EXPO_FIELD_SIDE,
|
||||
@@ -80,7 +80,7 @@ void menuModelExpoOne(event_t event)
|
||||
drawSource(PSIZE(TR_MENUINPUTS)*FW+FW, 0, MIXSRC_FIRST_INPUT+ed->chn, 0);
|
||||
lcdDrawFilledRect(0, 0, LCD_W, FH, SOLID, FILL_WHITE|GREY_DEFAULT);
|
||||
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {0, 0, 0, ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW, 0, 0, CASE_CURVES(CURVE_ROWS) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {0, 0, 0, ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW, 0, 0, CURVE_ROWS, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
|
||||
SET_SCROLLBAR_X(EXPO_ONE_2ND_COLUMN+10*FW);
|
||||
|
||||
@@ -128,12 +128,10 @@ void menuModelExpoOne(event_t event)
|
||||
ed->offset = GVAR_MENU_ITEM(EXPO_ONE_2ND_COLUMN, y, ed->offset, -100, 100, LEFT|attr, 0, event);
|
||||
break;
|
||||
|
||||
#if defined(CURVES)
|
||||
case EXPO_FIELD_CURVE:
|
||||
lcdDrawTextAlignedLeft(y, STR_CURVE);
|
||||
editCurveRef(EXPO_ONE_2ND_COLUMN, y, ed->curve, event, attr);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
case EXPO_FIELD_FLIGHT_MODES:
|
||||
|
||||
@@ -26,7 +26,7 @@ enum MixFields {
|
||||
MIX_FIELD_WEIGHT,
|
||||
MIX_FIELD_OFFSET,
|
||||
MIX_FIELD_TRIM,
|
||||
CASE_CURVES(MIX_FIELD_CURVE)
|
||||
MIX_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(MIX_FIELD_FLIGHT_MODE)
|
||||
MIX_FIELD_SWITCH,
|
||||
MIX_FIELD_WARNING,
|
||||
@@ -94,7 +94,7 @@ void menuModelMixOne(event_t event)
|
||||
putsChn(PSIZE(TR_MIXER)*FW+FW, 0, md2->destCh+1,0);
|
||||
lcdDrawFilledRect(0, 0, LCD_W, FH, SOLID, FILL_WHITE|GREY_DEFAULT);
|
||||
|
||||
SUBMENU(STR_MIXER, MIX_FIELD_COUNT, {0, 0, 0, 0, 0, CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU(STR_MIXER, MIX_FIELD_COUNT, {0, 0, 0, 0, 0, 1, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
|
||||
int8_t sub = menuVerticalPosition;
|
||||
int8_t editMode = s_editMode;
|
||||
@@ -138,12 +138,10 @@ void menuModelMixOne(event_t event)
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(CURVES)
|
||||
case MIX_FIELD_CURVE:
|
||||
lcdDrawTextAlignedLeft(y, STR_CURVE);
|
||||
editCurveRef(MIXES_2ND_COLUMN, y, md2->curve, event, attr);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
case MIX_FIELD_FLIGHT_MODE:
|
||||
|
||||
@@ -26,9 +26,7 @@ enum LimitsItems {
|
||||
ITEM_LIMITS_MIN,
|
||||
ITEM_LIMITS_MAX,
|
||||
ITEM_LIMITS_DIRECTION,
|
||||
#if defined(CURVES)
|
||||
ITEM_LIMITS_CURVE,
|
||||
#endif
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
ITEM_LIMITS_PPM_CENTER,
|
||||
#endif
|
||||
@@ -208,7 +206,6 @@ void menuModelLimits(event_t event)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(CURVES)
|
||||
case ITEM_LIMITS_CURVE:
|
||||
drawCurveName(LIMITS_CURVE_POS, y, ld->curve, attr);
|
||||
if (attr && event==EVT_KEY_LONG(KEY_ENTER) && ld->curve>0) {
|
||||
@@ -219,7 +216,6 @@ void menuModelLimits(event_t event)
|
||||
CHECK_INCDEC_MODELVAR(event, ld->curve, -MAX_CURVES, +MAX_CURVES);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
case ITEM_LIMITS_PPM_CENTER:
|
||||
|
||||
@@ -86,7 +86,6 @@ enum MenuRadioSetupItems {
|
||||
ITEM_SETUP_LANGUAGE,
|
||||
ITEM_SETUP_IMPERIAL,
|
||||
IF_FAI_CHOICE(ITEM_SETUP_FAI)
|
||||
CASE_MAVLINK(ITEM_MAVLINK_BAUD)
|
||||
ITEM_SETUP_SWITCHES_DELAY,
|
||||
ITEM_SETUP_USB_MODE,
|
||||
ITEM_SETUP_RX_CHANNEL_ORD,
|
||||
@@ -117,7 +116,7 @@ void menuRadioSetup(event_t event)
|
||||
}
|
||||
#endif
|
||||
|
||||
MENU(STR_MENURADIOSETUP, menuTabGeneral, MENU_RADIO_SETUP, ITEM_SETUP_MAX, { 2, 2, 0, 1, LABEL(SOUND), 0, 0, 0, 0, 0, 0, 0, CASE_VARIO(LABEL(VARIO)) CASE_VARIO(0) CASE_VARIO(0) CASE_VARIO(0) CASE_VARIO(0) CASE_HAPTIC(LABEL(HAPTIC)) CASE_HAPTIC(0) CASE_HAPTIC(0) CASE_HAPTIC(0) 0, LABEL(ALARMS), 0, 0, 0, 0, 0,IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, 0, CASE_PCBX9E_PCBX9DP(0) 0, CASE_SPLASH_PARAM(0) CASE_GPS(LABEL(GPS)) CASE_GPS(0) CASE_GPS(0) CASE_GPS(0) CASE_PXX(0) 0, 0, IF_FAI_CHOICE(0) CASE_MAVLINK(0) 0, 0, 0, LABEL(TX_MODE), 0, 1/*to force edit mode*/ });
|
||||
MENU(STR_MENURADIOSETUP, menuTabGeneral, MENU_RADIO_SETUP, ITEM_SETUP_MAX, { 2, 2, 0, 1, LABEL(SOUND), 0, 0, 0, 0, 0, 0, 0, CASE_VARIO(LABEL(VARIO)) CASE_VARIO(0) CASE_VARIO(0) CASE_VARIO(0) CASE_VARIO(0) CASE_HAPTIC(LABEL(HAPTIC)) CASE_HAPTIC(0) CASE_HAPTIC(0) CASE_HAPTIC(0) 0, LABEL(ALARMS), 0, 0, 0, 0, 0,IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, 0, CASE_PCBX9E_PCBX9DP(0) 0, CASE_SPLASH_PARAM(0) CASE_GPS(LABEL(GPS)) CASE_GPS(0) CASE_GPS(0) CASE_GPS(0) CASE_PXX(0) 0, 0, IF_FAI_CHOICE(0) 0, 0, 0, LABEL(TX_MODE), 0, 1/*to force edit mode*/ });
|
||||
|
||||
if (event == EVT_ENTRY) {
|
||||
reusableBuffer.generalSettings.stickMode = g_eeGeneral.stickMode;
|
||||
@@ -466,11 +465,6 @@ void menuRadioSetup(event_t event)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
case ITEM_MAVLINK_BAUD:
|
||||
g_eeGeneral.mavbaud = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUD_LABEL, STR_MAVLINK_BAUDS, g_eeGeneral.mavbaud, 0, 7, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_SETUP_SWITCHES_DELAY:
|
||||
lcdDrawTextAlignedLeft(y, STR_SWITCHES_DELAY);
|
||||
|
||||
@@ -56,4 +56,4 @@ void drawSecondSplash()
|
||||
lcdDrawBitmap(0, 0, splash2_lbm);
|
||||
lcdRefresh();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -27,7 +27,7 @@ const MenuHandlerFunc menuTabModel[] = {
|
||||
menuModelExposAll,
|
||||
menuModelMixAll,
|
||||
menuModelLimits,
|
||||
CASE_CURVES(menuModelCurvesAll)
|
||||
menuModelCurvesAll,
|
||||
#if defined(GVARS) && defined(FLIGHT_MODES)
|
||||
CASE_GVARS(menuModelGVars)
|
||||
#endif
|
||||
@@ -37,7 +37,6 @@ const MenuHandlerFunc menuTabModel[] = {
|
||||
menuModelCustomScripts,
|
||||
#endif
|
||||
CASE_FRSKY(menuModelTelemetryFrsky)
|
||||
CASE_MAVLINK(menuModelTelemetryMavlink)
|
||||
};
|
||||
|
||||
void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlags attr);
|
||||
|
||||
@@ -107,7 +107,7 @@ enum EnumTabModel {
|
||||
MENU_MODEL_INPUTS,
|
||||
MENU_MODEL_MIXES,
|
||||
MENU_MODEL_OUTPUTS,
|
||||
CASE_CURVES(MENU_MODEL_CURVES)
|
||||
MENU_MODEL_CURVES,
|
||||
CASE_GVARS(MENU_MODEL_GVARS)
|
||||
MENU_MODEL_LOGICAL_SWITCHES,
|
||||
MENU_MODEL_SPECIAL_FUNCTIONS,
|
||||
@@ -136,7 +136,7 @@ const uint8_t MODEL_ICONS[] = {
|
||||
ICON_MODEL_INPUTS,
|
||||
ICON_MODEL_MIXER,
|
||||
ICON_MODEL_OUTPUTS,
|
||||
CASE_CURVES(ICON_MODEL_CURVES)
|
||||
ICON_MODEL_CURVES,
|
||||
CASE_GVARS(ICON_MODEL_GVARS)
|
||||
ICON_MODEL_LOGICAL_SWITCHES,
|
||||
ICON_MODEL_SPECIAL_FUNCTIONS,
|
||||
|
||||
@@ -162,7 +162,7 @@ enum ExposFields {
|
||||
EXPO_FIELD_SCALE,
|
||||
EXPO_FIELD_WEIGHT,
|
||||
EXPO_FIELD_OFFSET,
|
||||
CASE_CURVES(EXPO_FIELD_CURVE)
|
||||
EXPO_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(EXPO_FIELD_FLIGHT_MODES)
|
||||
EXPO_FIELD_SWITCH,
|
||||
EXPO_FIELD_SIDE,
|
||||
@@ -176,7 +176,7 @@ bool menuModelExpoOne(event_t event)
|
||||
{
|
||||
ExpoData * ed = expoAddress(s_currIdx);
|
||||
|
||||
SUBMENU_WITH_OPTIONS(STR_MENUINPUTS, ICON_MODEL_INPUTS, EXPO_FIELD_MAX, OPTION_MENU_NO_FOOTER|OPTION_MENU_NO_SCROLLBAR, { 0, 0, 0, (ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW), 0, 0, CASE_CURVES(CURVE_ROWS) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
SUBMENU_WITH_OPTIONS(STR_MENUINPUTS, ICON_MODEL_INPUTS, EXPO_FIELD_MAX, OPTION_MENU_NO_FOOTER|OPTION_MENU_NO_SCROLLBAR, { 0, 0, 0, (ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW), 0, 0, CURVE_ROWS, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
lcdDrawSizedText(50, 3+FH, g_model.inputNames[ed->chn], LEN_INPUT_NAME, ZCHAR|MENU_TITLE_COLOR);
|
||||
lcdDrawSolidFilledRect(0, MENU_FOOTER_TOP, 230, MENU_FOOTER_HEIGHT, HEADER_BGCOLOR);
|
||||
|
||||
@@ -267,12 +267,10 @@ bool menuModelExpoOne(event_t event)
|
||||
ed->offset = GVAR_MENU_ITEM(EXPO_ONE_2ND_COLUMN, y, ed->offset, -100, 100, LEFT|attr, 0, event);
|
||||
break;
|
||||
|
||||
#if defined(CURVES)
|
||||
case EXPO_FIELD_CURVE:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_CURVE);
|
||||
editCurveRef(EXPO_ONE_2ND_COLUMN, y, ed->curve, event, attr);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
case EXPO_FIELD_FLIGHT_MODES:
|
||||
|
||||
@@ -152,7 +152,7 @@ enum MixFields {
|
||||
MIX_FIELD_WEIGHT,
|
||||
MIX_FIELD_OFFSET,
|
||||
MIX_FIELD_TRIM,
|
||||
CASE_CURVES(MIX_FIELD_CURVE)
|
||||
MIX_FIELD_CURVE,
|
||||
CASE_FLIGHT_MODES(MIX_FIELD_FLIGHT_MODE)
|
||||
MIX_FIELD_SWITCH,
|
||||
MIX_FIELD_WARNING,
|
||||
@@ -176,7 +176,7 @@ bool menuModelMixOne(event_t event)
|
||||
{
|
||||
MixData * md2 = mixAddress(s_currIdx) ;
|
||||
|
||||
SUBMENU_WITH_OPTIONS(STR_MIXER, ICON_MODEL_MIXER, MIX_FIELD_COUNT, OPTION_MENU_NO_SCROLLBAR, { 0, 0, 0, 0, 0, CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/ });
|
||||
SUBMENU_WITH_OPTIONS(STR_MIXER, ICON_MODEL_MIXER, MIX_FIELD_COUNT, OPTION_MENU_NO_SCROLLBAR, { 0, 0, 0, 0, 0, 1, CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/ });
|
||||
putsChn(50, 3+FH, md2->destCh+1, MENU_TITLE_COLOR);
|
||||
displayMixStatus(md2->destCh);
|
||||
|
||||
@@ -228,12 +228,10 @@ bool menuModelMixOne(event_t event)
|
||||
drawCheckBox(MIXES_2ND_COLUMN, y, !md2->carryTrim, attr);
|
||||
if (attr) md2->carryTrim = !checkIncDecModel(event, !md2->carryTrim, 0, 1);
|
||||
break;
|
||||
#if defined(CURVES)
|
||||
case MIX_FIELD_CURVE:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_CURVE);
|
||||
editCurveRef(MIXES_2ND_COLUMN, y, md2->curve, event, attr);
|
||||
break;
|
||||
#endif
|
||||
#if defined(FLIGHT_MODES)
|
||||
case MIX_FIELD_FLIGHT_MODE:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_FLMODE);
|
||||
|
||||
@@ -26,9 +26,7 @@ enum LimitsItems {
|
||||
ITEM_LIMITS_MIN,
|
||||
ITEM_LIMITS_MAX,
|
||||
ITEM_LIMITS_DIRECTION,
|
||||
#if defined(CURVES)
|
||||
ITEM_LIMITS_CURVE,
|
||||
#endif
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
ITEM_LIMITS_PPM_CENTER,
|
||||
#endif
|
||||
@@ -197,7 +195,6 @@ bool menuModelLimits(event_t event)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(CURVES)
|
||||
case ITEM_LIMITS_CURVE:
|
||||
drawCurveName(LIMITS_CURVE_POS, y, ld->curve, attr);
|
||||
if (attr && event==EVT_KEY_LONG(KEY_ENTER) && ld->curve>0) {
|
||||
@@ -208,7 +205,6 @@ bool menuModelLimits(event_t event)
|
||||
CHECK_INCDEC_MODELVAR(event, ld->curve, -MAX_CURVES, +MAX_CURVES);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
case ITEM_LIMITS_PPM_CENTER:
|
||||
|
||||
@@ -74,7 +74,6 @@ enum menuRadioSetupItems {
|
||||
ITEM_SETUP_LANGUAGE,
|
||||
ITEM_SETUP_IMPERIAL,
|
||||
IF_FAI_CHOICE(ITEM_SETUP_FAI)
|
||||
// CASE_MAVLINK(ITEM_MAVLINK_BAUD)
|
||||
ITEM_SETUP_SWITCHES_DELAY,
|
||||
ITEM_SETUP_USB_MODE,
|
||||
ITEM_SETUP_RX_CHANNEL_ORD,
|
||||
@@ -442,12 +441,6 @@ bool menuRadioSetup(event_t event)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
case ITEM_MAVLINK_BAUD:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_MAVLINK_BAUD_LABEL);
|
||||
g_eeGeneral.mavbaud = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUDS, g_eeGeneral.mavbaud, 0, 7, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_SETUP_SWITCHES_DELAY:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SWITCHES_DELAY);
|
||||
|
||||
@@ -23,17 +23,10 @@ set(GUI_SRC
|
||||
)
|
||||
|
||||
if(GUI_DIR STREQUAL 128x64)
|
||||
if (ARCH STREQUAL ARM)
|
||||
set(GUI_SRC
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
model_outputs_arm.cpp
|
||||
)
|
||||
else()
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
model_outputs_avr.cpp
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
|
||||
@@ -92,4 +92,4 @@ void runFatalErrorScreen(const char * message)
|
||||
SIMU_SLEEP_NORET(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,26 +8,21 @@ if(HELI)
|
||||
set(GUI_SRC ${GUI_SRC} ../common/stdlcd/model_heli.cpp)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL ARM)
|
||||
add_definitions(-DGRAPHICS)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_inputs.cpp
|
||||
../common/stdlcd/model_mixes.cpp
|
||||
../common/stdlcd/view_text.cpp
|
||||
)
|
||||
set(CURVE_EDIT_SRC model_curve_edit.cpp)
|
||||
else()
|
||||
set(CURVE_EDIT_SRC model_curve_simple_edit.cpp)
|
||||
endif()
|
||||
add_definitions(-DGRAPHICS)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_inputs.cpp
|
||||
../common/stdlcd/model_mixes.cpp
|
||||
../common/stdlcd/view_text.cpp
|
||||
)
|
||||
set(CURVE_EDIT_SRC )
|
||||
|
||||
if(CURVES)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_curves.cpp
|
||||
${CURVE_EDIT_SRC}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_curves.cpp
|
||||
model_curve_edit.cpp
|
||||
)
|
||||
|
||||
if(SDCARD)
|
||||
set(GUI_SRC
|
||||
|
||||
@@ -73,4 +73,4 @@ const char * writeScreenshot()
|
||||
f_close(&bmpFile);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -32,7 +32,7 @@ int16_t trims[NUM_TRIMS] = {0};
|
||||
int32_t chans[MAX_OUTPUT_CHANNELS] = {0};
|
||||
BeepANACenter bpanaCenter = 0;
|
||||
|
||||
int24_t act [MAX_MIXERS] = {0};
|
||||
int32_t act [MAX_MIXERS] = {0};
|
||||
SwOn swOn [MAX_MIXERS]; // TODO better name later...
|
||||
|
||||
uint8_t mixWarning;
|
||||
@@ -244,7 +244,6 @@ int16_t applyLimits(uint8_t channel, int32_t value)
|
||||
{
|
||||
LimitData * lim = limitAddress(channel);
|
||||
|
||||
#if defined(CPUARM) && defined(CURVES)
|
||||
if (lim->curve) {
|
||||
// TODO we loose precision here, applyCustomCurve could work with int32_t on ARM boards...
|
||||
if (lim->curve > 0)
|
||||
@@ -252,7 +251,6 @@ int16_t applyLimits(uint8_t channel, int32_t value)
|
||||
else
|
||||
value = 256 * applyCustomCurve(-value/256, -lim->curve-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
int16_t ofs = LIMIT_OFS_RESX(lim);
|
||||
int16_t lim_p = LIMIT_MAX_RESX(lim);
|
||||
|
||||
@@ -347,12 +347,6 @@ void defaultInputs()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TEMPLATES)
|
||||
inline void applyDefaultTemplate()
|
||||
{
|
||||
applyTemplate(TMPL_SIMPLE_4CH); // calls storageDirty internally
|
||||
}
|
||||
#else
|
||||
void applyDefaultTemplate()
|
||||
{
|
||||
#if defined(VIRTUAL_INPUTS)
|
||||
@@ -372,7 +366,6 @@ void applyDefaultTemplate()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM) && defined(EEPROM)
|
||||
void checkModelIdUnique(uint8_t index, uint8_t module)
|
||||
@@ -505,10 +498,6 @@ void modelDefault(uint8_t id)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
g_model.mavlink.rc_rssi_scale = 15;
|
||||
g_model.mavlink.pc_rssi_en = 1;
|
||||
#endif
|
||||
|
||||
#if !defined(EEPROM)
|
||||
strcpy(g_model.header.name, "\015\361\374\373\364");
|
||||
@@ -2184,12 +2173,6 @@ int main()
|
||||
// important to disable it before commencing with system initialisation (or
|
||||
// we could put a bunch more wdt_reset()s in. But I don't like that approach
|
||||
// during boot up.)
|
||||
#if defined(CPUM2560) || defined(CPUM2561)
|
||||
uint8_t mcusr = MCUSR; // save the WDT (etc) flags
|
||||
MCUSR = 0; // must be zeroed before disabling the WDT
|
||||
MCUCR = 0x80 ; // Disable JTAG port that can interfere with POT3
|
||||
MCUCR = 0x80 ; // Must be done twice
|
||||
#endif
|
||||
#if defined(PCBTARANIS)
|
||||
g_eeGeneral.contrast = LCD_CONTRAST_DEFAULT;
|
||||
#endif
|
||||
@@ -2230,21 +2213,9 @@ int main()
|
||||
DSM2_Init();
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_JETI)
|
||||
JETI_Init();
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_ARDUPILOT)
|
||||
ARDUPILOT_Init();
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_NMEA)
|
||||
NMEA_Init();
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
MAVLINK_Init();
|
||||
#endif
|
||||
|
||||
#if defined(MENU_ROTARY_SW)
|
||||
init_rotary_sw();
|
||||
|
||||
+1
-32
@@ -45,9 +45,6 @@
|
||||
#define CASE_PCBSKY9X(x)
|
||||
#endif
|
||||
|
||||
#define CASE_CPUARM(x) x,
|
||||
#define IF_CPUARM(x) x
|
||||
|
||||
#if defined(STM32)
|
||||
#define CASE_STM32(x) x,
|
||||
#else
|
||||
@@ -66,8 +63,6 @@
|
||||
#define CASE_LUA(x)
|
||||
#endif
|
||||
|
||||
#define CASE_PERSISTENT_TIMERS(x) x,
|
||||
|
||||
#if defined(RTCLOCK)
|
||||
#define CASE_RTCLOCK(x) x,
|
||||
#else
|
||||
@@ -128,12 +123,6 @@
|
||||
#define CASE_FRSKY(x)
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define CASE_MAVLINK(x) x,
|
||||
#else
|
||||
#define CASE_MAVLINK(x)
|
||||
#endif
|
||||
|
||||
#if defined(PXX)
|
||||
#define CASE_PXX(x) x,
|
||||
#else
|
||||
@@ -158,24 +147,12 @@
|
||||
#define CASE_HELI(x)
|
||||
#endif
|
||||
|
||||
#if defined(TEMPLATES)
|
||||
#define CASE_TEMPLATES(x) x,
|
||||
#else
|
||||
#define CASE_TEMPLATES(x)
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
#define CASE_FLIGHT_MODES(x) x,
|
||||
#else
|
||||
#define CASE_FLIGHT_MODES(x)
|
||||
#endif
|
||||
|
||||
#if defined(CURVES)
|
||||
#define CASE_CURVES(x) x,
|
||||
#else
|
||||
#define CASE_CURVES(x)
|
||||
#endif
|
||||
|
||||
#if defined(GVARS)
|
||||
#define CASE_GVARS(x) x,
|
||||
#else
|
||||
@@ -460,9 +437,6 @@ typedef struct {
|
||||
#include "strhelpers.h"
|
||||
#include "gui.h"
|
||||
|
||||
#if defined(TEMPLATES)
|
||||
#include "templates.h"
|
||||
#endif
|
||||
|
||||
#if !defined(SIMU)
|
||||
#define assert(x)
|
||||
@@ -978,10 +952,6 @@ struct point_t
|
||||
coord_t y;
|
||||
};
|
||||
point_t getPoint(uint8_t i);
|
||||
#if !defined(CURVES)
|
||||
#define LOAD_MODEL_CURVES()
|
||||
#define applyCurve(x, idx) (x)
|
||||
#else
|
||||
typedef CurveData CurveInfo;
|
||||
void loadCurves();
|
||||
#define LOAD_MODEL_CURVES() loadCurves()
|
||||
@@ -992,7 +962,6 @@ int applyCurrentCurve(int x);
|
||||
int8_t getCurveX(int noPoints, int point);
|
||||
void resetCustomCurveX(int8_t * points, int noPoints);
|
||||
bool moveCurve(uint8_t index, int8_t shift); // TODO bool?
|
||||
#endif
|
||||
|
||||
#define APPLY_EXPOS_EXTRA_PARAMS_INC , uint8_t ovwrIdx=0, int16_t ovwrValue=0
|
||||
#define APPLY_EXPOS_EXTRA_PARAMS , uint8_t ovwrIdx, int16_t ovwrValue
|
||||
@@ -1053,7 +1022,7 @@ PACK(typedef struct {
|
||||
}) SwOn;
|
||||
|
||||
extern SwOn swOn[MAX_MIXERS];
|
||||
extern int24_t act[MAX_MIXERS];
|
||||
extern int32_t act[MAX_MIXERS];
|
||||
|
||||
#if defined(BOLD_FONT)
|
||||
inline bool isExpoActive(uint8_t expo)
|
||||
|
||||
@@ -1,61 +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 _PGMTYPES_H_
|
||||
#define _PGMTYPES_H_
|
||||
|
||||
/* this is workaround for g++ bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734 */
|
||||
#if (((__GNUC__ * 1000) + __GNUC_MINOR__) * 1000 + __GNUC_PATCHLEVEL__) < 4006002
|
||||
# ifdef __cplusplus
|
||||
# undef PROGMEM
|
||||
# define PROGMEM __attribute__(( section(".progmem.data") ))
|
||||
# undef PSTR
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* old (pre 1.8.0) avr-libc does not have progmem macros compatible with new gcc
|
||||
* note: even for old gcc, definition was wrong. Old gcc was just more tolerant. */
|
||||
#if (((__AVR_LIBC_MAJOR__ * 1000) + __AVR_LIBC_MINOR__) * 1000 + __AVR_LIBC_REVISION__) < 1008000
|
||||
# ifndef __PGMSPACE_H_
|
||||
# warning "This file should be included after <avr/pgmspace.h>"
|
||||
# endif
|
||||
# undef PSTR
|
||||
# undef PGM_P
|
||||
# undef PGM_VOID_P
|
||||
# define PGM_P const char *
|
||||
# define PGM_VOID_P const void *
|
||||
#endif
|
||||
|
||||
#ifndef PSTR
|
||||
# define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s);&__c[0];}))
|
||||
#endif
|
||||
|
||||
typedef void pm_void;
|
||||
typedef char pm_char;
|
||||
typedef unsigned char pm_uchar;
|
||||
typedef int8_t pm_int8_t;
|
||||
typedef uint8_t pm_uint8_t;
|
||||
typedef int16_t pm_int16_t;
|
||||
typedef uint16_t pm_uint16_t;
|
||||
typedef int32_t pm_int32_t;
|
||||
typedef uint32_t pm_uint32_t;
|
||||
|
||||
#endif // _PGMTYPES_H_
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,48 +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 _PULSES_AVR_H_
|
||||
#define _PULSES_AVR_H_
|
||||
|
||||
extern uint8_t s_current_protocol[1];
|
||||
extern uint8_t s_pulses_paused;
|
||||
|
||||
extern uint8_t *pulses2MHzRPtr;
|
||||
extern uint8_t *pulses2MHzWPtr;
|
||||
|
||||
extern uint16_t nextMixerEndTime;
|
||||
|
||||
extern uint8_t moduleFlag[NUM_MODULES];
|
||||
|
||||
#define MAX_MIXER_DELTA (50*16) /* 50ms max as an interval between 2 mixer calculations */
|
||||
|
||||
void startPulses();
|
||||
inline bool pulsesStarted() { return s_current_protocol[0] != 255; }
|
||||
inline void pausePulses() { s_pulses_paused = true; }
|
||||
inline void resumePulses() { s_pulses_paused = false; }
|
||||
void setupPulses();
|
||||
void DSM2_Init();
|
||||
void DSM2_Done();
|
||||
|
||||
#define SEND_FAILSAFE_NOW()
|
||||
#define SEND_FAILSAFE_1S()
|
||||
|
||||
#endif // _PULSES_AVR_H_
|
||||
/*eof*/
|
||||
@@ -543,19 +543,15 @@ PACK(typedef struct {
|
||||
PACK(typedef struct {
|
||||
ModelHeader_v216 header;
|
||||
TimerData_v216 timers[2];
|
||||
AVR_FIELD(uint8_t protocol:3)
|
||||
ARM_FIELD(uint8_t telemetryProtocol:3)
|
||||
uint8_t telemetryProtocol:3;
|
||||
uint8_t thrTrim:1; // Enable Throttle Trim
|
||||
AVR_FIELD(int8_t ppmNCH:4)
|
||||
ARM_FIELD(int8_t spare2:4)
|
||||
int8_t spare2:4;
|
||||
int8_t trimInc:3; // Trim Increments
|
||||
uint8_t disableThrottleWarning:1;
|
||||
ARM_FIELD(uint8_t displayChecklist:1)
|
||||
AVR_FIELD(uint8_t pulsePol:1)
|
||||
uint8_t displayChecklist:1;
|
||||
uint8_t extendedLimits:1;
|
||||
uint8_t extendedTrims:1;
|
||||
uint8_t throttleReversed:1;
|
||||
AVR_FIELD(int8_t ppmDelay)
|
||||
BeepANACenter beepANACenter; // 1<<0->A1.. 1<<6->A7
|
||||
MixData_v216 mixData[MAX_MIXERS];
|
||||
LimitData_v216 limitData[MAX_OUTPUT_CHANNELS];
|
||||
@@ -591,14 +587,14 @@ PACK(typedef struct {
|
||||
PACK(typedef struct {
|
||||
ModelHeader header;
|
||||
TimerData_v217 timers[MAX_TIMERS];
|
||||
ARM_FIELD(uint8_t telemetryProtocol:3)
|
||||
uint8_t telemetryProtocol:3;
|
||||
uint8_t thrTrim:1; // Enable Throttle Trim
|
||||
ARM_FIELD(uint8_t noGlobalFunctions:1)
|
||||
ARM_FIELD(uint8_t displayTrims:2)
|
||||
ARM_FIELD(uint8_t ignoreSensorIds:1)
|
||||
uint8_t noGlobalFunctions:1;
|
||||
uint8_t displayTrims:2;
|
||||
uint8_t ignoreSensorIds:1;
|
||||
int8_t trimInc:3; // Trim Increments
|
||||
uint8_t disableThrottleWarning:1;
|
||||
ARM_FIELD(uint8_t displayChecklist:1)
|
||||
uint8_t displayChecklist:1;
|
||||
uint8_t extendedLimits:1;
|
||||
uint8_t extendedTrims:1;
|
||||
uint8_t throttleReversed:1;
|
||||
|
||||
@@ -612,4 +612,4 @@ int32_t fat12Write(const uint8_t * buffer, uint16_t sector, uint16_t count)
|
||||
}
|
||||
#endif
|
||||
return 0 ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,4 +449,4 @@ int32_t getVolume()
|
||||
return -1; // TODO
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -107,4 +107,4 @@ uint8_t gpsGetByte(uint8_t * byte)
|
||||
}
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,19 +306,6 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||
SWITCH_CASE(4, PIOA->PIO_PDSR, 1<<2)
|
||||
SWITCH_CASE(5, PIOC->PIO_PDSR, 1<<16)
|
||||
SWITCH_CASE(6, PIOC->PIO_PDSR, 1<<8)
|
||||
#else // PCB9X
|
||||
SWITCH_3_CASE(0, ping, pine, (1<<INP_G_ID1), (1<<INP_E_ID2))
|
||||
#if defined(TELEMETRY_JETI) || defined(TELEMETRY_FRSKY) || defined(TELEMETRY_NMEA) || defined(TELEMETRY_ARDUPILOT) || defined(TELEMETRY_MAVLINK)
|
||||
SWITCH_CASE(1, pinc, 1<<INP_C_ThrCt)
|
||||
SWITCH_CASE(4, pinc, 1<<INP_C_AileDR)
|
||||
#else
|
||||
SWITCH_CASE(1, pine, 1<<INP_E_ThrCt)
|
||||
SWITCH_CASE(4, pine, 1<<INP_E_AileDR)
|
||||
#endif
|
||||
SWITCH_CASE(2, ping, 1<<INP_G_RuddDR)
|
||||
SWITCH_CASE(3, pine, 1<<INP_E_ElevDR)
|
||||
SWITCH_CASE(5, pine, 1<<INP_E_Gear)
|
||||
SWITCH_CASE(6, pine, 1<<INP_E_Trainer)
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
||||
@@ -117,4 +117,4 @@ void pwrResetHandler()
|
||||
if (WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
|
||||
pwrOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ void mixerTask(void * pdata)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_FRSKY) || defined(TELEMETRY_MAVLINK)
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
DEBUG_TIMER_START(debugTimerTelemetryWakeup);
|
||||
telemetryWakeup();
|
||||
DEBUG_TIMER_STOP(debugTimerTelemetryWakeup);
|
||||
|
||||
@@ -1,716 +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 "opentx.h"
|
||||
|
||||
#define NB_BUF 2
|
||||
#define LG_BUF 11
|
||||
#define VALSTR(val) (rbuf[val][0] ? rbuf[val] : val_unknown)
|
||||
#define APSIZE (BSS | DBLSIZE)
|
||||
|
||||
/* Received data
|
||||
|
||||
Data are received as packets, each packet is identified by a prefix of three
|
||||
characters and is ended by three stars. Some packets can contain more than
|
||||
one value, the values are ended by a comma.
|
||||
|
||||
|
||||
Position packet:
|
||||
!!!LAT:0123456789,LON:9876543210,SPD:123,CRT:1,ALT:123456,ALH:654321,CRS:123,BER:123,WPN:12,DST:12345,BTV:12.4567 9012,RSP:123,TOW:123456,***
|
||||
...----1--------------2--------------3-------4-----5----------6----------7-------8-------9------10--------11-----------12----------13-----END
|
||||
1st value 2nd value
|
||||
|
||||
Attitude packet:
|
||||
+++ASP:123,THH:123,RLL:123,PCH:123,***
|
||||
...----1-------2-------3-------4---END
|
||||
|
||||
Mode change packet:
|
||||
###STABILIZE***
|
||||
...1--------END
|
||||
|
||||
Waypoint packet:
|
||||
%%%12 45***
|
||||
...1----END
|
||||
|
||||
Alert packet:
|
||||
XXXAlert Text alert***
|
||||
...1---------------END
|
||||
|
||||
Performance packet:
|
||||
PPPThis is performant***
|
||||
...1--------------END
|
||||
*/
|
||||
|
||||
// Position packet prefix
|
||||
#define PACK_POS 0x21
|
||||
// value occurence number in this packet
|
||||
#define LAT 1
|
||||
#define LON 2
|
||||
#define SPD 3
|
||||
#define CRT 4
|
||||
#define ALT 5
|
||||
#define ALH 6
|
||||
#define CRS 7
|
||||
#define BER 8
|
||||
#define WPN 9
|
||||
#define DST 10
|
||||
#define BTV 11
|
||||
#define RSP 12
|
||||
#define TOW 13
|
||||
|
||||
#define PACK_ATT 0x2b
|
||||
// value occurence number in this packet
|
||||
#define ASP 1
|
||||
#define THH 2
|
||||
#define RLL 3
|
||||
#define PCH 4
|
||||
|
||||
#define PACK_MOD 0x23
|
||||
// value occurence number in this packet
|
||||
#define MOD 1
|
||||
|
||||
#define PACK_WPC 0x25
|
||||
// value occurence number in this packet
|
||||
#define WPC 1
|
||||
|
||||
#define PACK_ALR 0x58
|
||||
// value occurence number in this packet
|
||||
#define ALR 1
|
||||
|
||||
#define PACK_PRF 0x50
|
||||
// value occurence number in this packet
|
||||
#define PRF 1
|
||||
|
||||
// end of packet
|
||||
#define PACK_END 0x2a
|
||||
// end of value
|
||||
#define VAL_END 0x2c
|
||||
// end of title
|
||||
#define TITLE_END 0x3a
|
||||
|
||||
// stateful machine
|
||||
|
||||
// Since the packets are sent continuously, we need to synchronize on the
|
||||
// reception of the three chars prefixing a packet, whatever they are.
|
||||
|
||||
// states values
|
||||
#define WAIT_PACKET 1
|
||||
#define WAIT_PACK_POS1 2
|
||||
#define WAIT_PACK_POS2 3
|
||||
#define WAIT_PACK_POS3 4
|
||||
#define WAIT_PACK_ATT1 5
|
||||
#define WAIT_PACK_ATT2 6
|
||||
#define WAIT_PACK_ATT3 7
|
||||
#define WAIT_PACK_MOD1 8
|
||||
#define WAIT_PACK_MOD2 9
|
||||
#define WAIT_PACK_MOD3 10
|
||||
#define WAIT_PACK_WPC1 11
|
||||
#define WAIT_PACK_WPC2 12
|
||||
#define WAIT_PACK_WPC3 13
|
||||
#define WAIT_PACK_ALR1 14
|
||||
#define WAIT_PACK_ALR2 15
|
||||
#define WAIT_PACK_ALR3 16
|
||||
#define WAIT_PACK_PRF1 17
|
||||
#define WAIT_PACK_PRF2 18
|
||||
#define WAIT_PACK_PRF3 19
|
||||
#define FLUSH_TITLE1 20
|
||||
#define FLUSH_TITLE2 21
|
||||
#define FLUSH_TITLE3 22
|
||||
#define FLUSH_TITLE4 23
|
||||
#define READ_VALUE 24
|
||||
|
||||
uint8_t i; // working variable
|
||||
uint8_t state; // currrent state
|
||||
uint8_t rval, rpack; // received items
|
||||
uint8_t xval[NB_BUF]; // expected value
|
||||
uint8_t xpack[NB_BUF]; // expected packet
|
||||
uint8_t ibuf[NB_BUF]; // subscripts on buffers values
|
||||
char rbuf[NB_BUF][LG_BUF]; // receive buffers
|
||||
const char val_unknown[] = "?";
|
||||
|
||||
void menuViewTelemetryArduPilot1(event_t event);
|
||||
void menuViewTelemetryArduPilot2(event_t event);
|
||||
void menuViewTelemetryArduPilot3(event_t event);
|
||||
void menuViewTelemetryArduPilot4(event_t event);
|
||||
void menuViewTelemetryArduPilot5(event_t event);
|
||||
void menuViewTelemetryArduPilot6(event_t event);
|
||||
void menuViewTelemetryArduPilot7(event_t event);
|
||||
void menuViewTelemetryArduPilot8(event_t event);
|
||||
void title(char x);
|
||||
void initval(uint8_t num, uint8_t pack, uint8_t val);
|
||||
|
||||
#ifndef SIMU
|
||||
ISR (USART0_RX_vect)
|
||||
{
|
||||
uint8_t rl;
|
||||
// uint8_t rh; //USART control and Status Register 0 B
|
||||
uint8_t iostat; //USART control and Status Register 0 A
|
||||
|
||||
rl = UDR0;
|
||||
iostat = UCSR0A; //USART control and Status Register 0 A
|
||||
/*
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
RxC0 TxC0 UDRE0 FE0 DOR0 UPE0 U2X0 MPCM0
|
||||
|
||||
RxC0: Receive complete
|
||||
TXC0: Transmit Complete
|
||||
UDRE0: USART Data Register Empty
|
||||
FE0: Frame Error
|
||||
DOR0: Data OverRun
|
||||
UPE0: USART Parity Error
|
||||
U2X0: Double Tx Speed
|
||||
MPCM0: MultiProcessor Comms Mode
|
||||
*/
|
||||
if (iostat & ((1 << FE0) | (1 << DOR0) | (1 << UPE0)))
|
||||
{
|
||||
rl = xpack[0] = xpack[1] = xval[0] = xval[1] = 0;
|
||||
state = WAIT_PACKET; // restart on error
|
||||
}
|
||||
// rh = UCSR0B; //USART control and Status Register 0 B
|
||||
/* bit 7 6 5 4 3 2 1 0
|
||||
RxCIE0 TxCIE0 UDRIE0 RXEN0 TXEN0 UCSZ02 RXB80 TXB80
|
||||
|
||||
RxCIE0: Receive complete int enable
|
||||
TXCIE0: Transmit Complete int enable
|
||||
UDRIE0: USART Data Register Empty int enable
|
||||
RXEN0: Rx enable
|
||||
TXEN0: Tx Enable
|
||||
UCSZ02: Character Size bit 2
|
||||
RXB80: Rx data bit 8
|
||||
TXB80: Tx data bit 8
|
||||
*/
|
||||
switch (state)
|
||||
{
|
||||
case WAIT_PACKET:
|
||||
switch (rl)
|
||||
{
|
||||
case PACK_POS: // found a new POS packet
|
||||
state = WAIT_PACK_POS2; // wait for the 2nd char
|
||||
break;
|
||||
case PACK_ATT: // found a new ATT packet
|
||||
state = WAIT_PACK_ATT2; // wait for the 2nd char
|
||||
break;
|
||||
case PACK_MOD: // found a new MOD packet
|
||||
state = WAIT_PACK_MOD2; // wait for the 2nd char
|
||||
break;
|
||||
case PACK_WPC: // found a new WPC packet
|
||||
state = WAIT_PACK_WPC2; // wait for the 2nd char
|
||||
break;
|
||||
case PACK_ALR: // found a new ALR packet
|
||||
state = WAIT_PACK_ALR2; // wait for the 2nd char
|
||||
break;
|
||||
case PACK_PRF: // found a new PRF packet
|
||||
state = WAIT_PACK_PRF2; // wait for the 2nd char
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case WAIT_PACK_POS2: // wait for 2nd char
|
||||
if (rl == PACK_POS)
|
||||
state = WAIT_PACK_POS3;
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_POS3: // wait for 3rd char
|
||||
if (rl == PACK_POS) // found
|
||||
{
|
||||
state = FLUSH_TITLE1; // flush title "LAT:"
|
||||
rpack = PACK_POS;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_ATT2: // wait for 2nd char
|
||||
if (rl == PACK_ATT)
|
||||
state = WAIT_PACK_ATT3;
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_ATT3: // wait for 3rd char
|
||||
if (rl == PACK_ATT)
|
||||
{
|
||||
state = FLUSH_TITLE1; // flush title "ASP:"
|
||||
rpack = PACK_ATT;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_MOD2: // wait for 2nd char
|
||||
if (rl == PACK_MOD)
|
||||
state = WAIT_PACK_MOD3;
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_MOD3: // wait for 3rd char
|
||||
if (rl == PACK_MOD)
|
||||
{
|
||||
state = READ_VALUE; // ready to read values from PACK_MOD packet
|
||||
rpack = PACK_MOD;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_WPC2: // wait for 2nd char
|
||||
if (rl == PACK_WPC)
|
||||
state = WAIT_PACK_WPC3;
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_WPC3: // wait for 3rd char
|
||||
if (rl == PACK_WPC)
|
||||
{
|
||||
state = READ_VALUE; // ready to read values from PACK_WPC packet
|
||||
rpack = PACK_WPC;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_ALR2: // wait for 2nd char
|
||||
if (rl == PACK_ALR)
|
||||
state = WAIT_PACK_ALR3;
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_ALR3: // wait for 3rd char
|
||||
if (rl == PACK_ALR)
|
||||
{
|
||||
state = READ_VALUE; // ready to read values from PACK_ALR packet
|
||||
rpack = PACK_ALR;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_PRF2: // wait for 2nd char
|
||||
if (rl == PACK_PRF)
|
||||
state = WAIT_PACK_PRF3;
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_PRF3: // wait for 3rd char
|
||||
if (rl == PACK_PRF)
|
||||
{
|
||||
state = READ_VALUE; // ready to read values from PACK_PRF packet
|
||||
rpack = PACK_PRF;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case FLUSH_TITLE1: // wait for 1st char of title
|
||||
state = FLUSH_TITLE2;
|
||||
break;
|
||||
case FLUSH_TITLE2: // wait for 2nd char
|
||||
state = FLUSH_TITLE3;
|
||||
break;
|
||||
case FLUSH_TITLE3: // wait for 3rd char
|
||||
state = FLUSH_TITLE4;
|
||||
break;
|
||||
case FLUSH_TITLE4: // wait for 4th char
|
||||
if (rl == TITLE_END)
|
||||
state = READ_VALUE;
|
||||
else
|
||||
state = WAIT_PACKET; // was not a title, wait for the next packet
|
||||
break;
|
||||
case READ_VALUE:
|
||||
switch (rl)
|
||||
{
|
||||
case PACK_END:
|
||||
state = WAIT_PACKET; // packet completed, wait for the next packet
|
||||
break;
|
||||
case VAL_END: // comma found, value completed
|
||||
state = FLUSH_TITLE1; // flush next title
|
||||
rval++; // and get next value
|
||||
break;
|
||||
default: // store the char in the corresponding buffer
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
{ // is it the expected value in the expected packet ?
|
||||
if (rpack == xpack[i] && rval == xval[i] && ibuf[i] < LG_BUF - 1)
|
||||
{ // yes, store the char
|
||||
rbuf[i] [ibuf[i]] = rl;
|
||||
ibuf[i]++;
|
||||
rbuf[i] [ibuf[i]] = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void ARDUPILOT_Init (void)
|
||||
{
|
||||
DDRE &= ~(1 << DDE0); // set RXD0 pin as input
|
||||
PORTE &= ~(1 << PORTE0); // disable pullup on RXD0 pin
|
||||
|
||||
#ifndef SIMU
|
||||
// switch (Telem_baud)
|
||||
// {
|
||||
// case 1:
|
||||
#undef BAUD
|
||||
#define BAUD 38400
|
||||
#include <util/setbaud.h>
|
||||
UBRR0H = UBRRH_VALUE;
|
||||
UBRR0L = UBRRL_VALUE;
|
||||
// break;
|
||||
// }
|
||||
|
||||
UCSR0A &= ~(1 << U2X0); // disable double speed operation
|
||||
// set 8N1
|
||||
UCSR0B = 0|(0<< RXCIE0)|(0<<TXCIE0)|(0<<UDRIE0)|(0<<RXEN0)|(0<<TXEN0)|(0<<UCSZ02);
|
||||
UCSR0C = 0|(1 << UCSZ01) | (1 << UCSZ00);
|
||||
while ( UCSR0A & (1 << RXC0) )
|
||||
UDR0; // flush receive buffer
|
||||
#endif
|
||||
}
|
||||
|
||||
void ARDUPILOT_DisableTXD (void)
|
||||
{
|
||||
UCSR0B &= ~(1 << TXEN0); // disable TX
|
||||
}
|
||||
|
||||
void ARDUPILOT_EnableTXD (void)
|
||||
{
|
||||
UCSR0B |= (1 << TXEN0); // enable TX
|
||||
}
|
||||
|
||||
void ARDUPILOT_DisableRXD (void)
|
||||
{
|
||||
UCSR0B &= ~(1 << RXEN0); // disable RX
|
||||
UCSR0B &= ~(1 << RXCIE0); // disable Interrupt
|
||||
}
|
||||
|
||||
void ARDUPILOT_EnableRXD (void)
|
||||
{
|
||||
for (i = 0; i < NB_BUF; i++)
|
||||
{
|
||||
ibuf[i] = 0;
|
||||
rbuf[i][0] = 0;
|
||||
xpack[i] = 0;
|
||||
xval[i] = 0;
|
||||
}
|
||||
state = WAIT_PACKET; // wait for the next packet
|
||||
UCSR0B |= (1 << RXEN0); // enable RX
|
||||
UCSR0B |= (1 << RXCIE0); // enable Interrupt
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot(event_t event)
|
||||
{
|
||||
menuViewTelemetryArduPilot1(event);
|
||||
}
|
||||
|
||||
// Start of ArduPilot menus 1-8 <<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
void menuViewTelemetryArduPilot1(event_t event)
|
||||
{
|
||||
switch(event) // new event received, branch accordingly
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot8);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot2);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_MENU):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuStatisticsView);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
How to use:
|
||||
|
||||
You choose the values to be displayed using the function:
|
||||
|
||||
initval(<number>, <packet>, <value>);
|
||||
-------------------------------------
|
||||
|
||||
That means that "<value>" of "<packet>" is stored in the <number> buffer.
|
||||
The first <number> is 0.
|
||||
|
||||
Here are the packet names and the associated value names:
|
||||
|
||||
Position packet (beginning with "!!!"): "PACK_POS"
|
||||
value names: "LAT", "LON", "SPD", "CRT", "ALT", "ALH", "CRS", "BER",
|
||||
"WPN", "DST", "BTV", "RSP", "TOW"
|
||||
|
||||
Attitude packet (beginning with "+++"): "PACK_ATT"
|
||||
value names: "ASP", "THH", "RLL", "PCH"
|
||||
|
||||
Mode change packet (beginning with "###"): "PACK_MOD"
|
||||
value name: "MOD"
|
||||
|
||||
Waypoint packet (beginning with "%%%"): "PACK_WPC"
|
||||
value name: "WPC"
|
||||
|
||||
Alert packet (beginning with "XXX"): "PACK_ALR"
|
||||
value name: "ALR"
|
||||
|
||||
Performance packet (beginning with "PPP"): "PACK_PRF"
|
||||
value name: "PRF"
|
||||
|
||||
The buffers are accessed using the macro "VALSTR(<n>)", where "<n>" is "0"
|
||||
for the first buffer, and "1" for the second buffer.
|
||||
|
||||
When a value is missing, it is replaced by the contents of val_unknown ("?").
|
||||
*/
|
||||
// expecting LAT value in POS packet to be stored in the first buffer
|
||||
initval (0, PACK_POS, LAT);
|
||||
// and LON value in POS packet stored in the second buffer
|
||||
initval (1, PACK_POS, LON);
|
||||
// title of the screen
|
||||
title ('1');
|
||||
lcdDrawText(5*FW, 1*FH, PSTR(" Latitude")); // line 1 column 5
|
||||
// first buffer into line 2 column 2
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(5*FW, 4*FH, PSTR(" Longitude")); // line 4 column 5
|
||||
// second buffer into line 5 column 2
|
||||
lcdDrawText (1*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot2(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot1);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot3);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (0, PACK_POS, SPD);
|
||||
initval (1, PACK_POS, CRT);
|
||||
title ('2');
|
||||
lcdDrawText(1*FW, 1*FH, PSTR(" Ground speed"));
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(1*FW, 4*FH, PSTR(" Climb rate") );
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot3(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot2);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot4);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (0, PACK_POS, ALT);
|
||||
initval (1, PACK_POS, ALH);
|
||||
title ('3');
|
||||
lcdDrawText(1*FW, 1*FH, PSTR(" Altitude"));
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(1*FW, 4*FH, PSTR(" Altitude Hold") );
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot4(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot3);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot5);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (0, PACK_POS, CRS);
|
||||
initval (1, PACK_POS, BER);
|
||||
title ('4');
|
||||
lcdDrawText(1*FW, 1*FH, PSTR(" Course"));
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(1*FW, 4*FH, PSTR(" Bearing"));
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot5(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot4);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot6);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_MENU):
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (0, PACK_POS, WPN);
|
||||
initval (1, PACK_POS, DST);
|
||||
title ('5');
|
||||
lcdDrawText(1*FW, 1*FH, PSTR(" Way Point # "));
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(1*FW, 4*FH, PSTR(" Distance "));
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot6(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot5);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot7);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_MENU):
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (0, PACK_ATT, ASP);
|
||||
initval (1, PACK_ATT, THH);
|
||||
title ('6');
|
||||
lcdDrawText(1*FW, 1*FH, PSTR(" Air Speed "));
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(1*FW, 4*FH, PSTR(" Climb Rate "));
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot7(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot6);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot8);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_MENU):
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (0, PACK_ATT, RLL);
|
||||
initval (1, PACK_ATT, PCH);
|
||||
title ('7');
|
||||
lcdDrawText(1*FW, 1*FH, PSTR(" Roll Angle"));
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(1*FW, 4*FH, PSTR(" Pitch Angle"));
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void menuViewTelemetryArduPilot8(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
chainMenu(menuViewTelemetryArduPilot7);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
chainMenu(menuViewTelemetryArduPilot1);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_MENU):
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
ARDUPILOT_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (0, PACK_MOD, MOD);
|
||||
initval (1, PACK_WPC, WPC);
|
||||
title ('8');
|
||||
lcdDrawText(1*FW, 1*FH, PSTR(" ArduPilot Mode"));
|
||||
lcdDrawText (2*FW, 2*FH, VALSTR(0), APSIZE);
|
||||
lcdDrawText(1*FW, 4*FH, PSTR(" RTL Distance"));
|
||||
lcdDrawText (2*FW, 5*FH, VALSTR(1), APSIZE);
|
||||
}
|
||||
|
||||
void title(char x)
|
||||
{
|
||||
lcdDrawText (0, 0, PSTR(" ARDU PILOT Mega ?/8 "), INVERS);
|
||||
lcdDrawChar(17*FW, 0*FH, x, INVERS);
|
||||
}
|
||||
|
||||
void initval(uint8_t num, uint8_t pack, uint8_t val)
|
||||
{
|
||||
if (xpack[num] != pack || xval[num] != val)
|
||||
{
|
||||
ibuf[num] = rbuf[num][0] = 0;
|
||||
xpack[num] = pack;
|
||||
xval[num] = val;
|
||||
state = WAIT_PACKET; // synchronize to the next packet
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Without ArduPilot:
|
||||
Size after:
|
||||
er9x.elf :
|
||||
section size addr
|
||||
.data 164 8388864
|
||||
.text 50634 0
|
||||
.bss 3485 8389028
|
||||
----------------------------------
|
||||
With ArduPilot:
|
||||
Size after:
|
||||
er9x.elf :
|
||||
section size addr
|
||||
.data 166 8388864
|
||||
.text 53026 0
|
||||
.bss 3517 8389030
|
||||
*/
|
||||
@@ -1,27 +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 _ARDUPILOT_H_
|
||||
#define _ARDUPILOT_H_
|
||||
void ARDUPILOT_Init(void);
|
||||
void ARDUPILOT_EnableRXD (void);
|
||||
void menuViewTelemetryArduPilot(event_t event);
|
||||
#endif // _ARDUPILOT_H_
|
||||
|
||||
@@ -21,16 +21,7 @@
|
||||
#include "opentx.h"
|
||||
|
||||
|
||||
#if defined(TELEMETREZ)
|
||||
#define PRIVATE 0x1B
|
||||
uint8_t privateDataLen;
|
||||
uint8_t privateDataPos;
|
||||
#endif
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION) && defined(TELEMETREZ)
|
||||
extern uint8_t TrotCount;
|
||||
extern uint8_t TezRotary;
|
||||
#endif
|
||||
|
||||
NOINLINE void processFrskyTelemetryData(uint8_t data)
|
||||
{
|
||||
@@ -102,42 +93,8 @@ NOINLINE void processFrskyTelemetryData(uint8_t data)
|
||||
telemetryRxBufferCount = 0;
|
||||
dataState = STATE_DATA_START;
|
||||
}
|
||||
#if defined(TELEMETREZ)
|
||||
if (data == PRIVATE) {
|
||||
dataState = STATE_DATA_PRIVATE_LEN;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if defined(TELEMETREZ)
|
||||
case STATE_DATA_PRIVATE_LEN:
|
||||
dataState = STATE_DATA_PRIVATE_VALUE;
|
||||
privateDataLen = data; // Count of bytes to receive
|
||||
privateDataPos = 0;
|
||||
break;
|
||||
|
||||
case STATE_DATA_PRIVATE_VALUE :
|
||||
if (privateDataPos == 0) {
|
||||
// Process first private data byte
|
||||
// PC6, PC7
|
||||
if ((data & 0x3F) == 0) {// Check byte is valid
|
||||
DDRC |= 0xC0; // Set as outputs
|
||||
PORTC = ( PORTC & 0x3F ) | ( data & 0xC0 ); // update outputs
|
||||
}
|
||||
}
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
if (privateDataPos == 1) {
|
||||
TrotCount = data;
|
||||
}
|
||||
if (privateDataPos == 2) { // rotary encoder switch
|
||||
RotEncoder = data;
|
||||
}
|
||||
#endif
|
||||
if (++privateDataPos == privateDataLen) {
|
||||
dataState = STATE_DATA_IDLE;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
} // switch
|
||||
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
|
||||
@@ -30,10 +30,6 @@ enum FrSkyDataState {
|
||||
STATE_DATA_START,
|
||||
STATE_DATA_IN_FRAME,
|
||||
STATE_DATA_XOR,
|
||||
#if defined(TELEMETREZ)
|
||||
STATE_DATA_PRIVATE_LEN,
|
||||
STATE_DATA_PRIVATE_VALUE
|
||||
#endif
|
||||
};
|
||||
|
||||
#define FRSKY_SPORT_BAUDRATE 57600
|
||||
|
||||
@@ -1,331 +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 "opentx.h"
|
||||
|
||||
#if (defined(FRSKY_HUB) || defined(WS_HOW_HIGH))
|
||||
void checkMinMaxAltitude()
|
||||
{
|
||||
if (TELEMETRY_RELATIVE_BARO_ALT_BP > telemetryData.hub.maxAltitude)
|
||||
telemetryData.hub.maxAltitude = TELEMETRY_RELATIVE_BARO_ALT_BP;
|
||||
if (TELEMETRY_RELATIVE_BARO_ALT_BP < telemetryData.hub.minAltitude)
|
||||
telemetryData.hub.minAltitude = TELEMETRY_RELATIVE_BARO_ALT_BP;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
void parseTelemHubByte(uint8_t byte)
|
||||
{
|
||||
static int8_t structPos;
|
||||
static uint8_t lowByte;
|
||||
static TS_STATE state = TS_IDLE;
|
||||
|
||||
if (byte == 0x5e) {
|
||||
state = TS_DATA_ID;
|
||||
return;
|
||||
}
|
||||
if (state == TS_IDLE) {
|
||||
return;
|
||||
}
|
||||
if (state & TS_XOR) {
|
||||
byte = byte ^ 0x60;
|
||||
state = (TS_STATE)(state - TS_XOR);
|
||||
}
|
||||
else if (byte == 0x5d) {
|
||||
state = (TS_STATE)(state | TS_XOR);
|
||||
return;
|
||||
}
|
||||
if (state == TS_DATA_ID) {
|
||||
if (byte > 0x3f) {
|
||||
state = TS_IDLE;
|
||||
}
|
||||
else {
|
||||
structPos = byte * 2;
|
||||
state = TS_DATA_LOW;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (state == TS_DATA_LOW) {
|
||||
lowByte = byte;
|
||||
state = TS_DATA_HIGH;
|
||||
return;
|
||||
}
|
||||
|
||||
state = TS_IDLE;
|
||||
|
||||
#if defined(GPS)
|
||||
if ((uint8_t)structPos == offsetof(FrskyTelemetryData, gpsLatitude_bp)) {
|
||||
if (lowByte || byte)
|
||||
telemetryData.hub.gpsFix = 1;
|
||||
else if (telemetryData.hub.gpsFix > 0 && telemetryData.hub.gpsLatitude_bp > 1)
|
||||
telemetryData.hub.gpsFix = 0;
|
||||
}
|
||||
else if ((uint8_t)structPos == offsetof(FrskyTelemetryData, gpsLongitude_bp)) {
|
||||
if (lowByte || byte)
|
||||
telemetryData.hub.gpsFix = 1;
|
||||
else if (telemetryData.hub.gpsFix > 0 && telemetryData.hub.gpsLongitude_bp > 1)
|
||||
telemetryData.hub.gpsFix = 0;
|
||||
}
|
||||
|
||||
if ((uint8_t)structPos == offsetof(FrskyTelemetryData, gpsAltitude_bp) ||
|
||||
((uint8_t)structPos >= offsetof(FrskyTelemetryData, gpsAltitude_ap) && (uint8_t)structPos <= offsetof(FrskyTelemetryData, gpsLatitudeNS) && (uint8_t)structPos != offsetof(FrskyTelemetryData, baroAltitude_bp) && (uint8_t)structPos != offsetof(FrskyTelemetryData, baroAltitude_ap))) {
|
||||
// If we don't have a fix, we may discard the value
|
||||
if (telemetryData.hub.gpsFix <= 0)
|
||||
return;
|
||||
}
|
||||
#endif // #if defined(GPS)
|
||||
|
||||
((uint8_t*)&telemetryData.hub)[structPos] = lowByte;
|
||||
((uint8_t*)&telemetryData.hub)[structPos+1] = byte;
|
||||
|
||||
switch ((uint8_t)structPos) {
|
||||
|
||||
case offsetof(FrskyTelemetryData, rpm):
|
||||
telemetryData.hub.rpm *= (uint8_t)60/(g_model.frsky.blades+2);
|
||||
if (telemetryData.hub.rpm > telemetryData.hub.maxRpm)
|
||||
telemetryData.hub.maxRpm = telemetryData.hub.rpm;
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, temperature1):
|
||||
if (telemetryData.hub.temperature1 > telemetryData.hub.maxTemperature1)
|
||||
telemetryData.hub.maxTemperature1 = telemetryData.hub.temperature1;
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, temperature2):
|
||||
if (telemetryData.hub.temperature2 > telemetryData.hub.maxTemperature2)
|
||||
telemetryData.hub.maxTemperature2 = telemetryData.hub.temperature2;
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, current):
|
||||
if ((int16_t)telemetryData.hub.current > 0 && ((int16_t)telemetryData.hub.current + g_model.frsky.fasOffset) > 0)
|
||||
telemetryData.hub.current += g_model.frsky.fasOffset;
|
||||
else
|
||||
telemetryData.hub.current = 0;
|
||||
if (telemetryData.hub.current > telemetryData.hub.maxCurrent)
|
||||
telemetryData.hub.maxCurrent = telemetryData.hub.current;
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, currentConsumption):
|
||||
// we receive data from openXsensor. stops the calculation of consumption and power
|
||||
telemetryData.hub.openXsensor = 1;
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, volts_ap):
|
||||
#if defined(FAS_PROTOTYPE)
|
||||
telemetryData.hub.vfas = (telemetryData.hub.volts_bp * 10 + telemetryData.hub.volts_ap);
|
||||
#else
|
||||
telemetryData.hub.vfas = ((telemetryData.hub.volts_bp * 10 + telemetryData.hub.volts_ap) * 21) / 11;
|
||||
#endif
|
||||
/* TODO later if (!telemetryData.hub.minVfas || telemetryData.hub.minVfas > telemetryData.hub.vfas)
|
||||
telemetryData.hub.minVfas = telemetryData.hub.vfas; */
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, baroAltitude_bp):
|
||||
// First received barometer altitude => Altitude offset
|
||||
if (!telemetryData.hub.baroAltitudeOffset)
|
||||
telemetryData.hub.baroAltitudeOffset = -telemetryData.hub.baroAltitude_bp;
|
||||
telemetryData.hub.baroAltitude_bp += telemetryData.hub.baroAltitudeOffset;
|
||||
checkMinMaxAltitude();
|
||||
break;
|
||||
|
||||
#if defined(GPS)
|
||||
case offsetof(FrskyTelemetryData, gpsAltitude_ap):
|
||||
if (!telemetryData.hub.gpsAltitudeOffset)
|
||||
telemetryData.hub.gpsAltitudeOffset = -telemetryData.hub.gpsAltitude_bp;
|
||||
telemetryData.hub.gpsAltitude_bp += telemetryData.hub.gpsAltitudeOffset;
|
||||
if (!telemetryData.hub.baroAltitudeOffset) {
|
||||
if (telemetryData.hub.gpsAltitude_bp > telemetryData.hub.maxAltitude)
|
||||
telemetryData.hub.maxAltitude = telemetryData.hub.gpsAltitude_bp;
|
||||
if (telemetryData.hub.gpsAltitude_bp < telemetryData.hub.minAltitude)
|
||||
telemetryData.hub.minAltitude = telemetryData.hub.gpsAltitude_bp;
|
||||
}
|
||||
if (!telemetryData.hub.pilotLatitude && !telemetryData.hub.pilotLongitude) {
|
||||
// First received GPS position => Pilot GPS position
|
||||
getGpsPilotPosition();
|
||||
}
|
||||
else if (telemetryData.hub.gpsDistNeeded || menuHandlers[menuLevel] == menuViewTelemetryFrsky) {
|
||||
getGpsDistance();
|
||||
}
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, gpsSpeed_bp):
|
||||
// Speed => Max speed
|
||||
if (telemetryData.hub.gpsSpeed_bp > telemetryData.hub.maxGpsSpeed)
|
||||
telemetryData.hub.maxGpsSpeed = telemetryData.hub.gpsSpeed_bp;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case offsetof(FrskyTelemetryData, volts):
|
||||
frskyUpdateCells();
|
||||
break;
|
||||
|
||||
case offsetof(FrskyTelemetryData, accelX):
|
||||
case offsetof(FrskyTelemetryData, accelY):
|
||||
case offsetof(FrskyTelemetryData, accelZ):
|
||||
*(int16_t*)(&((uint8_t*)&telemetryData.hub)[structPos]) /= 10;
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case offsetof(FrskyTelemetryData, gpsAltitude_bp):
|
||||
case offsetof(FrskyTelemetryData, fuelLevel):
|
||||
case offsetof(FrskyTelemetryData, gpsLongitude_bp):
|
||||
case offsetof(FrskyTelemetryData, gpsLatitude_bp):
|
||||
case offsetof(FrskyTelemetryData, gpsCourse_bp):
|
||||
case offsetof(FrskyTelemetryData, day):
|
||||
case offsetof(FrskyTelemetryData, year):
|
||||
case offsetof(FrskyTelemetryData, sec):
|
||||
case offsetof(FrskyTelemetryData, gpsSpeed_ap):
|
||||
case offsetof(FrskyTelemetryData, gpsLongitude_ap):
|
||||
case offsetof(FrskyTelemetryData, gpsLatitude_ap):
|
||||
case offsetof(FrskyTelemetryData, gpsCourse_ap):
|
||||
case offsetof(FrskyTelemetryData, gpsLongitudeEW):
|
||||
case offsetof(FrskyTelemetryData, gpsLatitudeNS):
|
||||
case offsetof(FrskyTelemetryData, varioSpeed):
|
||||
case offsetof(FrskyTelemetryData, power): /* because sent by openXsensor */
|
||||
case offsetof(FrskyTelemetryData, vfas):
|
||||
case offsetof(FrskyTelemetryData, volts_bp):
|
||||
break;
|
||||
|
||||
default:
|
||||
*((uint16_t *)(((uint8_t*)&telemetryData.hub) + structPos)) = previousValue;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif // #if defined(FRSKY_HUB)
|
||||
|
||||
#if defined(WS_HOW_HIGH)
|
||||
void parseTelemWSHowHighByte(uint8_t byte)
|
||||
{
|
||||
if (wshhStreaming < (WSHH_TIMEOUT10ms - 10)) {
|
||||
((uint8_t*)&telemetryData.hub)[offsetof(FrskyTelemetryData, baroAltitude_bp)] = byte;
|
||||
checkMinMaxAltitude();
|
||||
}
|
||||
else {
|
||||
// At least 100mS passed since last data received
|
||||
((uint8_t*)&telemetryData.hub)[offsetof(FrskyTelemetryData, baroAltitude_bp)+1] = byte;
|
||||
}
|
||||
// baroAltitude_bp unit here is feet!
|
||||
wshhStreaming = WSHH_TIMEOUT10ms; // reset counter
|
||||
}
|
||||
#endif
|
||||
|
||||
void frskyDProcessPacket(const uint8_t *packet)
|
||||
{
|
||||
// What type of packet?
|
||||
switch (packet[0])
|
||||
{
|
||||
case LINKPKT: // A1/A2/RSSI values
|
||||
{
|
||||
telemetryData.analog[TELEM_ANA_A1].set(packet[1], g_model.frsky.channels[TELEM_ANA_A1].type);
|
||||
telemetryData.analog[TELEM_ANA_A2].set(packet[2], g_model.frsky.channels[TELEM_ANA_A2].type);
|
||||
telemetryData.rssi[0].set(packet[3]);
|
||||
telemetryData.rssi[1].set(packet[4] / 2);
|
||||
telemetryStreaming = TELEMETRY_TIMEOUT10ms; // reset counter only if valid packets are being detected
|
||||
link_counter += 256 / FRSKY_D_AVERAGING;
|
||||
#if defined(VARIO)
|
||||
uint8_t varioSource = g_model.frsky.varioSource - VARIO_SOURCE_A1;
|
||||
if (varioSource < 2) {
|
||||
telemetryData.hub.varioSpeed = applyChannelRatio(varioSource, telemetryData.analog[varioSource].value);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#if defined(FRSKY_HUB) || defined (WS_HOW_HIGH)
|
||||
case USRPKT: // User Data packet
|
||||
uint8_t numBytes = 3 + (packet[1] & 0x07); // sanitize in case of data corruption leading to buffer overflow
|
||||
for (uint8_t i=3; i<numBytes; i++) {
|
||||
#if defined(FRSKY_HUB)
|
||||
if (IS_USR_PROTO_FRSKY_HUB()) {
|
||||
parseTelemHubByte(packet[i]);
|
||||
}
|
||||
#endif
|
||||
#if defined(WS_HOW_HIGH)
|
||||
if (IS_USR_PROTO_WS_HOW_HIGH()) {
|
||||
parseTelemWSHowHighByte(packet[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#endif // #if defined(FRSKY_HUB) || defined (WS_HOW_HIGH)
|
||||
}
|
||||
}
|
||||
|
||||
// Alarms level sent to the FrSky module
|
||||
|
||||
uint8_t frskyAlarmsSendState = 0 ;
|
||||
|
||||
void frskyPushValue(uint8_t *&ptr, uint8_t value)
|
||||
{
|
||||
// byte stuff the only byte than might need it
|
||||
bool bytestuff = false;
|
||||
|
||||
if (value == START_STOP) {
|
||||
bytestuff = true;
|
||||
value = 0x5e;
|
||||
}
|
||||
else if (value == BYTESTUFF) {
|
||||
bytestuff = true;
|
||||
value = 0x5d;
|
||||
}
|
||||
|
||||
*ptr++ = value;
|
||||
if (bytestuff)
|
||||
*ptr = BYTESTUFF;
|
||||
}
|
||||
|
||||
void frskySendPacket(uint8_t type, uint8_t value, uint8_t p1, uint8_t p2)
|
||||
{
|
||||
uint8_t *ptr = &frskyTxBuffer[0];
|
||||
|
||||
*ptr++ = START_STOP; // End of packet
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = (IS_SOUND_OFF() ? alarm_off : p2);
|
||||
*ptr++ = p1;
|
||||
frskyPushValue(ptr, value);
|
||||
*ptr++ = type;
|
||||
*ptr++ = START_STOP; // Start of packet
|
||||
|
||||
frskyTxBufferCount = ptr - &frskyTxBuffer[0];
|
||||
#if !defined(SIMU)
|
||||
telemetryTransmitBuffer();
|
||||
#endif
|
||||
}
|
||||
|
||||
void frskyDSendNextAlarm(void)
|
||||
{
|
||||
if (frskyTxBufferCount)
|
||||
return; // we only have one buffer. If it's in use, then we can't send yet.
|
||||
|
||||
// Now send a packet
|
||||
frskyAlarmsSendState -= 1;
|
||||
uint8_t alarm = 1 - (frskyAlarmsSendState % 2);
|
||||
if (frskyAlarmsSendState < SEND_MODEL_ALARMS) {
|
||||
uint8_t channel = 1 - (frskyAlarmsSendState / 2);
|
||||
frskySendPacket(A22PKT + frskyAlarmsSendState, g_model.frsky.channels[channel].alarms_value[alarm], ALARM_GREATER(channel, alarm), ALARM_LEVEL(channel, alarm));
|
||||
}
|
||||
else {
|
||||
frskySendPacket(RSSI1PKT-alarm, getRssiAlarmValue(alarm), 0, (2+alarm+g_model.frsky.rssiAlarms[alarm].level) % 4);
|
||||
}
|
||||
}
|
||||
@@ -1,207 +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 "opentx.h"
|
||||
|
||||
uint8_t jetiRxBuffer[32];
|
||||
uint8_t jetiReady;
|
||||
uint16_t jetiKeys;
|
||||
|
||||
void telemetryInterrupt10ms()
|
||||
{
|
||||
if (jetiReady) {
|
||||
jetiKeys = JETI_KEY_NOCHANGE;
|
||||
if (switchState(KEY_UP)) jetiKeys &= JETI_KEY_UP;
|
||||
if (switchState(KEY_DOWN)) jetiKeys &= JETI_KEY_DOWN;
|
||||
if (switchState(KEY_LEFT)) jetiKeys &= JETI_KEY_LEFT;
|
||||
if (switchState(KEY_RIGHT)) jetiKeys &= JETI_KEY_RIGHT;
|
||||
|
||||
jetiReady = 0; // invalidate buffer
|
||||
|
||||
JETI_EnableTXD();
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SIMU
|
||||
ISR(USART0_UDRE_vect)
|
||||
{
|
||||
if (jetiKeys != 0xff) {
|
||||
UCSR0B &= ~(1 << TXB80);
|
||||
|
||||
if (jetiKeys & 0x0100)
|
||||
UCSR0B |= (1 << TXB80);
|
||||
|
||||
UDR0 = jetiKeys;
|
||||
|
||||
jetiKeys = 0xff;
|
||||
}
|
||||
else {
|
||||
JETI_DisableTXD();
|
||||
}
|
||||
}
|
||||
|
||||
ISR (USART0_RX_vect)
|
||||
{
|
||||
uint8_t stat;
|
||||
uint8_t rh;
|
||||
uint8_t rl;
|
||||
static uint8_t jbp;
|
||||
|
||||
stat = UCSR0A;
|
||||
rh = UCSR0B;
|
||||
rl = UDR0;
|
||||
|
||||
if (stat & ((1 << FE0) | (1 << DOR0) | (1 << UPE0))) {
|
||||
// discard buffer and start new on any error
|
||||
jetiReady = 0;
|
||||
jbp = 0;
|
||||
}
|
||||
else if ((rh & (1 << RXB80)) == 0) {
|
||||
// control
|
||||
if (rl == 0xfe) {
|
||||
// start condition
|
||||
jetiReady = 0;
|
||||
jbp = 0;
|
||||
}
|
||||
else if (rl == 0xff) {
|
||||
// stop condition
|
||||
jetiReady = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// data
|
||||
if (jbp < 32) {
|
||||
if (rl==0xDF)
|
||||
jetiRxBuffer[jbp++] = '@'; //@ => ° Issue 163
|
||||
else
|
||||
jetiRxBuffer[jbp++] = rl;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void JETI_Init (void)
|
||||
{
|
||||
DDRE &= ~(1 << DDE0); // set RXD0 pin as input
|
||||
PORTE &= ~(1 << PORTE0); // disable pullup on RXD0 pin
|
||||
|
||||
#ifndef SIMU
|
||||
|
||||
#undef BAUD
|
||||
#define BAUD 9600
|
||||
#include <util/setbaud.h>
|
||||
UBRR0H = UBRRH_VALUE;
|
||||
UBRR0L = UBRRL_VALUE;
|
||||
|
||||
UCSR0A &= ~(1 << U2X0); // disable double speed operation
|
||||
|
||||
// set 9O1
|
||||
UCSR0C = (1 << UPM01) | (1 << UPM00) | (1 << UCSZ01) | (1 << UCSZ00);
|
||||
UCSR0B = (1 << UCSZ02);
|
||||
|
||||
// flush receive buffer
|
||||
while ( UCSR0A & (1 << RXC0) ) UDR0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void JETI_EnableTXD (void)
|
||||
{
|
||||
UCSR0B |= (1 << TXEN0); // enable TX
|
||||
UCSR0B |= (1 << UDRIE0); // enable UDRE0 interrupt
|
||||
}
|
||||
|
||||
void JETI_DisableTXD (void)
|
||||
{
|
||||
UCSR0B &= ~(1 << TXEN0); // disable TX
|
||||
UCSR0B &= ~(1 << UDRIE0); // disable UDRE0 interrupt
|
||||
}
|
||||
|
||||
void JETI_EnableRXD (void)
|
||||
{
|
||||
UCSR0B |= (1 << RXEN0); // enable RX
|
||||
UCSR0B |= (1 << RXCIE0); // enable Interrupt
|
||||
}
|
||||
|
||||
void JETI_DisableRXD (void)
|
||||
{
|
||||
UCSR0B &= ~(1 << RXEN0); // disable RX
|
||||
UCSR0B &= ~(1 << RXCIE0); // disable Interrupt
|
||||
}
|
||||
|
||||
#if 0
|
||||
void JETI_putw (uint16_t c)
|
||||
{
|
||||
loop_until_bit_is_set(UCSR0A, UDRE0);
|
||||
UCSR0B &= ~(1 << TXB80);
|
||||
if (c & 0x0100)
|
||||
{
|
||||
UCSR0B |= (1 << TXB80);
|
||||
}
|
||||
UDR0 = c;
|
||||
}
|
||||
|
||||
void JETI_putc (uint8_t c)
|
||||
{
|
||||
loop_until_bit_is_set(UCSR0A, UDRE0);
|
||||
// UCSRB &= ~(1 << TXB8);
|
||||
UCSR0B |= (1 << TXB80);
|
||||
UDR0 = c;
|
||||
}
|
||||
|
||||
void JETI_puts (char *s)
|
||||
{
|
||||
while (*s)
|
||||
{
|
||||
JETI_putc (*s);
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
||||
void JETI_put_start (void)
|
||||
{
|
||||
loop_until_bit_is_set(UCSR0A, UDRE0);
|
||||
UCSR0B &= ~(1 << TXB80);
|
||||
UDR0 = 0xFE;
|
||||
}
|
||||
|
||||
void JETI_put_stop (void)
|
||||
{
|
||||
loop_until_bit_is_set(UCSR0A, UDRE0);
|
||||
UCSR0B &= ~(1 << TXB80);
|
||||
UDR0 = 0xFF;
|
||||
}
|
||||
#endif
|
||||
|
||||
void menuViewTelemetryJeti(event_t event)
|
||||
{
|
||||
drawTelemetryTopBar();
|
||||
|
||||
for (uint8_t i=0; i<16; i++) {
|
||||
lcdDrawChar((i+2)*FW, 3*FH, jetiRxBuffer[i], BSS);
|
||||
lcdDrawChar((i+2)*FW, 4*FH, jetiRxBuffer[i+16], BSS);
|
||||
}
|
||||
|
||||
if (event == EVT_KEY_FIRST(KEY_EXIT)) {
|
||||
JETI_DisableRXD();
|
||||
jetiReady = 0;
|
||||
chainMenu(menuMainView);
|
||||
}
|
||||
}
|
||||
@@ -1,40 +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 _JETI_H_
|
||||
#define _JETI_H_
|
||||
|
||||
#define JETI_KEY_LEFT 0x70
|
||||
#define JETI_KEY_RIGHT 0xe0
|
||||
#define JETI_KEY_UP 0xd0
|
||||
#define JETI_KEY_DOWN 0xb0
|
||||
#define JETI_KEY_NOCHANGE 0xf0
|
||||
|
||||
void JETI_Init(void);
|
||||
void JETI_EnableRXD (void);
|
||||
void JETI_DisableRXD (void);
|
||||
void JETI_EnableTXD (void);
|
||||
void JETI_DisableTXD (void);
|
||||
|
||||
void telemetryInterrupt10ms();
|
||||
void menuViewTelemetryJeti(event_t event);
|
||||
|
||||
#endif // _JETI_H_
|
||||
|
||||
@@ -1,600 +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.
|
||||
*/
|
||||
|
||||
/*! \file mavlink.cpp
|
||||
* Mavlink telemetry decoder for Arducopter/Arduplane telemetry information.
|
||||
*/
|
||||
|
||||
|
||||
#include "telemetry/mavlink.h"
|
||||
|
||||
// this might need to move to the flight software
|
||||
//static
|
||||
mavlink_system_t mavlink_system = { 7, MAV_COMP_ID_MISSIONPLANNER };
|
||||
|
||||
// Mavlink message decoded Status Text
|
||||
#define PARAM_NB_REPEAT 10
|
||||
char mav_statustext[LEN_STATUSTEXT];
|
||||
int8_t mav_heartbeat = 0;
|
||||
int8_t mav_heartbeat_recv = 0;
|
||||
uint8_t data_stream_start_stop = 0;
|
||||
|
||||
|
||||
// Telemetry data hold
|
||||
Telemetry_Data_t telemetry_data;
|
||||
|
||||
// *****************************************************
|
||||
static void MAVLINK_parse_char(uint8_t c);
|
||||
uint8_t telemetryRxBufferCount = 0;
|
||||
|
||||
void processTelemetryData(uint8_t byte) {
|
||||
MAVLINK_parse_char(byte);
|
||||
}
|
||||
|
||||
/*! \brief Reset basic Mavlink varables
|
||||
* \todo Figure out exact function
|
||||
*
|
||||
*/
|
||||
void MAVLINK_reset(uint8_t warm_reset) {
|
||||
if (warm_reset && telemetry_data.status) {
|
||||
mav_statustext[0] = 0;
|
||||
}
|
||||
|
||||
mavlink_status_t* p_status = mavlink_get_channel_status(MAVLINK_COMM_0);
|
||||
p_status->current_rx_seq = 0;
|
||||
p_status->current_tx_seq = 0;
|
||||
memset(&telemetry_data, 0, sizeof(telemetry_data));
|
||||
telemetry_data.rcv_control_mode = ERROR_NUM_MODES;
|
||||
telemetry_data.req_mode = ERROR_NUM_MODES;
|
||||
|
||||
telemetry_data.type = MAV_TYPE_ENUM_END;
|
||||
telemetry_data.autopilot = MAV_AUTOPILOT_ENUM_END;
|
||||
telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE;
|
||||
|
||||
mav_heartbeat = 0;
|
||||
mav_heartbeat_recv = 0;
|
||||
data_stream_start_stop = 0;
|
||||
}
|
||||
|
||||
//! \brief initalize mavlink extension
|
||||
void MAVLINK_Init(void)
|
||||
{
|
||||
mav_statustext[0] = 0;
|
||||
MAVLINK_reset(0);
|
||||
telemetryPortInit(g_eeGeneral.mavbaud);
|
||||
}
|
||||
|
||||
/*! \brief Status log message
|
||||
* \details Processes the mavlink status messages. This message contains a
|
||||
* severity and a message. The severity is an enum difined by MAV_SEVERITY also
|
||||
* see RFC-5424 for the severity levels.
|
||||
* The original message is maximum 50 characters and is without termination
|
||||
* character. For readablity on the 9x the only the first 15 (LEN_STATUSTEXT)
|
||||
* characters are used. To get the full message you can use the commented
|
||||
* funtion below.
|
||||
*/
|
||||
|
||||
static inline void REC_MAVLINK_MSG_ID_STATUSTEXT(const mavlink_message_t* msg) {
|
||||
_MAV_RETURN_char_array(msg, mav_statustext, LEN_STATUSTEXT, 1);
|
||||
}
|
||||
|
||||
/*! \brief System status including cpu load, battery status and communication status.
|
||||
* \details From this message we use use only the batery infomation. The rest
|
||||
* is not realy of use while flying. The complete message can be decoded in to
|
||||
* a struct with the first two commented lines.
|
||||
* The batery votage is in mV. We devide by 100 to display tenths of volts.'
|
||||
* \todo Add battery remaining variable in telemetry_data struct for estimated
|
||||
* remaining battery. Decoding funtion allready in place.
|
||||
*/
|
||||
|
||||
static inline void REC_MAVLINK_MSG_ID_SYS_STATUS(const mavlink_message_t* msg) {
|
||||
telemetry_data.vbat = mavlink_msg_sys_status_get_voltage_battery(msg) / 100; // Voltage * 10
|
||||
telemetry_data.ibat = mavlink_msg_sys_status_get_current_battery(msg) / 10;
|
||||
telemetry_data.rem_bat = mavlink_msg_sys_status_get_battery_remaining(msg);
|
||||
|
||||
#ifdef MAVLINK_PARAMS
|
||||
telemetry_data.vbat_low = (getMavlinParamsValue(BATT_MONITOR) > 0)
|
||||
&& (((float) telemetry_data.vbat / 10.0) < getMavlinParamsValue(LOW_VOLT)) && (telemetry_data.vbat > 50);
|
||||
#else
|
||||
telemetry_data.vbat_low = (telemetry_data.rem_bat < 10);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*! \brief Receive rc channels
|
||||
*
|
||||
*/
|
||||
static inline void REC_MAVLINK_MSG_ID_RC_CHANNELS(const mavlink_message_t* msg) {
|
||||
uint8_t temp_scale = 5 + g_model.mavlink.rc_rssi_scale;
|
||||
telemetry_data.rc_rssi = mavlink_msg_rc_channels_get_rssi(msg) * 20 / temp_scale;
|
||||
}
|
||||
|
||||
/*! \brief Receive raw rc channels
|
||||
*
|
||||
*/
|
||||
static inline void REC_MAVLINK_MSG_ID_RC_CHANNELS_RAW(const mavlink_message_t* msg) {
|
||||
uint8_t temp_rssi =(mavlink_msg_rc_channels_raw_get_rssi(msg) * 100) / 255;
|
||||
uint8_t temp_scale = 25 + g_model.mavlink.rc_rssi_scale * 5;
|
||||
telemetry_data.rc_rssi = (temp_rssi * 100) / temp_scale;
|
||||
}
|
||||
|
||||
/*! \brief Arducopter specific radio message
|
||||
*
|
||||
*/
|
||||
static inline void REC_MAVLINK_MSG_ID_RADIO(const mavlink_message_t* msg) {
|
||||
if (msg->sysid != 51)
|
||||
return;
|
||||
telemetry_data.pc_rssi = (mavlink_msg_radio_get_rssi(msg) * 100) / 255;
|
||||
telemetry_data.packet_drop = mavlink_msg_radio_get_rxerrors(msg);
|
||||
telemetry_data.packet_fixed = mavlink_msg_radio_get_fixed(msg);
|
||||
telemetry_data.radio_sysid = msg->sysid;
|
||||
telemetry_data.radio_compid = msg->compid;
|
||||
}
|
||||
static inline void REC_MAVLINK_MSG_ID_RADIO_STATUS(const mavlink_message_t* msg) {
|
||||
REC_MAVLINK_MSG_ID_RADIO(msg);
|
||||
}
|
||||
|
||||
//! \brief Navigaion output message
|
||||
static inline void REC_MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT(const mavlink_message_t* msg) {
|
||||
telemetry_data.bearing = mavlink_msg_nav_controller_output_get_target_bearing(msg);
|
||||
}
|
||||
|
||||
//! \brief Hud navigation message
|
||||
static inline void REC_MAVLINK_MSG_ID_VFR_HUD(const mavlink_message_t* msg) {
|
||||
telemetry_data.heading = mavlink_msg_vfr_hud_get_heading(msg);
|
||||
telemetry_data.loc_current.rel_alt = mavlink_msg_vfr_hud_get_alt(msg);
|
||||
}
|
||||
|
||||
/*! \brief Heartbeat message
|
||||
* \details Heartbeat message is used for the following information:
|
||||
* type and autopilot is used to determine if the UAV is an ArduPlane or Arducopter
|
||||
*/
|
||||
static inline void REC_MAVLINK_MSG_ID_HEARTBEAT(const mavlink_message_t* msg) {
|
||||
telemetry_data.mode = mavlink_msg_heartbeat_get_base_mode(msg);
|
||||
telemetry_data.custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg);
|
||||
telemetry_data.status = mavlink_msg_heartbeat_get_system_status(msg);
|
||||
telemetry_data.mav_sysid = msg->sysid;
|
||||
telemetry_data.mav_compid = msg->compid;
|
||||
uint8_t type = mavlink_msg_heartbeat_get_type(msg);
|
||||
uint8_t autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
|
||||
if (type != telemetry_data.type || autopilot != telemetry_data.autopilot) {
|
||||
telemetry_data.type = mavlink_msg_heartbeat_get_type(msg);
|
||||
telemetry_data.autopilot = mavlink_msg_heartbeat_get_autopilot(msg);
|
||||
if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) {
|
||||
if (type == MAV_TYPE_QUADROTOR ||
|
||||
type == MAV_TYPE_COAXIAL ||
|
||||
type == MAV_TYPE_HELICOPTER ||
|
||||
type == MAV_TYPE_HEXAROTOR ||
|
||||
type == MAV_TYPE_OCTOROTOR ||
|
||||
type == MAV_TYPE_TRICOPTER) {
|
||||
telemetry_data.type_autopilot = MAVLINK_ARDUCOPTER;
|
||||
}
|
||||
else if (type == MAV_TYPE_FIXED_WING) {
|
||||
telemetry_data.type_autopilot = MAVLINK_ARDUPLANE;
|
||||
}
|
||||
else {
|
||||
telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE;
|
||||
}
|
||||
}
|
||||
telemetry_data.active = (telemetry_data.mode & MAV_MODE_FLAG_SAFETY_ARMED) ? true : false;
|
||||
mav_heartbeat = 3; // 450ms display '*'
|
||||
mav_heartbeat_recv = 1;
|
||||
}
|
||||
|
||||
static inline void REC_MAVLINK_MSG_ID_HIL_CONTROLS(const mavlink_message_t* msg) {
|
||||
telemetry_data.nav_mode = mavlink_msg_hil_controls_get_mode(msg);
|
||||
}
|
||||
|
||||
/*! \brief Process GPS raw intger message
|
||||
* \details This message contains the following data:
|
||||
* - fix type: 0-1: no fix, 2: 2D fix, 3: 3D fix.
|
||||
* - Latitude, longitude in 1E7 * degrees
|
||||
* - Altutude 1E3 * meters above MSL.
|
||||
* - Course over ground in 100 * degrees
|
||||
* - GPS HDOP horizontal dilution of precision in cm (m*100).
|
||||
* - Ground speed in m/s * 100
|
||||
*/
|
||||
static inline void REC_MAVLINK_MSG_ID_GPS_RAW_INT(const mavlink_message_t* msg) {
|
||||
telemetry_data.fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg);
|
||||
telemetry_data.loc_current.lat = mavlink_msg_gps_raw_int_get_lat(msg) / 1E7;
|
||||
telemetry_data.loc_current.lon = mavlink_msg_gps_raw_int_get_lon(msg) / 1E7;
|
||||
telemetry_data.loc_current.gps_alt = mavlink_msg_gps_raw_int_get_alt(msg) / 1E3;
|
||||
telemetry_data.eph = mavlink_msg_gps_raw_int_get_eph(msg) / 100.0;
|
||||
telemetry_data.course = mavlink_msg_gps_raw_int_get_cog(msg) / 100.0;
|
||||
telemetry_data.v = mavlink_msg_gps_raw_int_get_vel(msg) / 100.0 ;
|
||||
telemetry_data.satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg);
|
||||
}
|
||||
|
||||
#ifdef MAVLINK_PARAMS
|
||||
const pm_char *getParamId(uint8_t idx) {
|
||||
const pm_char *mav_params_id [((NB_PID_PARAMS / 2) + 4)] = {
|
||||
PSTR("RATE_YAW"), // Rate Yaw
|
||||
PSTR("STB_YAW"), // Stabilize Yaw
|
||||
PSTR("RATE_PIT"), // Rate Pitch
|
||||
PSTR("STB_PIT"), // Stabilize Pitch
|
||||
PSTR("RATE_RLL"), // Rate Roll
|
||||
PSTR("STB_RLL"), // Stabilize Roll
|
||||
PSTR("THR_ALT"), // PSTR("THR_BAR"), // Altitude Hold
|
||||
PSTR("HLD_LON"), // Loiter
|
||||
PSTR("HLD_LAT"), // Loiter
|
||||
PSTR("NAV_LON"), // Nav WP
|
||||
PSTR("NAV_LAT"), // Nav WP
|
||||
PSTR("LOW_VOLT"), // Battery low voltage
|
||||
PSTR("VOLT_DIVIDER"), //
|
||||
PSTR("BATT_MONITOR"), //
|
||||
PSTR("BATT_CAPACITY")
|
||||
};
|
||||
uint8_t i;
|
||||
if (idx < NB_PID_PARAMS) {
|
||||
i = idx / 2;
|
||||
} else {
|
||||
i = idx - (NB_PID_PARAMS / 2);
|
||||
}
|
||||
return mav_params_id[i];
|
||||
}
|
||||
|
||||
void setMavlinParamsValue(uint8_t idx, float val) {
|
||||
MavlinkParam_t *param = getParam(idx);
|
||||
if (idx < NB_PARAMS && val != param->value) {
|
||||
param->value = val;
|
||||
param->repeat = PARAM_NB_REPEAT;
|
||||
uint8_t link_idx = NB_PID_PARAMS;
|
||||
switch (idx) {
|
||||
case RATE_PIT_P:
|
||||
case RATE_PIT_I:
|
||||
case STB_PIT_P:
|
||||
case STB_PIT_I:
|
||||
link_idx = idx + 4;
|
||||
break;
|
||||
case RATE_RLL_P:
|
||||
case RATE_RLL_I:
|
||||
case STB_RLL_P:
|
||||
case STB_RLL_I:
|
||||
link_idx = idx - 4;
|
||||
break;
|
||||
case HLD_LON_P:
|
||||
case HLD_LON_I:
|
||||
case NAV_LON_P:
|
||||
case NAV_LON_I:
|
||||
link_idx = idx + 2;
|
||||
break;
|
||||
case HLD_LAT_P:
|
||||
case HLD_LAT_I:
|
||||
case NAV_LAT_P:
|
||||
case NAV_LAT_I:
|
||||
link_idx = idx - 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (link_idx < NB_PID_PARAMS) {
|
||||
MavlinkParam_t *p = getParam(link_idx);
|
||||
p->value = val;
|
||||
p->repeat = PARAM_NB_REPEAT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void putsMavlinParams(uint8_t x, uint8_t y, uint8_t idx, uint8_t att) {
|
||||
if (idx < NB_PARAMS) {
|
||||
const pm_char * s = getParamId(idx);
|
||||
char c;
|
||||
while ((c = pgm_read_byte(s++))) {
|
||||
lcdDrawChar(x, y, (c == '_' ? ' ' : c), 0);
|
||||
x += FW;
|
||||
}
|
||||
if (idx < NB_PID_PARAMS) {
|
||||
x = 11 * FW;
|
||||
lcdDrawChar(x, y, "PI"[idx & 0x01], att);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void setParamValue(int8_t *id, float value) {
|
||||
int8_t *p_id;
|
||||
for (int8_t idx = 0; idx < NB_PARAMS; idx++) {
|
||||
const pm_char * s = getParamId(idx);
|
||||
p_id = id;
|
||||
while (1) {
|
||||
char c1 = pgm_read_byte(s++);
|
||||
if (!c1) {
|
||||
// Founded !
|
||||
uint8_t founded = !*p_id;
|
||||
if (idx < NB_PID_PARAMS) {
|
||||
p_id++;
|
||||
switch (*p_id++) {
|
||||
case 'P':
|
||||
founded = !*p_id;
|
||||
break;
|
||||
case 'I':
|
||||
founded = !*p_id;
|
||||
idx++;
|
||||
break;
|
||||
default:
|
||||
founded = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// test end of string char == 0 and a valid PI
|
||||
if (founded) {
|
||||
MavlinkParam_t *param = getParam(idx);
|
||||
param->repeat = 0;
|
||||
param->valid = 1;
|
||||
param->value = value;
|
||||
mav_req_params_nb_recv++;
|
||||
}
|
||||
return;
|
||||
} else if (c1 != *p_id++) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx < NB_PID_PARAMS) {
|
||||
// Skip I Parameter from PID
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void REC_MAVLINK_MSG_ID_PARAM_VALUE(const mavlink_message_t* msg) {
|
||||
mavlink_param_value_t param_value;
|
||||
mavlink_msg_param_value_decode(msg, ¶m_value);
|
||||
char *id = param_value.param_id;
|
||||
setParamValue((int8_t*)id, param_value.param_value);
|
||||
data_stream_start_stop = 0; // stop data stream while getting params list
|
||||
watch_mav_req_params_list = mav_req_params_nb_recv < (NB_PARAMS - 5) ? 20 : 0; // stop timeout
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void handleMessage(mavlink_message_t* p_rxmsg) {
|
||||
switch (p_rxmsg->msgid) {
|
||||
case MAVLINK_MSG_ID_HEARTBEAT:
|
||||
REC_MAVLINK_MSG_ID_HEARTBEAT(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_STATUSTEXT:
|
||||
REC_MAVLINK_MSG_ID_STATUSTEXT(p_rxmsg);
|
||||
AUDIO_WARNING1();
|
||||
break;
|
||||
case MAVLINK_MSG_ID_SYS_STATUS:
|
||||
REC_MAVLINK_MSG_ID_SYS_STATUS(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_RC_CHANNELS:
|
||||
REC_MAVLINK_MSG_ID_RC_CHANNELS(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_RC_CHANNELS_RAW:
|
||||
REC_MAVLINK_MSG_ID_RC_CHANNELS_RAW(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_RADIO:
|
||||
REC_MAVLINK_MSG_ID_RADIO(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_RADIO_STATUS:
|
||||
REC_MAVLINK_MSG_ID_RADIO_STATUS(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT:
|
||||
REC_MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_VFR_HUD:
|
||||
REC_MAVLINK_MSG_ID_VFR_HUD(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_HIL_CONTROLS:
|
||||
REC_MAVLINK_MSG_ID_HIL_CONTROLS(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_GPS_RAW_INT:
|
||||
REC_MAVLINK_MSG_ID_GPS_RAW_INT(p_rxmsg);
|
||||
break;
|
||||
#ifdef MAVLINK_PARAMS
|
||||
case MAVLINK_MSG_ID_PARAM_VALUE:
|
||||
REC_MAVLINK_MSG_ID_PARAM_VALUE(p_rxmsg);
|
||||
break;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Mavlink message parser
|
||||
* \details Parses the characters in to a mavlink message.
|
||||
* Case statement parses each character as it is recieved.
|
||||
* \attention One big change form the 0.9 to 1.0 version is the
|
||||
* MAVLINK_CRC_EXTRA. This requires the mavlink_message_crcs array of 256 bytes.
|
||||
* \todo create dot for the statemachine
|
||||
*/
|
||||
static void MAVLINK_parse_char(uint8_t c) {
|
||||
|
||||
static mavlink_message_t m_mavlink_message;
|
||||
//! The currently decoded message
|
||||
static mavlink_message_t* p_rxmsg = &m_mavlink_message;
|
||||
//! The current decode status
|
||||
mavlink_status_t* p_status = mavlink_get_channel_status(MAVLINK_COMM_0);
|
||||
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
static const uint8_t mavlink_message_crcs[256] PROGMEM = MAVLINK_MESSAGE_CRCS;
|
||||
#endif
|
||||
|
||||
// Initializes only once, values keep unchanged after first initialization
|
||||
//mavlink_parse_state_initialize(p_status);
|
||||
|
||||
//p_status->msg_received = 0;
|
||||
|
||||
switch (p_status->parse_state) {
|
||||
case MAVLINK_PARSE_STATE_UNINIT:
|
||||
case MAVLINK_PARSE_STATE_IDLE:
|
||||
if (c == MAVLINK_STX) {
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_STX;
|
||||
mavlink_start_checksum(p_rxmsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_STX:
|
||||
// NOT counting STX, LENGTH, SEQ, SYSID, COMPID, MSGID, CRC1 and CRC2
|
||||
p_rxmsg->len = c;
|
||||
p_status->packet_idx = 0;
|
||||
mavlink_update_checksum(p_rxmsg, c);
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_LENGTH;
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_LENGTH:
|
||||
p_rxmsg->seq = c;
|
||||
mavlink_update_checksum(p_rxmsg, c);
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_SEQ;
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_SEQ:
|
||||
p_rxmsg->sysid = c;
|
||||
mavlink_update_checksum(p_rxmsg, c);
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_SYSID;
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_SYSID:
|
||||
p_rxmsg->compid = c;
|
||||
mavlink_update_checksum(p_rxmsg, c);
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_COMPID;
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_COMPID:
|
||||
p_rxmsg->msgid = c;
|
||||
mavlink_update_checksum(p_rxmsg, c);
|
||||
if (p_rxmsg->len == 0) {
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_PAYLOAD;
|
||||
} else {
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_MSGID;
|
||||
}
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_MSGID:
|
||||
_MAV_PAYLOAD_NON_CONST(p_rxmsg)[p_status->packet_idx++] = (char) c;
|
||||
mavlink_update_checksum(p_rxmsg, c);
|
||||
if (p_status->packet_idx == p_rxmsg->len) {
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_PAYLOAD;
|
||||
}
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_PAYLOAD:
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
mavlink_update_checksum(p_rxmsg, pgm_read_byte(&(mavlink_message_crcs[p_rxmsg->msgid])));
|
||||
#endif
|
||||
if (c != (p_rxmsg->checksum & 0xFF)) {
|
||||
// Check first checksum byte
|
||||
p_status->parse_error = 3;
|
||||
} else {
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_CRC1;
|
||||
}
|
||||
break;
|
||||
|
||||
case MAVLINK_PARSE_STATE_GOT_CRC1:
|
||||
if (c != (p_rxmsg->checksum >> 8)) {
|
||||
// Check second checksum byte
|
||||
p_status->parse_error = 4;
|
||||
} else {
|
||||
// Successfully got message
|
||||
if (mav_heartbeat < 0)
|
||||
mav_heartbeat = 0;
|
||||
p_status->current_rx_seq = p_rxmsg->seq;
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_IDLE;
|
||||
handleMessage(p_rxmsg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Error occur
|
||||
if (p_status->parse_error) {
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_IDLE;
|
||||
if (c == MAVLINK_STX) {
|
||||
p_status->parse_state = MAVLINK_PARSE_STATE_GOT_STX;
|
||||
mavlink_start_checksum(p_rxmsg);
|
||||
}
|
||||
p_status->parse_error = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MAVLINK_PARAMS
|
||||
static inline void MAVLINK_msg_param_request_list_send() {
|
||||
mavlink_channel_t chan = MAVLINK_COMM_0;
|
||||
mavlink_msg_param_request_list_send(chan, mavlink_system.sysid, mavlink_system.compid);
|
||||
}
|
||||
|
||||
static inline void MAVLINK_msg_param_set(uint8_t idx) {
|
||||
const pm_char* s = getParamId(idx);
|
||||
int8_t buf[15];
|
||||
int8_t *p = buf;
|
||||
while (1) {
|
||||
char c = pgm_read_byte(s++);
|
||||
if (!c) {
|
||||
if (idx < NB_PID_PARAMS) {
|
||||
*p++ = '_';
|
||||
uint8_t colIdx = idx & 0x01;
|
||||
*p++ = "PI"[colIdx];
|
||||
}
|
||||
*p++ = 0;
|
||||
break;
|
||||
}
|
||||
*p++ = c;
|
||||
}
|
||||
float param_value = getParam(idx)->value;
|
||||
|
||||
mavlink_channel_t chan = MAVLINK_COMM_0;
|
||||
uint8_t param_type = (uint8_t)MAV_PARAM_TYPE_REAL32;
|
||||
const char* param_id = (const char*)buf;
|
||||
mavlink_msg_param_set_send(chan, mavlink_system.sysid, mavlink_system.compid, param_id, param_value, param_type);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
__attribute__((unused))
|
||||
static inline void MAVLINK_msg_request_data_stream_pack_send(uint8_t req_stream_id, uint16_t req_message_rate,
|
||||
uint8_t start_stop) {
|
||||
mavlink_channel_t chan = MAVLINK_COMM_0;
|
||||
mavlink_msg_request_data_stream_send(chan, mavlink_system.sysid, mavlink_system.compid, req_stream_id, req_message_rate,
|
||||
start_stop);
|
||||
}
|
||||
|
||||
|
||||
__attribute__((unused))
|
||||
//! \brief old mode switch funtion
|
||||
static inline void MAVLINK_msg_set_mode_send(uint8_t mode) {
|
||||
mavlink_channel_t chan = MAVLINK_COMM_0;
|
||||
mavlink_msg_set_mode_send(chan, mavlink_system.sysid, mode, 0);
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Telemetry monitoring, calls \link MAVLINK10mspoll.
|
||||
* \todo Reimplemnt \link MAVLINK10mspoll
|
||||
*
|
||||
*/
|
||||
void telemetryWakeup() {
|
||||
uint16_t tmr10ms = get_tmr10ms();
|
||||
static uint16_t last_time = 0;
|
||||
if (tmr10ms - last_time > 15) {
|
||||
if (mav_heartbeat > -30) {
|
||||
mav_heartbeat--;
|
||||
|
||||
if (mav_heartbeat == -30) {
|
||||
MAVLINK_reset(1);
|
||||
telemetryPortInit(g_eeGeneral.mavbaud);
|
||||
}
|
||||
}
|
||||
last_time = tmr10ms;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,335 +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.
|
||||
*/
|
||||
|
||||
/*! \file mavlink.h
|
||||
* Mavlink include file
|
||||
*/
|
||||
|
||||
#ifndef _MAVLINK_H_
|
||||
#define _MAVLINK_H_
|
||||
|
||||
#define MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
#define MAVLINK_COMM_NUM_BUFFERS 1
|
||||
|
||||
#include "GCS_MAVLink/include_v1.0/mavlink_types.h"
|
||||
#include "opentx.h"
|
||||
|
||||
extern int8_t mav_heartbeat;
|
||||
extern mavlink_system_t mavlink_system;
|
||||
#define LEN_STATUSTEXT 20
|
||||
extern char mav_statustext[LEN_STATUSTEXT];
|
||||
|
||||
extern void SERIAL_start_uart_send();
|
||||
extern void SERIAL_end_uart_send();
|
||||
extern void SERIAL_send_uart_bytes(const uint8_t * buf, uint16_t len);
|
||||
|
||||
# define MAV_SYSTEM_ID 1
|
||||
//mavlink_system.type = 2; //MAV_QUADROTOR;
|
||||
|
||||
|
||||
#define MAVLINK_START_UART_SEND(chan,len) SERIAL_start_uart_send()
|
||||
#define MAVLINK_END_UART_SEND(chan,len) SERIAL_end_uart_send()
|
||||
#define MAVLINK_SEND_UART_BYTES(chan,buf,len) SERIAL_send_uart_bytes(buf,len)
|
||||
|
||||
#if __clang__
|
||||
// clang does not like packed member access at all. Since mavlink is a 3rd party library, ignore the errors
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Waddress-of-packed-member"
|
||||
#endif
|
||||
#include "GCS_MAVLink/include_v1.0/ardupilotmega/mavlink.h"
|
||||
#if __clang__
|
||||
// Restore warnings about packed member access
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
//#define MAVLINK_PARAMS
|
||||
//#define DUMP_RX_TX
|
||||
#define ERROR_NUM_MODES 99
|
||||
#define ERROR_MAV_ACTION_NB 99
|
||||
|
||||
|
||||
// Auto Pilot modes
|
||||
// ----------------
|
||||
#define AC_STABILIZE 0 // hold level position
|
||||
#define AC_ACRO 1 // rate control
|
||||
#define AC_ALT_HOLD 2 // AUTO control
|
||||
#define AC_AUTO 3 // AUTO control
|
||||
#define AC_GUIDED 4 // AUTO control
|
||||
#define AC_LOITER 5 // Hold a single location
|
||||
#define AC_RTL 6 // AUTO control
|
||||
#define AC_CIRCLE 7 // AUTO control
|
||||
#define AC_POSITION 8 // AUTO control
|
||||
#define AC_LAND 9 // AUTO control
|
||||
#define AC_OF_LOITER 10 // Hold a single location using optical flow
|
||||
// sensor
|
||||
#define AC_TOY_A 11 // THOR Enum for Toy mode
|
||||
#define AC_TOY_M 12 // THOR Enum for Toy mode
|
||||
#define AC_NUM_MODES 13
|
||||
|
||||
// Mavlink airframe types
|
||||
#define MAVLINK_ARDUCOPTER 0
|
||||
#define MAVLINK_ARDUPLANE 1
|
||||
#define MAVLINK_INVALID_TYPE 2
|
||||
|
||||
|
||||
#define AP_MANUAL 0
|
||||
#define AP_CIRCLE 1
|
||||
#define AP_STABILIZE 2
|
||||
#define AP_TRAINING 3
|
||||
#define AP_FLY_BY_WIRE_A 5
|
||||
#define AP_FLY_BY_WIRE_B 6
|
||||
#define AP_AUTO 10
|
||||
#define AP_RTL 11
|
||||
#define AP_LOITER 12
|
||||
#define AP_GUIDED 15
|
||||
#define AP_INITIALISING 16
|
||||
#define AP_NUM_MODES 17
|
||||
|
||||
static const uint8_t ap_modes_lut[18] PROGMEM = {0,1,2,3,12,4,5,12,12,12,6,7,8,9,12,12,10,11};
|
||||
|
||||
/*
|
||||
* Type definitions
|
||||
*/
|
||||
|
||||
#ifdef MAVLINK_PARAMS
|
||||
|
||||
enum ACM_PARAMS {
|
||||
RATE_YAW_P, // Rate Yaw
|
||||
RATE_YAW_I, // Rate Yaw
|
||||
STB_YAW_P, // Stabilize Yaw
|
||||
STB_YAW_I, // Stabilize Yaw
|
||||
RATE_PIT_P, // Rate Pitch
|
||||
RATE_PIT_I, // Rate Pitch
|
||||
STB_PIT_P, // Stabilize Pitch
|
||||
STB_PIT_I, // Stabilize Pitch
|
||||
RATE_RLL_P, // Rate Roll
|
||||
RATE_RLL_I, // Rate Roll
|
||||
STB_RLL_P, // Stabilize Roll
|
||||
STB_RLL_I, // Stabilize Roll
|
||||
THR_ALT_P, // THR_BAR, // Altitude Hold
|
||||
THR_ALT_I, // THR_BAR, // Altitude Hold
|
||||
HLD_LON_P, // Loiter
|
||||
HLD_LON_I, // Loiter
|
||||
HLD_LAT_P, // Loiter
|
||||
HLD_LAT_I, // Loiter
|
||||
NAV_LON_P, // Nav WP
|
||||
NAV_LON_I, // Nav WP
|
||||
NAV_LAT_P, // Nav WPs
|
||||
NAV_LAT_I, // Nav WP
|
||||
NB_PID_PARAMS, // Number of PI Parameters
|
||||
LOW_VOLT = NB_PID_PARAMS,
|
||||
IN_VOLT, //
|
||||
BATT_MONITOR, //
|
||||
BATT_CAPACITY, //
|
||||
NB_PARAMS
|
||||
};
|
||||
//#define NB_PID_PARAMS 24
|
||||
#define NB_COL_PARAMS 2
|
||||
#define NB_ROW_PARAMS ((NB_PARAMS+1)/NB_COL_PARAMS)
|
||||
|
||||
typedef struct MavlinkParam_ {
|
||||
uint8_t repeat :4;
|
||||
uint8_t valid :4;
|
||||
float value;
|
||||
} MavlinkParam_t;
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct Location_ {
|
||||
float lat; ///< Latitude in degrees
|
||||
float lon; ///< Longitude in degrees
|
||||
float gps_alt; ///< Altitude in meters
|
||||
float rel_alt;
|
||||
} Location_t;
|
||||
|
||||
typedef struct Telemetry_Data_ {
|
||||
// INFOS
|
||||
uint8_t status; ///< System status flag, see MAV_STATUS ENUM
|
||||
uint8_t type;
|
||||
uint8_t autopilot;
|
||||
uint8_t type_autopilot;
|
||||
uint16_t packet_drop;
|
||||
uint16_t packet_fixed;
|
||||
uint8_t radio_sysid;
|
||||
uint8_t radio_compid;
|
||||
uint8_t mav_sysid;
|
||||
uint8_t mav_compid;
|
||||
uint8_t mode;
|
||||
uint32_t custom_mode;
|
||||
bool active;
|
||||
uint8_t nav_mode;
|
||||
uint8_t rcv_control_mode; ///< System mode, see MAV_MODE ENUM in mavlink/include/mavlink_types.h
|
||||
uint16_t load; ///< Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
|
||||
uint8_t vbat; ///< Battery voltage, in millivolts (1 = 1 millivolt)
|
||||
uint8_t ibat; ///< Battery voltage, in millivolts (1 = 1 millivolt)
|
||||
uint8_t rem_bat; ///< Battery voltage, in millivolts (1 = 1 millivolt)
|
||||
bool vbat_low;
|
||||
|
||||
uint8_t rc_rssi;
|
||||
uint8_t pc_rssi;
|
||||
|
||||
uint8_t debug;
|
||||
|
||||
// MSG ACTION / ACK
|
||||
uint8_t req_mode;
|
||||
int8_t ack_result;
|
||||
|
||||
// GPS
|
||||
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
uint8_t satellites_visible; ///< Number of satellites visible
|
||||
Location_t loc_current;
|
||||
float eph;
|
||||
uint16_t course;
|
||||
float v; // Ground speed
|
||||
// Navigation
|
||||
uint16_t heading;
|
||||
uint16_t bearing;
|
||||
|
||||
#ifdef MAVLINK_PARAMS
|
||||
// Params
|
||||
MavlinkParam_t params[NB_PARAMS];
|
||||
#endif
|
||||
|
||||
} Telemetry_Data_t;
|
||||
|
||||
// Telemetry data hold
|
||||
extern Telemetry_Data_t telemetry_data;
|
||||
|
||||
/*
|
||||
* Funtion definitions
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
extern inline uint8_t MAVLINK_CtrlMode2Action(uint8_t mode) {
|
||||
uint8_t action;
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
extern inline uint8_t MAVLINK_Action2CtrlMode(uint8_t action) {
|
||||
uint8_t mode = ERROR_NUM_MODES;
|
||||
switch (action) {
|
||||
|
||||
return action;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
void telemetryWakeup();
|
||||
void MAVLINK_Init(void);
|
||||
void menuViewTelemetryMavlink(event_t event);
|
||||
void MAVLINK10mspoll(uint16_t time);
|
||||
|
||||
#ifdef MAVLINK_PARAMS
|
||||
|
||||
void putsMavlinParams(uint8_t x, uint8_t y, uint8_t idx, uint8_t att);
|
||||
void setMavlinParamsValue(uint8_t idx, float val);
|
||||
|
||||
inline uint8_t getIdxParam(uint8_t rowIdx, uint8_t colIdx) {
|
||||
return (rowIdx * NB_COL_PARAMS) + colIdx;
|
||||
}
|
||||
|
||||
inline MavlinkParam_t * getParam(uint8_t idx) {
|
||||
return &telemetry_data.params[idx];
|
||||
}
|
||||
|
||||
inline float getMavlinParamsValue(uint8_t idx) {
|
||||
return telemetry_data.params[idx].value;
|
||||
}
|
||||
|
||||
inline uint8_t isDirtyParamsValue(uint8_t idx) {
|
||||
return telemetry_data.params[idx].repeat;
|
||||
}
|
||||
|
||||
inline uint8_t isValidParamsValue(uint8_t idx) {
|
||||
return telemetry_data.params[idx].valid;
|
||||
}
|
||||
|
||||
inline float getCoefPrecis(uint8_t precis) {
|
||||
switch (precis) {
|
||||
case 1:
|
||||
return 10.0;
|
||||
case 2:
|
||||
return 100.0;
|
||||
case 3:
|
||||
return 1000.0;
|
||||
}
|
||||
return 1.0;
|
||||
|
||||
}
|
||||
|
||||
inline int16_t getMaxMavlinParamsValue(uint8_t idx) {
|
||||
int16_t max = 0;
|
||||
switch (idx) {
|
||||
case LOW_VOLT:
|
||||
max = 2500; // 25.0 Volt max
|
||||
break;
|
||||
case IN_VOLT:
|
||||
max = 900; // 7.00 Volt max
|
||||
break;
|
||||
case BATT_MONITOR:
|
||||
max = 3;
|
||||
break;
|
||||
case BATT_CAPACITY:
|
||||
max = 7000; // 7000 mAh max
|
||||
break;
|
||||
default:
|
||||
if (idx < NB_PID_PARAMS) {
|
||||
max = (idx & 0x01) ? 1000 : 750;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
inline uint8_t getPrecisMavlinParamsValue(uint8_t idx) {
|
||||
uint8_t precis = 2;
|
||||
switch (idx) {
|
||||
case LOW_VOLT:
|
||||
precis = 2;
|
||||
break;
|
||||
case IN_VOLT:
|
||||
precis = 2;
|
||||
break;
|
||||
case BATT_MONITOR:
|
||||
precis = 0;
|
||||
break;
|
||||
case BATT_CAPACITY:
|
||||
precis = 0;
|
||||
break;
|
||||
default:
|
||||
if (idx < NB_PID_PARAMS) {
|
||||
if (idx & 0x01)
|
||||
precis = 3;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return precis;
|
||||
}
|
||||
|
||||
void lcd_outdezFloat(uint8_t x, uint8_t y, float val, uint8_t precis, uint8_t mode);
|
||||
#endif
|
||||
|
||||
void telemetryPortInit(uint8_t baudrate);
|
||||
|
||||
#endif // _MAVLINK_H_
|
||||
|
||||
@@ -1,826 +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 "opentx.h"
|
||||
|
||||
#define LG_BUF 14
|
||||
#define NB_LONG_BUF 3
|
||||
#define NB_SHORT_BUF 3
|
||||
#define LONG_BUF(val) (val)
|
||||
#define SHORT_BUF(val) (val+NB_LONG_BUF)
|
||||
#define VALSTR(val) (rbuf[val][0] ? rbuf[val] : val_unknown)
|
||||
#define APSIZE (BSS | DBLSIZE)
|
||||
|
||||
uint8_t i; // working variable
|
||||
uint8_t state; // currrent state
|
||||
uint8_t rval, rpack; // received items
|
||||
uint8_t xval[NB_LONG_BUF+NB_SHORT_BUF]; // expected value
|
||||
uint8_t xpack[NB_LONG_BUF+NB_SHORT_BUF]; // expected packet
|
||||
uint8_t ibuf[NB_LONG_BUF]; // subscripts on long buffers values
|
||||
char rbuf[NB_LONG_BUF][LG_BUF]; // long receive buffers
|
||||
char sbuf[NB_SHORT_BUF]; // short receive buffers
|
||||
const char val_unknown[] = "?";
|
||||
int32_t home_alt, save_alt, rel_alt, prev_alt, lift_alt, max_alt, abs_alt; // integer values for altitude computations
|
||||
int32_t gpstimer=0;
|
||||
int32_t gpstime;
|
||||
uint8_t ggareceived;
|
||||
uint8_t beep_on;
|
||||
uint8_t show_timer;
|
||||
|
||||
/* Received data
|
||||
Data are received as packets, each packet is identified by a prefix of seven
|
||||
characters ('$GPGGA,' or '$GPRMC,')and is ended by one star plus two bytes checksum.
|
||||
The values are terminated by a comma.
|
||||
|
||||
$GPGGA - Global Positioning System Fix Data, Time, Position and fix related data fora GPS receiver.
|
||||
|
||||
11
|
||||
1 2 3 4 5 6 7 8 9 10 | 12 13 14 15
|
||||
| | | | | | | | | | | | | | |
|
||||
GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh<CR><LF>
|
||||
|
||||
Field Number:
|
||||
1) Universal Time Coordinated (UTC)
|
||||
2) Latitude
|
||||
3) N or S (North or South)
|
||||
4) Longitude
|
||||
5) E or W (East or West)
|
||||
6) GPS Quality Indicator,
|
||||
0 - fix not available,
|
||||
1 - GPS fix,
|
||||
2 - Differential GPS fix
|
||||
7) Number of satellites in view, 00 - 12
|
||||
8) Horizontal Dilution of precision
|
||||
9) Antenna Altitude above/below mean-sea-level (geoid)
|
||||
10) Units of antenna altitude, meters
|
||||
11) Geoidal separation, the difference between the WGS-84 earth
|
||||
ellipsoid and mean-sea-level (geoid), "-" means mean-sea-level
|
||||
below ellipsoid
|
||||
12) Units of geoidal separation, meters
|
||||
13) Age of differential GPS data, time in seconds since last SC104
|
||||
type 1 or 9 update, null field when DGPS is not used
|
||||
14) Differential reference station ID, 0000-1023
|
||||
*
|
||||
15) Checksum
|
||||
CrLf
|
||||
|
||||
|
||||
$GPRMC - Recommended Minimum Navigation Information
|
||||
12
|
||||
1 2 3 4 5 6 7 8 9 10 11|
|
||||
| | | | | | | | | | | |
|
||||
RMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,xxxx,x.x,a*hh<CR><LF>
|
||||
|
||||
Field Number:
|
||||
1) UTC Time
|
||||
2) Status, V = Navigation receiver warning
|
||||
3) Latitude
|
||||
4) N or S
|
||||
5) Longitude
|
||||
6) E or W
|
||||
7) Speed over ground, knots
|
||||
8) Track made good, degrees true. = = Course over ground (COG)
|
||||
9) Date, ddmmyy
|
||||
10) Magnetic Variation, degrees
|
||||
11) E or W
|
||||
12) Checksum
|
||||
*/
|
||||
|
||||
// GGA record prefix
|
||||
#define PACK_GGA 0x47 // "G"
|
||||
#define PACK_GGA3 0x41 // "A"
|
||||
// value occurence number in the GGA packet
|
||||
#define TIM 1
|
||||
#define LAT 2
|
||||
#define NOS 3
|
||||
#define LON 4
|
||||
#define EOW 5
|
||||
#define FIX 6
|
||||
#define SAT 7
|
||||
#define DIL 8
|
||||
#define ALT 9
|
||||
#define MTR 10
|
||||
#define GEO 11
|
||||
#define MET 12
|
||||
#define AGE 13
|
||||
#define DIF 14
|
||||
|
||||
// RMC record prefix
|
||||
#define PACK_RMC 0x52 // "R"
|
||||
#define PACK_RMC2 0x4D // "M"
|
||||
#define PACK_RMC3 0x43 // "C"
|
||||
// value occurence number in the RMC packet
|
||||
#define TIM 1
|
||||
#define NRW 2
|
||||
#define LT1 3
|
||||
#define NSO 4
|
||||
#define LN1 5
|
||||
#define EWE 6
|
||||
#define SOG 7
|
||||
#define COG 8
|
||||
#define DAT 9
|
||||
#define MAG 10
|
||||
#define EAW 11
|
||||
|
||||
// end of packet
|
||||
#define PACK_END 0x2a // *
|
||||
// end of value
|
||||
#define VAL_END 0x2c // ,
|
||||
|
||||
// stateful machine
|
||||
|
||||
// Since the packets are sent continuously, we need to synchronize on the
|
||||
// reception of the three chars prefixing a packet, whatever they are.
|
||||
|
||||
// states values
|
||||
#define WAIT_PACKET 1
|
||||
#define WAIT_PACK_GGA1 2
|
||||
#define WAIT_PACK_GGA2 3
|
||||
#define WAIT_PACK_GGA3 4
|
||||
#define WAIT_PACK_RMC2 5
|
||||
#define WAIT_PACK_RMC3 6
|
||||
#define WAIT_VAL_END 7
|
||||
#define READ_VALUE 8
|
||||
|
||||
void menuViewTelemetryNMEA1(event_t event);
|
||||
void menuViewTelemetryNMEA2(event_t event);
|
||||
void menuViewTelemetryNMEA3(event_t event);
|
||||
void menuViewTelemetryNMEA4(event_t event);
|
||||
void title(char x);
|
||||
void initval(uint8_t num, uint8_t pack, uint8_t val);
|
||||
int32_t binary (char *str);
|
||||
int32_t bintime (char *str);
|
||||
|
||||
#ifndef SIMU
|
||||
ISR (USART0_RX_vect)
|
||||
{
|
||||
uint8_t rl;
|
||||
// uint8_t rh; //USART control and Status Register 0 B
|
||||
uint8_t iostat; //USART control and Status Register 0 A
|
||||
|
||||
rl = UDR0;
|
||||
iostat = UCSR0A; //USART control and Status Register 0 A
|
||||
/*
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
RxC0 TxC0 UDRE0 FE0 DOR0 UPE0 U2X0 MPCM0
|
||||
|
||||
RxC0: Receive complete
|
||||
TXC0: Transmit Complete
|
||||
UDRE0: USART Data Register Empty
|
||||
FE0: Frame Error
|
||||
DOR0: Data OverRun
|
||||
UPE0: USART Parity Error
|
||||
U2X0: Double Tx Speed
|
||||
MPCM0: MultiProcessor Comms Mode
|
||||
*/
|
||||
if (iostat & ((1 << FE0) | (1 << DOR0) | (1 << UPE0)))
|
||||
{
|
||||
rl = xpack[0] = xpack[1] = xval[0] = xval[1] = 0;
|
||||
initval (LONG_BUF(2), PACK_GGA, TIM); // always get UTC time for timer
|
||||
state = WAIT_PACKET; // restart on error
|
||||
}
|
||||
// rh = UCSR0B; //USART control and Status Register 0 B
|
||||
/* bit 7 6 5 4 3 2 1 0
|
||||
RxCIE0 TxCIE0 UDRIE0 RXEN0 TXEN0 UCSZ02 RXB80 TXB80
|
||||
|
||||
RxCIE0: Receive complete int enable
|
||||
TXCIE0: Transmit Complete int enable
|
||||
UDRIE0: USART Data Register Empty int enable
|
||||
RXEN0: Rx enable
|
||||
TXEN0: Tx Enable
|
||||
UCSZ02: Character Size bit 2
|
||||
RXB80: Rx data bit 8
|
||||
TXB80: Tx data bit 8
|
||||
*/
|
||||
switch (state)
|
||||
{
|
||||
case WAIT_PACKET:
|
||||
switch (rl)
|
||||
{
|
||||
case PACK_GGA: // found a new GGA packet "G"
|
||||
state = WAIT_PACK_GGA2; // wait for the 2nd char
|
||||
break;
|
||||
case PACK_RMC: // found a new RMS packet "R"
|
||||
state = WAIT_PACK_RMC2; // wait for the 2nd char
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WAIT_PACK_GGA2: // received 2nd char "G"
|
||||
if (rl == PACK_GGA)
|
||||
state = WAIT_PACK_GGA3; // wait for 3rd character "A"
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not "G"
|
||||
break;
|
||||
case WAIT_PACK_GGA3: // received 3rd char "A"
|
||||
if (rl == PACK_GGA3) // found
|
||||
{
|
||||
state = WAIT_VAL_END; // wait for ","
|
||||
rpack = PACK_GGA;
|
||||
rval = 1; //clear the buffer
|
||||
for (i = 0; i < NB_LONG_BUF; i++)
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
|
||||
case WAIT_PACK_RMC2: // wait for 2nd char "M"
|
||||
if (rl == PACK_RMC2)
|
||||
state = WAIT_PACK_RMC3;
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
case WAIT_PACK_RMC3: // wait for 3rd char "C"
|
||||
if (rl == PACK_RMC3)
|
||||
{
|
||||
state = WAIT_VAL_END; // wait for ","
|
||||
rpack = PACK_RMC;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_LONG_BUF; i++) // clear buffer
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
|
||||
case WAIT_VAL_END:
|
||||
if (rl == VAL_END) // "," nach "GGA" oder "RMC"
|
||||
{
|
||||
state = READ_VALUE;
|
||||
rval = 1;
|
||||
for (i = 0; i < NB_LONG_BUF; i++) // clear buffer
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
else
|
||||
state = WAIT_PACKET; // restart if not found
|
||||
break;
|
||||
|
||||
|
||||
case READ_VALUE:
|
||||
switch (rl)
|
||||
{
|
||||
case PACK_END:
|
||||
if (rpack == PACK_GGA)
|
||||
ggareceived = 1;
|
||||
state = WAIT_PACKET; // packet completed, wait for the next packet
|
||||
break;
|
||||
case VAL_END: // comma found, value completed
|
||||
rval++; // and get next value
|
||||
break;
|
||||
default: // store the char in the corresponding buffer
|
||||
for (i = 0; i < NB_LONG_BUF; i++)
|
||||
{ // is it the expected value in the expected packet ?
|
||||
if (rpack == xpack[i] && rval == xval[i] && ibuf[i] < LG_BUF - 1)
|
||||
{ // yes, store the char
|
||||
rbuf[i] [ibuf[i]] = rl;
|
||||
ibuf[i]++;
|
||||
rbuf[i] [ibuf[i]] = 0;
|
||||
}
|
||||
}
|
||||
for (i = NB_LONG_BUF; i < NB_LONG_BUF+NB_SHORT_BUF; i++) {
|
||||
if (rpack == xpack[i] // is this the expected short value in the expected packet ?
|
||||
&& rval == xval[i])
|
||||
sbuf[i-NB_LONG_BUF] = rl; // yes, store the char
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void NMEA_Init (void)
|
||||
{
|
||||
#ifndef SIMU
|
||||
DDRE &= ~(1 << DDE0); // set RXD0 pin as input
|
||||
PORTE &= ~(1 << PORTE0); // disable pullup on RXD0 pin
|
||||
|
||||
// switch (Telem_baud)
|
||||
// {
|
||||
// case 1:
|
||||
#undef BAUD
|
||||
#define BAUD 4800
|
||||
#include <util/setbaud.h>
|
||||
UBRR0H = UBRRH_VALUE;
|
||||
UBRR0L = UBRRL_VALUE;
|
||||
// break;
|
||||
// }
|
||||
|
||||
UCSR0A &= ~(1 << U2X0); // disable double speed operation
|
||||
// set 8N1
|
||||
UCSR0B = 0|(0<< RXCIE0)|(0<<TXCIE0)|(0<<UDRIE0)|(0<<RXEN0)|(0<<TXEN0)|(0<<UCSZ02);
|
||||
UCSR0C = 0|(1 << UCSZ01) | (1 << UCSZ00);
|
||||
while ( UCSR0A & (1 << RXC0) )
|
||||
UDR0; // flush receive buffer
|
||||
#endif
|
||||
home_alt = rel_alt = ggareceived =0;
|
||||
gpstimer = -1;
|
||||
beep_on=1;
|
||||
}
|
||||
|
||||
// TX Capabilities are not required for NMEA
|
||||
// void NMEA_DisableTXD (void)
|
||||
// {
|
||||
// UCSR0B &= ~(1 << TXEN0); // disable TX
|
||||
// }
|
||||
|
||||
// void NMEA_EnableTXD (void)
|
||||
// {
|
||||
// UCSR0B |= (1 << TXEN0); // enable TX
|
||||
// }
|
||||
|
||||
void NMEA_DisableRXD (void)
|
||||
{
|
||||
UCSR0B &= ~(1 << RXEN0); // disable RX
|
||||
UCSR0B &= ~(1 << RXCIE0); // disable Interrupt
|
||||
}
|
||||
|
||||
void NMEA_EnableRXD (void)
|
||||
{
|
||||
for (i = 0; i < NB_LONG_BUF; i++)
|
||||
{
|
||||
ibuf[i] = 0;
|
||||
rbuf[i][0] = 0;
|
||||
xpack[i] = 0;
|
||||
xval[i] = 0;
|
||||
}
|
||||
initval (LONG_BUF(2), PACK_GGA, TIM); // always get UTC time for timer
|
||||
state = WAIT_PACKET; // wait for the next packet
|
||||
UCSR0B |= (1 << RXEN0); // enable RX
|
||||
UCSR0B |= (1 << RXCIE0); // enable Interrupt
|
||||
}
|
||||
|
||||
void menuViewTelemetryNMEA(event_t event)
|
||||
{
|
||||
menuViewTelemetryNMEA1(event);
|
||||
}
|
||||
|
||||
// Start of NMEA menus 1-4 <<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
void menuViewTelemetryNMEA1(event_t event)
|
||||
{
|
||||
switch(event) // new event received, branch accordingly
|
||||
{
|
||||
case EVT_KEY_BREAK(KEY_LEFT):
|
||||
chainMenu(menuViewTelemetryNMEA4);
|
||||
break;
|
||||
case EVT_KEY_BREAK(KEY_RIGHT):
|
||||
chainMenu(menuViewTelemetryNMEA2);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_UP):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuStatisticsView);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_DOWN):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_MENU):
|
||||
if (show_timer == 0) {
|
||||
show_timer = 1;
|
||||
if (gpstimer <= 0)
|
||||
gpstimer = bintime(rbuf[2]);
|
||||
}
|
||||
else
|
||||
show_timer = 0;
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_EXIT):
|
||||
if ((show_timer == 1) &&(rbuf[2][0]))
|
||||
gpstimer = bintime(rbuf[2]); // get actual GPS time ->resets timer to 00:00
|
||||
break;
|
||||
}
|
||||
/*
|
||||
How to use:
|
||||
|
||||
You choose the values to be displayed using the function:
|
||||
|
||||
initval(<number>, <packet>, <value>);
|
||||
-------------------------------------
|
||||
|
||||
That means that "<value>" of "<packet>" is stored in the <number> buffer.
|
||||
The first <number> is 0.
|
||||
|
||||
Here are the packet names and the associated value names:
|
||||
|
||||
Position packet (beginning with "GGA"): "PACK_GGA"
|
||||
value names: "TIM", "LAT", "NOS", "LON", "EOW", "FIX", "SAT", "DIL", "ALT", "MTR", "GEO", "MET", "AGE", "DIF",
|
||||
|
||||
Required minimum packet (beginning with "RMC"): "PACK_RMC"
|
||||
value names: "TIM", "NRW", "LT1", "NSO", "LN1", "EWE", "SOG", "COG", "DAT", "MAG", "EAW"
|
||||
|
||||
The buffers are accessed using the macro "VALSTR(<n>)", where "<n>" is "0"
|
||||
for the first buffer, and "1" for the second buffer.
|
||||
|
||||
When a value is missing, it is replaced by the contents of val_unknown ("?").
|
||||
*/
|
||||
|
||||
if (ggareceived)
|
||||
{
|
||||
gpstime=bintime(rbuf[2]);
|
||||
ggareceived=0;
|
||||
}
|
||||
|
||||
initval (LONG_BUF(0), PACK_RMC, TIM); // sets rbuf[0][.]
|
||||
initval (LONG_BUF(1), PACK_RMC, DAT); // sets rbuf[1][.]
|
||||
initval (SHORT_BUF(0), PACK_RMC, NRW); // sets sbuf[0]
|
||||
initval (SHORT_BUF(2), PACK_GGA, SAT); // -> sbuf[2]
|
||||
|
||||
|
||||
title ('1');
|
||||
lcdDrawText ( 2*FW, 1*FH, PSTR("UTC-Time Sat"));
|
||||
|
||||
if (rbuf[0][0]) { // show always if data have been received
|
||||
lcdDrawChar ( 19*FW, 1*FH, sbuf[2], 0); // satellites in view
|
||||
lcdDrawSizedText ( 2*FW, 2*FH, &rbuf[0][0], 2, APSIZE); // hours
|
||||
lcdDrawChar ( 6*FW, 2*FH, ':', DBLSIZE); // ":"
|
||||
lcdDrawSizedText ( 8*FW, 2*FH, &rbuf[0][2], 2, APSIZE); // minutes
|
||||
lcdDrawChar ( 12*FW, 2*FH, ':', DBLSIZE); // ":"
|
||||
lcdDrawSizedText ( 14*FW, 2*FH, &rbuf[0][4], 2, APSIZE); // seconds
|
||||
}
|
||||
else
|
||||
lcdDrawText ( 2*FW, 2*FH, val_unknown, APSIZE); // "?"
|
||||
|
||||
if ((show_timer == 1) && rbuf[0][0]) { // show the Timer when data have been received
|
||||
|
||||
lcdDrawText ( 2*FW, 4*FH, PSTR("Timer")); // display "Timer"
|
||||
drawTimer ( 5*FW, 5*FH, (gpstime-gpstimer), DBLSIZE, DBLSIZE); // display difference as mm:ss
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdDrawText ( 2*FW, 4*FH, PSTR("Date")); // show the UTC Date
|
||||
|
||||
if (rbuf[1][0]) {
|
||||
lcdDrawSizedText( 2*FW, 5*FH, &rbuf[1][0], 2, APSIZE); // year
|
||||
lcdDrawChar ( 6*FW, 5*FH, '/', DBLSIZE); // "/"
|
||||
lcdDrawSizedText( 8*FW, 5*FH, &rbuf[1][2], 2, APSIZE); // month
|
||||
lcdDrawChar (12*FW, 5*FH, '/', DBLSIZE); // "/"
|
||||
lcdDrawSizedText(14*FW, 5*FH, &rbuf[1][4], 2, APSIZE); // day
|
||||
}
|
||||
else
|
||||
lcdDrawText ( 2*FW, 5*FH, val_unknown, APSIZE); // "?"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void menuViewTelemetryNMEA2(event_t event)
|
||||
{
|
||||
static uint8_t ignore_break;
|
||||
|
||||
|
||||
switch(event)
|
||||
{
|
||||
// Menu navigation
|
||||
case EVT_KEY_BREAK(KEY_LEFT):
|
||||
if (ignore_break==1) {
|
||||
ignore_break=0;
|
||||
break;}
|
||||
chainMenu(menuViewTelemetryNMEA1);
|
||||
break;
|
||||
case EVT_KEY_BREAK(KEY_RIGHT):
|
||||
if (ignore_break==1) {
|
||||
ignore_break=0;
|
||||
break;}
|
||||
chainMenu(menuViewTelemetryNMEA3);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_UP):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuStatisticsView);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_DOWN):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
|
||||
//Beep setting
|
||||
case EVT_KEY_LONG(KEY_LEFT):
|
||||
ignore_break = 1;
|
||||
beep_on=0;
|
||||
AUDIO_KEY_PRESS();
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_RIGHT):
|
||||
ignore_break = 1;
|
||||
beep_on=1;
|
||||
AUDIO_KEY_PRESS();
|
||||
break;
|
||||
|
||||
//Altitude setting
|
||||
/* Set a home position for altitude. Normally used before starting
|
||||
the model when GPS has got a fix.
|
||||
MENU[short] --> alternating relative and absolute altitudes
|
||||
MENU[long] --> set home altitude to current
|
||||
EXIT[long] --> reset max altitude to 0
|
||||
|
||||
Switch ON / OFF short beep with positive lift
|
||||
LEFT[long] --> Positive lift Beep off
|
||||
RIGHT[long] --> Positive lift Beep on */
|
||||
|
||||
|
||||
case EVT_KEY_BREAK(KEY_MENU):
|
||||
if (ignore_break==1) {
|
||||
ignore_break=0;
|
||||
break;}
|
||||
|
||||
if (!home_alt) // umschalten zwischen absoluter und relativer H�he
|
||||
home_alt = save_alt;
|
||||
else
|
||||
home_alt=0;
|
||||
|
||||
if (save_alt==0) // wenn noch keine Home H�he gesetzt war, wird sie es jetzt, weil sonst
|
||||
// das Umschalten keine Wirkung zeigt
|
||||
save_alt = home_alt = abs_alt; // absolute altitude
|
||||
AUDIO_KEY_PRESS();
|
||||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_MENU):
|
||||
ignore_break = 1;
|
||||
save_alt = home_alt = abs_alt; // Home altitude auf aktuelle absolute H�he setzen
|
||||
AUDIO_KEY_PRESS();
|
||||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_EXIT): // Max Altitude auf 0 zur�cksetzen
|
||||
max_alt=0;
|
||||
AUDIO_KEY_PRESS();
|
||||
break;
|
||||
|
||||
}
|
||||
title ('2');
|
||||
|
||||
lcdDrawText ( 1*FW, 1*FH, PSTR("Altitude Sat Max"));
|
||||
|
||||
|
||||
lcdDrawText ( 16*FW, 3*FH, PSTR("Home"));
|
||||
lcdDrawText ( 2*FW, 4*FH, PSTR("Lift") );
|
||||
|
||||
lcdDrawText ( 16*FW, 5*FH, PSTR("Beep") );
|
||||
if (beep_on==1)
|
||||
lcdDrawText ( 18*FW, 6*FH, PSTR("ON") );
|
||||
|
||||
else
|
||||
lcdDrawText ( 17*FW, 6*FH, PSTR("OFF") );
|
||||
|
||||
|
||||
lcdDrawNumber( 20*FW, 4*FH, home_alt, PREC1, 6); // display home_alt, small characters
|
||||
|
||||
if (xpack[0] != PACK_GGA)
|
||||
ggareceived = 0;
|
||||
|
||||
initval (LONG_BUF(0), PACK_GGA, ALT); // -> rbuf[0]
|
||||
initval (LONG_BUF(1), PACK_GGA, GEO); // -> rbuf[1]
|
||||
initval (SHORT_BUF(0), PACK_GGA, MTR); // -> sbuf[0]
|
||||
initval (SHORT_BUF(1), PACK_GGA, FIX); // -> sbuf[1]
|
||||
initval (SHORT_BUF(2), PACK_GGA, SAT); // -> sbuf[2]
|
||||
|
||||
if (ggareceived) // at least one second has elapsed
|
||||
{
|
||||
ggareceived = 0;
|
||||
|
||||
/* ALT and GEO have one single digit following the decimal point
|
||||
e.g. ALT=359.7 GEO=47.7
|
||||
The altitude over mean sea level is to be calculated as:
|
||||
altitude minus geoidal separation
|
||||
*/
|
||||
|
||||
abs_alt = binary(rbuf[0]) - binary(rbuf[1]); // alt - geo that is absolute altitude
|
||||
|
||||
if (abs_alt> max_alt) max_alt=abs_alt; // hold max altitude relative to 0 m
|
||||
|
||||
rel_alt=abs_alt - home_alt; // alt - geo - home altitude relative to home
|
||||
|
||||
|
||||
lift_alt = rel_alt - prev_alt;
|
||||
prev_alt = rel_alt;
|
||||
|
||||
if ((lift_alt >= 0) && (sbuf[1]>0x30) && beep_on) // GGA record must have Fix> 0
|
||||
AUDIO_KEY_PRESS(); // short blip for non negative lift
|
||||
|
||||
}
|
||||
|
||||
if (rbuf[0][0]) {
|
||||
lcdDrawChar ( 13*FW, 1*FH, sbuf[2], 0); // satellites in view
|
||||
|
||||
if (sbuf[1]>0x30) { // & GGA has FIX > 0
|
||||
|
||||
|
||||
lcdDrawNumber( 10*FW, 2*FH, rel_alt, DBLSIZE|PREC1, 7); // altitude
|
||||
|
||||
if (home_alt >= 0)
|
||||
lcdDrawNumber( 20*FW, 2*FH, (max_alt-home_alt), PREC1, 6); // display small characters
|
||||
else
|
||||
lcdDrawNumber( 20*FW, 2*FH, max_alt, PREC1, 6); // display small characters
|
||||
|
||||
|
||||
lcdDrawChar ( 11*FW, 3*FH, sbuf[0], 0); // dimension [m]
|
||||
|
||||
lcdDrawNumber( 10*FW, 5*FH, lift_alt, DBLSIZE|PREC1, 6); // lift
|
||||
lcdDrawChar ( 11*FW, 6*FH, sbuf[0], 0); // dimension [m/S]
|
||||
lcdDrawText ( 12*FW, 6*FH, PSTR("/S") );
|
||||
}
|
||||
}
|
||||
else {
|
||||
lcdDrawText ( 2*FW, 2*FH, val_unknown, APSIZE);
|
||||
lcdDrawText ( 2*FW, 5*FH, val_unknown, APSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void menuViewTelemetryNMEA3(event_t event)
|
||||
{
|
||||
switch(event)
|
||||
{
|
||||
case EVT_KEY_BREAK(KEY_LEFT):
|
||||
chainMenu(menuViewTelemetryNMEA2);
|
||||
break;
|
||||
case EVT_KEY_BREAK(KEY_RIGHT):
|
||||
chainMenu(menuViewTelemetryNMEA4);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_UP):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuStatisticsView);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_DOWN):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
initval (LONG_BUF(0), PACK_RMC, SOG);
|
||||
initval (LONG_BUF(1), PACK_RMC, COG);
|
||||
initval (SHORT_BUF(2), PACK_GGA, SAT); // -> sbuf[2]
|
||||
title ('3');
|
||||
lcdDrawText ( 0*FW, 1*FH, PSTR("GrndSpeed[knt] Sat"));
|
||||
if (rbuf[0][0]) // if first position is 00, buffer is empty, taken as false
|
||||
{ // any other value is true
|
||||
uint8_t i = 0;
|
||||
while (rbuf[0][i])
|
||||
{
|
||||
if (rbuf[0][i] == '.') // find decimal point and insert End of String 3 positions higher
|
||||
{
|
||||
rbuf[0][i+3] = 0;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
lcdDrawText ( 2*FW, 2*FH, VALSTR(0), APSIZE); // speed over ground
|
||||
}
|
||||
else
|
||||
lcdDrawText ( 2*FW, 2*FH, val_unknown, APSIZE);
|
||||
|
||||
lcdDrawChar ( 19*FW, 1*FH, sbuf[2], 0); // satellites in view
|
||||
|
||||
lcdDrawText ( 1*FW, 4*FH, PSTR("Course over ground") );
|
||||
lcdDrawText ( 2*FW, 5*FH, VALSTR(1), APSIZE); // course over ground
|
||||
}
|
||||
|
||||
|
||||
|
||||
void menuViewTelemetryNMEA4(event_t event)
|
||||
{
|
||||
switch(event) // new event received, branch accordingly
|
||||
{
|
||||
case EVT_KEY_BREAK(KEY_LEFT):
|
||||
chainMenu(menuViewTelemetryNMEA3);
|
||||
break;
|
||||
case EVT_KEY_BREAK(KEY_RIGHT):
|
||||
chainMenu(menuViewTelemetryNMEA1);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_UP):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuStatisticsView);
|
||||
break;
|
||||
case EVT_KEY_LONG(KEY_DOWN):
|
||||
NMEA_DisableRXD();
|
||||
chainMenu(menuMainView);
|
||||
break;
|
||||
}
|
||||
// expecting LAT value in POS packet to be stored in the first buffer
|
||||
initval (LONG_BUF(0), PACK_GGA, LAT);
|
||||
initval (SHORT_BUF(0), PACK_GGA, NOS);
|
||||
// and LON value in POS packet stored in the second buffer
|
||||
initval (LONG_BUF(1), PACK_GGA, LON);
|
||||
initval (SHORT_BUF(1), PACK_GGA, EOW);
|
||||
initval (SHORT_BUF(2), PACK_GGA, SAT); // -> sbuf[2]
|
||||
// title of the screen
|
||||
title ('4');
|
||||
lcdDrawText ( 3*FW, 1*FH, PSTR("Latitude Sat")); // line 1 column 3
|
||||
// first buffer into line 2 column 2
|
||||
if (rbuf[0][0])
|
||||
{
|
||||
lcdDrawChar ( 13*FW, 1*FH, sbuf[0], 0); // N or S
|
||||
lcdDrawChar ( 19*FW, 1*FH, sbuf[2], 0); // satellites in view
|
||||
lcdDrawSizedText ( 1*FW, 2*FH, rbuf[0], 2, APSIZE);
|
||||
lcdDrawChar ( 5*FW, 2*FH, '@',0);
|
||||
lcdDrawText ( 6*FW, 2*FH, &rbuf[0][2], APSIZE); // minutes with small decimal point
|
||||
}
|
||||
else
|
||||
lcdDrawText ( 2*FW, 2*FH, val_unknown, APSIZE);
|
||||
lcdDrawText ( 3*FW, 4*FH, PSTR("Longitude")); // line 4 column 5
|
||||
// second buffer into line 5 column 2
|
||||
if (rbuf[0][0])
|
||||
{
|
||||
lcdDrawChar ( 13*FW, 4*FH, sbuf[1], 0); // E or W
|
||||
lcdDrawSizedText ( 0*FW, 5*FH, rbuf[1], 3, APSIZE);
|
||||
lcdDrawChar ( 6*FW, 5*FH, '@',0);
|
||||
lcdDrawText ( 7*FW, 5*FH, &rbuf[1][3], APSIZE); // minutes with small decimal point
|
||||
|
||||
}
|
||||
else
|
||||
lcdDrawText ( 2*FW, 5*FH, val_unknown, APSIZE);
|
||||
}
|
||||
|
||||
void title(char x)
|
||||
{
|
||||
lcdDrawText (0*FW, 0*FH, PSTR(" GPS NMEA data ?/4 "), INVERS);
|
||||
lcdDrawChar(16*FW, 0*FH, x, INVERS);
|
||||
}
|
||||
|
||||
void initval(uint8_t num, uint8_t pack, uint8_t val)
|
||||
{
|
||||
if (xpack[num] != pack || xval[num] != val)
|
||||
{
|
||||
if (num < NB_LONG_BUF) {
|
||||
ibuf[num] = rbuf[num][0] = 0;
|
||||
}
|
||||
else
|
||||
sbuf[num-NB_LONG_BUF] = '?';
|
||||
xpack[num] = pack;
|
||||
xval[num] = val;
|
||||
state = WAIT_PACKET; // synchronize to the next packet
|
||||
}
|
||||
}
|
||||
|
||||
int32_t binary (char *str)
|
||||
{
|
||||
int32_t numval = 0;
|
||||
uint8_t sign = 0;
|
||||
|
||||
while (*str) {
|
||||
if (*str == '-')
|
||||
sign = 1;
|
||||
else if (*str >= '0' && *str <= '9')
|
||||
numval = numval * 10 + (*str - '0');
|
||||
str++;
|
||||
}
|
||||
if (sign)
|
||||
numval = -numval;
|
||||
return numval;
|
||||
}
|
||||
|
||||
int32_t bintime (char *str)
|
||||
{
|
||||
int32_t numval=0;
|
||||
|
||||
if (*str) {
|
||||
numval = ((str[0] - '0') * 10l) + (str[1] - '0'); // hours
|
||||
numval = numval * 3600l;
|
||||
numval = numval + ((( (str[2] - '0') * 10l) + (str[3] - '0')) * 60l); // minutes
|
||||
numval = numval + ((str[4] - '0') * 10l) + (str[5] - '0'); // seconds
|
||||
}
|
||||
return numval;
|
||||
}
|
||||
/*
|
||||
Without NMEA:
|
||||
|
||||
Size after:
|
||||
AVR Memory Usage
|
||||
----------------
|
||||
Device: atmega64
|
||||
|
||||
Program: 54226 bytes (82.7% Full)
|
||||
(.text + .data + .bootloader)
|
||||
|
||||
Data: 3440 bytes (84.0% Full)
|
||||
(.data + .bss + .noinit)
|
||||
|
||||
----------------------------------
|
||||
|
||||
With NMEA:
|
||||
|
||||
Size after:
|
||||
AVR Memory Usage
|
||||
----------------
|
||||
Device: atmega64
|
||||
|
||||
Program: 57098 bytes (87.1% Full)
|
||||
(.text + .data + .bootloader)
|
||||
|
||||
Data: 3524 bytes (86.0% Full)
|
||||
(.data + .bss + .noinit)
|
||||
*/
|
||||
@@ -1,29 +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 _NMEA_H_
|
||||
#define _NMEA_H_
|
||||
|
||||
void NMEA_Init(void);
|
||||
void NMEA_EnableRXD (void);
|
||||
void menuViewTelemetryNMEA(event_t event);
|
||||
|
||||
#endif // _NMEA_H_
|
||||
|
||||
@@ -489,4 +489,4 @@ void spektrumSetDefault(int index, uint16_t id, uint8_t subId, uint8_t instance)
|
||||
}
|
||||
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,18 +24,6 @@
|
||||
#if defined(TELEMETRY_FRSKY)
|
||||
// FrSky Telemetry
|
||||
#include "frsky.h"
|
||||
#elif defined(TELEMETRY_JETI)
|
||||
// Jeti-DUPLEX Telemetry
|
||||
#include "jeti.h"
|
||||
#elif defined(TELEMETRY_ARDUPILOT)
|
||||
// ArduPilot Telemetry
|
||||
#include "ardupilot.h"
|
||||
#elif defined(TELEMETRY_NMEA)
|
||||
// NMEA Telemetry
|
||||
#include "nmea.h"
|
||||
#elif defined(TELEMETRY_MAVLINK)
|
||||
// Mavlink Telemetry
|
||||
#include "mavlink.h"
|
||||
#endif
|
||||
|
||||
#if defined(CROSSFIRE)
|
||||
|
||||
@@ -1,262 +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.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* ============================================================
|
||||
* Templates file
|
||||
*
|
||||
* eccpm
|
||||
* crow
|
||||
* throttle cut
|
||||
* flaperon
|
||||
* elevon
|
||||
* v-tail
|
||||
* throttle hold
|
||||
* Aileron Differential
|
||||
* Spoilers
|
||||
* Snap Roll
|
||||
* ELE->Flap
|
||||
* Flap->ELE
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#pragma message("Templates are not implemented on this board")
|
||||
|
||||
MixData* setDest(uint8_t dch, uint8_t src, bool clear=false)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
MixData * mix;
|
||||
|
||||
while (1) {
|
||||
mix = mixAddress(i);
|
||||
if (mix->srcRaw && mix->destCh <= dch) {
|
||||
if (clear && mix->destCh == dch) {
|
||||
deleteExpoMix(0, i);
|
||||
}
|
||||
else {
|
||||
if (++i==MAX_MIXERS) {
|
||||
// TODO should return null pointer but needs to be tested then
|
||||
mix = mixAddress(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
memmove(mix+1, mix, (MAX_MIXERS-(i+1))*sizeof(MixData) );
|
||||
memclear(mix, sizeof(MixData));
|
||||
mix->destCh = dch;
|
||||
mix->srcRaw = src;
|
||||
mix->weight = 100;
|
||||
return mix;
|
||||
}
|
||||
|
||||
void mixSetWeight(MixData* md, int8_t weight)
|
||||
{
|
||||
u_int8int16_t tmp;
|
||||
tmp.word=weight;
|
||||
MD_UNION_TO_WEIGHT(tmp,md);
|
||||
// MD_SETWEIGHT(md,weight); doesn't matter here in code cost compiler optimizes this anyway
|
||||
}
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TMPL_INPUT(x) (MIXSRC_FIRST_INPUT+channel_order(x)-1)
|
||||
#else
|
||||
#define clearInputs()
|
||||
#define defaultInputs()
|
||||
#define TMPL_INPUT(x) (MIXSRC_Rud+x-1)
|
||||
#endif
|
||||
|
||||
void clearMixes()
|
||||
{
|
||||
memset(g_model.mixData, 0, sizeof(g_model.mixData)); // clear all mixes
|
||||
}
|
||||
|
||||
void clearCurves()
|
||||
{
|
||||
memclear(g_model.curves, sizeof(g_model.curves) + sizeof(g_model.points)); // clear all curves
|
||||
}
|
||||
|
||||
#if defined(CURVES)
|
||||
void setCurve(uint8_t c, const pm_int8_t ar[])
|
||||
{
|
||||
int8_t * cv = curveAddress(c);
|
||||
for (uint8_t i=0; i<5; i++) {
|
||||
cv[i] = pgm_read_byte(&ar[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void setLogicalSwitch(uint8_t idx, uint8_t func, int8_t v1, int8_t v2)
|
||||
{
|
||||
LogicalSwitchData *cs = lswAddress(idx-1);
|
||||
cs->func = func;
|
||||
cs->v1 = v1;
|
||||
cs->v2 = v2;
|
||||
}
|
||||
|
||||
const pm_int8_t heli_ar1[] PROGMEM = {-100, 20, 30, 70, 90};
|
||||
const pm_int8_t heli_ar2[] PROGMEM = {80, 70, 60, 70, 100};
|
||||
const pm_int8_t heli_ar3[] PROGMEM = {100, 90, 80, 90, 100};
|
||||
const pm_int8_t heli_ar4[] PROGMEM = {-30, -15, 0, 50, 100};
|
||||
const pm_int8_t heli_ar5[] PROGMEM = {-100, -50, 0, 50, 100};
|
||||
|
||||
void applyTemplate(uint8_t idx)
|
||||
{
|
||||
MixData *md;
|
||||
|
||||
//CC(STK) -> vSTK
|
||||
//ICC(vSTK) -> STK
|
||||
#define ICC(x) icc[(x)-1]
|
||||
uint8_t icc[4] = {0};
|
||||
for (uint8_t i=0; i<4; i++) { //generate inverse array
|
||||
for(uint8_t j=0; j<4; j++)
|
||||
if(CC(i+1)==j+MIXSRC_Rud) icc[j]=i;
|
||||
}
|
||||
|
||||
switch (idx) {
|
||||
case TMPL_CLEAR_MIXES:
|
||||
case TMPL_SIMPLE_4CH:
|
||||
#if defined(HELI) && defined(CURVES)
|
||||
case TMPL_HELI_SETUP:
|
||||
#endif
|
||||
clearMixes();
|
||||
break;
|
||||
}
|
||||
|
||||
switch (idx) {
|
||||
// Simple 4-Ch
|
||||
case TMPL_SIMPLE_4CH:
|
||||
defaultInputs();
|
||||
setDest(ICC(STK_RUD), TMPL_INPUT(STK_RUD));
|
||||
setDest(ICC(STK_ELE), TMPL_INPUT(STK_ELE));
|
||||
setDest(ICC(STK_THR), TMPL_INPUT(STK_THR));
|
||||
setDest(ICC(STK_AIL), TMPL_INPUT(STK_AIL));
|
||||
break;
|
||||
|
||||
// Sticky-T-Cut
|
||||
case TMPL_STI_THR_CUT:
|
||||
md=setDest(ICC(STK_THR), MIXSRC_MAX); mixSetWeight(md, -100); md->swtch=SWSRC_SWC; md->mltpx=MLTPX_REP;
|
||||
md=setDest(13, MIXSRC_CH14); // md->weight= 100; done by setDest anyway
|
||||
md=setDest(13, MIXSRC_MAX); mixSetWeight(md, -100); md->swtch=SWSRC_SWB; md->mltpx=MLTPX_REP;
|
||||
md=setDest(13, MIXSRC_MAX); /* md->weight= 100;*/ md->swtch=SWSRC_THR; md->mltpx=MLTPX_REP;
|
||||
setLogicalSwitch(11, LS_FUNC_VNEG, STK_THR, -99);
|
||||
setLogicalSwitch(12, LS_FUNC_VPOS, MIXSRC_CH14, 0);
|
||||
break;
|
||||
|
||||
// V-Tail
|
||||
case TMPL_V_TAIL:
|
||||
defaultInputs();
|
||||
setDest(ICC(STK_RUD), TMPL_INPUT(STK_RUD), true);
|
||||
md=setDest(ICC(STK_RUD), TMPL_INPUT(STK_ELE)); mixSetWeight(md, -100);
|
||||
setDest(ICC(STK_ELE), TMPL_INPUT(STK_RUD), true);
|
||||
setDest(ICC(STK_ELE), TMPL_INPUT(STK_ELE));
|
||||
break;
|
||||
|
||||
// Elevon\\Delta
|
||||
case TMPL_ELEVON_DELTA:
|
||||
defaultInputs();
|
||||
setDest(ICC(STK_ELE), MIXSRC_Ele, true);
|
||||
setDest(ICC(STK_ELE), MIXSRC_Ail);
|
||||
setDest(ICC(STK_AIL), MIXSRC_Ele, true);
|
||||
md=setDest(ICC(STK_AIL), MIXSRC_Ail); mixSetWeight(md, -100);
|
||||
break;
|
||||
|
||||
// eCCPM
|
||||
case TMPL_ECCPM:
|
||||
md=setDest(ICC(STK_ELE), MIXSRC_Ele, true); md->weight= 72;
|
||||
md=setDest(ICC(STK_ELE), MIXSRC_Thr); md->weight= 55;
|
||||
md=setDest(ICC(STK_AIL), MIXSRC_Ele, true); mixSetWeight(md, -36);
|
||||
md=setDest(ICC(STK_AIL), MIXSRC_Ail); md->weight= 62;
|
||||
md=setDest(ICC(STK_AIL), MIXSRC_Thr); md->weight= 55;
|
||||
md=setDest(5, MIXSRC_Ele, true); mixSetWeight(md, -36);
|
||||
md=setDest(5, MIXSRC_Ail); mixSetWeight(md, -62);
|
||||
md=setDest(5, MIXSRC_Thr); md->weight= 55;
|
||||
break;
|
||||
|
||||
#if defined(HELI) && defined(CURVES)
|
||||
// Heli Setup
|
||||
case TMPL_HELI_SETUP:
|
||||
clearCurves();
|
||||
|
||||
//Set up Mixes
|
||||
// 3 cyclic channels
|
||||
md=setDest(0, MIXSRC_CYC1); // md->weight=100;
|
||||
md=setDest(1, MIXSRC_CYC2); // md->weight=100;
|
||||
md=setDest(2, MIXSRC_CYC3); // md->weight=100;
|
||||
|
||||
// rudder
|
||||
md=setDest(3, MIXSRC_Rud); // md->weight=100;
|
||||
|
||||
// throttle
|
||||
#if defined(PCBTARANIS)
|
||||
// TODO
|
||||
#else
|
||||
md=setDest(4, MIXSRC_Thr); md->swtch=SWSRC_ID0; mixSetCurve(md, 0); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(4, MIXSRC_Thr); md->swtch=SWSRC_ID1; mixSetCurve(md, 1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(4, MIXSRC_Thr); md->swtch=SWSRC_ID2; mixSetCurve(md, 2); md->carryTrim=TRIM_OFF;
|
||||
#endif
|
||||
md=setDest(4, MIXSRC_MAX); mixSetWeight(md, -100); md->swtch=SWSRC_THR; md->mltpx=MLTPX_REP;
|
||||
|
||||
// gyro gain
|
||||
md=setDest(5, MIXSRC_MAX); md->weight= 30; md->swtch=-SWSRC_GEA;
|
||||
md=setDest(5, MIXSRC_MAX); mixSetWeight(md, -30); md->swtch= SWSRC_GEA;
|
||||
|
||||
// collective
|
||||
#if defined(PCBTARANIS)
|
||||
// TODO
|
||||
#else
|
||||
md=setDest(10, MIXSRC_Thr); /*md->weight= 100;*/ md->swtch=SWSRC_ID0; mixSetCurve(md, 3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); /*md->weight= 100;*/ md->swtch=SWSRC_ID1; mixSetCurve(md, 4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); /*md->weight= 100;*/ md->swtch=SWSRC_ID2; mixSetCurve(md, 5); md->carryTrim=TRIM_OFF;
|
||||
#endif
|
||||
|
||||
g_model.swashR.collectiveSource = MIXSRC_CH11;
|
||||
g_model.swashR.type = SWASH_TYPE_120;
|
||||
|
||||
// curves
|
||||
setCurve(0, heli_ar1);
|
||||
setCurve(1, heli_ar2);
|
||||
setCurve(2, heli_ar3);
|
||||
setCurve(3, heli_ar4);
|
||||
setCurve(4, heli_ar5);
|
||||
setCurve(5, heli_ar5);
|
||||
break;
|
||||
#endif
|
||||
|
||||
// Servo Test
|
||||
case TMPL_SERVO_TEST:
|
||||
md=setDest(MAX_OUTPUT_CHANNELS-1, MIXSRC_SW1, true); md->weight=110; md->mltpx=MLTPX_ADD; md->delayUp = 6; md->delayDown = 6; md->speedUp = 8; md->speedDown = 8;
|
||||
setLogicalSwitch(1, LS_FUNC_VNEG, MIXSRC_LAST_CH, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
@@ -1,82 +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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ============================================================
|
||||
* Templates file
|
||||
*
|
||||
* eccpm
|
||||
* crow
|
||||
* throttle cut
|
||||
* flaperon
|
||||
* elevon
|
||||
* v-tail
|
||||
* throttle hold
|
||||
* Aileron Differential
|
||||
* Spoilers
|
||||
* Snap Roll
|
||||
* ELE->Flap
|
||||
* Flap->ELE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TEMPLATES_H_
|
||||
#define _TEMPLATES_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#define STK_RUD 1
|
||||
#define STK_ELE 2
|
||||
#define STK_THR 3
|
||||
#define STK_AIL 4
|
||||
#define STK_P1 5
|
||||
#define STK_P2 6
|
||||
#define STK_P3 7
|
||||
|
||||
#define CV(x) (CURVE_BASE+(x)-1)
|
||||
#define CC(x) (MIXSRC_Rud - 1 + channel_order(x)) // need to invert this to work with dest
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define mixSetCurve(mix, idx) mix->curve.type=CURVE_REF_CUSTOM; mix->curve.value=idx
|
||||
#else
|
||||
#define mixSetCurve(mix, idx) mix->curveMode=MODE_CURVE; mix->curveParam=CURVE_BASE+idx
|
||||
#endif
|
||||
|
||||
enum Templates {
|
||||
TMPL_CLEAR_MIXES,
|
||||
TMPL_SIMPLE_4CH,
|
||||
TMPL_STI_THR_CUT,
|
||||
TMPL_V_TAIL,
|
||||
TMPL_ELEVON_DELTA,
|
||||
TMPL_ECCPM,
|
||||
#if defined(HELI) && defined(CURVES)
|
||||
TMPL_HELI_SETUP,
|
||||
#endif
|
||||
TMPL_SERVO_TEST,
|
||||
TMPL_COUNT
|
||||
};
|
||||
|
||||
void clearMixes();
|
||||
void clearCurves();
|
||||
void applyTemplate(uint8_t idx);
|
||||
|
||||
#endif // _TEMPLATES_H_
|
||||
|
||||
|
||||
@@ -51,4 +51,4 @@ TEST(color, ARGB)
|
||||
EXPECT_EQ(ARGB(128, 30, 40, 150), (uint16_t)0x8129);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
*~
|
||||
doc/html
|
||||
doc/*.log
|
||||
-1
Submodule radio/src/thirdparty/GCS_MAVLink/include_v1.0 deleted from 21083c3af5
@@ -70,9 +70,6 @@ const pm_char STR_OPEN9X[] PROGMEM =
|
||||
ISTR(AMPSRC)
|
||||
ISTR(VARIOSRC)
|
||||
ISTR(VTELEMSCREENTYPE)
|
||||
#if defined(TEMPLATES)
|
||||
ISTR(VTEMPLATES)
|
||||
#endif
|
||||
#if defined(HELI)
|
||||
ISTR(VSWASHTYPE)
|
||||
#endif
|
||||
@@ -113,11 +110,6 @@ const pm_char STR_OPEN9X[] PROGMEM =
|
||||
ISTR(BLUETOOTH_MODES)
|
||||
#endif
|
||||
ISTR(VANTENNATYPES)
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
ISTR(MAVLINK_BAUDS)
|
||||
ISTR(MAVLINK_AC_MODES)
|
||||
ISTR(MAVLINK_AP_MODES)
|
||||
#endif
|
||||
;
|
||||
|
||||
// The 0-terminated-strings
|
||||
@@ -345,9 +337,6 @@ const pm_char STR_MENUTELEMETRY[] PROGMEM = TR_MENUTELEMETRY;
|
||||
const pm_char STR_LIMIT[] PROGMEM = TR_LIMIT;
|
||||
#endif
|
||||
|
||||
#if defined(TEMPLATES)
|
||||
const pm_char STR_MENUTEMPLATES[] PROGMEM = TR_MENUTEMPLATES;
|
||||
#endif
|
||||
|
||||
const pm_char STR_MENUSTAT[] PROGMEM = TR_MENUSTAT;
|
||||
const pm_char STR_MENUDEBUG[] PROGMEM = TR_MENUDEBUG;
|
||||
@@ -719,31 +708,6 @@ const pm_char STR_BLCOLOR[] PROGMEM = TR_BLCOLOR;
|
||||
const pm_char STR_BLUETOOTH_PIN_CODE[] PROGMEM = TR_BLUETOOTH_PIN_CODE;
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
const pm_char STR_MAVLINK_RC_RSSI_SCALE_LABEL[] PROGMEM = TR_MAVLINK_RC_RSSI_SCALE_LABEL;
|
||||
const pm_char STR_MAVLINK_PC_RSSI_EN_LABEL[] PROGMEM = TR_MAVLINK_PC_RSSI_EN_LABEL;
|
||||
const pm_char STR_MAVMENUSETUP_TITLE[] PROGMEM = TR_MAVMENUSETUP_TITLE;
|
||||
const pm_char STR_MAVLINK_BAUD_LABEL[] PROGMEM = TR_MAVLINK_BAUD_LABEL;
|
||||
const pm_char STR_MAVLINK_INFOS[] PROGMEM = TR_MAVLINK_INFOS;
|
||||
const pm_char STR_MAVLINK_MODE[] PROGMEM = TR_MAVLINK_MODE;
|
||||
const pm_char STR_MAVLINK_CUR_MODE[] PROGMEM = TR_MAVLINK_CUR_MODE;
|
||||
const pm_char STR_MAVLINK_ARMED[] PROGMEM = TR_MAVLINK_ARMED;
|
||||
const pm_char STR_MAVLINK_BAT_MENU_TITLE[] PROGMEM = TR_MAVLINK_BAT_MENU_TITLE;
|
||||
const pm_char STR_MAVLINK_BATTERY_LABEL[] PROGMEM = TR_MAVLINK_BATTERY_LABEL;
|
||||
const pm_char STR_MAVLINK_RC_RSSI_LABEL[] PROGMEM = TR_MAVLINK_RC_RSSI_LABEL;
|
||||
const pm_char STR_MAVLINK_PC_RSSI_LABEL[] PROGMEM = TR_MAVLINK_PC_RSSI_LABEL;
|
||||
const pm_char STR_MAVLINK_NAV_MENU_TITLE[] PROGMEM = TR_MAVLINK_NAV_MENU_TITLE;
|
||||
const pm_char STR_MAVLINK_COURSE[] PROGMEM = TR_MAVLINK_COURSE;
|
||||
const pm_char STR_MAVLINK_HEADING[] PROGMEM = TR_MAVLINK_HEADING;
|
||||
const pm_char STR_MAVLINK_BEARING[] PROGMEM = TR_MAVLINK_BEARING;
|
||||
const pm_char STR_MAVLINK_ALTITUDE[] PROGMEM = TR_MAVLINK_ALTITUDE;
|
||||
const pm_char STR_MAVLINK_GPS[] PROGMEM = TR_MAVLINK_GPS;
|
||||
const pm_char STR_MAVLINK_NO_FIX[] PROGMEM = TR_MAVLINK_NO_FIX;
|
||||
const pm_char STR_MAVLINK_SAT[] PROGMEM = TR_MAVLINK_SAT;
|
||||
const pm_char STR_MAVLINK_HDOP[] PROGMEM = TR_MAVLINK_HDOP;
|
||||
const pm_char STR_MAVLINK_LAT[] PROGMEM = TR_MAVLINK_LAT;
|
||||
const pm_char STR_MAVLINK_LON[] PROGMEM = TR_MAVLINK_LON;
|
||||
#endif
|
||||
|
||||
const pm_char STR_ABOUTUS[] PROGMEM = TR_ABOUTUS;
|
||||
const pm_char STR_ABOUT_OPENTX_1[] PROGMEM = TR_ABOUT_OPENTX_1;
|
||||
|
||||
@@ -163,12 +163,7 @@ extern const pm_char STR_OPEN9X[];
|
||||
#define OFS_VARIOSRC (OFS_AMPSRC + sizeof(TR_AMPSRC))
|
||||
#define OFS_VSCREEN (OFS_VARIOSRC + sizeof(TR_VARIOSRC))
|
||||
#define OFS_VTEMPLATES (OFS_VSCREEN + sizeof(TR_VTELEMSCREENTYPE))
|
||||
#if defined(TEMPLATES)
|
||||
#define TR_VTEMPLATES TR_TEMPLATE_CLEAR_MIXES TR_TEMPLATE_SIMPLE_4CH TR_TEMPLATE_STICKY_TCUT TR_TEMPLATE_VTAIL TR_TEMPLATE_DELTA TR_TEMPLATE_ECCPM TR_TEMPLATE_HELI TR_TEMPLATE_SERVO_TEST
|
||||
#define OFS_VSWASHTYPE (OFS_VTEMPLATES + sizeof(TR_VTEMPLATES))
|
||||
#else
|
||||
#define OFS_VSWASHTYPE (OFS_VTEMPLATES)
|
||||
#endif
|
||||
#if defined(HELI)
|
||||
#define OFS_VKEYS (OFS_VSWASHTYPE + sizeof(TR_VSWASHTYPE))
|
||||
#else
|
||||
@@ -217,13 +212,7 @@ extern const pm_char STR_OPEN9X[];
|
||||
#define OFS_VANTENNATYPES (OFS_VCELLINDEX + sizeof(TR_VCELLINDEX))
|
||||
#endif
|
||||
#define OFS_MAVLINK_BAUDS (OFS_VANTENNATYPES + sizeof(TR_VANTENNATYPES))
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define OFS_MAVLINK_AC_MODES (OFS_MAVLINK_BAUDS + sizeof(TR_MAVLINK_BAUDS))
|
||||
#define OFS_MAVLINK_AP_MODES (OFS_MAVLINK_AC_MODES + sizeof(TR_MAVLINK_AC_MODES))
|
||||
#define OFS_SPARE (OFS_MAVLINK_AP_MODES + sizeof(TR_MAVLINK_AP_MODES))
|
||||
#else
|
||||
#define OFS_SPARE (OFS_MAVLINK_BAUDS)
|
||||
#endif
|
||||
|
||||
#define STR_OFFON (STR_OPEN9X + OFS_OFFON)
|
||||
#define STR_MMMINV (STR_OPEN9X + OFS_MMMINV)
|
||||
@@ -270,9 +259,6 @@ extern const pm_char STR_OPEN9X[];
|
||||
#define STR_VTELEMSCREENTYPE (STR_OPEN9X + OFS_VSCREEN)
|
||||
#define STR_TELEMCHNS (STR_OPEN9X + OFS_TELEMCHNS)
|
||||
|
||||
#if defined(TEMPLATES)
|
||||
#define STR_VTEMPLATES (STR_OPEN9X + OFS_VTEMPLATES)
|
||||
#endif
|
||||
|
||||
#if defined(HELI)
|
||||
#define STR_VSWASHTYPE (STR_OPEN9X + OFS_VSWASHTYPE)
|
||||
@@ -334,11 +320,6 @@ extern const pm_char STR_BLUETOOTH_LOCAL_ADDR[];
|
||||
#define STR_BLUETOOTH_MODES (STR_OPEN9X + OFS_BLUETOOTH_MODES)
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define STR_MAVLINK_BAUDS (STR_OPEN9X + OFS_MAVLINK_BAUDS)
|
||||
#define STR_MAVLINK_AC_MODES (STR_OPEN9X + OFS_MAVLINK_AC_MODES)
|
||||
#define STR_MAVLINK_AP_MODES (STR_OPEN9X + OFS_MAVLINK_AP_MODES)
|
||||
#endif
|
||||
|
||||
// The 0-terminated-strings
|
||||
#define NO_INDENT(x) (x)+LEN_INDENT
|
||||
@@ -986,31 +967,6 @@ extern const pm_char STR_BLCOLOR[];
|
||||
extern const pm_char STR_MODULE_RANGE[];
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
extern const pm_char STR_MAVLINK_RC_RSSI_SCALE_LABEL[];
|
||||
extern const pm_char STR_MAVLINK_PC_RSSI_EN_LABEL[];
|
||||
extern const pm_char STR_MAVMENUSETUP_TITLE[];
|
||||
extern const pm_char STR_MAVLINK_BAUD_LABEL[];
|
||||
extern const pm_char STR_MAVLINK_INFOS[];
|
||||
extern const pm_char STR_MAVLINK_MODE[];
|
||||
extern const pm_char STR_MAVLINK_CUR_MODE[];
|
||||
extern const pm_char STR_MAVLINK_ARMED[];
|
||||
extern const pm_char STR_MAVLINK_BAT_MENU_TITLE[];
|
||||
extern const pm_char STR_MAVLINK_BATTERY_LABEL[];
|
||||
extern const pm_char STR_MAVLINK_RC_RSSI_LABEL[];
|
||||
extern const pm_char STR_MAVLINK_PC_RSSI_LABEL[];
|
||||
extern const pm_char STR_MAVLINK_NAV_MENU_TITLE[];
|
||||
extern const pm_char STR_MAVLINK_COURSE[];
|
||||
extern const pm_char STR_MAVLINK_HEADING[];
|
||||
extern const pm_char STR_MAVLINK_BEARING[];
|
||||
extern const pm_char STR_MAVLINK_ALTITUDE[];
|
||||
extern const pm_char STR_MAVLINK_GPS[];
|
||||
extern const pm_char STR_MAVLINK_NO_FIX[];
|
||||
extern const pm_char STR_MAVLINK_SAT[];
|
||||
extern const pm_char STR_MAVLINK_HDOP[];
|
||||
extern const pm_char STR_MAVLINK_LAT[];
|
||||
extern const pm_char STR_MAVLINK_LON[];
|
||||
#endif
|
||||
|
||||
extern const pm_char STR_ABOUTUS[];
|
||||
extern const pm_char STR_ABOUT_OPENTX_1[];
|
||||
|
||||
@@ -141,8 +141,6 @@
|
||||
#define TR_RETA123 "SVPK123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "SVPK123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "SVPK123ab"
|
||||
#else
|
||||
#define TR_RETA123 "SVPK123"
|
||||
#endif
|
||||
@@ -171,11 +169,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -212,27 +206,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Stky\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0"
|
||||
#define TR_CSWSTAY "Edge\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\013"
|
||||
|
||||
@@ -308,13 +289,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[rezerva]\0 "
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trenér \0 ""Insta-Trim\0""Reset\0 ""Změna \0 " TR_ADJUST_GVAR "Hlasitost\0 " "SetFailsafe" "RangeCheck\0" "ModuleBind\0" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Podsvětlení" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trenér \0 ""Insta-Trim\0""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Podsvětlení" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trenér \0 ""Insta-Trim\0""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Podsvětlení" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\012")
|
||||
|
||||
@@ -334,10 +309,8 @@
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_FSW_RESET_TIMERS "Stopky1\0 ""Stopky2\0 ""Stopky3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "Vše\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "Vše\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -352,22 +325,10 @@
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Metr.\0""Imper.", "Metrické""Imperial")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -381,15 +342,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "---\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#define LEN_VOLTSRC TR("\003", "\005")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\004"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -398,13 +354,8 @@
|
||||
#define TR_VARIOSRC "Alt\0""Alt+""VSpd""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\010"
|
||||
#define TR_VTELEMSCREENTYPE "Nic\0 ""Hodnota ""Ukazatel""Skript\0"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\010"
|
||||
#define TR_VTELEMSCREENTYPE "Hodnota ""Ukazatel"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
@@ -447,18 +398,12 @@
|
||||
#define LEN_INPUTNAMES "\004"
|
||||
#define TR_INPUTNAMES "Sme\0""Vys\0""Pln\0""Kri\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_STICKS_VSRCRAW "\307Smě""\307Výš""\307Pln""\307Kři"
|
||||
#else
|
||||
#define TR_STICKS_VSRCRAW "Směr""Výšk""Plyn""Křid"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_VSRCRAW "\313Smě""\313Výš""\313Pln""\313Kři""\313T5\0""\313T6\0"
|
||||
#elif defined(CPUARM)
|
||||
#define TR_TRIMS_VSRCRAW "\313Smě""\313Výš""\313Pln""\313Kři"
|
||||
#else
|
||||
#define TR_TRIMS_VSRCRAW "TrmS""TrmV""TrmP""TrmK"
|
||||
#define TR_TRIMS_VSRCRAW "\313Smě""\313Výš""\313Pln""\313Kři"
|
||||
#endif
|
||||
|
||||
#if defined(PCBX12S)
|
||||
@@ -489,11 +434,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Sl""\313Sp""\313Vd""\313Vn""\313Pd""\313Pn""\313Kl""\313Kp""\3135d""\3135n""\3136d""\3136n"
|
||||
@@ -504,9 +445,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -533,13 +471,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Bat.""Čas\0""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0" "Bat." "Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""ASp+""Cel-""Cls-""Vfs-""Cur+""Pwr+""Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -557,14 +490,6 @@
|
||||
#define LEN_VFAILSAFE "\012"
|
||||
#define TR_VFAILSAFE "Nenastaven""Držet\0 ""Vlastní\0 ""Bez pulzů\0""Přijímač\0"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\011"
|
||||
#define TR_VSENSORTYPES "Vlastní\0 ""Vypočtený"
|
||||
@@ -629,11 +554,7 @@
|
||||
#define TR_PHASENAME "Název"
|
||||
#define TR_MIXNAME "Název"
|
||||
#define TR_INPUTNAME "Název"
|
||||
#if defined(CPUARM)
|
||||
#define TR_EXPONAME "Popis"
|
||||
#else
|
||||
#define TR_EXPONAME "Název"
|
||||
#endif
|
||||
#define TR_BITMAP "Obrázek"
|
||||
#define TR_TIMER "Stopky"
|
||||
#define TR_ELIMITS TR("Limit +25%", "Kanál +/- 125%")
|
||||
@@ -648,13 +569,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Output"
|
||||
#endif
|
||||
#define TR_PROTO INDENT "Protokol"
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "PPM frame"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME "PPM frame"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH "Spínač"
|
||||
#define TR_TRIMS "Trimy"
|
||||
@@ -777,13 +694,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER" >> Reset"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -828,11 +740,7 @@
|
||||
|
||||
#define TR_MENULIMITS "SERVA"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "VSTUPY"
|
||||
#else
|
||||
#define TR_MENUINPUTS "DR/EXPO"
|
||||
#endif
|
||||
|
||||
#define TR_MENUCURVES "KŘIVKY"
|
||||
#define TR_MENUCURVE "\002K"
|
||||
@@ -851,13 +759,8 @@
|
||||
#define TR_MONITOR_CHANNELS4 "MONITOR KANÁLŮ 25/32"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Výstupy"
|
||||
#define TR_MONITOR_MIXER_DESC "Mixy"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR(INDENT "RX číslo", INDENT "Číslo přijímače")
|
||||
#define TR_RECEIVER INDENT "Přijímač"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "RX číslo"
|
||||
#define TR_RECEIVER "RxNum"
|
||||
#endif
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "Freq tune",INDENT "RF Freq. fine tune")
|
||||
#define TR_MULTI_TELEMETRY "Telemetry"
|
||||
#define TR_MULTI_VIDFREQ TR(INDENT "Vid. freq.", INDENT "Video frequency")
|
||||
@@ -1114,31 +1017,6 @@
|
||||
#define TR_CONFIRMRESET "Smazat modely a nastavení?"
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Příliš mnoho skriptů!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Mavlink Setup"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODE"
|
||||
#define TR_MAVLINK_CUR_MODE "Current Mode"
|
||||
#define TR_MAVLINK_ARMED "Armed"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Flight Battery status"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Heading"
|
||||
#define TR_MAVLINK_BEARING "Bearing"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitude"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
|
||||
// Horus and Taranis column headers
|
||||
|
||||
@@ -144,8 +144,6 @@
|
||||
#define TR_RETA123 "SHGQ123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "SHGQ123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "SHGQ123ab"
|
||||
#else
|
||||
#define TR_RETA123 "SHGQ123"
|
||||
#endif
|
||||
@@ -174,11 +172,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -215,27 +209,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Takt\0" // TIM = Takt = Taktgenerator
|
||||
#define TR_CSWSTICKY "SRFF\0" // Sticky = RS-Flip-Flop
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0" // Range= Bereichsabfrage von bis
|
||||
#define TR_CSWSTAY "Puls\0" // Edge = einstellbarer Impuls
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\012"
|
||||
|
||||
@@ -313,13 +294,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[Reserve]\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Lehrer \0 ""Inst. Trim""Rücksetz.\0""Setze \0 " TR_ADJUST_GVAR "Lautstr.\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "LCD Licht\0" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Lehrer \0 ""Inst. Trim""Rücksetz.\0" TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "LCD Licht\0" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Lehrer \0 ""Inst. Trim""Rücksetz.\0" TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "LCD Licht\0" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
@@ -339,10 +314,8 @@
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -352,21 +325,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Zeit", "Zeit\0")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("[NA]", "[NA]\0")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
@@ -376,33 +340,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2""Tmr3", "Tmr1\0""Tmr2\0""Tmr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2", "Tmr1\0""Tmr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\012")
|
||||
#define TR_VUNITSSYSTEM TR("Metrik""Imper.", "Metrisch\0 ""Imperial\0 ")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -416,15 +364,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "Kein\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#define LEN_VOLTSRC TR("\003", "\005")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\004"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -433,13 +376,8 @@
|
||||
#define TR_VARIOSRC "Alt\0""Alt+""Vspd""A1\0 ""A2\0 "
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\007"
|
||||
#define TR_VTELEMSCREENTYPE " None "" Werte "" Balken"" Script"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\007"
|
||||
#define TR_VTELEMSCREENTYPE " Werte "" Balken"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "GMS\0""NMEA" //Koordinatenanzeige
|
||||
@@ -511,11 +449,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -526,9 +460,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "DGa\0"
|
||||
#define TR_ROTENC_SWITCHES "DGa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "DGa\0""DGb\0"
|
||||
#define TR_ROTENC_SWITCHES "DGa""DGb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -555,13 +486,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0""Akku" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_TIMERS TR_RAS "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Zeit"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -579,14 +505,6 @@
|
||||
#define LEN_VFAILSAFE "\015" // "\013" original
|
||||
#define TR_VFAILSAFE "Kein Failsafe""Halte Pos.\0 ""Kanäle\0 ""Kein Signal\0 ""Empfänger\0 "
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012"
|
||||
#define TR_VSENSORTYPES "Sensor\0 ""Berechnung"
|
||||
@@ -641,11 +559,7 @@
|
||||
#define TR_PHASENAME "Phase-Name"
|
||||
#define TR_MIXNAME "Mix-Name"
|
||||
#define TR_INPUTNAME "Input"
|
||||
#if defined(CPUARM)
|
||||
#define TR_EXPONAME "Info"
|
||||
#else
|
||||
#define TR_EXPONAME "Info" // Expo Name
|
||||
#endif
|
||||
#define TR_BITMAP "Modellfoto"
|
||||
#define TR_TIMER TR("Timer", "Timer ") // für Timer1 Timer2 Timer3
|
||||
#define TR_ELIMITS TR("Erw. Limit", "Erw. Wege auf 150%")
|
||||
@@ -660,13 +574,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Output"
|
||||
#endif
|
||||
#define TR_PROTO TR(INDENT "Protok.", INDENT "Protokoll")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "PPM frame"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME "PPM frame"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH TR("Schalt.", "Schalter")
|
||||
#define TR_TRIMS "Trims"
|
||||
@@ -748,8 +658,8 @@
|
||||
#define TR_SPLASHSCREEN TR("Startbild Ein", "Startbild Anzeigedauer")
|
||||
#define TR_THROTTLEWARNING TR("Gasalarm", INDENT "Gas Alarm")
|
||||
#define TR_SWITCHWARNING TR("Sch. Alarm", INDENT "Schalter-Alarm")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR("Pot Warn.", INDENT "Poti-Warnung")
|
||||
#define TR_TIMEZONE TR("Zeitzone", "GPS-Zeitzone +/-Std")
|
||||
#define TR_ADJUST_RTC TR("Uhrzeit setzen", INDENT "Uhrzeit per GPS setzen")
|
||||
@@ -791,13 +701,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Freier Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Freier Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER " für Reset"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -840,13 +745,8 @@
|
||||
#define TR_MENUFLIGHTMODES "FLUGPHASEN"
|
||||
#define TR_MENUHELISETUP TR("HELI TS-Mischer", "HELI TS-Mischer CYC1-3")
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "INPUTS"
|
||||
#define TR_MENULIMITS "SERVOS" //"AUSGABEN" oder "Servos"
|
||||
#else
|
||||
#define TR_MENUINPUTS "KNÜPPEL"
|
||||
#define TR_MENULIMITS "SERVOS"
|
||||
#endif
|
||||
#define TR_MENUCURVES "KURVEN"
|
||||
#define TR_MENUCURVE "KURVE"
|
||||
#define TR_MENULOGICALSWITCH "LOGIKSCHALTER"
|
||||
@@ -864,13 +764,8 @@
|
||||
#define TR_MONITOR_SWITCHES "LOGIK SCHALTER MONITOR"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Kanäle"
|
||||
#define TR_MONITOR_MIXER_DESC "Mischer"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR(INDENT "Empf Nr.", INDENT "Empfänger Nummer")
|
||||
#define TR_RECEIVER INDENT "Receiver"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "Empf Nr."
|
||||
#define TR_RECEIVER "Empf Nr."
|
||||
#endif
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "RF Freq.", INDENT "RF Freq. Feintuning")
|
||||
#define TR_MULTI_TELEMETRY "Telemetry"
|
||||
#define TR_MULTI_VIDFREQ TR(INDENT "Vid. Freq.", INDENT "Video Frequenz")
|
||||
@@ -1122,31 +1017,6 @@
|
||||
#define TR_CONFIRMRESET TR("Alles löschen? ","ALLE Modelle+Einst. löschen?")
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Zu viele Lua-Skripte!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Mavlink Setup"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODE"
|
||||
#define TR_MAVLINK_CUR_MODE "Current Mode"
|
||||
#define TR_MAVLINK_ARMED "Armed"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Flugakku-Status"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Heading"
|
||||
#define TR_MAVLINK_BEARING "Bearing"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitude"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis specific column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Name "
|
||||
|
||||
@@ -143,8 +143,6 @@
|
||||
#define TR_RETA123 "RETA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "RETA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123"
|
||||
#endif
|
||||
@@ -174,11 +172,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -215,27 +209,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Stky\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0"
|
||||
#define TR_CSWSTAY "Edge\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\012"
|
||||
|
||||
@@ -313,13 +294,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[reserve]\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Backlight\0" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
@@ -339,10 +314,8 @@
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "Flight\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -357,22 +330,10 @@
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -386,15 +347,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "None\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#define LEN_VOLTSRC TR("\003", "\005")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\004"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -403,13 +359,8 @@
|
||||
#define TR_VARIOSRC "Alt\0""Alt+""VSpd""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\006"
|
||||
#define TR_VTELEMSCREENTYPE "None\0 ""Nums\0 ""Bars\0 ""Script"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\004"
|
||||
#define TR_VTELEMSCREENTYPE "Nums""Bars"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
@@ -452,18 +403,12 @@
|
||||
#define LEN_VSWITCHES "\003"
|
||||
#define LEN_VSRCRAW "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_STICKS_VSRCRAW "\307Rud""\307Ele""\307Thr""\307Ail"
|
||||
#else
|
||||
#define TR_STICKS_VSRCRAW "Rud\0""Ele\0""Thr\0""Ail\0"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_VSRCRAW "\313Rud""\313Ele""\313Thr""\313Ail""\313T5\0""\313T6\0"
|
||||
#elif defined(CPUARM)
|
||||
#define TR_TRIMS_VSRCRAW "\313Rud""\313Ele""\313Thr""\313Ail"
|
||||
#else
|
||||
#define TR_TRIMS_VSRCRAW "TrmR""TrmE""TrmT""TrmA"
|
||||
#define TR_TRIMS_VSRCRAW "\313Rud""\313Ele""\313Thr""\313Ail"
|
||||
#endif
|
||||
|
||||
#if defined(PCBX12S)
|
||||
@@ -494,11 +439,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -509,9 +450,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -538,13 +476,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0" "Batt" "Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""ASp+""Cel-""Cls-""Vfs-""Cur+""Pwr+""Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -562,14 +495,6 @@
|
||||
#define LEN_VFAILSAFE "\011"
|
||||
#define TR_VFAILSAFE "Not set\0 ""Hold\0 ""Custom\0 ""No pulses""Receiver\0"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012"
|
||||
#define TR_VSENSORTYPES "Custom\0 ""Calculated"
|
||||
@@ -648,13 +573,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Output"
|
||||
#endif
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protocol")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "PPM frame"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME "PPM frame"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH "Switch"
|
||||
#define TR_TRIMS "Trims"
|
||||
@@ -734,11 +655,11 @@
|
||||
#define TR_BLOFFBRIGHTNESS INDENT "OFF brightness"
|
||||
#define TR_BLCOLOR INDENT "Color"
|
||||
#define TR_SPLASHSCREEN "Splash screen"
|
||||
#define TR_THROTTLEWARNING TR(IF_CPUARM(INDENT) "T-Warning", INDENT "Throttle state")
|
||||
#define TR_SWITCHWARNING TR(IF_CPUARM(INDENT) "S-Warning", INDENT "Switch positions")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(IF_CPUARM(INDENT) "Pot warn.", INDENT "Pot positions")
|
||||
#define TR_THROTTLEWARNING TR(INDENT "T-Warning", INDENT "Throttle state")
|
||||
#define TR_SWITCHWARNING TR(INDENT "S-Warning", INDENT "Switch positions")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(INDENT "Pot warn.", INDENT "Pot positions")
|
||||
#define TR_TIMEZONE TR("Time Zone", INDENT "Time zone")
|
||||
#define TR_ADJUST_RTC TR("Adjust RTC", INDENT "Adjust RTC")
|
||||
#define TR_GPS "GPS"
|
||||
@@ -779,13 +700,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER " to reset"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -828,13 +744,8 @@
|
||||
#define TR_MENUFLIGHTMODE "FLIGHT MODE"
|
||||
#define TR_MENUHELISETUP "HELI SETUP"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "INPUTS"
|
||||
#define TR_MENULIMITS "OUTPUTS"
|
||||
#else
|
||||
#define TR_MENUINPUTS "STICKS"
|
||||
#define TR_MENULIMITS "SERVOS"
|
||||
#endif
|
||||
#define TR_MENUCURVES "CURVES"
|
||||
#define TR_MENUCURVE "CURVE"
|
||||
#define TR_MENULOGICALSWITCH "LOGICAL SWITCH"
|
||||
@@ -852,13 +763,8 @@
|
||||
#define TR_MONITOR_SWITCHES "LOGICAL SWITCHES MONITOR"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Outputs"
|
||||
#define TR_MONITOR_MIXER_DESC "Mixers"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR(INDENT "RxNum", INDENT "Receiver No.")
|
||||
#define TR_RECEIVER INDENT "Receiver"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "RxNum"
|
||||
#define TR_RECEIVER "RxNum"
|
||||
#endif
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "Freq tune",INDENT "RF Freq. fine tune")
|
||||
#define TR_MULTI_TELEMETRY "Telemetry"
|
||||
#define TR_MULTI_VIDFREQ TR(INDENT "Vid. freq.", INDENT "Video frequency")
|
||||
@@ -1122,31 +1028,6 @@
|
||||
#define TR_CONFIRMRESET TR("Erase ALL", "Erase ALL models and settings?")
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Too many Lua scripts!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Mavlink setup"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODE"
|
||||
#define TR_MAVLINK_CUR_MODE "Current mode"
|
||||
#define TR_MAVLINK_ARMED "Armed"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Flight battery status"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Heading"
|
||||
#define TR_MAVLINK_BEARING "Bearing"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitude"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Name"
|
||||
|
||||
@@ -143,8 +143,6 @@
|
||||
#define TR_RETA123 "RETA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "RETA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123"
|
||||
#endif
|
||||
@@ -173,11 +171,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -214,27 +208,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Glue\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0"
|
||||
#define TR_CSWSTAY "Edge\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\012"
|
||||
|
||||
@@ -310,13 +291,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[reserve]\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Aprendiz\0 ""Inst. Trim""Reset\0 ""Set \0 " TR_ADJUST_GVAR "Volumen\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Luz fondo\0" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Aprendiz\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Luz fondo\0" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Aprendiz\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Luz fondo\0" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
@@ -336,10 +311,8 @@
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -349,21 +322,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Time", "Time\0")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("[NA]", "[NA]\0")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
@@ -373,33 +337,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2""Tmr3", "Tmr1\0""Tmr2\0""Tmr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2", "Tmr1\0""Tmr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -413,15 +361,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "Nada\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#define LEN_VOLTSRC TR("\003", "\007")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -495,11 +438,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -510,9 +449,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -539,13 +475,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0" "Batt" "Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""ASp+""Cel-""Cls-""Vfs-""Cur+""Pwr+""Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -563,14 +494,6 @@
|
||||
#define LEN_VFAILSAFE "\011"
|
||||
#define TR_VFAILSAFE "Not set\0 ""Guardar\0 ""Adaptar\0 ""Sin pulso""Receiver\0"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Estabilizar""Acrobat. ""Alt Hold ""Auto ""Guiado ""Loiter ""RTL ""Circulo ""Pos Hold ""Tierra ""OF Loiter""Toy A ""Toy M ""INVALIDO "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circulo ""Estabilizar ""Entrenamiento""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guiado ""Inicialisando""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012"
|
||||
#define TR_VSENSORTYPES "Custom\0 ""Calculated"
|
||||
@@ -738,8 +661,8 @@
|
||||
#define TR_SPLASHSCREEN "Ptalla.inicio"
|
||||
#define TR_THROTTLEWARNING TR("Aviso-A", INDENT "Aviso Acelerador")
|
||||
#define TR_SWITCHWARNING TR("Aviso-I", INDENT "Aviso Intrptor")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR("Pot Warn.", INDENT "Pot Warning")
|
||||
#define TR_TIMEZONE TR("Zona Hora", "GPS Zona Hora")
|
||||
#define TR_ADJUST_RTC TR("Adjust RTC", INDENT "Adjust RTC")
|
||||
@@ -775,13 +698,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Pila LIbre\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER "Resetear"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -1105,31 +1023,6 @@
|
||||
#define TR_CONFIRMRESET "Erase ALL models and settings?"
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Too many Lua scripts!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Mavlink Setup"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODO"
|
||||
#define TR_MAVLINK_CUR_MODE "Modo actual"
|
||||
#define TR_MAVLINK_ARMED "Armad0"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Estado Bateria de vuelo"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Carrera"
|
||||
#define TR_MAVLINK_HEADING "Titulo"
|
||||
#define TR_MAVLINK_BEARING "Soporte"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitud"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Nombre"
|
||||
|
||||
@@ -143,8 +143,6 @@
|
||||
#define TR_RETA123 "RETA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "RETA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123"
|
||||
#endif
|
||||
@@ -173,11 +171,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -214,27 +208,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Glue\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0"
|
||||
#define TR_CSWSTAY "Edge\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\012"
|
||||
|
||||
@@ -310,13 +291,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[reserve]\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Backlight\0" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
@@ -336,10 +311,8 @@
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -349,21 +322,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Time", "Time\0")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("[NA]", "[NA]\0")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
@@ -373,33 +337,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2""Tmr3", "Tmr1\0""Tmr2\0""Tmr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2", "Tmr1\0""Tmr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -413,15 +361,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "None\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#define LEN_VOLTSRC TR("\003", "\007")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -495,11 +438,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -510,9 +449,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -539,13 +475,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0" "Batt" "Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""ASp+""Cel-""Cls-""Vfs-""Cur+""Pwr+""Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -563,14 +494,6 @@
|
||||
#define LEN_VFAILSAFE "\011"
|
||||
#define TR_VFAILSAFE "Not set\0 ""Hold\0 ""Custom\0 ""No pulses""Receiver\0"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012"
|
||||
#define TR_VSENSORTYPES "Custom\0 ""Calculated"
|
||||
@@ -730,8 +653,8 @@
|
||||
#define TR_SPLASHSCREEN "Splash screen"
|
||||
#define TR_THROTTLEWARNING TR("T-Warning", INDENT "Throttle Warning")
|
||||
#define TR_SWITCHWARNING TR("S-Warning", INDENT "Switch Warning")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR("Pot Warn.", INDENT "Pot Warning")
|
||||
#define TR_TIMEZONE TR("Time Zone","GPS Time zone")
|
||||
#define TR_ADJUST_RTC TR("Adjust RTC", INDENT "Adjust RTC")
|
||||
@@ -767,13 +690,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER " to reset"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -1097,31 +1015,6 @@
|
||||
#define TR_CONFIRMRESET "Erase ALL models and settings?"
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Too many Lua scripts!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Mavlink Setup"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODE"
|
||||
#define TR_MAVLINK_CUR_MODE "Current Mode"
|
||||
#define TR_MAVLINK_ARMED "Armed"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Flight Battery status"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Heading"
|
||||
#define TR_MAVLINK_BEARING "Bearing"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitude"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Name"
|
||||
|
||||
@@ -143,8 +143,6 @@
|
||||
#define TR_RETA123 "DPGA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "DPGA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "DPGA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "DPGA123"
|
||||
#endif
|
||||
@@ -173,11 +171,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -214,27 +208,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Temp\0"
|
||||
#define TR_CSWSTICKY "Bist\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Zone\0"
|
||||
#define TR_CSWSTAY "Flnc\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""ET\0 ""OU\0 ""OUX\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""ET\0 ""OU\0 ""OUX\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\015"
|
||||
|
||||
@@ -312,13 +293,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[reserve]\0 "
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Ecolage\0 ""Trim instant.""Remise à 0\0 ""Déf.\0 " TR_ADJUST_GVAR "Volume\0 " "DéfFailsafe\0 " "Test Port.\0 " "Bind\0 " TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Rétroécl.\0 " TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Ecolage\0 ""Trim instant.""Remise à 0\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Rétroécl.\0 " TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Ecolage\0 ""Trim instant.""Remise à 0\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Rétroécl.\0 " TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\012")
|
||||
|
||||
@@ -338,10 +313,8 @@
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_FSW_RESET_TIMERS "Chrono 1\0 ""Chrono 2\0 ""Chrono 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Chr1""Chr2""Chr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Chr1""Chr2"
|
||||
#define TR_FSW_RESET_TIMERS "Chr1""Chr2""Chr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "Tout" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "Tout\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -351,21 +324,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Heur", "H:M\0 ")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("BtRx", "BatRx")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ViA+", "VitA+")
|
||||
|
||||
@@ -375,33 +339,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Chr1""Chr2""Chr3", "Chr1\0""Chr2\0""Chr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Chr1""Chr2", "Chr1\0""Chr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\012")
|
||||
#define TR_VUNITSSYSTEM TR("Métr.\0""Impér.", "Métriques\0""Impériales")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -415,15 +363,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "Aucun ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Elem.")
|
||||
#define LEN_VOLTSRC TR("\003", "\005")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Elem.")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Elem.")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -432,13 +375,8 @@
|
||||
#define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\007"
|
||||
#define TR_VTELEMSCREENTYPE "Rien\0 ""Valeurs""Barres\0""Script\0"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\004"
|
||||
#define TR_VTELEMSCREENTYPE "Val.""Bars"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
@@ -477,18 +415,12 @@
|
||||
#define LEN_VSWITCHES "\003"
|
||||
#define LEN_VSRCRAW "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_STICKS_VSRCRAW "\307Dir""\307Prf""\307Gaz""\307Ail"
|
||||
#else
|
||||
#define TR_STICKS_VSRCRAW "Dir\0""Prf\0""Gaz\0""Ail\0"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_VSRCRAW "\313Dir""\313Prf""\313Gaz""\313Ail""\313T5\0""\313T6\0"
|
||||
#elif defined(CPUARM)
|
||||
#define TR_TRIMS_VSRCRAW "\313Dir""\313Prf""\313Gaz""\313Ail"
|
||||
#else
|
||||
#define TR_TRIMS_VSRCRAW "TrmD""TrmP""TrmG""TrmA"
|
||||
#define TR_TRIMS_VSRCRAW "\313Dir""\313Prf""\313Gaz""\313Ail"
|
||||
#endif
|
||||
|
||||
#if defined(PCBX12S)
|
||||
@@ -519,11 +451,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Dg""\313Dd""\313Pb""\313Ph""\313Gb""\313Gh""\313Ag""\313Ad""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -534,9 +462,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -563,13 +488,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""H:M\0""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Chr1""Chr2""Chr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_TIMERS TR_RAS "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vit\0""Dist""AltG""Elem""Velm""Vfas""Cour""Cnsm""Puis""AccX""AccY""AccZ""Cap\0""VitV""VitA""dET\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vit+""Dst+" TR_ASPD_MAX "Elm-""Els-""Vfs-""Cur+""Pui+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Tmps"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -587,14 +507,6 @@
|
||||
#define LEN_VFAILSAFE "\011"
|
||||
#define TR_VFAILSAFE TR("Pas déf.\0""Maintien\0""Prédéf.\0 ""Pas d'imp""Récepteur", "Pas déf.\0""Maintien\0""Prédéfini""Pas d'imp""Récepteur")
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012"
|
||||
#define TR_VSENSORTYPES "Perso\0 ""Calculé\0 "
|
||||
@@ -674,13 +586,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Sortie"
|
||||
#endif
|
||||
#define TR_PROTO TR(INDENT "Proto.", INDENT "Protocole")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "Trame PPM"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME "Trame PPM"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH TR("Inter", "Interrupteur")
|
||||
#define TR_TRIMS "Trims"
|
||||
@@ -760,11 +668,11 @@
|
||||
#define TR_BLOFFBRIGHTNESS INDENT "Luminosité OFF"
|
||||
#define TR_BLCOLOR INDENT "Couleur"
|
||||
#define TR_SPLASHSCREEN "Logo d'accueil"
|
||||
#define TR_THROTTLEWARNING TR(IF_CPUARM(INDENT) "Alerte gaz", INDENT "Alerte gaz")
|
||||
#define TR_SWITCHWARNING TR(IF_CPUARM(INDENT) "Alerte int", INDENT "Pos. interrupteurs")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(IF_CPUARM(INDENT) "Alerte pot", INDENT "Pos. potentios")
|
||||
#define TR_THROTTLEWARNING TR(INDENT "Alerte gaz", INDENT "Alerte gaz")
|
||||
#define TR_SWITCHWARNING TR(INDENT "Alerte int", INDENT "Pos. interrupteurs")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(INDENT "Alerte pot", INDENT "Pos. potentios")
|
||||
#define TR_TIMEZONE "Fuseau horaire"
|
||||
#define TR_ADJUST_RTC TR("Ajust. RTC", INDENT "Ajust. heure auto")
|
||||
#define TR_GPS "GPS"
|
||||
@@ -803,13 +711,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER" pour reset"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -852,13 +755,8 @@
|
||||
#define TR_MENUFLIGHTMODES "PHASES DE VOL"
|
||||
#define TR_MENUHELISETUP TR("CONF.HELI", "CONFIGURATION HELICO")
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "ENTREES"
|
||||
#define TR_MENULIMITS "SORTIES"
|
||||
#else
|
||||
#define TR_MENUINPUTS "DR/EXPO"
|
||||
#define TR_MENULIMITS "LIMITES"
|
||||
#endif
|
||||
|
||||
#define TR_MENUCURVES "COURBES"
|
||||
#define TR_MENUCURVE "COURBE"
|
||||
@@ -877,13 +775,8 @@
|
||||
#define TR_MONITOR_SWITCHES "INTERS LOGIQUES"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Sorties"
|
||||
#define TR_MONITOR_MIXER_DESC "Mixeurs"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR(INDENT "NumRx", INDENT "No. récepteur")
|
||||
#define TR_RECEIVER INDENT "Récepteur"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "Récepteur"
|
||||
#define TR_RECEIVER "Récepteur"
|
||||
#endif
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "Ajust.fréq", INDENT "Ajustement fréq.")
|
||||
#define TR_MULTI_TELEMETRY "Télémétrie"
|
||||
#define TR_MULTI_VIDFREQ TR(INDENT "Fréq. vidéo", INDENT "Fréquence vidéo")
|
||||
@@ -1142,31 +1035,6 @@
|
||||
#define TR_CONFIRMRESET TR("Effacer TOUT?","Effacer TOUS modèles/réglages?")
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Trop de scripts lua!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "RSSI Max"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Config Mavlink"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODE"
|
||||
#define TR_MAVLINK_CUR_MODE "Mode courant"
|
||||
#define TR_MAVLINK_ARMED "Armé"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Accu propulsion"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Cap"
|
||||
#define TR_MAVLINK_BEARING "Relèv."
|
||||
#define TR_MAVLINK_ALTITUDE "Altitude"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Nom"
|
||||
|
||||
@@ -143,8 +143,6 @@
|
||||
#define TR_RETA123 "DEMA123SD"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "DEMA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "DEMA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "DEMA123"
|
||||
#endif
|
||||
@@ -173,11 +171,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -214,27 +208,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Glue\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0"
|
||||
#define TR_CSWSTAY "Edge\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\015"
|
||||
|
||||
@@ -312,13 +293,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[riserva] \0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Maestro \0 ""Trim Instant.""Azzera\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " "SetFailsafe\0 " "RangeCheck\0 " "ModuleBind\0 " TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Retroillum.\0 " TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Maestro \0 ""Trim Instant.""Azzera\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Retroillum.\0 " TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Maestro \0 ""Trim Instant.""Azzera\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Retroillum.\0 " TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
@@ -338,10 +313,8 @@
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "Tutto\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -351,21 +324,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Ora\0", "Ora\0 ")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("RxBt", "BatRx")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
@@ -375,33 +339,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2""Tmr3", "Tmr1\0""Tmr2\0""Tmr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2", "Tmr1\0""Tmr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\011")
|
||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metriche\0""Imperiali")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -415,15 +363,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "---\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Celle\0 ")
|
||||
#define LEN_VOLTSRC TR("\003", "\007")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Celle\0 ")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Celle\0 ")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -432,13 +375,8 @@
|
||||
#define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\006"
|
||||
#define TR_VTELEMSCREENTYPE "Niente""Valori""Barre\0""Script"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\006"
|
||||
#define TR_VTELEMSCREENTYPE "Valori""Barre\0"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
@@ -502,11 +440,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -517,9 +451,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -546,13 +477,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_TIMERS TR_RAS "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Ora\0"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -570,14 +496,6 @@
|
||||
#define LEN_VFAILSAFE "\013"
|
||||
#define TR_VFAILSAFE "Non settato""Mantieni\0 ""Personali\0 ""No impulsi\0""Ricevente\0 "
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Inizializza ""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012"
|
||||
#define TR_VSENSORTYPES "Custom\0 ""Calcolato\0"
|
||||
@@ -642,11 +560,7 @@
|
||||
#define TR_PHASENAME "Nome fase"
|
||||
#define TR_MIXNAME "Nome mix"
|
||||
#define TR_INPUTNAME "Nome Ingr."
|
||||
#if defined(CPUARM)
|
||||
#define TR_EXPONAME "Nome expo"
|
||||
#else
|
||||
#define TR_EXPONAME "Nome Expo"
|
||||
#endif
|
||||
#define TR_BITMAP "Immagine"
|
||||
#define TR_TIMER TR("Timer","Timer ")
|
||||
#define TR_ELIMITS TR("Limiti.E","Limiti Estesi")
|
||||
@@ -661,13 +575,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Output"
|
||||
#endif
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protocollo")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "PPM frame"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME "PPM frame"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH "Inter."
|
||||
#define TR_TRIMS "Trims"
|
||||
@@ -749,8 +659,8 @@
|
||||
#define TR_SPLASHSCREEN TR("Schermo avvio", "Schermata di avvio")
|
||||
#define TR_THROTTLEWARNING TR("All. Mot.", INDENT "Allarme Motore")
|
||||
#define TR_SWITCHWARNING TR("Avv. Int.", INDENT "Avviso Interr.")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR("Avv. Pot.", INDENT "Avviso Pot.")
|
||||
#define TR_TIMEZONE "Ora locale"
|
||||
#define TR_ADJUST_RTC TR("Aggiusta RTC", INDENT "Aggiusta RTC")
|
||||
@@ -790,13 +700,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER" x Azzerare"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -839,13 +744,8 @@
|
||||
#define TR_MENUFLIGHTMODES "FASI DI VOLO"
|
||||
#define TR_MENUHELISETUP "CONFIGURA ELI"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "INGRESSI"
|
||||
#define TR_MENULIMITS "USCITE"
|
||||
#else
|
||||
#define TR_MENUINPUTS "DR/ESPO"
|
||||
#define TR_MENULIMITS "LIMITI"
|
||||
#endif
|
||||
|
||||
#define TR_MENUCURVES "CURVE"
|
||||
#define TR_MENUCURVE "CURVA"
|
||||
@@ -864,13 +764,8 @@
|
||||
#define TR_MONITOR_CHANNELS4 "CHANNELS MONITOR 25/32"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Outputs"
|
||||
#define TR_MONITOR_MIXER_DESC "Mixers"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR(INDENT "RxNum", INDENT "Ricevente No.")
|
||||
#define TR_RECEIVER INDENT "Receiver"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "RxNum"
|
||||
#define TR_RECEIVER "RxNum"
|
||||
#endif
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "Freq tune",INDENT "RF Freq. fine tune")
|
||||
#define TR_MULTI_TELEMETRY "Telemetry"
|
||||
#define TR_MULTI_VIDFREQ TR(INDENT "Vid. freq.", INDENT "Video frequency")
|
||||
@@ -1122,31 +1017,6 @@
|
||||
#define TR_CONFIRMRESET "Resettare TUTTI i dati?"
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Troppi Scripts Lua!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Setta Mavlink"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODO"
|
||||
#define TR_MAVLINK_CUR_MODE "Modo Corrente"
|
||||
#define TR_MAVLINK_ARMED "Armato"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Stato batteria di volo"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Heading"
|
||||
#define TR_MAVLINK_BEARING "Bearing"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitudine"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Nome"
|
||||
|
||||
@@ -145,8 +145,6 @@
|
||||
#define TR_RETA123 "RETA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "RETA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123"
|
||||
#endif
|
||||
@@ -175,11 +173,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -216,27 +210,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Glue\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0"
|
||||
#define TR_CSWSTAY "Edge\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\012"
|
||||
|
||||
@@ -314,13 +295,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[reserve]\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Backlight\0" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\012")
|
||||
|
||||
@@ -340,10 +315,8 @@
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "Vliegdata\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -358,22 +331,10 @@
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Mtrsch""Engels", "Metrisch\0 ""Engels\0 ")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -387,15 +348,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "Geen\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#define LEN_VOLTSRC TR("\003", "\005")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\004"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -404,13 +360,8 @@
|
||||
#define TR_VARIOSRC "Alt\0""Alt+""VSpd""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\006"
|
||||
#define TR_VTELEMSCREENTYPE "Geen\0 ""Nums\0 ""Balken""Script"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\006"
|
||||
#define TR_VTELEMSCREENTYPE "Nums\0 ""Balken"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
@@ -446,11 +397,7 @@
|
||||
#define LEN_VSWITCHES "\003"
|
||||
#define LEN_VSRCRAW "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_STICKS_VSRCRAW "\307Rud""\307Ele""\307Thr""\307Ail"
|
||||
#else
|
||||
#define TR_STICKS_VSRCRAW "Rud\0""Ele\0""Thr\0""Ail\0"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_VSRCRAW "\313Rud""\313Ele""\313Thr""\313Ail""\313T5\0""\313T6\0"
|
||||
@@ -486,11 +433,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -501,9 +444,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -530,13 +470,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0" "Batt" "Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""ASp+""Cel-""Cls-""Vfs-""Cur+""Pwr+""Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -554,14 +489,6 @@
|
||||
#define LEN_VFAILSAFE TR("\013","\011")
|
||||
#define TR_VFAILSAFE TR("Niet Gezet\0""Vasthouden\0""Custom\0 ""Geen Pulsen""Ontvanger\0 ","Not Set\0 ""Hold\0 ""Custom\0 ""No Pulses""Receiver\0")
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manueel ""Cirkel ""Stabiliseer ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Begeleid ""Initialiseren""ONGELDIG "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\010"
|
||||
#define TR_VSENSORTYPES "Custom\0 ""Berekend"
|
||||
@@ -642,13 +569,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Output"
|
||||
#endif
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protocol")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "PPM frame"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME "PPM frame"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH TR("Schak.", "Schakelaar")
|
||||
#define TR_TRIMS "Trims"
|
||||
@@ -730,11 +653,11 @@
|
||||
#define TR_BLOFFBRIGHTNESS INDENT "Uit-Helderheid"
|
||||
#define TR_BLCOLOR INDENT "Kleur"
|
||||
#define TR_SPLASHSCREEN "Startscherm Aan"
|
||||
#define TR_THROTTLEWARNING TR(IF_CPUARM(INDENT) "T-Warning", INDENT "Throttle Status")
|
||||
#define TR_SWITCHWARNING TR(IF_CPUARM(INDENT) "S-Warning", INDENT "Switch Posities")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(IF_CPUARM(INDENT) "Pot Warn.", INDENT "Pot Posities")
|
||||
#define TR_THROTTLEWARNING TR(INDENT "T-Warning", INDENT "Throttle Status")
|
||||
#define TR_SWITCHWARNING TR(INDENT "S-Warning", INDENT "Switch Posities")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(INDENT "Pot Warn.", INDENT "Pot Posities")
|
||||
#define TR_TIMEZONE TR("Tijdzone", "GPS-Tijdzone +/-Std")
|
||||
#define TR_ADJUST_RTC TR("Klok instellen", INDENT "Klok middels GPS instellen")
|
||||
#define TR_GPS "GPS"
|
||||
@@ -775,13 +698,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER" voor Reset"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -827,13 +745,8 @@
|
||||
#define TR_MENUFLIGHTMODE "VLIEGFASE"
|
||||
#define TR_MENUHELISETUP "HELI TS-Mixer"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "INPUTS"
|
||||
#define TR_MENULIMITS "OUTPUTS"
|
||||
#else
|
||||
#define TR_MENUINPUTS "STICKS"
|
||||
#define TR_MENULIMITS "SERVOS"
|
||||
#endif
|
||||
|
||||
#define TR_MENUCURVES "CURVEN"
|
||||
#define TR_MENUCURVE "CURVE"
|
||||
@@ -852,13 +765,8 @@
|
||||
#define TR_MONITOR_SWITCHES "LOGISCHE SCHAKELAARS MONITOR"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Outputs"
|
||||
#define TR_MONITOR_MIXER_DESC "Mixers"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR(INDENT "RxNum", INDENT "Receiver Nr.")
|
||||
#define TR_RECEIVER INDENT "Receiver"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "RxNum"
|
||||
#define TR_RECEIVER "RxNum"
|
||||
#endif
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "Freq tune",INDENT "RF Freq. fine tune")
|
||||
#define TR_MULTI_TELEMETRY "Telemetry"
|
||||
#define TR_MULTI_VIDFREQ TR(INDENT "Vid. freq.", INDENT "Video frequency")
|
||||
@@ -1116,31 +1024,6 @@
|
||||
#define TR_CONFIRMRESET TR("Wis Alles?", "Wis ALLE modellen en instellingen?")
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Te veel Lua scripts!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Mavlink setup"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODE"
|
||||
#define TR_MAVLINK_CUR_MODE "Current mode"
|
||||
#define TR_MAVLINK_ARMED "Armed"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Vliegaccu-Status"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Heading"
|
||||
#define TR_MAVLINK_BEARING "Bearing"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitude"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Name"
|
||||
|
||||
@@ -144,8 +144,6 @@
|
||||
#define TR_RETA123 "KWGL123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "KWGL123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "KWGL123ab"
|
||||
#else
|
||||
#define TR_RETA123 "KWGL123"
|
||||
#endif
|
||||
@@ -174,11 +172,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -215,27 +209,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Stały"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Zasię"
|
||||
#define TR_CSWSTAY "Brzeg"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\012" /*10 decimal*/
|
||||
|
||||
@@ -313,13 +294,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[rezerwa]\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trener \0 ""Inst-Trim ""Resetuj\0 ""Ustaw\0 " TR_ADJUST_GVAR "Głośność\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Podświetl\0" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trener \0 ""Inst-Trim ""Resetuj\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Podświetl\0" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trener \0 ""Inst-Trim ""Resetuj\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Podświetl\0" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011") /*9 decimal*/
|
||||
|
||||
@@ -339,10 +314,8 @@
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -352,21 +325,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Time", "Time\0")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("[NA]", "[NA]\0")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
@@ -376,33 +340,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2""Tmr3", "Tmr1\0""Tmr2\0""Tmr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2", "Tmr1\0""Tmr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010") /*8 decimal*/
|
||||
#define TR_VUNITSSYSTEM TR("Metr. ""Imper.", "Metryczn""Imperial")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -416,15 +364,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "None\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#define LEN_VOLTSRC TR("\003", "\005")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\005")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\004"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -433,13 +376,8 @@
|
||||
#define TR_VARIOSRC "Wys\0""Wys+""VSpd""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\006"
|
||||
#define TR_VTELEMSCREENTYPE "Brak\0 ""Liczb\0""Paski\0""Skrypt"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\004"
|
||||
#define TR_VTELEMSCREENTYPE "Licz""Pask"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
@@ -503,11 +441,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -518,9 +452,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -547,13 +478,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0""Bat\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_TIMERS TR_RAS "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -571,14 +497,6 @@
|
||||
#define LEN_VFAILSAFE "\011" /*9 decimal*/
|
||||
#define TR_VFAILSAFE "Brak \0 ""Utrzymuj\0""Własne \0""0 sygnału""Odbiornik"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011" /*9 decimal*/
|
||||
#define TR_MAVLINK_AC_MODES "Stabiliz.""Akro ""Alt Hold ""Auto ""Sterowany""Loiter ""RTL ""Koło ""Utrzymuj ""Ląduj ""OF Loiter""Toy A ""Toy M ""BŁĘDNY "
|
||||
#define LEN_MAVLINK_AP_MODES "\015" /*13 decimal*/
|
||||
#define TR_MAVLINK_AP_MODES "Ręczny ""Koło ""Stabilizacja ""Trening ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Sterowany ""Inicjalizacja""BŁĘDNY "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012" /*10 decimal*/
|
||||
#define TR_VSENSORTYPES "Użytkownik""Obliczone "
|
||||
@@ -643,11 +561,7 @@
|
||||
#define TR_PHASENAME "Nazwa Fazy"
|
||||
#define TR_MIXNAME "Nazwa Mix"
|
||||
#define TR_INPUTNAME "Wpisz Nazw"
|
||||
#if defined(CPUARM)
|
||||
#define TR_EXPONAME "LiniaNazw"
|
||||
#else
|
||||
#define TR_EXPONAME "Nazwa Exp"
|
||||
#endif
|
||||
#define TR_BITMAP "Obrazek "
|
||||
#define TR_TIMER TR("Timer", "Timer ")
|
||||
#define TR_ELIMITS TR("Limi+25%", "Kanał +/- 125% ")
|
||||
@@ -662,13 +576,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Wyjście"
|
||||
#endif
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protokół")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "Ramka PPM"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME INDENT "Ramka PPM"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH "Przełą"
|
||||
#define TR_TRIMS "Trymy"
|
||||
@@ -748,11 +658,11 @@
|
||||
#define TR_BLOFFBRIGHTNESS INDENT"Jasność wył."
|
||||
#define TR_BLCOLOR INDENT "Color"
|
||||
#define TR_SPLASHSCREEN "Logo ekranu"
|
||||
#define TR_THROTTLEWARNING TR(IF_CPUARM(INDENT)"OstrzGaz", INDENT "OstrzeżenieGaz")
|
||||
#define TR_SWITCHWARNING TR(IF_CPUARM(INDENT) "OstrzPrzeł", INDENT "PozycjaPrzeł")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(IF_CPUARM(INDENT) "Ostrz.Poten.", INDENT "PozycjaPotencj.")
|
||||
#define TR_THROTTLEWARNING TR(INDENT"OstrzGaz", INDENT "OstrzeżenieGaz")
|
||||
#define TR_SWITCHWARNING TR(INDENT "OstrzPrzeł", INDENT "PozycjaPrzeł")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR(INDENT "Ostrz.Poten.", INDENT "PozycjaPotencj.")
|
||||
#define TR_TIMEZONE TR("Strefa czasowa" ,"Strefa czasowa GPS")
|
||||
#define TR_ADJUST_RTC TR("RegulujRTC", INDENT "RegulujRTC")
|
||||
#define TR_GPS "GPS"
|
||||
@@ -791,13 +701,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "TmixMaks"
|
||||
#define TR_FREESTACKMINB "Wolny stos"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "TmixMaks\037\124ms"
|
||||
#define TR_FREESTACKMINB "Wolny stos\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER " >> Reset"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -840,13 +745,8 @@
|
||||
#define TR_MENUFLIGHTMODES "FAZY LOTU"
|
||||
#define TR_MENUHELISETUP "USTAW HELI"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "WEJŚCIA"
|
||||
#define TR_MENULIMITS "WYJŚCIA"
|
||||
#else
|
||||
#define TR_MENUINPUTS "DRĄŻKI"
|
||||
#define TR_MENULIMITS "SERWA "
|
||||
#endif
|
||||
|
||||
#define TR_MENUCURVES "KRZYWE"
|
||||
#define TR_MENUCURVE "KRZYWA"
|
||||
@@ -865,13 +765,8 @@
|
||||
#define TR_MONITOR_CHANNELS4 "CHANNELS MONITOR 25/32"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Outputs"
|
||||
#define TR_MONITOR_MIXER_DESC "Mixers"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR( INDENT "Nr RX",INDENT "Nr odbiornika")
|
||||
#define TR_RECEIVER INDENT "Receiver"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "NumOdb"
|
||||
#define TR_RECEIVER INDENT "Receiver"
|
||||
#endif
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "Freq tune",INDENT "RF Freq. fine tune")
|
||||
#define TR_MULTI_TELEMETRY "Telemetry"
|
||||
#define TR_MULTI_VIDFREQ TR(INDENT "Vid. freq.", INDENT "Video frequency")
|
||||
@@ -1123,31 +1018,6 @@
|
||||
#define TR_CONFIRMRESET "WYkasować wszytkie modele? "
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Za dużo skryptów Lua!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "MaksRSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Ustaw.Mavlink"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFO"
|
||||
#define TR_MAVLINK_MODE "TRYB"
|
||||
#define TR_MAVLINK_CUR_MODE "Aktualy Tryb"
|
||||
#define TR_MAVLINK_ARMED "Aktywny"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Status bateriOdbiorn."
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Kurs"
|
||||
#define TR_MAVLINK_HEADING "Kierunek"
|
||||
#define TR_MAVLINK_BEARING "Orientacja"
|
||||
#define TR_MAVLINK_ALTITUDE "Wysokość"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "SZR"
|
||||
#define TR_MAVLINK_LON "DLG"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Nazwa"
|
||||
|
||||
@@ -142,8 +142,6 @@
|
||||
#define TR_RETA123 "LPMA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "LPMA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "LPMA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "LPMA123"
|
||||
#endif
|
||||
@@ -172,11 +170,7 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
@@ -213,27 +207,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Glue\0"
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Rnge\0"
|
||||
#define TR_CSWSTAY "Edge\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\015"
|
||||
|
||||
@@ -309,13 +290,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[reserve]\0 "
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Aprendiz\0 ""Ajuste Rapido""Reset\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " "SetFailsafe\0 " "RangeCheck\0 " "ModuleBind\0 " TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0 " TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Aprendiz\0 ""Ajuste Rapido""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0 " TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Aprendiz\0 ""Ajuste Rapido""Reset\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Backlight\0 " TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
@@ -335,10 +310,8 @@
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -348,21 +321,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Time", "Time\0")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("[NA]", "[NA]\0")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
@@ -372,33 +336,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2""Tmr3", "Tmr1\0""Tmr2\0""Tmr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2", "Tmr1\0""Tmr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -412,15 +360,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "Nada\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#define LEN_VOLTSRC TR("\003", "\007")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -494,11 +437,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rl""\313Rr""\313Ed""\313Eu""\313Td""\313Tu""\313Al""\313Ar""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -509,9 +448,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -538,13 +474,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Time""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0" "Batt" "Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""ASp+""Cel-""Cls-""Vfs-""Cur+""Pwr+""Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -562,14 +493,6 @@
|
||||
#define LEN_VFAILSAFE "\011"
|
||||
#define TR_VFAILSAFE "Not set\0 ""Hold\0 ""Custom\0 ""No pulses""Receiver\0"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\012"
|
||||
#define TR_VSENSORTYPES "Custom\0 ""Calculated"
|
||||
@@ -737,8 +660,8 @@
|
||||
#define TR_SPLASHSCREEN "Splash screen"
|
||||
#define TR_THROTTLEWARNING TR("Avisa Acel", INDENT "Avisa Acel")
|
||||
#define TR_SWITCHWARNING TR("Avisa Chav", INDENT "Avisa Chav")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR("Pot Warn.", INDENT "Pot Warning")
|
||||
#define TR_TIMEZONE "Time Zone"
|
||||
#define TR_ADJUST_RTC TR("Adjust RTC", INDENT "Adjust RTC")
|
||||
@@ -774,13 +697,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Pilha Livre\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER" Reinicia"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -1104,31 +1022,6 @@
|
||||
#define TR_CONFIRMRESET "Erase ALL models and settings?"
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "Too many Lua scripts!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "Mavlink Setup"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "MODE"
|
||||
#define TR_MAVLINK_CUR_MODE "Current Mode"
|
||||
#define TR_MAVLINK_ARMED "Armed"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Flight Battery status"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Course"
|
||||
#define TR_MAVLINK_HEADING "Heading"
|
||||
#define TR_MAVLINK_BEARING "Bearing"
|
||||
#define TR_MAVLINK_ALTITUDE "Altitude"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "NO Fix"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Name"
|
||||
|
||||
@@ -141,8 +141,6 @@
|
||||
#define TR_RETA123 "RHGS123HV"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "RHGS123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "RHGS123ab"
|
||||
#else
|
||||
#define TR_RETA123 "RHGS123"
|
||||
#endif
|
||||
@@ -171,12 +169,6 @@
|
||||
#define TR_IRPROTOS
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_XPPM
|
||||
#else
|
||||
#define TR_XPPM "PPM16\0""PPMsim"
|
||||
#endif
|
||||
|
||||
#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS
|
||||
|
||||
#define LEN_POSNEG "\003"
|
||||
@@ -212,27 +204,14 @@
|
||||
#else
|
||||
#define TR_CSWTIMER "Tim\0 "
|
||||
#define TR_CSWSTICKY "Seg\0 "
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWRANGE "Vidd\0"
|
||||
#define TR_CSWSTAY "Kant\0"
|
||||
#else
|
||||
#define TR_CSWRANGE
|
||||
#define TR_CSWSTAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CSWEQUAL "a=x\0 "
|
||||
#else
|
||||
#define TR_CSWEQUAL
|
||||
#endif
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#if defined(CPUARM)
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#else
|
||||
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""^}x\0 ""|^|}x" TR_CSWTIMER TR_CSWSTICKY
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWFUNC "\012"
|
||||
|
||||
@@ -310,13 +289,7 @@
|
||||
|
||||
#define TR_SF_RESERVE "[reserve]\0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Sätt Trim\0""Nollställ\0""Sätt\0 " TR_ADJUST_GVAR "Volym\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Belysning\0" TR_SF_SCREENSHOT TR_SF_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer \0 ""Sätt Trim\0""Nollställ\0" TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Belysning\0" TR_SF_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer \0 ""Sätt Trim\0""Nollställ\0" TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Belysning\0" TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
@@ -336,10 +309,8 @@
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
|
||||
#elif defined(CPUARM)
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2"
|
||||
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR(TR_FSW_RESET_TIMERS "All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, TR_FSW_RESET_TIMERS "Alla\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
@@ -349,21 +320,12 @@
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Tid\0", "Tid\0 ")
|
||||
#define TR_RAS TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("[NA]", "[NA]\0")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_RAS
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
@@ -373,33 +335,17 @@
|
||||
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2""Tmr3", "Tmr1\0""Tmr2\0""Tmr3\0")
|
||||
#else
|
||||
#define TR_TELEM_TIMERS TR("Tmr1""Tmr2", "Tmr1\0""Tmr2\0")
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "fot"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
#define LENGTH_UNIT_METR "m\0 "
|
||||
#define SPEED_UNIT_METR "kmh"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Metri.""Imper.", "Metriska""Imperial")
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "-\0 ""V\0 ""A\0 ""mA\0""kts""m/s""f/s""kmh""mph""m\0 ""ft\0""@C\0""@F\0""%\0 ""mAh""W\0 ""mW\0""dB\0""rpm""g\0 ""@\0 ""rad""ml\0""fOz"
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT LENGTH_UNIT_IMP
|
||||
#define SPEED_UNIT SPEED_UNIT_IMP
|
||||
#else
|
||||
#define LENGTH_UNIT LENGTH_UNIT_METR
|
||||
#define SPEED_UNIT SPEED_UNIT_METR
|
||||
#endif
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "V\0 ""A\0 ""m/s""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#endif
|
||||
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
@@ -413,15 +359,10 @@
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "---\0 ""Hub\0 ""WSHHög."
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#define LEN_VOLTSRC TR("\003", "\007")
|
||||
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
#if defined(TELEMETRY_FRSKY_SPORT)
|
||||
@@ -430,13 +371,8 @@
|
||||
#define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VTELEMSCREENTYPE "\007"
|
||||
#define TR_VTELEMSCREENTYPE "Inget\0 ""Siffror""Staplar""Script\0"
|
||||
#else
|
||||
#define LEN_VTELEMSCREENTYPE "\007"
|
||||
#define TR_VTELEMSCREENTYPE "Siffror""Staplar"
|
||||
#endif
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
@@ -509,11 +445,7 @@
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
|
||||
#else
|
||||
#define TR_LOGICALSW "L01""L02""L03""L04""L05""L06""L07""L08""L09""L10""L11""L12"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES "\313Rv""\313Rh""\313Hn""\313Hu""\313Gn""\313Gu""\313Sv""\313Sh""\3135d""\3135u""\3136d""\3136u"
|
||||
@@ -524,9 +456,6 @@
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
@@ -555,13 +484,8 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Batt""Tid\0""GPS\0" TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW TR_RESERVE_VSRCRAW "Tmr1""Tmr2""Tmr3"
|
||||
#else
|
||||
#define TR_EXTRA_VSRCRAW
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_TIMERS TR_RAS "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Tid\0"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "Max\0" TR_CYC_VSRCRAW TR_TRIMS_VSRCRAW TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
|
||||
|
||||
@@ -579,14 +503,6 @@
|
||||
#define LEN_VFAILSAFE "\011"
|
||||
#define TR_VFAILSAFE "Ej givet\0""Lås Servo""Anpassat\0""Pulsfritt""Mottagare"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""58798 ""76800"
|
||||
#define LEN_MAVLINK_AC_MODES "\011"
|
||||
#define TR_MAVLINK_AC_MODES "Stabil ""Akrobat ""Lås Höjd ""Automat ""Guidad ""Hovra ""Flyg Hem ""Cirkla ""Håll Pos.""Landa ""OF Hovra ""Leksak A ""Leksak M ""OGILTIG "
|
||||
#define LEN_MAVLINK_AP_MODES "\015"
|
||||
#define TR_MAVLINK_AP_MODES "Manuell ""Cirkla ""Stabilisera ""Övning ""Fly by Wire A""Fly by Wire A""Automatisk ""Flyg Hem ""Hovra ""Guidad ""Initialiserar""OGILTIG "
|
||||
#endif
|
||||
|
||||
#define LEN_VSENSORTYPES "\010"
|
||||
#define TR_VSENSORTYPES "Egen\0 ""Beräknad"
|
||||
@@ -670,13 +586,9 @@
|
||||
#define TR_OUTPUT_TYPE INDENT "Output"
|
||||
#endif
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protokoll")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "PPM-paket"
|
||||
#define TR_REFRESHRATE TR(INDENT "Refresh", INDENT "Refresh rate")
|
||||
#define STR_WARN_BATTVOLTAGE TR(INDENT "Output is VBAT: ", INDENT "Warning: output level is VBAT: ")
|
||||
#else
|
||||
#define TR_PPMFRAME "PPM-paket"
|
||||
#endif
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH "Brytare"
|
||||
#define TR_TRIMS "Trimmar"
|
||||
@@ -758,8 +670,8 @@
|
||||
#define TR_BLCOLOR INDENT "Color"
|
||||
#define TR_THROTTLEWARNING TR("Gasvarning", INDENT "Gasvarning")
|
||||
#define TR_SWITCHWARNING TR("Bryt.varn.", INDENT "Brytarvarning")
|
||||
#define TR_POTWARNINGSTATE TR(IF_CPUARM(INDENT) "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(IF_CPUARM(INDENT) "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNINGSTATE TR(INDENT "Pot&Slid.", INDENT "Pots & sliders")
|
||||
#define TR_SLIDERWARNING TR(INDENT "Slid. pos.", INDENT "Slider positions")
|
||||
#define TR_POTWARNING TR("Rattvarn.", INDENT "Rattvarning")
|
||||
#define TR_TIMEZONE TR("Tidszon", "GPS Tidszon")
|
||||
#define TR_ADJUST_RTC TR("Adjust RTC", INDENT "Adjust RTC")
|
||||
@@ -799,13 +711,8 @@
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\037\124ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\037\124b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER " Nollar"
|
||||
#define TR_PPM_TRAINER "TR"
|
||||
@@ -848,13 +755,8 @@
|
||||
#define TR_MENUFLIGHTMODES "FLYGLÄGEN"
|
||||
#define TR_MENUHELISETUP "HELIKOPTER"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_MENUINPUTS "INPUT"
|
||||
#define TR_MENULIMITS "SERVON"
|
||||
#else
|
||||
#define TR_MENUINPUTS "SPAKAR"
|
||||
#define TR_MENULIMITS "SERVON"
|
||||
#endif
|
||||
|
||||
#define TR_MENUCURVES "KURVOR"
|
||||
#define TR_MENUCURVE "KURVA"
|
||||
@@ -873,13 +775,8 @@
|
||||
#define TR_MONITOR_CHANNELS4 "CHANNELS MONITOR 25/32"
|
||||
#define TR_MONITOR_OUTPUT_DESC "Outputs"
|
||||
#define TR_MONITOR_MIXER_DESC "Mixers"
|
||||
#if defined(CPUARM)
|
||||
#define TR_RECEIVER_NUM TR(INDENT "RxNum", INDENT "Mottagare Nr.")
|
||||
#define TR_RECEIVER INDENT "Receiver"
|
||||
#else
|
||||
#define TR_RECEIVER_NUM "RxNum"
|
||||
#define TR_RECEIVER "RxNum"
|
||||
#endif
|
||||
#define TR_SYNCMENU "Synk [MENU]"
|
||||
#define TR_MULTI_RFTUNE TR(INDENT "Freq tune",INDENT "RF Freq. fine tune")
|
||||
#define TR_MULTI_TELEMETRY "Telemetry"
|
||||
@@ -1132,31 +1029,6 @@
|
||||
#define TR_CONFIRMRESET "Erase ALL models and settings?"
|
||||
#define TR_TO_MANY_LUA_SCRIPTS "För många Lua-scripts!"
|
||||
|
||||
#if defined(TELEMETRY_MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN"
|
||||
#define TR_MAVMENUSETUP_TITLE "MAVLINKINSTÄLLNINGAR"
|
||||
#define TR_MAVLINK_BAUD_LABEL "Baudrate"
|
||||
#define TR_MAVLINK_INFOS "INFOS"
|
||||
#define TR_MAVLINK_MODE "LÄGE"
|
||||
#define TR_MAVLINK_CUR_MODE "Nuvarande Läge"
|
||||
#define TR_MAVLINK_ARMED "Osäkrad"
|
||||
#define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI"
|
||||
#define TR_MAVLINK_BATTERY_LABEL "Status för flygbatteri"
|
||||
#define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI"
|
||||
#define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI"
|
||||
#define TR_MAVLINK_NAV_MENU_TITLE "NAV"
|
||||
#define TR_MAVLINK_COURSE "Kurs"
|
||||
#define TR_MAVLINK_HEADING "Riktning"
|
||||
#define TR_MAVLINK_BEARING "Bäring"
|
||||
#define TR_MAVLINK_ALTITUDE "Höjd"
|
||||
#define TR_MAVLINK_GPS "GPS"
|
||||
#define TR_MAVLINK_NO_FIX "EJ Lås"
|
||||
#define TR_MAVLINK_SAT "SAT"
|
||||
#define TR_MAVLINK_HDOP "HDOP"
|
||||
#define TR_MAVLINK_LAT "LAT"
|
||||
#define TR_MAVLINK_LON "LON"
|
||||
#endif
|
||||
|
||||
// Horus and Taranis column headers
|
||||
#define TR_PHASES_HEADERS_NAME "Namn"
|
||||
|
||||
@@ -16,14 +16,11 @@ INVALID_BOARD = 6
|
||||
INVALID_LANGUAGE = 7
|
||||
|
||||
# Board types
|
||||
BOARD_9X = 0
|
||||
BOARD_GRUVIN9X = 1
|
||||
BOARD_SKY9X = 2
|
||||
BOARD_TARANIS = 3
|
||||
BOARD_HORUS = 4
|
||||
|
||||
# Board families
|
||||
BOARD_FAMILY_AVR = 0
|
||||
BOARD_FAMILY_ARM = 1
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
@@ -40,47 +37,8 @@ if len(options) < 2 or options[0] != "opentx":
|
||||
optcount = 1
|
||||
command_options = {}
|
||||
|
||||
if options[optcount] == "9x":
|
||||
command_options["PCB"] = "9X"
|
||||
firmware_options = options_9x
|
||||
maxsize = 65536
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "9xr":
|
||||
command_options["PCB"] = "9XR"
|
||||
firmware_options = options_9x
|
||||
maxsize = 65536
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "9x128":
|
||||
command_options["PCB"] = "9X128"
|
||||
command_options["FRSKY_STICKS"] = "YES"
|
||||
firmware_options = options_9x128
|
||||
maxsize = 65536 * 2
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "9xr128":
|
||||
command_options["PCB"] = "9XR128"
|
||||
command_options["FRSKY_STICKS"] = "YES"
|
||||
firmware_options = options_9x128
|
||||
maxsize = 65536 * 2
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "gruvin9x":
|
||||
command_options["PCB"] = "GRUVIN9X"
|
||||
command_options["TELEMETRY"] = "FRSKY"
|
||||
firmware_options = options_gruvin9x
|
||||
maxsize = 65536 * 4
|
||||
board = BOARD_GRUVIN9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "mega2560":
|
||||
command_options["PCB"] = "MEGA2560"
|
||||
command_options["TELEMETRY"] = "FRSKY"
|
||||
firmware_options = options_mega2560
|
||||
maxsize = 65536 * 4
|
||||
board = BOARD_GRUVIN9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "sky9x":
|
||||
|
||||
if options[optcount] == "sky9x":
|
||||
command_options["PCB"] = "SKY9X"
|
||||
firmware_options = options_sky9x
|
||||
maxsize = 65536 * 4
|
||||
@@ -234,9 +192,6 @@ def build_firmware(path):
|
||||
# Check binary size
|
||||
if board_family == BOARD_FAMILY_ARM:
|
||||
size = os.stat(target).st_size
|
||||
else:
|
||||
size = subprocess.check_output('avr-size -A %s | grep Total | cut -f2- -d " "' % target, shell=True)
|
||||
size = int(size.strip())
|
||||
if size > maxsize:
|
||||
exit(FIRMWARE_SIZE_TOO_BIG)
|
||||
|
||||
|
||||
@@ -21,172 +21,7 @@ tts_languages = {
|
||||
"de",
|
||||
"pt"
|
||||
}
|
||||
tts_avr = {
|
||||
"tts%s" % language: ("TTS", language.upper(), None) for language in tts_languages
|
||||
}
|
||||
|
||||
options_9x_ext = {
|
||||
"nmea": ("TELEMETRY", "NMEA", None),
|
||||
"frsky": ("TELEMETRY", "FRSKY", None),
|
||||
"telemetrez": ("TELEMETRY", "TELEMETREZ", None),
|
||||
"jeti": ("TELEMETRY", "JETI", None),
|
||||
"ardupilot": ("TELEMETRY", "ARDUPILOT", None),
|
||||
"mavlink": ("TELEMETRY", "MAVLINK", None),
|
||||
}
|
||||
|
||||
options_9x = {
|
||||
"heli": ("HELI", "YES", "NO"),
|
||||
"templates": ("TEMPLATES", "YES", "NO"),
|
||||
"nosplash": ("SPLASH", "NO", "YES"),
|
||||
"nofp": ("FLIGHT_MODES", "NO", "YES"),
|
||||
"nocurves": ("CURVES", "NO", "YES"),
|
||||
"audio": ("AUDIO", "YES", "NO"),
|
||||
"voice": ("VOICE", "YES", "NO"),
|
||||
"haptic": ("HAPTIC", "YES", "NO"),
|
||||
"pwmbl": ("PWM_BACKLIGHT", "YES", "NO"),
|
||||
"turnigyfix": ("TURNIGY_TRANSMITTER_FIX", "YES", "NO"),
|
||||
"acurStats": ("ACCURAT_THROTTLE_STATS", "YES", "NO"),
|
||||
"arithOvfl": ("ARITHMETIC_OVERFLOW_CHECK", "YES", "NO"),
|
||||
# "PXX": ("PXX", "YES", "NO"),
|
||||
"DSM2": ("DSM2", "PPM ", "NO"),
|
||||
"potscroll": ("NAVIGATION", "POTS ", "NO"),
|
||||
"rotenc": ("NAVIGATION", "ROTENC ", "NO"),
|
||||
"sp22": ("SP22", "YES", "NO"),
|
||||
"autosource": ("AUTOSOURCE", "YES", "NO"),
|
||||
"autoswitch": ("AUTOSWITCH", "YES", "NO"),
|
||||
"dblkeys": ("DBLKEYS", "YES", "NO"),
|
||||
"ppmca": ("PPM_CENTER_ADJUSTABLE", "YES", "NO"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"gvars": ("GVARS", "YES", "NO"),
|
||||
"symlimits": ("PPM_LIMITS_SYMETRICAL", "YES", "NO"),
|
||||
"nographics": ("GRAPHICS", "NO", "YES"),
|
||||
"battgraph": ("BATTGRAPH", "YES", "NO"),
|
||||
"nobold": ("BOLD", "NO", "YES"),
|
||||
"sqt5font": ("FONT", "SQT5 ", None),
|
||||
"thrtrace": ("THR_TRACE", "YES", "NO"),
|
||||
"pgbar": ("EEPROM_PROGRESS_BAR", "YES", "NO"),
|
||||
"imperial": ("UNITS", "IMPERIAL", "METRIC"),
|
||||
"nogps": ("GPS", "NO", "YES"),
|
||||
"nogauges": ("GAUGES", "NO", "YES"),
|
||||
"novario": ("VARIO", "NO", "YES"),
|
||||
"nowshh": ("WS_HOW_HIGH", "NO", "YES"),
|
||||
"faimode": ("FAI", "YES", None),
|
||||
"faichoice": ("FAI", "CHOICE ", None),
|
||||
"fasoffset": ("FAS_OFFSET", "YES", "NO"),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES"),
|
||||
"stickrev": ("FRSKY_STICKS", "YES", "NO")
|
||||
}
|
||||
|
||||
options_9x.update(options_9x_ext)
|
||||
options_9x.update(tts_avr)
|
||||
|
||||
options_9x128 = {
|
||||
"heli": ("HELI", "YES", "NO"),
|
||||
"templates": ("TEMPLATES", "YES", "NO"),
|
||||
"nosplash": ("SPLASH", "NO", "YES"),
|
||||
"nofp": ("FLIGHT_MODES", "NO", "YES"),
|
||||
"nocurves": ("CURVES", "NO", "YES"),
|
||||
"audio": ("AUDIO", "YES", "NO"),
|
||||
"voice": ("VOICE", "YES", "NO"),
|
||||
"haptic": ("HAPTIC", "YES", "NO"),
|
||||
"pwmbl": ("PWM_BACKLIGHT", "YES", "NO"),
|
||||
"turnigyfix": ("TURNIGY_TRANSMITTER_FIX", "YES", "NO"),
|
||||
# "PXX": ("PXX", "YES", "NO"),
|
||||
"DSM2": ("DSM2", "PPM", "NO"),
|
||||
"potscroll": ("NAVIGATION", "POTS", "NO"),
|
||||
"rotenc": ("NAVIGATION", "ROTENC", "NO"),
|
||||
"sp22": ("SP22", "YES", "NO"),
|
||||
"autosource": ("AUTOSOURCE", "YES", "NO"),
|
||||
"autoswitch": ("AUTOSWITCH", "YES", "NO"),
|
||||
"dblkeys": ("DBLKEYS", "YES", "NO"),
|
||||
"ppmca": ("PPM_CENTER_ADJUSTABLE", "YES", "NO"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"gvars": ("GVARS", "YES", "NO"),
|
||||
"symlimits": ("PPM_LIMITS_SYMETRICAL", "YES", "NO"),
|
||||
"nographics": ("GRAPHICS", "NO", "YES"),
|
||||
"battgraph": ("BATTGRAPH", "YES", "NO"),
|
||||
"nobold": ("BOLD", "NO", "YES"),
|
||||
"sqt5font": ("FONT", "SQT5", None),
|
||||
"thrtrace": ("THR_TRACE", "YES", "NO"),
|
||||
"pgbar": ("EEPROM_PROGRESS_BAR", "YES", "NO"),
|
||||
"imperial": ("UNITS", "IMPERIAL", "METRIC"),
|
||||
"nogps": ("GPS", "NO", "YES"),
|
||||
"nogauges": ("GAUGES", "NO", "YES"),
|
||||
"novario": ("VARIO", "NO", "YES"),
|
||||
"nowshh": ("WS_HOW_HIGH", "NO", "YES"),
|
||||
"faimode": ("FAI", "YES", None),
|
||||
"faichoice": ("FAI", "CHOICE", None),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES")
|
||||
}
|
||||
|
||||
options_9x128.update(options_9x_ext)
|
||||
options_9x128.update(tts_avr)
|
||||
|
||||
options_gruvin9x = {
|
||||
"heli": ("HELI", "YES", "NO"),
|
||||
"templates": ("TEMPLATES", "YES", "NO"),
|
||||
"nocurves": ("CURVES", "NO", "YES"),
|
||||
"nofp": ("FLIGHT_MODES", "NO", "YES"),
|
||||
"sdcard": ("SDCARD", "YES", "NO"),
|
||||
"voice": ("VOICE", "YES", "NO"),
|
||||
"PXX": ("PXX", "YES", "NO"),
|
||||
"DSM2": ("DSM2", "SERIAL", "NO"),
|
||||
"DSM2PPM": ("DSM2", "PPM", "NO"),
|
||||
"potscroll": ("NAVIGATION", "POTS", "NO"),
|
||||
"ppmca": ("PPM_CENTER_ADJUSTABLE", "YES", "NO"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"gvars": ("GVARS", "YES", "NO"),
|
||||
"symlimits": ("PPM_LIMITS_SYMETRICAL", "YES", "NO"),
|
||||
"autosource": ("AUTOSOURCE", "YES", "NO"),
|
||||
"autoswitch": ("AUTOSWITCH", "YES", "NO"),
|
||||
"dblkeys": ("DBLKEYS", "YES", "NO"),
|
||||
"nographics": ("GRAPHICS", "NO", "YES"),
|
||||
"battgraph": ("BATTGRAPH", "YES", "NO"),
|
||||
"nobold": ("BOLD", "NO", "YES"),
|
||||
"sqt5font": ("FONT", "SQT5", None),
|
||||
"pgbar": ("EEPROM_PROGRESS_BAR", "YES", "NO"),
|
||||
"imperial": ("UNITS", "IMPERIAL", "METRIC"),
|
||||
"faimode": ("FAI", "YES", None),
|
||||
"faichoice": ("FAI", "CHOICE", None),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES")
|
||||
}
|
||||
|
||||
options_gruvin9x.update(tts_avr)
|
||||
|
||||
options_mega2560 = {
|
||||
"heli": ("HELI", "YES", "NO"),
|
||||
"templates": ("TEMPLATES", "YES", "NO"),
|
||||
"nofp": ("FLIGHT_MODES", "NO", "YES"),
|
||||
"nocurves": ("CURVES", "NO", "YES"),
|
||||
"PWR": ("PWRMANAGE", "YES", "NO"),
|
||||
"sdcard": ("SDCARD", "YES", "NO"),
|
||||
"voice": ("VOICE", "YES", "NO"),
|
||||
"PXX": ("PXX", "YES", "NO"),
|
||||
"DSM2": ("DSM2", "SERIAL", "NO"),
|
||||
"DSM2PPM": ("DSM2", "PPM", "NO"),
|
||||
"ST7565R": ("LCD", "ST7565R", None),
|
||||
"ERC12864FSF": ("LCD", "ERC12864FSF", None),
|
||||
"ST7920": ("LCD", "ST7920", None),
|
||||
"potscroll": ("NAVIGATION", "POTS", "NO"),
|
||||
"ppmca": ("PPM_CENTER_ADJUSTABLE", "YES", "NO"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"gvars": ("GVARS", "YES", "NO"),
|
||||
"symlimits": ("PPM_LIMITS_SYMETRICAL", "YES", "NO"),
|
||||
"autosource": ("AUTOSOURCE", "YES", "NO"),
|
||||
"autoswitch": ("AUTOSWITCH", "YES", "NO"),
|
||||
"dblkeys": ("DBLKEYS", "YES", "NO"),
|
||||
"nographics": ("GRAPHICS", "NO", "YES"),
|
||||
"battgraph": ("BATTGRAPH", "YES", "NO"),
|
||||
"nobold": ("BOLD", "NO", "YES"),
|
||||
"sqt5font": ("FONT", "SQT5", None),
|
||||
"pgbar": ("EEPROM_PROGRESS_BAR", "YES", "NO"),
|
||||
"imperial": ("UNITS", "IMPERIAL", "METRIC"),
|
||||
"faimode": ("FAI", "YES", None),
|
||||
"faichoice": ("FAI", "CHOICE", None),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES")
|
||||
}
|
||||
|
||||
options_mega2560.update(tts_avr)
|
||||
|
||||
options_sky9x = {
|
||||
"heli": ("HELI", "YES", "NO"),
|
||||
|
||||
Reference in New Issue
Block a user