mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 06:15:10 +03:00
Added RPM calculation based on Spur and Pinion Gear
This commit is contained in:
parent
ddd8d137fc
commit
01c2413a0c
14 changed files with 10705 additions and 6 deletions
|
@ -5164,6 +5164,8 @@ enum menuModelTelemetryItems {
|
|||
ITEM_TELEMETRY_USR_PROTO,
|
||||
#endif
|
||||
ITEM_TELEMETRY_USR_BLADES,
|
||||
ITEM_TELEMETRY_USR_SPUR_GEAR, // T.Foley
|
||||
ITEM_TELEMETRY_USR_PINION_GEAR, // T.Foley
|
||||
#endif
|
||||
ITEM_TELEMETRY_USR_VOLTAGE_SOURCE,
|
||||
ITEM_TELEMETRY_USR_CURRENT_SOURCE,
|
||||
|
@ -5200,7 +5202,8 @@ enum menuModelTelemetryItems {
|
|||
};
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define USRDATA_LINES (uint8_t)-1, 0,
|
||||
//#define USRDATA_LINES (uint8_t)-1, 0,
|
||||
#define USRDATA_LINES (uint8_t)-1, 0, 0, 0, // T.Foley - Add room for two new gearing options
|
||||
#elif defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||
#define USRDATA_LINES (uint8_t)-1, 0, 0,
|
||||
#else
|
||||
|
@ -5403,8 +5406,24 @@ void menuModelTelemetry(uint8_t event)
|
|||
|
||||
case ITEM_TELEMETRY_USR_BLADES:
|
||||
lcd_putsLeft(y, STR_BLADES);
|
||||
lcd_outdezAtt(TELEM_COL2+FWNUM, y, 2+g_model.frsky.blades, attr);
|
||||
if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.blades, 3);
|
||||
//lcd_outdezAtt(TELEM_COL2+FWNUM, y, 2+g_model.frsky.blades, attr);
|
||||
lcd_outdezAtt(TELEM_COL2, y, 1+g_model.frsky.blades, LEFT|attr); // T.Foley
|
||||
//if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.blades, 3);
|
||||
if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.blades, 254); // T.Foley
|
||||
break;
|
||||
|
||||
case ITEM_TELEMETRY_USR_SPUR_GEAR: // T.Foley
|
||||
lcd_putsLeft(y, STR_SPURGEAR);
|
||||
lcd_outdezAtt(TELEM_COL2, y, 1+g_model.frsky.spur_gear, LEFT|attr);
|
||||
// Spur gear must be greater than or equal to pinion to prevent floating point error
|
||||
if (attr) CHECK_INCDEC_MODELVAR(event, g_model.frsky.spur_gear, g_model.frsky.pinion_gear, 254);
|
||||
break;
|
||||
|
||||
case ITEM_TELEMETRY_USR_PINION_GEAR: // T.Foley
|
||||
lcd_putsLeft(y, STR_PINIONGEAR);
|
||||
lcd_outdezAtt(TELEM_COL2, y, 1+g_model.frsky.pinion_gear, LEFT|attr);
|
||||
// Pinion gear ,ust be less than or equal to spur gear to prevent floating point error
|
||||
if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.pinion_gear, g_model.frsky.spur_gear);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
5643
radio/src/gui/menu_model.cpp~
Normal file
5643
radio/src/gui/menu_model.cpp~
Normal file
File diff suppressed because it is too large
Load diff
|
@ -976,7 +976,7 @@ PACK(typedef struct t_FrSkyData {
|
|||
uint8_t usrProto; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh, 3=Halcyon
|
||||
uint8_t voltsSource:7;
|
||||
uint8_t altitudeDisplayed:1;
|
||||
uint8_t blades; // How many blades for RPMs, 0=2 blades, 1=3 blades
|
||||
uint8_t blades; // How many blades for RPMs, 0=1 blades, 1=2 blades // T.Foley
|
||||
uint8_t currentSource;
|
||||
uint8_t screensType;
|
||||
FrSkyScreenData screens[MAX_FRSKY_SCREENS];
|
||||
|
@ -989,13 +989,15 @@ PACK(typedef struct t_FrSkyData {
|
|||
uint16_t mAhPersistent:1;
|
||||
uint16_t storedMah:15;
|
||||
int8_t fasOffset;
|
||||
uint8_t spur_gear; // How many teeth on Spur Gear for Headspeed Calc. T.Foley
|
||||
uint8_t pinion_gear; // How many teeth on Pinion Gear for Headspeed Calc. T.Foley
|
||||
}) FrSkyData;
|
||||
#else
|
||||
#define MAX_FRSKY_SCREENS 2
|
||||
PACK(typedef struct t_FrSkyData {
|
||||
FrSkyChannelData channels[2];
|
||||
uint8_t usrProto:2; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh, 3=Halcyon
|
||||
uint8_t blades:2; // How many blades for RPMs, 0=2 blades, 1=3 blades
|
||||
uint8_t blades:2; // How many blades for RPMs, 0=1 blades, 1=2 blades // T.Foley
|
||||
uint8_t screensType:2;
|
||||
uint8_t voltsSource:2;
|
||||
int8_t varioMin:4;
|
||||
|
@ -1007,6 +1009,8 @@ PACK(typedef struct t_FrSkyData {
|
|||
uint8_t currentSource:3;
|
||||
int8_t varioCenterMax:5;
|
||||
int8_t fasOffset;
|
||||
uint8_t spur_gear; // How many teeth on Spur Gear for Headspeed Calc. T.Foley
|
||||
uint8_t pinion_gear; // How many teeth on Pinion Gear for Headspeed Calc. T.Foley
|
||||
}) FrSkyData;
|
||||
#endif
|
||||
|
||||
|
|
1469
radio/src/myeeprom.h~
Normal file
1469
radio/src/myeeprom.h~
Normal file
File diff suppressed because it is too large
Load diff
|
@ -337,6 +337,14 @@ void Open9xSim::refreshDiplay()
|
|||
|
||||
bmp->render();
|
||||
bmf->setImage(bmp);
|
||||
|
||||
// Recalc RPM based on Blades setting during simulator - T.Foley
|
||||
// Final value will change as user adjusts blades, spur or gear live in simulator
|
||||
frskyData.hub.rpm = 303;
|
||||
frskyData.hub.rpm *= (uint8_t)60;
|
||||
frskyData.hub.rpm /= (g_model.frsky.blades+1);
|
||||
float gear_ratio = (((float)g_model.frsky.spur_gear+1) / ((float)g_model.frsky.pinion_gear+1));
|
||||
frskyData.hub.rpm = (float)(frskyData.hub.rpm / gear_ratio);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
425
radio/src/simu.cpp~
Normal file
425
radio/src/simu.cpp~
Normal file
|
@ -0,0 +1,425 @@
|
|||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Andreas Weitl
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Gabriel Birkus
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* 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 "fx.h"
|
||||
#include "FXExpression.h"
|
||||
#include "FXPNGImage.h"
|
||||
#include <unistd.h>
|
||||
#include "fxkeys.h"
|
||||
#include "opentx.h"
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define W2 LCD_W*2
|
||||
#define H2 LCD_H*2
|
||||
|
||||
int g_snapshot_idx = 0;
|
||||
|
||||
class Open9xSim: public FXMainWindow
|
||||
{
|
||||
FXDECLARE(Open9xSim)
|
||||
public:
|
||||
Open9xSim(){};
|
||||
Open9xSim(FXApp* a);
|
||||
long onKeypress(FXObject*,FXSelector,void*);
|
||||
long onTimeout(FXObject*,FXSelector,void*);
|
||||
void makeSnapshot(const FXDrawable* drawable);
|
||||
void doEvents();
|
||||
void refreshDiplay();
|
||||
|
||||
private:
|
||||
FXImage *bmp;
|
||||
FXImageFrame *bmf;
|
||||
bool firstTime;
|
||||
|
||||
public:
|
||||
FXSlider *sliders[8];
|
||||
FXKnob *knobs[NUM_POTS];
|
||||
};
|
||||
// Message Map
|
||||
FXDEFMAP(Open9xSim) Open9xSimMap[]={
|
||||
|
||||
//________Message_Type_________ID_____________________Message_Handler_______
|
||||
FXMAPFUNC(SEL_TIMEOUT, 2, Open9xSim::onTimeout),
|
||||
FXMAPFUNC(SEL_KEYPRESS, 0, Open9xSim::onKeypress),
|
||||
};
|
||||
|
||||
FXIMPLEMENT(Open9xSim,FXMainWindow,Open9xSimMap,ARRAYNUMBER(Open9xSimMap))
|
||||
|
||||
Open9xSim::Open9xSim(FXApp* a)
|
||||
:FXMainWindow(a,"OpenTXSimu",NULL,NULL,DECOR_ALL,20,90,0,0)
|
||||
{
|
||||
firstTime=true;
|
||||
for(int i=0; i<(LCD_W*LCD_H/8); i++) displayBuf[i]=0;//rand();
|
||||
bmp = new FXPPMImage(getApp(),NULL,IMAGE_OWNED|IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP, W2, H2);
|
||||
|
||||
FXHorizontalFrame *hf11=new FXHorizontalFrame(this,LAYOUT_CENTER_X);
|
||||
FXHorizontalFrame *hf1=new FXHorizontalFrame(this,LAYOUT_FILL_X);
|
||||
|
||||
//rh lv rv lh
|
||||
for(int i=0; i<4; i++){
|
||||
switch(i)
|
||||
{
|
||||
#define L LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT|LAYOUT_FIX_X|LAYOUT_FIX_Y
|
||||
#undef X0
|
||||
#define X0 10
|
||||
#define Y0 10
|
||||
case 0:
|
||||
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_HORIZONTAL,X0+0,Y0+100,100,20);
|
||||
break;
|
||||
case 1:
|
||||
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_VERTICAL,X0+100,Y0+0,20,100);
|
||||
break;
|
||||
case 2:
|
||||
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_VERTICAL,X0+120,Y0+0,20,100);
|
||||
break;
|
||||
case 3:
|
||||
sliders[i]=new FXSlider(hf1,NULL,0,L|SLIDER_HORIZONTAL,X0+140,Y0+100,100,20);
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
sliders[i]->setRange(-1024, 1024);
|
||||
sliders[i]->setTickDelta(7);
|
||||
sliders[i]->setValue(0);
|
||||
}
|
||||
|
||||
for(int i=0; i<NUM_POTS; i++){
|
||||
knobs[i]= new FXKnob(hf11,NULL,0,KNOB_TICKS|LAYOUT_LEFT);
|
||||
knobs[i]->setRange(-1024, 1024);
|
||||
knobs[i]->setValue(0);
|
||||
}
|
||||
|
||||
bmf = new FXImageFrame(this,bmp);
|
||||
|
||||
getApp()->addTimeout(this,2,100);
|
||||
}
|
||||
|
||||
void Open9xSim::makeSnapshot(const FXDrawable* drawable)
|
||||
{
|
||||
// Construct and create an FXImage object
|
||||
FXPNGImage snapshot(getApp(), NULL, 0, drawable->getWidth(), drawable->getHeight());
|
||||
snapshot.create();
|
||||
|
||||
// Create a window device context and lock it onto the image
|
||||
FXDCWindow dc(&snapshot);
|
||||
|
||||
// Draw from the widget to this
|
||||
dc.drawArea(drawable, 0, 0, drawable->getWidth(), drawable->getHeight(), 0, 0);
|
||||
|
||||
// Release lock
|
||||
dc.end();
|
||||
|
||||
// Grab pixels from server side back to client side
|
||||
snapshot.restore();
|
||||
|
||||
// Save recovered pixels to a file
|
||||
FXFileStream stream;
|
||||
char buf[100];
|
||||
|
||||
do {
|
||||
stream.close();
|
||||
sprintf(buf,"snapshot_%02d.png", ++g_snapshot_idx);
|
||||
} while (stream.open(buf, FXStreamLoad));
|
||||
|
||||
if (stream.open(buf, FXStreamSave)) {
|
||||
snapshot.savePixels(stream);
|
||||
stream.close();
|
||||
printf("Snapshot written: %s\n", buf);
|
||||
}
|
||||
else {
|
||||
printf("Cannot create snapshot %s\n", buf);
|
||||
}
|
||||
}
|
||||
void Open9xSim::doEvents()
|
||||
{
|
||||
getApp()->runOneEvent(false);
|
||||
}
|
||||
|
||||
long Open9xSim::onKeypress(FXObject*,FXSelector,void*v)
|
||||
{
|
||||
FXEvent *evt=(FXEvent*)v;
|
||||
// printf("keypress %x\n", evt->code);
|
||||
if (evt->code=='s'){
|
||||
makeSnapshot(bmf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
long Open9xSim::onTimeout(FXObject*,FXSelector,void*)
|
||||
{
|
||||
if(hasFocus()) {
|
||||
static int keys1[]={
|
||||
#if defined(PCBTARANIS)
|
||||
KEY_Page_Up, KEY_MENU,
|
||||
KEY_Page_Down, KEY_PAGE,
|
||||
KEY_Return, KEY_ENTER,
|
||||
KEY_BackSpace, KEY_EXIT,
|
||||
KEY_Up, KEY_PLUS,
|
||||
KEY_Down, KEY_MINUS,
|
||||
#else
|
||||
KEY_Return, KEY_MENU,
|
||||
KEY_BackSpace, KEY_EXIT,
|
||||
KEY_Right, KEY_RIGHT,
|
||||
KEY_Left, KEY_LEFT,
|
||||
KEY_Up, KEY_UP,
|
||||
KEY_Down, KEY_DOWN,
|
||||
#endif
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
KEY_F, BTN_REa,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
Coproc_temp = 23;
|
||||
Coproc_maxtemp = 28;
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
temperature = 31;
|
||||
maxTemperature = 42;
|
||||
#endif
|
||||
|
||||
for (unsigned int i=0; i<DIM(keys1); i+=2) {
|
||||
simuSetKey(keys1[i+1], getApp()->getKeyState(keys1[i]));
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
// gruvin: Can't use Function keys on the Mac -- too many other app conflicts.
|
||||
// The ordering of these keys, Q/W,E/R,T/Y,U/I matches the on screen
|
||||
// order of trim sliders
|
||||
static FXuint trimKeys[] = { KEY_E, KEY_R, KEY_U, KEY_I, KEY_R, KEY_E, KEY_Y, KEY_T, KEY_Q, KEY_W };
|
||||
#else
|
||||
static FXuint trimKeys[] = { KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8 };
|
||||
#endif
|
||||
|
||||
for (unsigned i=0; i<DIM(trimKeys); i++) {
|
||||
simuSetTrim(i, getApp()->getKeyState(trimKeys[i]));
|
||||
}
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
static bool rotencAction = false;
|
||||
if (getApp()->getKeyState(KEY_G)) {
|
||||
if (!rotencAction) g_rotenc[0] += ROTARY_ENCODER_GRANULARITY;
|
||||
rotencAction = true;
|
||||
}
|
||||
else if (getApp()->getKeyState(KEY_D)) {
|
||||
if (!rotencAction) g_rotenc[0] -= ROTARY_ENCODER_GRANULARITY;
|
||||
rotencAction = true;
|
||||
}
|
||||
else {
|
||||
rotencAction = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define SWITCH_KEY(key, swtch, states) \
|
||||
static bool state##key = 0; \
|
||||
static int8_t state_##swtch = 2; \
|
||||
static int8_t inc_##swtch = 1; \
|
||||
if (getApp()->getKeyState(KEY_##key)) { \
|
||||
if (!state##key) { \
|
||||
state_##swtch = (state_##swtch+inc_##swtch); \
|
||||
if (state_##swtch == 1+states) inc_##swtch = -1; \
|
||||
else if (state_##swtch == 2) inc_##swtch = 1; \
|
||||
state##key = true; \
|
||||
} \
|
||||
} \
|
||||
else { \
|
||||
state##key = false; \
|
||||
} \
|
||||
simuSetSwitch(swtch, state_##swtch-states);
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
SWITCH_KEY(A, 0, 3);
|
||||
SWITCH_KEY(B, 1, 3);
|
||||
SWITCH_KEY(C, 2, 3);
|
||||
SWITCH_KEY(D, 3, 3);
|
||||
SWITCH_KEY(E, 4, 3);
|
||||
SWITCH_KEY(F, 5, 2);
|
||||
SWITCH_KEY(G, 6, 3);
|
||||
SWITCH_KEY(H, 7, 2);
|
||||
#else
|
||||
SWITCH_KEY(1, 0, 2);
|
||||
SWITCH_KEY(2, 1, 2);
|
||||
SWITCH_KEY(3, 2, 2);
|
||||
SWITCH_KEY(4, 3, 3);
|
||||
SWITCH_KEY(5, 4, 2);
|
||||
SWITCH_KEY(6, 5, 2);
|
||||
SWITCH_KEY(7, 6, 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
per10ms();
|
||||
refreshDiplay();
|
||||
getApp()->addTimeout(this,2,5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define BL_COLOR FXRGB(47,123,227)
|
||||
#else
|
||||
#define BL_COLOR FXRGB(150,200,152)
|
||||
#endif
|
||||
|
||||
void Open9xSim::refreshDiplay()
|
||||
{
|
||||
if (lcd_refresh) {
|
||||
lcd_refresh = false;
|
||||
FXColor offColor = IS_BACKLIGHT_ON() ? BL_COLOR : FXRGB(200,200,200);
|
||||
#if !defined(PCBTARANIS)
|
||||
FXColor onColor = FXRGB(0,0,0);
|
||||
#endif
|
||||
for (int x=0;x<LCD_W;x++) {
|
||||
for (int y=0; y<LCD_H; y++) {
|
||||
#if defined(PCBTARANIS)
|
||||
#define PALETTE_IDX(p, x, mask) ((((p)[(x)] & (mask)) ? 0x1 : 0) + (((p)[DISPLAY_PLAN_SIZE+(x)] & (mask)) ? 0x2 : 0) + (((p)[2*DISPLAY_PLAN_SIZE+(x)] & (mask)) ? 0x4 : 0) + (((p)[3*DISPLAY_PLAN_SIZE+(x)] & (mask)) ? 0x8 : 0))
|
||||
uint8_t mask = (1 << (y%8));
|
||||
uint32_t z = PALETTE_IDX(lcd_buf, (y/8)*LCD_W+x, mask);
|
||||
if (z) {
|
||||
FXColor color;
|
||||
if (IS_BACKLIGHT_ON())
|
||||
color = FXRGB(47-(z*47)/15, 123-(z*123)/15, 227-(z*227)/15);
|
||||
else
|
||||
color = FXRGB(200-(z*200)/15, 200-(z*200)/15, 200-(z*200)/15);
|
||||
bmp->setPixel(2*x, 2*y, color);
|
||||
bmp->setPixel(2*x+1, 2*y, color);
|
||||
bmp->setPixel(2*x, 2*y+1, color);
|
||||
bmp->setPixel(2*x+1, 2*y+1, color);
|
||||
}
|
||||
#else
|
||||
if (lcd_buf[x+(y/8)*LCD_W] & (1<<(y%8))) {
|
||||
bmp->setPixel(2*x, 2*y, onColor);
|
||||
bmp->setPixel(2*x+1, 2*y, onColor);
|
||||
bmp->setPixel(2*x, 2*y+1, onColor);
|
||||
bmp->setPixel(2*x+1, 2*y+1, onColor);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
bmp->setPixel(2*x, 2*y, offColor);
|
||||
bmp->setPixel(2*x+1, 2*y, offColor);
|
||||
bmp->setPixel(2*x, 2*y+1, offColor);
|
||||
bmp->setPixel(2*x+1, 2*y+1, offColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bmp->render();
|
||||
bmf->setImage(bmp);
|
||||
}
|
||||
}
|
||||
|
||||
Open9xSim *th9xSim;
|
||||
void doFxEvents()
|
||||
{
|
||||
//puts("doFxEvents");
|
||||
th9xSim->getApp()->runOneEvent(false);
|
||||
th9xSim->refreshDiplay();
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
// Each FOX GUI program needs one, and only one, application object.
|
||||
// The application objects coordinates some common stuff shared between
|
||||
// all the widgets; for example, it dispatches events, keeps track of
|
||||
// all the windows, and so on.
|
||||
// We pass the "name" of the application, and its "vendor", the name
|
||||
// and vendor are used to search the registry database (which stores
|
||||
// persistent information e.g. fonts and colors).
|
||||
FXApp application("Open9xSim", "thus");
|
||||
|
||||
// Here we initialize the application. We pass the command line arguments
|
||||
// because FOX may sometimes need to filter out some of the arguments.
|
||||
// This opens up the display as well, and reads the registry database
|
||||
// so that persistent settings are now available.
|
||||
application.init(argc,argv);
|
||||
|
||||
// This creates the main window. We pass in the title to be displayed
|
||||
// above the window, and possibly some icons for when its iconified.
|
||||
// The decorations determine stuff like the borders, close buttons,
|
||||
// drag handles, and so on the Window Manager is supposed to give this
|
||||
// window.
|
||||
//FXMainWindow *main=new FXMainWindow(&application,"Hello",NULL,NULL,DECOR_ALL);
|
||||
th9xSim = new Open9xSim(&application);
|
||||
application.create();
|
||||
|
||||
// Pretty self-explanatory:- this shows the window, and places it in the
|
||||
// middle of the screen.
|
||||
#ifndef __APPLE__
|
||||
th9xSim->show(PLACEMENT_SCREEN);
|
||||
#else
|
||||
th9xSim->show(); // Otherwise the main window gets centred across my two monitors, split down the middle.
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY) && !defined(FRSKY_SPORT)
|
||||
frskyStreaming = 1;
|
||||
#endif
|
||||
|
||||
printf("Model size = %d\n", (int)sizeof(g_model));
|
||||
|
||||
StartEepromThread(argc >= 2 ? argv[1] : "eeprom.bin");
|
||||
StartMainThread();
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
simuSetSwitch(0, 0);
|
||||
simuSetSwitch(1, 0);
|
||||
#endif
|
||||
|
||||
return application.run();
|
||||
}
|
||||
|
||||
uint16_t anaIn(uint8_t chan)
|
||||
{
|
||||
if (chan<NUM_STICKS)
|
||||
return th9xSim->sliders[chan]->getValue();
|
||||
else if (chan<NUM_STICKS+NUM_POTS)
|
||||
return th9xSim->knobs[chan-NUM_STICKS]->getValue();
|
||||
#if defined(PCBTARANIS)
|
||||
else if (chan == 8)
|
||||
return 1000;
|
||||
#elif defined(PCBSKY9X)
|
||||
else if (chan == 7)
|
||||
return 1500;
|
||||
else if (chan == 8)
|
||||
return 100;
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
else if (chan == 7)
|
||||
return 150;
|
||||
#else
|
||||
else if (chan == 7)
|
||||
return 1500;
|
||||
#endif
|
||||
else
|
||||
return 0;
|
||||
}
|
|
@ -175,7 +175,15 @@ void parseTelemHubByte(uint8_t byte)
|
|||
switch ((uint8_t)structPos) {
|
||||
|
||||
case offsetof(FrskySerialData, rpm):
|
||||
frskyData.hub.rpm *= (uint8_t)60/(g_model.frsky.blades+2);
|
||||
//frskyData.hub.rpm *= (uint8_t)60/(g_model.frsky.blades+2);
|
||||
// Change minimum Blades to 1 to allow for single sensors/raw data - T.Foley
|
||||
// Added Spur and Pinion Ratio Calculation to provide final head/drive RPM after gearing
|
||||
//
|
||||
frskyData.hub.rpm *= (uint8_t)60;
|
||||
frskyData.hub.rpm /= (g_model.frsky.blades+1);
|
||||
float gear_ratio = (((float)g_model.frsky.spur_gear+1) / ((float)g_model.frsky.pinion_gear+1));
|
||||
frskyData.hub.rpm = (float)(frskyData.hub.rpm / gear_ratio);
|
||||
|
||||
if (frskyData.hub.rpm > frskyData.hub.maxRpm)
|
||||
frskyData.hub.maxRpm = frskyData.hub.rpm;
|
||||
break;
|
||||
|
|
926
radio/src/telemetry/frsky.cpp~
Normal file
926
radio/src/telemetry/frsky.cpp~
Normal file
|
@ -0,0 +1,926 @@
|
|||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Andreas Weitl
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Gabriel Birkus
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* 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"
|
||||
|
||||
// Enumerate FrSky packet codes
|
||||
#define LINKPKT 0xfe
|
||||
#define USRPKT 0xfd
|
||||
#define A11PKT 0xfc
|
||||
#define A12PKT 0xfb
|
||||
#define A21PKT 0xfa
|
||||
#define A22PKT 0xf9
|
||||
#define ALRM_REQUEST 0xf8
|
||||
#define RSSI1PKT 0xf7
|
||||
#define RSSI2PKT 0xf6
|
||||
#define RSSI_REQUEST 0xf1
|
||||
|
||||
#define START_STOP 0x7e
|
||||
#define BYTESTUFF 0x7d
|
||||
#define STUFF_MASK 0x20
|
||||
|
||||
#if defined(TELEMETREZ)
|
||||
#define PRIVATE 0x1B
|
||||
#endif
|
||||
|
||||
uint8_t frskyRxBuffer[FRSKY_RX_PACKET_SIZE]; // Receive buffer. 9 bytes (full packet), worst case 18 bytes with byte-stuffing (+1)
|
||||
uint8_t frskyTxBuffer[FRSKY_TX_PACKET_SIZE]; // Ditto for transmit buffer
|
||||
#if !defined(CPUARM)
|
||||
uint8_t frskyTxBufferCount = 0;
|
||||
#endif
|
||||
uint8_t frskyStreaming = 0;
|
||||
#if defined(WS_HOW_HIGH)
|
||||
uint8_t frskyUsrStreaming = 0;
|
||||
#endif
|
||||
uint8_t link_counter = 0;
|
||||
FrskyData frskyData;
|
||||
|
||||
#if defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||
void checkMinMaxAltitude()
|
||||
{
|
||||
if (TELEMETRY_ALT_BP > frskyData.hub.maxAltitude)
|
||||
frskyData.hub.maxAltitude = TELEMETRY_ALT_BP;
|
||||
if (TELEMETRY_ALT_BP < frskyData.hub.minAltitude)
|
||||
frskyData.hub.minAltitude = TELEMETRY_ALT_BP;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(VARIO) && !defined(FRSKY_SPORT) && (defined(FRSKY_HUB) || defined(WS_HOW_HIGH))
|
||||
void evalVario(int16_t altitude_bp, uint16_t altitude_ap)
|
||||
{
|
||||
int32_t varioAltitude_cm = (int32_t)altitude_bp * 100 + (altitude_bp > 0 ? altitude_ap : -altitude_ap);
|
||||
uint8_t varioAltitudeQueuePointer = frskyData.hub.varioAltitudeQueuePointer + 1;
|
||||
if (varioAltitudeQueuePointer >= VARIO_QUEUE_LENGTH)
|
||||
varioAltitudeQueuePointer = 0;
|
||||
frskyData.hub.varioAltitudeQueuePointer = varioAltitudeQueuePointer;
|
||||
frskyData.hub.varioSpeed -= frskyData.hub.varioAltitudeQueue[varioAltitudeQueuePointer] ;
|
||||
frskyData.hub.varioAltitudeQueue[varioAltitudeQueuePointer] = varioAltitude_cm - frskyData.hub.varioAltitude_cm;
|
||||
frskyData.hub.varioAltitude_cm = varioAltitude_cm;
|
||||
frskyData.hub.varioSpeed += frskyData.hub.varioAltitudeQueue[varioAltitudeQueuePointer] ;
|
||||
}
|
||||
#else
|
||||
#define evalVario(...)
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
typedef enum {
|
||||
TS_IDLE = 0, // waiting for 0x5e frame marker
|
||||
TS_DATA_ID, // waiting for dataID
|
||||
TS_DATA_LOW, // waiting for data low byte
|
||||
TS_DATA_HIGH, // waiting for data high byte
|
||||
TS_XOR = 0x80 // decode stuffed byte
|
||||
} TS_STATE;
|
||||
|
||||
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);
|
||||
}
|
||||
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(FrskySerialData, gpsLatitude_bp)) {
|
||||
if (lowByte || byte)
|
||||
frskyData.hub.gpsFix = 1;
|
||||
else if (frskyData.hub.gpsFix > 0 && frskyData.hub.gpsLatitude_bp > 1)
|
||||
frskyData.hub.gpsFix = 0;
|
||||
}
|
||||
else if ((uint8_t)structPos == offsetof(FrskySerialData, gpsLongitude_bp)) {
|
||||
if (lowByte || byte)
|
||||
frskyData.hub.gpsFix = 1;
|
||||
else if (frskyData.hub.gpsFix > 0 && frskyData.hub.gpsLongitude_bp > 1)
|
||||
frskyData.hub.gpsFix = 0;
|
||||
}
|
||||
|
||||
if ((uint8_t)structPos == offsetof(FrskySerialData, gpsAltitude_bp) ||
|
||||
((uint8_t)structPos >= offsetof(FrskySerialData, gpsAltitude_ap) && (uint8_t)structPos <= offsetof(FrskySerialData, gpsLatitudeNS) && (uint8_t)structPos != offsetof(FrskySerialData, baroAltitude_bp) && (uint8_t)structPos != offsetof(FrskySerialData, baroAltitude_ap))) {
|
||||
// If we don't have a fix, we may discard the value
|
||||
if (frskyData.hub.gpsFix <= 0)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
uint16_t previousValue = *((uint16_t *)(((uint8_t*)&frskyData.hub) + structPos));
|
||||
#endif
|
||||
|
||||
((uint8_t*)&frskyData.hub)[structPos] = lowByte;
|
||||
((uint8_t*)&frskyData.hub)[structPos+1] = byte;
|
||||
|
||||
switch ((uint8_t)structPos) {
|
||||
|
||||
case offsetof(FrskySerialData, rpm):
|
||||
//frskyData.hub.rpm *= (uint8_t)60/(g_model.frsky.blades+2);
|
||||
// Change minimum Blades to 1 to allow for single sensors/raw data - T.Foley
|
||||
// Added Spur and Pinion Ratio Calculation to provide final head/drive RPM after gearing
|
||||
//
|
||||
frskyData.hub.rpm *= (uint8_t)60;
|
||||
frskyData.hub.rpm /= (g_model.frsky.blades+1);
|
||||
float gear_ratio = (((float)g_model.frsky.spur_gear+1) / ((float)g_model.frsky.pinion_gear+1));
|
||||
frskyData.hub.rpm = (float)(frskyData.hub.rpm / gear_ratio);
|
||||
if (frskyData.hub.rpm > frskyData.hub.maxRpm)
|
||||
frskyData.hub.maxRpm = frskyData.hub.rpm;
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, temperature1):
|
||||
if (frskyData.hub.temperature1 > frskyData.hub.maxTemperature1)
|
||||
frskyData.hub.maxTemperature1 = frskyData.hub.temperature1;
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, temperature2):
|
||||
if (frskyData.hub.temperature2 > frskyData.hub.maxTemperature2)
|
||||
frskyData.hub.maxTemperature2 = frskyData.hub.temperature2;
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, current):
|
||||
if (frskyData.hub.current > frskyData.hub.maxCurrent)
|
||||
frskyData.hub.maxCurrent = frskyData.hub.current;
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, currentConsumption):
|
||||
// we receive data from openXsensor. stops the calculation of consumption and power
|
||||
frskyData.hub.openXsensor = 1;
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, volts_ap):
|
||||
#if defined(FAS_BSS)
|
||||
frskyData.hub.vfas = (frskyData.hub.volts_bp * 10 + frskyData.hub.volts_ap);
|
||||
#else
|
||||
frskyData.hub.vfas = ((frskyData.hub.volts_bp * 100 + frskyData.hub.volts_ap * 10) * 21) / 110;
|
||||
#endif
|
||||
/* TODO later if (!frskyData.hub.minVfas || frskyData.hub.minVfas > frskyData.hub.vfas)
|
||||
frskyData.hub.minVfas = frskyData.hub.vfas; */
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, baroAltitude_bp):
|
||||
// First received barometer altitude => Altitude offset
|
||||
if (!frskyData.hub.baroAltitudeOffset)
|
||||
frskyData.hub.baroAltitudeOffset = -frskyData.hub.baroAltitude_bp;
|
||||
if (g_model.frsky.varioSource == VARIO_SOURCE_ALTI) {
|
||||
evalVario(frskyData.hub.baroAltitude_bp, 0);
|
||||
}
|
||||
frskyData.hub.baroAltitude_bp += frskyData.hub.baroAltitudeOffset;
|
||||
checkMinMaxAltitude();
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, baroAltitude_ap):
|
||||
if (g_model.frsky.varioSource == VARIO_SOURCE_ALTI_PLUS) {
|
||||
evalVario(frskyData.hub.baroAltitude_bp-frskyData.hub.baroAltitudeOffset, frskyData.hub.baroAltitude_ap);
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(GPS)
|
||||
case offsetof(FrskySerialData, gpsAltitude_ap):
|
||||
if (!frskyData.hub.gpsAltitudeOffset)
|
||||
frskyData.hub.gpsAltitudeOffset = -frskyData.hub.gpsAltitude_bp;
|
||||
frskyData.hub.gpsAltitude_bp += frskyData.hub.gpsAltitudeOffset;
|
||||
if (!frskyData.hub.baroAltitudeOffset) {
|
||||
if (frskyData.hub.gpsAltitude_bp > frskyData.hub.maxAltitude)
|
||||
frskyData.hub.maxAltitude = frskyData.hub.gpsAltitude_bp;
|
||||
if (frskyData.hub.gpsAltitude_bp < frskyData.hub.minAltitude)
|
||||
frskyData.hub.minAltitude = frskyData.hub.gpsAltitude_bp;
|
||||
}
|
||||
if (!frskyData.hub.pilotLatitude && !frskyData.hub.pilotLongitude) {
|
||||
// First received GPS position => Pilot GPS position
|
||||
getGpsPilotPosition();
|
||||
}
|
||||
else if (frskyData.hub.gpsDistNeeded || g_menuStack[g_menuStackPtr] == menuTelemetryFrsky) {
|
||||
getGpsDistance();
|
||||
}
|
||||
break;
|
||||
|
||||
case offsetof(FrskySerialData, gpsSpeed_bp):
|
||||
// Speed => Max speed
|
||||
if (frskyData.hub.gpsSpeed_bp > frskyData.hub.maxGpsSpeed)
|
||||
frskyData.hub.maxGpsSpeed = frskyData.hub.gpsSpeed_bp;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case offsetof(FrskySerialData, volts):
|
||||
// Voltage => Cell number + Cell voltage
|
||||
{
|
||||
uint8_t battnumber = ((frskyData.hub.volts & 0x00F0) >> 4);
|
||||
if (battnumber < 12) {
|
||||
if (frskyData.hub.cellsCount < battnumber+1) {
|
||||
frskyData.hub.cellsCount = battnumber+1;
|
||||
}
|
||||
uint8_t cellVolts = (uint8_t)(((((frskyData.hub.volts & 0xFF00) >> 8) + ((frskyData.hub.volts & 0x000F) << 8)))/10);
|
||||
frskyData.hub.cellVolts[battnumber] = cellVolts;
|
||||
if (!frskyData.hub.minCellVolts || cellVolts < frskyData.hub.minCellVolts || battnumber==frskyData.hub.minCellIdx) {
|
||||
frskyData.hub.minCellIdx = battnumber;
|
||||
frskyData.hub.minCellVolts = cellVolts;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(GPS)
|
||||
case offsetof(FrskySerialData, hour):
|
||||
frskyData.hub.hour = ((uint8_t)(frskyData.hub.hour + g_eeGeneral.timezone + 24)) % 24;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case offsetof(FrskySerialData, accelX):
|
||||
case offsetof(FrskySerialData, accelY):
|
||||
case offsetof(FrskySerialData, accelZ):
|
||||
*(int16_t*)(&((uint8_t*)&frskyData.hub)[structPos]) /= 10;
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case offsetof(FrskySerialData, gpsAltitude_bp):
|
||||
case offsetof(FrskySerialData, fuelLevel):
|
||||
case offsetof(FrskySerialData, gpsLongitude_bp):
|
||||
case offsetof(FrskySerialData, gpsLatitude_bp):
|
||||
case offsetof(FrskySerialData, gpsCourse_bp):
|
||||
case offsetof(FrskySerialData, day):
|
||||
case offsetof(FrskySerialData, year):
|
||||
case offsetof(FrskySerialData, sec):
|
||||
case offsetof(FrskySerialData, gpsSpeed_ap):
|
||||
case offsetof(FrskySerialData, gpsLongitude_ap):
|
||||
case offsetof(FrskySerialData, gpsLatitude_ap):
|
||||
case offsetof(FrskySerialData, gpsCourse_ap):
|
||||
case offsetof(FrskySerialData, gpsLongitudeEW):
|
||||
case offsetof(FrskySerialData, gpsLatitudeNS):
|
||||
case offsetof(FrskySerialData, varioSpeed):
|
||||
case offsetof(FrskySerialData, power): /* because sent by openXsensor */
|
||||
case offsetof(FrskySerialData, vfas):
|
||||
case offsetof(FrskySerialData, volts_bp):
|
||||
break;
|
||||
|
||||
default:
|
||||
*((uint16_t *)(((uint8_t*)&frskyData.hub) + structPos)) = previousValue;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WS_HOW_HIGH)
|
||||
void parseTelemWSHowHighByte(uint8_t byte)
|
||||
{
|
||||
if (frskyUsrStreaming < (FRSKY_TIMEOUT10ms*3 - 10)) {
|
||||
((uint8_t*)&frskyData.hub)[offsetof(FrskySerialData, baroAltitude_bp)] = byte;
|
||||
checkMinMaxAltitude();
|
||||
if (g_model.frsky.varioSource == VARIO_SOURCE_ALTI) {
|
||||
evalVario(frskyData.hub.baroAltitude_bp, 0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// At least 100mS passed since last data received
|
||||
((uint8_t*)&frskyData.hub)[offsetof(FrskySerialData, baroAltitude_bp)+1] = byte;
|
||||
}
|
||||
// baroAltitude_bp unit here is feet!
|
||||
frskyUsrStreaming = FRSKY_TIMEOUT10ms*3; // reset counter
|
||||
}
|
||||
#endif
|
||||
|
||||
void processFrskyPacket(uint8_t *packet)
|
||||
{
|
||||
// What type of packet?
|
||||
switch (packet[0])
|
||||
{
|
||||
case LINKPKT: // A1/A2/RSSI values
|
||||
{
|
||||
link_counter += 32;
|
||||
frskyData.analog[0].set(packet[1], g_model.frsky.channels[0].type);
|
||||
frskyData.analog[1].set(packet[2], g_model.frsky.channels[1].type);
|
||||
frskyData.rssi[0].set(packet[3]);
|
||||
frskyData.rssi[1].set(packet[4] / 2);
|
||||
frskyStreaming = FRSKY_TIMEOUT10ms; // reset counter only if valid frsky packets are being detected
|
||||
#if defined(VARIO)
|
||||
uint8_t varioSource = g_model.frsky.varioSource - VARIO_SOURCE_A1;
|
||||
if (varioSource < 2)
|
||||
frskyData.hub.varioSpeed = applyChannelRatio(varioSource, frskyData.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
|
||||
}
|
||||
}
|
||||
|
||||
// Receive buffer state machine state enum
|
||||
enum FrSkyDataState {
|
||||
STATE_DATA_IDLE,
|
||||
STATE_DATA_START,
|
||||
STATE_DATA_IN_FRAME,
|
||||
STATE_DATA_XOR,
|
||||
#if defined(TELEMETREZ)
|
||||
STATE_DATA_PRIVATE_LEN,
|
||||
STATE_DATA_PRIVATE_VALUE
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(TELEMETREZ)
|
||||
uint8_t privateDataLen;
|
||||
uint8_t privateDataPos;
|
||||
#endif
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION) && defined(TELEMETREZ)
|
||||
extern uint8_t TrotCount;
|
||||
extern uint8_t TezRotary;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Receive serial (RS-232) characters, detecting and storing each Fr-Sky
|
||||
0x7e-framed packet as it arrives. When a complete packet has been
|
||||
received, process its data into storage variables. NOTE: This is an
|
||||
interrupt routine and should not get too lengthy. I originally had
|
||||
the buffer being checked in the perMain function (because per10ms
|
||||
isn't quite often enough for data streaming at 9600baud) but alas
|
||||
that scheme lost packets also. So each packet is parsed as it arrives,
|
||||
directly at the ISR function (through a call to frskyProcessPacket).
|
||||
|
||||
If this proves a problem in the future, then I'll just have to implement
|
||||
a second buffer to receive data while one buffer is being processed (slowly).
|
||||
*/
|
||||
|
||||
#if defined(CPUARM)
|
||||
void processSerialData(uint8_t data)
|
||||
#else
|
||||
NOINLINE void processSerialData(uint8_t stat, uint8_t data)
|
||||
#endif
|
||||
{
|
||||
static uint8_t numPktBytes = 0;
|
||||
static uint8_t dataState = STATE_DATA_IDLE;
|
||||
|
||||
#if defined(BLUETOOTH)
|
||||
// TODO if (g_model.bt_telemetry)
|
||||
btPushByte(data);
|
||||
#endif
|
||||
|
||||
#if !defined(CPUARM)
|
||||
if (stat & ((1 << FE0) | (1 << DOR0) | (1 << UPE0))) {
|
||||
// discard buffer and start fresh on any comms error
|
||||
numPktBytes = 0;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
switch (dataState)
|
||||
{
|
||||
case STATE_DATA_START:
|
||||
if (data == START_STOP) break; // Remain in userDataStart if possible 0x7e,0x7e doublet found.
|
||||
|
||||
if (numPktBytes < FRSKY_RX_PACKET_SIZE)
|
||||
frskyRxBuffer[numPktBytes++] = data;
|
||||
dataState = STATE_DATA_IN_FRAME;
|
||||
break;
|
||||
|
||||
case STATE_DATA_IN_FRAME:
|
||||
if (data == BYTESTUFF)
|
||||
{
|
||||
dataState = STATE_DATA_XOR; // XOR next byte
|
||||
break;
|
||||
}
|
||||
if (data == START_STOP) // end of frame detected
|
||||
{
|
||||
processFrskyPacket(frskyRxBuffer);
|
||||
dataState = STATE_DATA_IDLE;
|
||||
break;
|
||||
}
|
||||
if (numPktBytes < FRSKY_RX_PACKET_SIZE)
|
||||
frskyRxBuffer[numPktBytes++] = data;
|
||||
break;
|
||||
|
||||
case STATE_DATA_XOR:
|
||||
if (numPktBytes < FRSKY_RX_PACKET_SIZE)
|
||||
frskyRxBuffer[numPktBytes++] = data ^ STUFF_MASK;
|
||||
dataState = STATE_DATA_IN_FRAME;
|
||||
break;
|
||||
|
||||
case STATE_DATA_IDLE:
|
||||
if (data == START_STOP) {
|
||||
numPktBytes = 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(CPUARM) && !defined(SIMU)
|
||||
ISR(USART0_RX_vect)
|
||||
{
|
||||
uint8_t stat;
|
||||
uint8_t data;
|
||||
|
||||
UCSR0B &= ~(1 << RXCIE0); // disable Interrupt
|
||||
sei();
|
||||
|
||||
stat = 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
|
||||
PCM0: MultiProcessor Comms Mode
|
||||
*/
|
||||
// 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
|
||||
*/
|
||||
|
||||
data = UDR0; // USART data register 0
|
||||
|
||||
processSerialData(stat, data);
|
||||
|
||||
cli() ;
|
||||
UCSR0B |= (1 << RXCIE0); // enable Interrupt
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************/
|
||||
#if defined(CPUARM)
|
||||
void frskyTransmitBuffer( uint32_t size )
|
||||
{
|
||||
#if defined(PCBSKY9X)
|
||||
txPdcUsart( frskyTxBuffer, size ) ;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
void frskyTransmitBuffer()
|
||||
{
|
||||
UCSR0B |= (1 << UDRIE0); // enable UDRE0 interrupt
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t frskyAlarmsSendState = 0 ;
|
||||
|
||||
#if defined(CPUARM)
|
||||
void frskyPushValue(uint8_t *&ptr, uint8_t value)
|
||||
{
|
||||
// byte stuff the only byte than might need it
|
||||
if (value == START_STOP) {
|
||||
*ptr++ = BYTESTUFF;
|
||||
*ptr++ = 0x5e;
|
||||
}
|
||||
else if (value == BYTESTUFF) {
|
||||
*ptr++ = BYTESTUFF;
|
||||
*ptr++ = 0x5d;
|
||||
}
|
||||
else {
|
||||
*ptr++ = value;
|
||||
}
|
||||
}
|
||||
|
||||
inline void frskySendNextAlarm(void)
|
||||
{
|
||||
#if defined(PCBSKY9X)
|
||||
if (txPdcPending())
|
||||
return; // we only have one buffer. If it's in use, then we can't send yet.
|
||||
#endif
|
||||
|
||||
uint8_t *ptr = &frskyTxBuffer[0];
|
||||
|
||||
*ptr++ = START_STOP; // Start of packet
|
||||
|
||||
// Now send a packet
|
||||
frskyAlarmsSendState -= 1;
|
||||
uint8_t alarm = 1 - (frskyAlarmsSendState % 2);
|
||||
if (frskyAlarmsSendState < SEND_MODEL_ALARMS) {
|
||||
uint8_t channel = 1 - (frskyAlarmsSendState / 2);
|
||||
*ptr++ = (A22PKT + frskyAlarmsSendState); // fc - fb - fa - f9
|
||||
frskyPushValue(ptr, g_model.frsky.channels[channel].alarms_value[alarm]);
|
||||
*ptr++ = ALARM_GREATER(channel, alarm);
|
||||
*ptr++ = (IS_SOUND_OFF() ? alarm_off : ALARM_LEVEL(channel, alarm));
|
||||
}
|
||||
else {
|
||||
*ptr++ = (RSSI1PKT-alarm); // f7 - f6
|
||||
frskyPushValue(ptr, getRssiAlarmValue(alarm));
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = (IS_SOUND_OFF() ? alarm_off : ((2+alarm+g_model.frsky.rssiAlarms[alarm].level) % 4));
|
||||
}
|
||||
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = 0x00;
|
||||
*ptr++ = START_STOP; // End of packet
|
||||
|
||||
frskyTransmitBuffer(ptr - &frskyTxBuffer[0]);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
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];
|
||||
frskyTransmitBuffer();
|
||||
}
|
||||
|
||||
inline void frskySendNextAlarm(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);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void telemetryInterrupt10ms()
|
||||
{
|
||||
uint16_t voltage = 0; /* unit: 1/10 volts */
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
for (uint8_t i=0; i<frskyData.hub.cellsCount; i++)
|
||||
voltage += frskyData.hub.cellVolts[i];
|
||||
voltage /= 5;
|
||||
frskyData.hub.cellsSum = voltage;
|
||||
#endif
|
||||
|
||||
if (TELEMETRY_STREAMING()) {
|
||||
if (!TELEMETRY_OPENXSENSOR()) {
|
||||
uint8_t channel = g_model.frsky.voltsSource;
|
||||
if (channel <= 1) {
|
||||
voltage = applyChannelRatio(channel, frskyData.analog[channel].value) / 10;
|
||||
}
|
||||
#if defined(FRSKY_HUB)
|
||||
else if (channel == 2) {
|
||||
voltage = frskyData.hub.vfas;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
uint16_t current = frskyData.hub.current; /* unit: 1/10 amps */
|
||||
#else
|
||||
uint16_t current = 0;
|
||||
#endif
|
||||
|
||||
channel = g_model.frsky.currentSource - FRSKY_SOURCE_A1;
|
||||
if (channel <= 1) {
|
||||
current = applyChannelRatio(channel, frskyData.analog[channel].value) / 10;
|
||||
}
|
||||
|
||||
#if defined(CPUARM)
|
||||
frskyData.hub.power = (current * voltage) / 100;
|
||||
#else
|
||||
frskyData.hub.power = ((current>>1) * (voltage>>1)) / 25;
|
||||
#endif
|
||||
|
||||
frskyData.hub.currentPrescale += current;
|
||||
if (frskyData.hub.currentPrescale >= 3600) {
|
||||
frskyData.hub.currentConsumption += 1;
|
||||
frskyData.hub.currentPrescale -= 3600;
|
||||
}
|
||||
}
|
||||
|
||||
if (frskyData.hub.power > frskyData.hub.maxPower)
|
||||
frskyData.hub.maxPower = frskyData.hub.power;
|
||||
}
|
||||
}
|
||||
|
||||
void telemetryWakeup()
|
||||
{
|
||||
#if defined(PCBSKY9X)
|
||||
rxPdcUsart(processSerialData); // Receive serial data here
|
||||
#endif
|
||||
|
||||
// Attempt to transmit any waiting Fr-Sky alarm set packets every 50ms (subject to packet buffer availability)
|
||||
static uint8_t frskyTxDelay = 5;
|
||||
if (frskyAlarmsSendState && (--frskyTxDelay == 0)) {
|
||||
frskyTxDelay = 5; // 50ms
|
||||
frskySendNextAlarm();
|
||||
}
|
||||
|
||||
#ifndef SIMU
|
||||
#if defined(WS_HOW_HIGH)
|
||||
if (frskyUsrStreaming > 0) {
|
||||
frskyUsrStreaming--;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (frskyStreaming > 0) {
|
||||
frskyStreaming--;
|
||||
}
|
||||
else {
|
||||
frskyData.rssi[0].set(0);
|
||||
frskyData.rssi[1].set(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(VARIO)
|
||||
if (TELEMETRY_STREAMING() && !IS_FAI_ENABLED())
|
||||
varioWakeup();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
// not used any more
|
||||
bool FRSKY_alarmRaised(uint8_t idx)
|
||||
{
|
||||
for (int i=0; i<2; i++) {
|
||||
if (ALARM_LEVEL(idx, i) != alarm_off) {
|
||||
if (ALARM_GREATER(idx, i)) {
|
||||
if (frskyData.analog[idx].value > g_model.frsky.channels[idx].alarms_value[i])
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if (frskyData.analog[idx].value < g_model.frsky.channels[idx].alarms_value[i])
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(CPUARM)
|
||||
inline void FRSKY_EnableTXD(void)
|
||||
{
|
||||
frskyTxBufferCount = 0;
|
||||
UCSR0B |= (1 << TXEN0); // enable TX
|
||||
}
|
||||
|
||||
inline void FRSKY_EnableRXD(void)
|
||||
{
|
||||
UCSR0B |= (1 << RXEN0); // enable RX
|
||||
UCSR0B |= (1 << RXCIE0); // enable Interrupt
|
||||
}
|
||||
#endif
|
||||
|
||||
void FRSKY_Init(void)
|
||||
{
|
||||
// clear frsky variables
|
||||
resetTelemetry();
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
// TODO
|
||||
#elif defined(PCBSKY9X)
|
||||
startPdcUsartReceive() ;
|
||||
#elif !defined(SIMU)
|
||||
|
||||
DDRE &= ~(1 << DDE0); // set RXD0 pin as input
|
||||
PORTE &= ~(1 << PORTE0); // disable pullup on RXD0 pin
|
||||
|
||||
#undef BAUD
|
||||
#define BAUD 9600
|
||||
#include <util/setbaud.h>
|
||||
|
||||
UBRR0H = UBRRH_VALUE;
|
||||
UBRR0L = UBRRL_VALUE;
|
||||
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
|
||||
|
||||
// These should be running right from power up on a FrSky enabled '9X.
|
||||
FRSKY_EnableTXD(); // enable FrSky-Telemetry reception
|
||||
FRSKY_EnableRXD(); // enable FrSky-Telemetry reception
|
||||
#endif
|
||||
}
|
||||
|
||||
void FrskyValueWithMin::set(uint8_t value)
|
||||
{
|
||||
if (this->value == 0) {
|
||||
this->value = value;
|
||||
}
|
||||
else {
|
||||
sum += value;
|
||||
if (link_counter == 0) {
|
||||
this->value = sum / 8;
|
||||
sum = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (value && (!min || value < min))
|
||||
min = value;
|
||||
}
|
||||
|
||||
void FrskyValueWithMinMax::set(uint8_t value, uint8_t unit)
|
||||
{
|
||||
FrskyValueWithMin::set(value);
|
||||
if (unit != UNIT_VOLTS) {
|
||||
this->value = value;
|
||||
}
|
||||
if (!max || value > max)
|
||||
max = value;
|
||||
}
|
||||
|
||||
void resetTelemetry()
|
||||
{
|
||||
memclear(&frskyData, sizeof(frskyData));
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
frskyData.hub.gpsLatitude_bp = 2;
|
||||
frskyData.hub.gpsLongitude_bp = 2;
|
||||
frskyData.hub.gpsFix = -1;
|
||||
#endif
|
||||
|
||||
#ifdef SIMU
|
||||
frskyData.analog[0].set(120, UNIT_VOLTS);
|
||||
frskyData.analog[1].set(240, UNIT_VOLTS);
|
||||
frskyData.rssi[0].value = 75;
|
||||
frskyData.rssi[1].value = 75;
|
||||
frskyData.hub.fuelLevel = 75;
|
||||
frskyData.hub.rpm = 12000;
|
||||
|
||||
#if defined(GPS)
|
||||
frskyData.hub.gpsFix = 1;
|
||||
frskyData.hub.gpsLatitude_bp = 4401;
|
||||
frskyData.hub.gpsLatitude_ap = 7710;
|
||||
frskyData.hub.gpsLongitude_bp = 1006;
|
||||
frskyData.hub.gpsLongitude_ap = 8872;
|
||||
frskyData.hub.gpsSpeed_bp = (100 * 250) / 463;
|
||||
getGpsPilotPosition();
|
||||
|
||||
frskyData.hub.gpsLatitude_bp = 4401;
|
||||
frskyData.hub.gpsLatitude_ap = 7455;
|
||||
frskyData.hub.gpsLongitude_bp = 1006;
|
||||
frskyData.hub.gpsLongitude_ap = 9533;
|
||||
getGpsDistance();
|
||||
#endif
|
||||
|
||||
frskyData.hub.cellsCount = 6;
|
||||
|
||||
frskyData.hub.gpsAltitude_bp = 50;
|
||||
frskyData.hub.baroAltitude_bp = 50;
|
||||
frskyData.hub.minAltitude = 10;
|
||||
frskyData.hub.maxAltitude = 500;
|
||||
|
||||
frskyData.hub.accelY = 100;
|
||||
frskyData.hub.temperature1 = -30;
|
||||
frskyData.hub.maxTemperature1 = 100;
|
||||
|
||||
frskyData.hub.current = 5;
|
||||
frskyData.hub.maxCurrent = 56;
|
||||
#endif
|
||||
}
|
|
@ -185,6 +185,8 @@ const pm_char STR_BAR[] PROGMEM = TR_BAR;
|
|||
const pm_char STR_ALARM[] PROGMEM = TR_ALARM;
|
||||
const pm_char STR_USRDATA[] PROGMEM = TR_USRDATA;
|
||||
const pm_char STR_BLADES[] PROGMEM = TR_BLADES;
|
||||
const pm_char STR_SPURGEAR[] PROGMEM = TR_SPURGEAR; // T.Foley
|
||||
const pm_char STR_PINIONGEAR[] PROGMEM = TR_PINIONGEAR; // T.Foley
|
||||
const pm_char STR_SCREEN[] PROGMEM = TR_SCREEN;
|
||||
const pm_char STR_SOUND_LABEL[] PROGMEM = TR_SOUND_LABEL;
|
||||
const pm_char STR_LENGTH[] PROGMEM = TR_LENGTH;
|
||||
|
|
672
radio/src/translations.cpp~
Normal file
672
radio/src/translations.cpp~
Normal file
|
@ -0,0 +1,672 @@
|
|||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Andreas Weitl
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Gabriel Birkus
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* 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 ISTR(x) LEN_##x TR_##x
|
||||
|
||||
// The non-0-terminated-strings
|
||||
const pm_char STR_OPEN9X[] PROGMEM =
|
||||
ISTR(OFFON)
|
||||
ISTR(MMMINV)
|
||||
ISTR(NCHANNELS)
|
||||
#if !defined(GRAPHICS)
|
||||
ISTR(VBEEPLEN)
|
||||
#endif
|
||||
ISTR(VBEEPMODE)
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
ISTR(VRENAVIG)
|
||||
#endif
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
ISTR(VRENCODERS)
|
||||
#endif
|
||||
ISTR(TRNMODE)
|
||||
ISTR(TRNCHN)
|
||||
ISTR(VTRIMINC)
|
||||
ISTR(RETA123)
|
||||
ISTR(VPROTOS)
|
||||
ISTR(POSNEG)
|
||||
ISTR(VBLMODE)
|
||||
ISTR(VCURVEFUNC)
|
||||
ISTR(VMLTPX)
|
||||
ISTR(VMLTPX2)
|
||||
ISTR(VMIXTRIMS)
|
||||
ISTR(VCSWFUNC)
|
||||
ISTR(VFSWFUNC)
|
||||
ISTR(VFSWRESET)
|
||||
ISTR(FUNCSOUNDS)
|
||||
ISTR(VTELEMCHNS)
|
||||
#if defined(FRSKY) || defined(CPUARM)
|
||||
#if defined(CPUARM)
|
||||
ISTR(VTELEMUNIT_IMP)
|
||||
ISTR(VTELEMUNIT_NORM)
|
||||
#else
|
||||
ISTR(VTELEMUNIT)
|
||||
#endif
|
||||
ISTR(VALARM)
|
||||
ISTR(VALARMFN)
|
||||
ISTR(VTELPROTO)
|
||||
ISTR(GPSFORMAT)
|
||||
ISTR(VOLTSRC)
|
||||
ISTR(VARIOSRC)
|
||||
ISTR(VSCREEN)
|
||||
#endif
|
||||
#if defined(TEMPLATES)
|
||||
ISTR(VTEMPLATES)
|
||||
#endif
|
||||
#if defined(HELI)
|
||||
ISTR(VSWASHTYPE)
|
||||
#endif
|
||||
ISTR(VKEYS)
|
||||
ISTR(VSWITCHES)
|
||||
ISTR(VSRCRAW)
|
||||
ISTR(VTMRMODES)
|
||||
#if defined(CPUM2560) || defined(CPUARM)
|
||||
ISTR(DATETIME)
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
ISTR(VLCD)
|
||||
ISTR(VUNITSSYSTEM)
|
||||
ISTR(VBEEPCOUNTDOWN)
|
||||
#endif
|
||||
#if defined(PXX)
|
||||
ISTR(COUNTRYCODES)
|
||||
ISTR(VFAILSAFE)
|
||||
#endif
|
||||
#if defined(PCBTARANIS)
|
||||
ISTR(VTRAINERMODES)
|
||||
#endif
|
||||
#if defined(MAVLINK)
|
||||
ISTR(MAVLINK_BAUDS)
|
||||
ISTR(MAVLINK_AC_MODES)
|
||||
ISTR(MAVLINK_AP_MODES)
|
||||
#endif
|
||||
;
|
||||
|
||||
// The 0-terminated-strings
|
||||
const pm_char STR_POPUPS[] PROGMEM = TR_POPUPS;
|
||||
const pm_char STR_MENUWHENDONE[] PROGMEM = TR_MENUWHENDONE;
|
||||
const pm_char STR_FREE[] PROGMEM = TR_FREE;
|
||||
const pm_char STR_DELETEMODEL[] PROGMEM = TR_DELETEMODEL;
|
||||
const pm_char STR_COPYINGMODEL[] PROGMEM = TR_COPYINGMODEL;
|
||||
const pm_char STR_MOVINGMODEL[] PROGMEM = TR_MOVINGMODEL;
|
||||
const pm_char STR_LOADINGMODEL[] PROGMEM = TR_LOADINGMODEL;
|
||||
const pm_char STR_NAME[] PROGMEM = TR_NAME;
|
||||
const pm_char STR_BITMAP[] PROGMEM = TR_BITMAP;
|
||||
const pm_char STR_TIMER[] PROGMEM = TR_TIMER;
|
||||
const pm_char STR_ELIMITS[] PROGMEM = TR_ELIMITS;
|
||||
const pm_char STR_ETRIMS[] PROGMEM = TR_ETRIMS;
|
||||
const pm_char STR_TRIMINC[] PROGMEM = TR_TRIMINC;
|
||||
const pm_char STR_TTRACE[] PROGMEM = TR_TTRACE;
|
||||
const pm_char STR_TTRIM[] PROGMEM = TR_TTRIM;
|
||||
const pm_char STR_BEEPCTR[] PROGMEM = TR_BEEPCTR;
|
||||
const pm_char STR_PROTO[] PROGMEM = TR_PROTO;
|
||||
const pm_char STR_PPMFRAME[] PROGMEM = TR_PPMFRAME;
|
||||
const pm_char STR_MS[] PROGMEM = TR_MS;
|
||||
const pm_char STR_SWITCH[] PROGMEM = TR_SWITCH;
|
||||
const pm_char STR_TRIMS[] PROGMEM = TR_TRIMS;
|
||||
const pm_char STR_FADEIN[] PROGMEM = TR_FADEIN;
|
||||
const pm_char STR_FADEOUT[] PROGMEM = TR_FADEOUT;
|
||||
const pm_char STR_DEFAULT[] PROGMEM = TR_DEFAULT;
|
||||
const pm_char STR_CHECKTRIMS[] PROGMEM = TR_CHECKTRIMS;
|
||||
#ifdef HELI
|
||||
const pm_char STR_SWASHTYPE[] PROGMEM = TR_SWASHTYPE;
|
||||
const pm_char STR_COLLECTIVE[] PROGMEM = TR_COLLECTIVE;
|
||||
const pm_char STR_SWASHRING[] PROGMEM = TR_SWASHRING;
|
||||
const pm_char STR_ELEDIRECTION[] PROGMEM = TR_ELEDIRECTION;
|
||||
const pm_char STR_AILDIRECTION[] PROGMEM = TR_AILDIRECTION;
|
||||
const pm_char STR_COLDIRECTION[] PROGMEM = TR_COLDIRECTION;
|
||||
#endif
|
||||
const pm_char STR_MODE[] PROGMEM = TR_MODE;
|
||||
#if defined(AUDIO) && defined(BUZZER)
|
||||
const pm_char STR_SPEAKER[] PROGMEM = TR_SPEAKER;
|
||||
const pm_char STR_BUZZER[] PROGMEM = TR_BUZZER;
|
||||
#endif
|
||||
const pm_char STR_NOFREEEXPO[] PROGMEM = TR_NOFREEEXPO;
|
||||
const pm_char STR_NOFREEMIXER[] PROGMEM = TR_NOFREEMIXER;
|
||||
const pm_char STR_INSERTMIX[] PROGMEM = TR_INSERTMIX;
|
||||
const pm_char STR_EDITMIX[] PROGMEM = TR_EDITMIX;
|
||||
const pm_char STR_SOURCE[] PROGMEM = TR_SOURCE;
|
||||
const pm_char STR_WEIGHT[] PROGMEM = TR_WEIGHT;
|
||||
const pm_char STR_EXPO[] PROGMEM = TR_EXPO;
|
||||
const pm_char STR_SIDE[] PROGMEM = TR_SIDE;
|
||||
const pm_char STR_DIFFERENTIAL[] PROGMEM = TR_DIFFERENTIAL;
|
||||
const pm_char STR_OFFSET[] PROGMEM = TR_OFFSET;
|
||||
const pm_char STR_TRIM[] PROGMEM = TR_TRIM;
|
||||
const pm_char STR_DREX[] PROGMEM = TR_DREX;
|
||||
const pm_char STR_CURVE[] PROGMEM = TR_CURVE;
|
||||
const pm_char STR_FLMODE[] PROGMEM = TR_FLMODE;
|
||||
const pm_char STR_MIXWARNING[] PROGMEM = TR_MIXWARNING;
|
||||
const pm_char STR_OFF[] PROGMEM = TR_OFF;
|
||||
const pm_char STR_MULTPX[] PROGMEM = TR_MULTPX;
|
||||
const pm_char STR_DELAYDOWN[] PROGMEM = TR_DELAYDOWN;
|
||||
const pm_char STR_DELAYUP[] PROGMEM = TR_DELAYUP;
|
||||
const pm_char STR_SLOWDOWN[] PROGMEM = TR_SLOWDOWN;
|
||||
const pm_char STR_SLOWUP[] PROGMEM = TR_SLOWUP;
|
||||
const pm_char STR_MIXER[] PROGMEM = TR_MIXER;
|
||||
const pm_char STR_CV[] PROGMEM = TR_CV;
|
||||
const pm_char STR_GV[] PROGMEM = TR_GV;
|
||||
const pm_char STR_ACHANNEL[] PROGMEM = TR_ACHANNEL;
|
||||
const pm_char STR_RANGE[] PROGMEM = TR_RANGE;
|
||||
const pm_char STR_BAR[] PROGMEM = TR_BAR;
|
||||
const pm_char STR_ALARM[] PROGMEM = TR_ALARM;
|
||||
const pm_char STR_USRDATA[] PROGMEM = TR_USRDATA;
|
||||
const pm_char STR_BLADES[] PROGMEM = TR_BLADES;
|
||||
const pm_char STR_SCREEN[] PROGMEM = TR_SCREEN;
|
||||
const pm_char STR_SOUND_LABEL[] PROGMEM = TR_SOUND_LABEL;
|
||||
const pm_char STR_LENGTH[] PROGMEM = TR_LENGTH;
|
||||
#if defined(AUDIO)
|
||||
const pm_char STR_SPKRPITCH[] PROGMEM = TR_SPKRPITCH;
|
||||
#endif
|
||||
#if defined(HAPTIC)
|
||||
const pm_char STR_HAPTIC_LABEL[] PROGMEM = TR_HAPTIC_LABEL;
|
||||
const pm_char STR_HAPTICSTRENGTH[] PROGMEM = TR_HAPTICSTRENGTH;
|
||||
#endif
|
||||
const pm_char STR_CONTRAST[] PROGMEM = TR_CONTRAST;
|
||||
const pm_char STR_ALARMS_LABEL[] PROGMEM = TR_ALARMS_LABEL;
|
||||
#if defined(BATTGRAPH) || defined(PCBTARANIS)
|
||||
const pm_char STR_BATTERY_RANGE[] PROGMEM = TR_BATTERY_RANGE;
|
||||
#endif
|
||||
const pm_char STR_BATTERYWARNING[] PROGMEM = TR_BATTERYWARNING;
|
||||
const pm_char STR_INACTIVITYALARM[] PROGMEM = TR_INACTIVITYALARM;
|
||||
const pm_char STR_MEMORYWARNING[] PROGMEM = TR_MEMORYWARNING;
|
||||
const pm_char STR_ALARMWARNING[] PROGMEM = TR_ALARMWARNING;
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
const pm_char STR_RENAVIG[] PROGMEM = TR_RENAVIG;
|
||||
#endif
|
||||
const pm_char STR_THROTTLEREVERSE[] PROGMEM = TR_THROTTLEREVERSE;
|
||||
const pm_char STR_MINUTEBEEP[] PROGMEM = TR_MINUTEBEEP;
|
||||
const pm_char STR_BEEPCOUNTDOWN[] PROGMEM = TR_BEEPCOUNTDOWN;
|
||||
const pm_char STR_PERSISTENT[] PROGMEM = TR_PERSISTENT;
|
||||
const pm_char STR_BACKLIGHT_LABEL[] PROGMEM = TR_BACKLIGHT_LABEL;
|
||||
const pm_char STR_BLDELAY[] PROGMEM = TR_BLDELAY;
|
||||
|
||||
#if defined(PWM_BACKLIGHT)
|
||||
const pm_char STR_BLONBRIGHTNESS[] PROGMEM = TR_BLONBRIGHTNESS;
|
||||
const pm_char STR_BLOFFBRIGHTNESS[] PROGMEM = TR_BLOFFBRIGHTNESS;
|
||||
#endif
|
||||
|
||||
const pm_char STR_SPLASHSCREEN[] PROGMEM = TR_SPLASHSCREEN;
|
||||
const pm_char STR_THROTTLEWARNING[] PROGMEM = TR_THROTTLEWARNING;
|
||||
const pm_char STR_SWITCHWARNING[] PROGMEM = TR_SWITCHWARNING;
|
||||
#ifdef FRSKY
|
||||
const pm_char STR_TIMEZONE[] PROGMEM = TR_TIMEZONE;
|
||||
const pm_char STR_GPSCOORD[] PROGMEM = TR_GPSCOORD;
|
||||
const pm_char STR_VARIO[] PROGMEM = TR_VARIO;
|
||||
#endif
|
||||
const pm_char STR_RXCHANNELORD[] PROGMEM = TR_RXCHANNELORD;
|
||||
const pm_char STR_SLAVE[] PROGMEM = TR_SLAVE;
|
||||
const pm_char STR_MODESRC[] PROGMEM = TR_MODESRC;
|
||||
const pm_char STR_MULTIPLIER[] PROGMEM = TR_MULTIPLIER;
|
||||
const pm_char STR_CAL[] PROGMEM = TR_CAL;
|
||||
const pm_char STR_VTRIM[] PROGMEM = TR_VTRIM;
|
||||
const pm_char STR_BG[] PROGMEM = TR_BG;
|
||||
const pm_char STR_MENUTOSTART[] PROGMEM = TR_MENUTOSTART;
|
||||
const pm_char STR_SETMIDPOINT[] PROGMEM = TR_SETMIDPOINT;
|
||||
const pm_char STR_MOVESTICKSPOTS[] PROGMEM = TR_MOVESTICKSPOTS;
|
||||
const pm_char STR_RXBATT[] PROGMEM = TR_RXBATT;
|
||||
const pm_char STR_TX[] PROGMEM = TR_TXnRX;
|
||||
const pm_char STR_ACCEL[] PROGMEM = TR_ACCEL;
|
||||
const pm_char STR_NODATA[] PROGMEM = TR_NODATA;
|
||||
const pm_char STR_TM1TM2[] PROGMEM = TR_TM1TM2;
|
||||
const pm_char STR_THRTHP[] PROGMEM = TR_THRTHP;
|
||||
const pm_char STR_TOT[] PROGMEM = TR_TOT;
|
||||
const pm_char STR_TMR1LATMAXUS[] PROGMEM = TR_TMR1LATMAXUS;
|
||||
const pm_char STR_TMR1LATMINUS[] PROGMEM = TR_TMR1LATMINUS;
|
||||
const pm_char STR_TMR1JITTERUS[] PROGMEM = TR_TMR1JITTERUS;
|
||||
const pm_char STR_TMIXMAXMS[] PROGMEM = TR_TMIXMAXMS;
|
||||
const pm_char STR_FREESTACKMINB[] PROGMEM = TR_FREESTACKMINB;
|
||||
const pm_char STR_MENUTORESET[] PROGMEM = TR_MENUTORESET;
|
||||
const pm_char STR_PPM[] PROGMEM = TR_PPM;
|
||||
const pm_char STR_CH[] PROGMEM = TR_CH;
|
||||
const pm_char STR_MODEL[] PROGMEM = TR_MODEL;
|
||||
const pm_char STR_FP[] PROGMEM = TR_FP;
|
||||
const pm_char STR_MIX[] PROGMEM = TR_MIX;
|
||||
const pm_char STR_EEPROMLOWMEM[] PROGMEM = TR_EEPROMLOWMEM;
|
||||
const pm_char STR_ALERT[] PROGMEM = TR_ALERT;
|
||||
const pm_char STR_PRESSANYKEYTOSKIP[] PROGMEM = TR_PRESSANYKEYTOSKIP;
|
||||
const pm_char STR_THROTTLENOTIDLE[] PROGMEM = TR_THROTTLENOTIDLE;
|
||||
const pm_char STR_ALARMSDISABLED[] PROGMEM = TR_ALARMSDISABLED;
|
||||
const pm_char STR_PRESSANYKEY[] PROGMEM = TR_PRESSANYKEY;
|
||||
const pm_char STR_BADEEPROMDATA[] PROGMEM = TR_BADEEPROMDATA;
|
||||
const pm_char STR_EEPROMFORMATTING[] PROGMEM = TR_EEPROMFORMATTING;
|
||||
const pm_char STR_EEPROMOVERFLOW[] PROGMEM = TR_EEPROMOVERFLOW;
|
||||
const pm_char STR_TRIMS2OFFSETS[] PROGMEM = TR_TRIMS2OFFSETS;
|
||||
const pm_char STR_MENURADIOSETUP[] PROGMEM = TR_MENURADIOSETUP;
|
||||
|
||||
#if defined(CPUM2560) || defined(CPUARM)
|
||||
const pm_char STR_MENUDATEANDTIME[] PROGMEM = TR_MENUDATEANDTIME;
|
||||
#endif
|
||||
|
||||
const pm_char STR_MENUTRAINER[] PROGMEM = TR_MENUTRAINER;
|
||||
const pm_char STR_MENUVERSION[] PROGMEM = TR_MENUVERSION;
|
||||
const pm_char STR_MENUDIAG[] PROGMEM = TR_MENUDIAG;
|
||||
const pm_char STR_MENUANA[] PROGMEM = TR_MENUANA;
|
||||
const pm_char STR_MENUCALIBRATION[] PROGMEM = TR_MENUCALIBRATION;
|
||||
|
||||
const pm_char STR_MENUMODELSEL[] PROGMEM = TR_MENUMODELSEL;
|
||||
const pm_char STR_MENUSETUP[] PROGMEM = TR_MENUSETUP;
|
||||
const pm_char STR_MENUFLIGHTPHASE[] PROGMEM = TR_MENUFLIGHTPHASE;
|
||||
const pm_char STR_MENUFLIGHTPHASES[] PROGMEM = TR_MENUFLIGHTPHASES;
|
||||
|
||||
#ifdef HELI
|
||||
const pm_char STR_MENUHELISETUP[] PROGMEM = TR_MENUHELISETUP;
|
||||
#endif
|
||||
|
||||
const pm_char STR_MENUINPUTS[] PROGMEM = TR_MENUINPUTS;
|
||||
const pm_char STR_MENULIMITS[] PROGMEM = TR_MENULIMITS;
|
||||
const pm_char STR_MENUCURVES[] PROGMEM = TR_MENUCURVES;
|
||||
const pm_char STR_MENUCURVE[] PROGMEM = TR_MENUCURVE;
|
||||
const pm_char STR_MENUCUSTOMSWITCH[] PROGMEM = TR_MENUCUSTOMSWITCH;
|
||||
const pm_char STR_MENUCUSTOMSWITCHES[] PROGMEM = TR_MENUCUSTOMSWITCHES;
|
||||
const pm_char STR_MENUCUSTOMFUNC[] PROGMEM = TR_MENUCUSTOMFUNC;
|
||||
|
||||
#if defined(LUA)
|
||||
const pm_char STR_MENUCUSTOMSCRIPTS[] PROGMEM = "CUSTOM SCRIPTS";
|
||||
const pm_char STR_MENUCUSTOMSCRIPT[] PROGMEM = "CUSTOM SCRIPT";
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY)
|
||||
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;
|
||||
const pm_char STR_MENUGLOBALVARS[] PROGMEM = TR_MENUGLOBALVARS;
|
||||
|
||||
#if defined(DSM2) || defined(PXX)
|
||||
const pm_char STR_RXNUM[] PROGMEM = TR_RXNUM;
|
||||
#endif
|
||||
|
||||
#if defined(PXX)
|
||||
const pm_char STR_SYNCMENU[] PROGMEM = TR_SYNCMENU;
|
||||
const pm_char STR_INTERNALRF[] PROGMEM = TR_INTERNALRF;
|
||||
const pm_char STR_EXTERNALRF[] PROGMEM = TR_EXTERNALRF;
|
||||
const pm_char STR_COUNTRYCODE[] PROGMEM = TR_COUNTRYCODE;
|
||||
const pm_char STR_FAILSAFE[] PROGMEM = TR_FAILSAFE;
|
||||
const pm_char STR_FAILSAFESET[] PROGMEM = TR_FAILSAFESET;
|
||||
#endif
|
||||
|
||||
const pm_char STR_INVERT_THR[] PROGMEM = TR_INVERT_THR;
|
||||
const pm_char STR_AND_SWITCH[] PROGMEM = TR_AND_SWITCH;
|
||||
extern const pm_char STR_CF[] PROGMEM = TR_CF;
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
const pm_char STR_MINRSSI[] PROGMEM = TR_MINRSSI;
|
||||
const pm_char STR_LATITUDE[] PROGMEM = TR_LATITUDE;
|
||||
const pm_char STR_LONGITUDE[] PROGMEM = TR_LONGITUDE;
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM) || defined(CPUM2560)
|
||||
const pm_char STR_SHUTDOWN[] PROGMEM = TR_SHUTDOWN;
|
||||
#endif
|
||||
|
||||
const pm_char STR_BATT_CALIB[] PROGMEM = TR_BATT_CALIB;
|
||||
|
||||
#if defined(CPUARM) || defined(FRSKY)
|
||||
const pm_char STR_VOLTAGE[] PROGMEM = TR_VOLTAGE;
|
||||
const pm_char STR_CURRENT[] PROGMEM = TR_CURRENT;
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
const pm_char STR_CURRENT_CALIB[] PROGMEM = TR_CURRENT_CALIB;
|
||||
const pm_char STR_UNITSSYSTEM[] PROGMEM = TR_UNITSSYSTEM;
|
||||
const pm_char STR_VOICELANG[] PROGMEM = TR_VOICELANG;
|
||||
const pm_char STR_MODELIDUSED[] PROGMEM = TR_MODELIDUSED;
|
||||
const pm_char STR_BEEP_VOLUME[] PROGMEM = INDENT TR_BEEP_VOLUME;
|
||||
const pm_char STR_WAV_VOLUME[] PROGMEM = INDENT TR_WAV_VOLUME;
|
||||
const pm_char STR_VARIO_VOLUME[] PROGMEM = INDENT TR_VARIO_VOLUME;
|
||||
const pm_char STR_BG_VOLUME[] PROGMEM = INDENT TR_BG_VOLUME;
|
||||
const pm_char STR_PERSISTENT_MAH[] PROGMEM = TR_PERSISTENT_MAH;
|
||||
#endif
|
||||
|
||||
#if defined(NAVIGATION_MENUS)
|
||||
const pm_char STR_SELECT_MODEL[] PROGMEM = TR_SELECT_MODEL;
|
||||
const pm_char STR_CREATE_MODEL[] PROGMEM = TR_CREATE_MODEL;
|
||||
const pm_char STR_COPY_MODEL[] PROGMEM = TR_COPY_MODEL;
|
||||
const pm_char STR_MOVE_MODEL[] PROGMEM = TR_MOVE_MODEL;
|
||||
const pm_char STR_DELETE_MODEL[] PROGMEM = TR_DELETE_MODEL;
|
||||
const pm_char STR_EDIT[] PROGMEM = TR_EDIT;
|
||||
const pm_char STR_INSERT_BEFORE[] PROGMEM = TR_INSERT_BEFORE;
|
||||
const pm_char STR_INSERT_AFTER[] PROGMEM = TR_INSERT_AFTER;
|
||||
const pm_char STR_COPY[] PROGMEM = TR_COPY;
|
||||
const pm_char STR_MOVE[] PROGMEM = TR_MOVE;
|
||||
const pm_char STR_PASTE[] PROGMEM = TR_PASTE;
|
||||
const pm_char STR_INSERT[] PROGMEM = TR_INSERT;
|
||||
const pm_char STR_DELETE[] PROGMEM = TR_DELETE;
|
||||
const pm_char STR_RESET_FLIGHT[] PROGMEM = TR_RESET_FLIGHT;
|
||||
const pm_char STR_RESET_TIMER1[] PROGMEM = TR_RESET_TIMER1;
|
||||
const pm_char STR_RESET_TIMER2[] PROGMEM = TR_RESET_TIMER2;
|
||||
const pm_char STR_RESET_TELEMETRY[] PROGMEM = TR_RESET_TELEMETRY;
|
||||
const pm_char STR_STATISTICS[] PROGMEM = TR_STATISTICS;
|
||||
const pm_char STR_ABOUT_US[] PROGMEM = TR_ABOUT_US;
|
||||
#endif
|
||||
|
||||
const pm_char STR_RESET_BTN[] PROGMEM = TR_RESET_BTN;
|
||||
|
||||
#if defined(SDCARD)
|
||||
const pm_char STR_BACKUP_MODEL[] PROGMEM = TR_BACKUP_MODEL;
|
||||
const pm_char STR_RESTORE_MODEL[] PROGMEM = TR_RESTORE_MODEL;
|
||||
const pm_char STR_SDCARD_ERROR[] PROGMEM = TR_SDCARD_ERROR;
|
||||
const pm_char STR_NO_SDCARD[] PROGMEM = TR_NO_SDCARD;
|
||||
const pm_char STR_INCOMPATIBLE[] PROGMEM = TR_INCOMPATIBLE;
|
||||
const pm_char STR_LOGS_PATH[] PROGMEM = LOGS_PATH;
|
||||
const pm_char STR_LOGS_EXT[] PROGMEM = LOGS_EXT;
|
||||
const pm_char STR_MODELS_PATH[] PROGMEM = MODELS_PATH;
|
||||
const pm_char STR_MODELS_EXT[] PROGMEM = MODELS_EXT;
|
||||
#endif
|
||||
|
||||
const pm_char STR_WARNING[] PROGMEM = TR_WARNING;
|
||||
const pm_char STR_EEPROMWARN[] PROGMEM = TR_EEPROMWARN;
|
||||
const pm_char STR_THROTTLEWARN[] PROGMEM = TR_THROTTLEWARN;
|
||||
const pm_char STR_ALARMSWARN[] PROGMEM = TR_ALARMSWARN;
|
||||
const pm_char STR_SWITCHWARN[] PROGMEM = TR_SWITCHWARN;
|
||||
|
||||
const pm_char STR_SPEAKER_VOLUME[] PROGMEM = TR_SPEAKER_VOLUME;
|
||||
const pm_char STR_LCD[] PROGMEM = TR_LCD;
|
||||
const pm_char STR_BRIGHTNESS[] PROGMEM = TR_BRIGHTNESS;
|
||||
const pm_char STR_CPU_TEMP[] PROGMEM = TR_CPU_TEMP;
|
||||
const pm_char STR_CPU_CURRENT[] PROGMEM = TR_CPU_CURRENT;
|
||||
const pm_char STR_CPU_MAH[] PROGMEM = TR_CPU_MAH;
|
||||
const pm_char STR_COPROC[] PROGMEM = TR_COPROC;
|
||||
const pm_char STR_COPROC_TEMP[] PROGMEM = TR_COPROC_TEMP;
|
||||
const pm_char STR_TEMPWARNING[] PROGMEM = TR_TEMPWARNING;
|
||||
const pm_char STR_CAPAWARNING[] PROGMEM = TR_CAPAWARNING;
|
||||
const pm_char STR_FUNC[] PROGMEM = TR_FUNC;
|
||||
const pm_char STR_V1[] PROGMEM = TR_V1;
|
||||
const pm_char STR_V2[] PROGMEM = TR_V2;
|
||||
const pm_char STR_DURATION[] PROGMEM = TR_DURATION;
|
||||
const pm_char STR_DELAY[] PROGMEM = TR_DELAY;
|
||||
const pm_char STR_SD_CARD[] PROGMEM = TR_SD_CARD;
|
||||
const pm_char STR_SDHC_CARD[] PROGMEM = TR_SDHC_CARD;
|
||||
const pm_char STR_NO_SOUNDS_ON_SD[] PROGMEM = TR_NO_SOUNDS_ON_SD;
|
||||
const pm_char STR_NO_MODELS_ON_SD[] PROGMEM = TR_NO_MODELS_ON_SD;
|
||||
const pm_char STR_NO_BITMAPS_ON_SD[] PROGMEM = TR_NO_BITMAPS_ON_SD;
|
||||
const pm_char STR_NO_SCRIPTS_ON_SD[] PROGMEM = "No Scripts on SD"; // TODO TR_NO_BITMAPS_ON_SD;
|
||||
const pm_char STR_PLAY_FILE[] PROGMEM = TR_PLAY_FILE;
|
||||
const pm_char STR_ASSIGN_BITMAP[] PROGMEM = TR_ASSIGN_BITMAP;
|
||||
const pm_char STR_EXECUTE_FILE[] PROGMEM = "Execute";
|
||||
const pm_char STR_DELETE_FILE[] PROGMEM = TR_DELETE_FILE;
|
||||
const pm_char STR_COPY_FILE[] PROGMEM = TR_COPY_FILE;
|
||||
const pm_char STR_RENAME_FILE[] PROGMEM = TR_RENAME_FILE;
|
||||
const pm_char STR_SD_INFO[] PROGMEM = TR_SD_INFO;
|
||||
const pm_char STR_SD_FORMAT[] PROGMEM = TR_SD_FORMAT;
|
||||
const pm_char STR_REMOVED[] PROGMEM = TR_REMOVED;
|
||||
const pm_char STR_NA[] PROGMEM = TR_NA;
|
||||
const pm_char STR_HARDWARE[] PROGMEM = TR_HARDWARE;
|
||||
const pm_char STR_FORMATTING[] PROGMEM = TR_FORMATTING;
|
||||
const pm_char STR_TEMP_CALIB[] PROGMEM = TR_TEMP_CALIB;
|
||||
const pm_char STR_TIME[] PROGMEM = TR_TIME;
|
||||
const pm_char STR_BAUDRATE[] PROGMEM = TR_BAUDRATE;
|
||||
const pm_char STR_SD_INFO_TITLE[] PROGMEM = TR_SD_INFO_TITLE;
|
||||
const pm_char STR_SD_TYPE[] PROGMEM = TR_SD_TYPE;
|
||||
const pm_char STR_SD_SPEED[] PROGMEM = TR_SD_SPEED;
|
||||
const pm_char STR_SD_SECTORS[] PROGMEM = TR_SD_SECTORS;
|
||||
const pm_char STR_SD_SIZE[] PROGMEM = TR_SD_SIZE;
|
||||
const pm_char STR_TYPE[] PROGMEM = TR_TYPE;
|
||||
const pm_char STR_GLOBAL_VARS[] PROGMEM = TR_GLOBAL_VARS;
|
||||
const pm_char STR_GLOBAL_VAR[] PROGMEM = TR_GLOBAL_VAR;
|
||||
const pm_char STR_OWN[] PROGMEM = TR_OWN;
|
||||
const pm_char STR_ROTARY_ENCODER[] PROGMEM = TR_ROTARY_ENCODER;
|
||||
const pm_char STR_DATE[] PROGMEM = TR_DATE;
|
||||
const pm_char STR_CHANNELS_MONITOR[] PROGMEM = TR_CHANNELS_MONITOR;
|
||||
const pm_char STR_PATH_TOO_LONG[] PROGMEM = "Path too long";
|
||||
const pm_char STR_VIEW_TEXT[] PROGMEM = "View text";
|
||||
|
||||
#if LCD_W >= 212
|
||||
const pm_char STR_MODELNAME[] PROGMEM = TR_MODELNAME;
|
||||
const pm_char STR_PHASENAME[] PROGMEM = TR_PHASENAME;
|
||||
const pm_char STR_MIXNAME[] PROGMEM = TR_MIXNAME;
|
||||
const pm_char STR_EXPONAME[] PROGMEM = TR_EXPONAME;
|
||||
#endif
|
||||
|
||||
#if LCD_W >= 212
|
||||
const char * STR_PHASES_HEADERS[] = TR_PHASES_HEADERS;
|
||||
const char * STR_LIMITS_HEADERS[] = TR_LIMITS_HEADERS;
|
||||
const char * STR_CSW_HEADERS[] = TR_CSW_HEADERS;
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
const pm_char STR_BYTES[] PROGMEM = TR_BYTES;
|
||||
const pm_char STR_MODULE_BIND[] PROGMEM = TR_MODULE_BIND;
|
||||
const pm_char STR_SET[] PROGMEM = TR_SET;
|
||||
const pm_char STR_TRAINER[] PROGMEM = TR_TRAINER;
|
||||
const pm_char STR_ANTENNAPROBLEM[] PROGMEM = TR_ANTENNAPROBLEM;
|
||||
const pm_char STR_MODULE[] PROGMEM = TR_MODULE;
|
||||
const pm_char STR_CHANNELRANGE[] PROGMEM = TR_CHANNELRANGE;
|
||||
const pm_char STR_LOWALARM[] PROGMEM = TR_LOWALARM;
|
||||
const pm_char STR_CRITICALALARM[] PROGMEM = TR_CRITICALALARM;
|
||||
const pm_char STR_ENABLE_POPUP[] PROGMEM = "Enable Popup";
|
||||
const pm_char STR_DISABLE_POPUP[] PROGMEM = "Disable Popup";
|
||||
const pm_char STR_CURVE_PRESET[] PROGMEM = "Preset...";
|
||||
const pm_char STR_PRESET[] PROGMEM = "Preset";
|
||||
const pm_char STR_MIRROR[] PROGMEM = "Mirror";
|
||||
const pm_char STR_CLEAR[] PROGMEM = "Clear";
|
||||
const pm_char STR_RESET[] PROGMEM = "Reset";
|
||||
const pm_char STR_COPY_TRIMS_TO_OFFSET[] = "Copy Trims To Offset";
|
||||
const pm_char STR_TOP_BAR[] PROGMEM = "Top Bar";
|
||||
const pm_char STR_ALTITUDE[] PROGMEM = INDENT "Altitude";
|
||||
const pm_char STR_SCALE[] PROGMEM = "Scale";
|
||||
const pm_char STR_VIEW_CHANNELS[] PROGMEM = "View Channels";
|
||||
const pm_char STR_VIEW_NOTES[] PROGMEM = "View Notes";
|
||||
#endif
|
||||
|
||||
#if MENUS_LOCK == 1
|
||||
const pm_char STR_UNLOCKED[] PROGMEM = TR_UNLOCKED;
|
||||
const pm_char STR_MODS_FORBIDDEN[] PROGMEM = TR_MODS_FORBIDDEN;
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS) || defined(DSM2)
|
||||
const pm_char STR_MODULE_RANGE[] PROGMEM = TR_MODULE_RANGE;
|
||||
#endif
|
||||
|
||||
#if defined(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
|
||||
|
||||
#if !defined(CPUM64)
|
||||
const pm_char STR_ABOUTUS[] PROGMEM = TR_ABOUTUS;
|
||||
const pm_char STR_ABOUT_OPENTX_1[] PROGMEM = TR_ABOUT_OPENTX_1;
|
||||
const pm_char STR_ABOUT_OPENTX_2[] PROGMEM = TR_ABOUT_OPENTX_2;
|
||||
const pm_char STR_ABOUT_OPENTX_3[] PROGMEM = TR_ABOUT_OPENTX_3;
|
||||
const pm_char STR_ABOUT_OPENTX_4[] PROGMEM = TR_ABOUT_OPENTX_4;
|
||||
const pm_char STR_ABOUT_OPENTX_5[] PROGMEM = TR_ABOUT_OPENTX_5;
|
||||
|
||||
const pm_char STR_ABOUT_BERTRAND_1[] PROGMEM = TR_ABOUT_BERTRAND_1;
|
||||
const pm_char STR_ABOUT_BERTRAND_2[] PROGMEM = TR_ABOUT_BERTRAND_2;
|
||||
const pm_char STR_ABOUT_BERTRAND_3[] PROGMEM = TR_ABOUT_BERTRAND_3;
|
||||
|
||||
const pm_char STR_ABOUT_MIKE_1[] PROGMEM = TR_ABOUT_MIKE_1;
|
||||
const pm_char STR_ABOUT_MIKE_2[] PROGMEM = TR_ABOUT_MIKE_2;
|
||||
const pm_char STR_ABOUT_MIKE_3[] PROGMEM = TR_ABOUT_MIKE_3;
|
||||
const pm_char STR_ABOUT_MIKE_4[] PROGMEM = TR_ABOUT_MIKE_4;
|
||||
|
||||
const pm_char STR_ABOUT_ROMOLO_1[] PROGMEM = TR_ABOUT_ROMOLO_1;
|
||||
const pm_char STR_ABOUT_ROMOLO_2[] PROGMEM = TR_ABOUT_ROMOLO_2;
|
||||
const pm_char STR_ABOUT_ROMOLO_3[] PROGMEM = TR_ABOUT_ROMOLO_3;
|
||||
|
||||
const pm_char STR_ABOUT_ANDRE_1[] PROGMEM = TR_ABOUT_ANDRE_1;
|
||||
const pm_char STR_ABOUT_ANDRE_2[] PROGMEM = TR_ABOUT_ANDRE_2;
|
||||
const pm_char STR_ABOUT_ANDRE_3[] PROGMEM = TR_ABOUT_ANDRE_3;
|
||||
|
||||
const pm_char STR_ABOUT_ROB_1[] PROGMEM = TR_ABOUT_ROB_1;
|
||||
const pm_char STR_ABOUT_ROB_2[] PROGMEM = TR_ABOUT_ROB_2;
|
||||
|
||||
const pm_char STR_ABOUT_MARTIN_1[] PROGMEM = TR_ABOUT_MARTIN_1;
|
||||
const pm_char STR_ABOUT_MARTIN_2[] PROGMEM = TR_ABOUT_MARTIN_2;
|
||||
|
||||
const pm_char STR_ABOUT_HARDWARE_1[] PROGMEM = TR_ABOUT_HARDWARE_1;
|
||||
const pm_char STR_ABOUT_HARDWARE_2[] PROGMEM = TR_ABOUT_HARDWARE_2;
|
||||
const pm_char STR_ABOUT_HARDWARE_3[] PROGMEM = TR_ABOUT_HARDWARE_3;
|
||||
|
||||
const pm_char STR_ABOUT_PARENTS_1[] PROGMEM = TR_ABOUT_PARENTS_1;
|
||||
const pm_char STR_ABOUT_PARENTS_2[] PROGMEM = TR_ABOUT_PARENTS_2;
|
||||
const pm_char STR_ABOUT_PARENTS_3[] PROGMEM = TR_ABOUT_PARENTS_3;
|
||||
const pm_char STR_ABOUT_PARENTS_4[] PROGMEM = TR_ABOUT_PARENTS_4;
|
||||
#endif
|
||||
|
||||
const pm_uchar font_5x7[] PROGMEM = {
|
||||
#include "font_05x07.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_05x07.lbm"
|
||||
#elif defined(TRANSLATIONS_CZ)
|
||||
#include "font_cz_05x07.lbm"
|
||||
#elif defined(TRANSLATIONS_ES)
|
||||
#include "font_es_05x07.lbm"
|
||||
#elif defined(TRANSLATIONS_FR)
|
||||
#include "font_fr_05x07.lbm"
|
||||
#elif defined(TRANSLATIONS_IT)
|
||||
#include "font_it_05x07.lbm"
|
||||
#elif defined(TRANSLATIONS_PL)
|
||||
#include "font_pl_05x07.lbm"
|
||||
#elif defined(TRANSLATIONS_PT)
|
||||
#include "font_pt_05x07.lbm"
|
||||
#elif defined(TRANSLATIONS_SE)
|
||||
#include "font_se_05x07.lbm"
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_10x14[] PROGMEM = {
|
||||
#include "font_10x14_compressed.lbm"
|
||||
#if defined(CPUARM)
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_10x14.lbm"
|
||||
#elif defined(TRANSLATIONS_CZ)
|
||||
#include "font_cz_10x14.lbm"
|
||||
#elif defined(TRANSLATIONS_ES)
|
||||
#include "font_es_10x14.lbm"
|
||||
#elif defined(TRANSLATIONS_FR)
|
||||
#include "font_fr_10x14.lbm"
|
||||
#elif defined(TRANSLATIONS_IT)
|
||||
#include "font_it_10x14.lbm"
|
||||
#elif defined(TRANSLATIONS_PL)
|
||||
#include "font_pl_10x14.lbm"
|
||||
#elif defined(TRANSLATIONS_PT)
|
||||
#include "font_pt_10x14.lbm"
|
||||
#elif defined(TRANSLATIONS_SE)
|
||||
#include "font_se_10x14.lbm"
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(CPUARM)
|
||||
const pm_uchar font_3x5[] PROGMEM = {
|
||||
#include "font_03x05.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_4x6[] PROGMEM = {
|
||||
#include "font_04x06.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_04x06.lbm"
|
||||
#elif defined(TRANSLATIONS_CZ)
|
||||
#include "font_cz_04x06.lbm"
|
||||
#elif defined(TRANSLATIONS_ES)
|
||||
#include "font_es_04x06.lbm"
|
||||
#elif defined(TRANSLATIONS_FR)
|
||||
#include "font_fr_04x06.lbm"
|
||||
#elif defined(TRANSLATIONS_IT)
|
||||
#include "font_it_04x06.lbm"
|
||||
#elif defined(TRANSLATIONS_PL)
|
||||
#include "font_pl_04x06.lbm"
|
||||
#elif defined(TRANSLATIONS_PT)
|
||||
#include "font_pt_04x06.lbm"
|
||||
#elif defined(TRANSLATIONS_SE)
|
||||
#include "font_se_04x06.lbm"
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_8x10[] PROGMEM = {
|
||||
#include "font_08x10.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_08x10.lbm"
|
||||
#elif defined(TRANSLATIONS_CZ)
|
||||
#include "font_cz_08x10.lbm"
|
||||
#elif defined(TRANSLATIONS_ES)
|
||||
#include "font_es_08x10.lbm"
|
||||
#elif defined(TRANSLATIONS_FR)
|
||||
#include "font_fr_08x10.lbm"
|
||||
#elif defined(TRANSLATIONS_IT)
|
||||
#include "font_it_08x10.lbm"
|
||||
#elif defined(TRANSLATIONS_PL)
|
||||
#include "font_pl_08x10.lbm"
|
||||
#elif defined(TRANSLATIONS_PT)
|
||||
#include "font_pt_08x10.lbm"
|
||||
#elif defined(TRANSLATIONS_SE)
|
||||
#include "font_se_08x10.lbm"
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_4x6_extra[] PROGMEM = {
|
||||
#include "font_04x06_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_5x7_extra[] PROGMEM = {
|
||||
#include "font_05x07_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_10x14_extra[] PROGMEM = {
|
||||
#include "font_10x14_extra.lbm"
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -343,6 +343,8 @@ extern const pm_char STR_BAR[];
|
|||
extern const pm_char STR_ALARM[];
|
||||
extern const pm_char STR_USRDATA[];
|
||||
extern const pm_char STR_BLADES[];
|
||||
extern const pm_char STR_SPURGEAR[]; // T.Foley
|
||||
extern const pm_char STR_PINIONGEAR[]; // T.Foley
|
||||
extern const pm_char STR_SCREEN[];
|
||||
extern const pm_char STR_SOUND_LABEL[];
|
||||
extern const pm_char STR_LENGTH[];
|
||||
|
|
754
radio/src/translations.h~
Normal file
754
radio/src/translations.h~
Normal file
|
@ -0,0 +1,754 @@
|
|||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Andreas Weitl
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Gabriel Birkus
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* 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 translations_h
|
||||
#define translations_h
|
||||
|
||||
#if defined(TRANSLATIONS_FR)
|
||||
#include "translations/fr.h"
|
||||
#define LEN_SPECIAL_CHARS 3
|
||||
#elif defined(TRANSLATIONS_IT)
|
||||
#include "translations/it.h"
|
||||
#define LEN_SPECIAL_CHARS 1
|
||||
#elif defined(TRANSLATIONS_SE)
|
||||
#include "translations/se.h"
|
||||
#define LEN_SPECIAL_CHARS 6
|
||||
#elif defined(TRANSLATIONS_DE)
|
||||
#include "translations/de.h"
|
||||
#define LEN_SPECIAL_CHARS 6
|
||||
#elif defined(TRANSLATIONS_CZ)
|
||||
#include "translations/cz.h"
|
||||
#define LEN_SPECIAL_CHARS 0
|
||||
#elif defined(TRANSLATIONS_ES)
|
||||
#include "translations/es.h"
|
||||
#define LEN_SPECIAL_CHARS 0
|
||||
#elif defined(TRANSLATIONS_PL)
|
||||
#include "translations/pl.h"
|
||||
#define LEN_SPECIAL_CHARS 0
|
||||
#elif defined(TRANSLATIONS_PT)
|
||||
#include "translations/pt.h"
|
||||
#define LEN_SPECIAL_CHARS 0
|
||||
#else
|
||||
#include "translations/en.h"
|
||||
#define LEN_SPECIAL_CHARS 0
|
||||
#endif
|
||||
|
||||
#define PSIZE(x) ( sizeof(x) - 1 )
|
||||
#define EOFS(x) ( OFS_##x + sizeof(TR_##x) )
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR(x,y) y
|
||||
#else
|
||||
#define TR(x,y) x
|
||||
#endif
|
||||
|
||||
// The non-0-terminated-strings
|
||||
|
||||
extern const pm_char STR_OPEN9X[];
|
||||
|
||||
#define OFS_OFFON 0
|
||||
#define OFS_MMMINV (OFS_OFFON + sizeof(TR_OFFON))
|
||||
#define OFS_NCHANNELS (OFS_MMMINV + sizeof(TR_MMMINV))
|
||||
#if defined(GRAPHICS)
|
||||
#define OFS_VBEEPMODE (OFS_NCHANNELS + sizeof(TR_NCHANNELS))
|
||||
#else
|
||||
#define OFS_VBEEPLEN (OFS_NCHANNELS + sizeof(TR_NCHANNELS))
|
||||
#define OFS_VBEEPMODE (OFS_VBEEPLEN + sizeof(TR_VBEEPLEN))
|
||||
#endif
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
#define OFS_VRENAVIG (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
||||
#define OFS_VRENCODERS (OFS_VRENAVIG + sizeof(TR_VRENAVIG))
|
||||
#define OFS_TRNMODE (OFS_VRENCODERS + sizeof(TR_VRENCODERS))
|
||||
#elif defined(ROTARY_ENCODER_NAVIGATION)
|
||||
#define OFS_VRENCODERS (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
||||
#define OFS_TRNMODE (OFS_VRENCODERS + sizeof(TR_VRENCODERS))
|
||||
#else
|
||||
#define OFS_TRNMODE (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
||||
#endif
|
||||
#define OFS_TRNCHN (OFS_TRNMODE + sizeof(TR_TRNMODE))
|
||||
#define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN))
|
||||
#define OFS_RETA123 (OFS_VTRIMINC + sizeof(TR_VTRIMINC))
|
||||
#define OFS_VPROTOS (OFS_RETA123 + sizeof(TR_RETA123))
|
||||
#define OFS_POSNEG (OFS_VPROTOS + sizeof(TR_VPROTOS))
|
||||
#define OFS_VBLMODE (OFS_POSNEG + sizeof(TR_POSNEG))
|
||||
#define OFS_VCURVEFUNC (OFS_VBLMODE + sizeof(TR_VBLMODE))
|
||||
#define OFS_VMLTPX (OFS_VCURVEFUNC + sizeof(TR_VCURVEFUNC))
|
||||
#define OFS_VMLTPX2 (OFS_VMLTPX + sizeof(TR_VMLTPX))
|
||||
#define OFS_VMIXTRIMS (OFS_VMLTPX2 + sizeof(TR_VMLTPX2))
|
||||
#define OFS_VCSWFUNC (OFS_VMIXTRIMS + sizeof(TR_VMIXTRIMS))
|
||||
#define OFS_VFSWFUNC (OFS_VCSWFUNC + sizeof(TR_VCSWFUNC))
|
||||
#define OFS_VFSWRESET (OFS_VFSWFUNC + sizeof(TR_VFSWFUNC))
|
||||
#define OFS_FUNCSOUNDS (OFS_VFSWRESET + sizeof(TR_VFSWRESET))
|
||||
#define OFS_VTELEMCHNS (OFS_FUNCSOUNDS + sizeof(TR_FUNCSOUNDS))
|
||||
#if defined(FRSKY) || defined(CPUARM)
|
||||
#if defined(CPUARM)
|
||||
#define OFS_VTELEMUNIT_IMP (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS))
|
||||
#define OFS_VTELEMUNIT_NORM (OFS_VTELEMUNIT_IMP + sizeof(TR_VTELEMUNIT_IMP))
|
||||
#define OFS_VALARM (OFS_VTELEMUNIT_NORM + sizeof(TR_VTELEMUNIT_NORM))
|
||||
#else
|
||||
#define OFS_VTELEMUNIT (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS))
|
||||
#define OFS_VALARM (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT))
|
||||
#endif
|
||||
#define OFS_VALARMFN (OFS_VALARM + sizeof(TR_VALARM))
|
||||
#define OFS_VTELPROTO (OFS_VALARMFN + sizeof(TR_VALARMFN))
|
||||
#define OFS_GPSFORMAT (OFS_VTELPROTO + sizeof(TR_VTELPROTO))
|
||||
#define OFS_VOLTSRC (OFS_GPSFORMAT + sizeof(TR_GPSFORMAT))
|
||||
#define OFS_VARIOSRC (OFS_VOLTSRC + sizeof(TR_VOLTSRC))
|
||||
#define OFS_VSCREEN (OFS_VARIOSRC + sizeof(TR_VARIOSRC))
|
||||
#define OFS_VTEMPLATES (OFS_VSCREEN + sizeof(TR_VSCREEN))
|
||||
#else
|
||||
#define OFS_VTEMPLATES (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS))
|
||||
#endif
|
||||
#if defined(TEMPLATES)
|
||||
#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
|
||||
#define OFS_VKEYS (OFS_VSWASHTYPE)
|
||||
#endif
|
||||
#define OFS_VSWITCHES (OFS_VKEYS + sizeof(TR_VKEYS))
|
||||
#define OFS_VSRCRAW (OFS_VSWITCHES + sizeof(TR_VSWITCHES))
|
||||
#define OFS_VTMRMODES (OFS_VSRCRAW + sizeof(TR_VSRCRAW))
|
||||
#define OFS_DATETIME (OFS_VTMRMODES + sizeof(TR_VTMRMODES))
|
||||
#if defined(CPUM2560) || defined(CPUARM)
|
||||
#define OFS_VLCD (OFS_DATETIME + sizeof(TR_DATETIME))
|
||||
#else
|
||||
#define OFS_VLCD (OFS_DATETIME)
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
#define OFS_VUNITSSYSTEM (OFS_VLCD + sizeof(TR_VLCD))
|
||||
#define OFS_VBEEPCOUNTDOWN (OFS_VUNITSSYSTEM + sizeof(TR_VUNITSSYSTEM))
|
||||
#define OFS_COUNTRYCODES (OFS_VBEEPCOUNTDOWN + sizeof(TR_VBEEPCOUNTDOWN))
|
||||
#else
|
||||
#define OFS_COUNTRYCODES (OFS_VLCD)
|
||||
#endif
|
||||
#if defined(PXX)
|
||||
#define OFS_VFAILSAFE (OFS_COUNTRYCODES + sizeof(TR_COUNTRYCODES))
|
||||
#else
|
||||
#define OFS_VFAILSAFE (OFS_COUNTRYCODES)
|
||||
#endif
|
||||
#if defined(PXX)
|
||||
#define OFS_VTRAINERMODES (OFS_VFAILSAFE + sizeof(TR_VFAILSAFE))
|
||||
#else
|
||||
#define OFS_VTRAINERMODES (OFS_VFAILSAFE)
|
||||
#endif
|
||||
#if defined(PCBTARANIS)
|
||||
#define OFS_MAVLINK_BAUDS (OFS_VTRAINERMODES + sizeof(TR_VTRAINERMODES))
|
||||
#else
|
||||
#define OFS_MAVLINK_BAUDS (OFS_VTRAINERMODES)
|
||||
#endif
|
||||
#if defined(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)
|
||||
#define STR_NCHANNELS (STR_OPEN9X + OFS_NCHANNELS)
|
||||
#if !defined(GRAPHICS)
|
||||
#define STR_VBEEPLEN (STR_OPEN9X + OFS_VBEEPLEN)
|
||||
#endif
|
||||
#define STR_VBEEPMODE (STR_OPEN9X + OFS_VBEEPMODE)
|
||||
#define STR_TRNMODE (STR_OPEN9X + OFS_TRNMODE)
|
||||
#define STR_TRNCHN (STR_OPEN9X + OFS_TRNCHN)
|
||||
#define STR_VTRIMINC (STR_OPEN9X + OFS_VTRIMINC)
|
||||
#define STR_RETA123 (STR_OPEN9X + OFS_RETA123)
|
||||
#define STR_VPROTOS (STR_OPEN9X + OFS_VPROTOS)
|
||||
#define STR_POSNEG (STR_OPEN9X + OFS_POSNEG)
|
||||
#define STR_VBLMODE (STR_OPEN9X + OFS_VBLMODE)
|
||||
#define STR_VCURVEFUNC (STR_OPEN9X + OFS_VCURVEFUNC)
|
||||
#define STR_VSIDE STR_VCURVEFUNC
|
||||
#define LEN_VSIDE LEN_VCURVEFUNC
|
||||
#define STR_VMLTPX (STR_OPEN9X + OFS_VMLTPX)
|
||||
#define STR_VMLTPX2 (STR_OPEN9X + OFS_VMLTPX2)
|
||||
#define STR_VMIXTRIMS (STR_OPEN9X + OFS_VMIXTRIMS)
|
||||
#define STR_VCSWFUNC (STR_OPEN9X + OFS_VCSWFUNC)
|
||||
#define STR_VFSWFUNC (STR_OPEN9X + OFS_VFSWFUNC)
|
||||
#define STR_VFSWRESET (STR_OPEN9X + OFS_VFSWRESET)
|
||||
#define STR_FUNCSOUNDS (STR_OPEN9X + OFS_FUNCSOUNDS)
|
||||
#define STR_VTELEMCHNS (STR_OPEN9X + OFS_VTELEMCHNS)
|
||||
|
||||
#if defined(FRSKY) || defined(CPUARM)
|
||||
#if defined(CPUARM)
|
||||
#define STR_VTELEMUNIT (STR_OPEN9X + (g_eeGeneral.imperial ? OFS_VTELEMUNIT_IMP : OFS_VTELEMUNIT_NORM))
|
||||
#else
|
||||
#define STR_VTELEMUNIT (STR_OPEN9X + OFS_VTELEMUNIT)
|
||||
#endif
|
||||
#define STR_VALARM (STR_OPEN9X + OFS_VALARM)
|
||||
#define STR_VALARMFN (STR_OPEN9X + OFS_VALARMFN)
|
||||
#define STR_VTELPROTO (STR_OPEN9X + OFS_VTELPROTO)
|
||||
#define STR_GPSFORMAT (STR_OPEN9X + OFS_GPSFORMAT)
|
||||
#define STR_VOLTSRC (STR_OPEN9X + OFS_VOLTSRC)
|
||||
#define STR_VARIOSRC (STR_OPEN9X + OFS_VARIOSRC)
|
||||
#define STR_VSCREEN (STR_OPEN9X + OFS_VSCREEN)
|
||||
#define STR_TELEMCHNS (STR_OPEN9X + OFS_TELEMCHNS)
|
||||
#endif
|
||||
|
||||
#ifdef TEMPLATES
|
||||
#define STR_VTEMPLATES (STR_OPEN9X + OFS_VTEMPLATES)
|
||||
#endif
|
||||
|
||||
#ifdef HELI
|
||||
#define STR_VSWASHTYPE (STR_OPEN9X + OFS_VSWASHTYPE)
|
||||
#endif
|
||||
|
||||
#define STR_VKEYS (STR_OPEN9X + OFS_VKEYS)
|
||||
#define STR_VSWITCHES (STR_OPEN9X + OFS_VSWITCHES)
|
||||
#define STR_VSRCRAW (STR_OPEN9X + OFS_VSRCRAW)
|
||||
#define STR_VTMRMODES (STR_OPEN9X + OFS_VTMRMODES)
|
||||
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
#define STR_VRENAVIG (STR_OPEN9X + OFS_VRENAVIG)
|
||||
#endif
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
#define STR_VRENCODERS (STR_OPEN9X + OFS_VRENCODERS)
|
||||
#endif
|
||||
|
||||
#if defined(CPUM2560) || defined(CPUARM)
|
||||
#define STR_DATETIME (STR_OPEN9X + OFS_DATETIME)
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define STR_VLCD (STR_OPEN9X + OFS_VLCD)
|
||||
#define STR_VUNITSSYSTEM (STR_OPEN9X + OFS_VUNITSSYSTEM)
|
||||
#define STR_VBEEPCOUNTDOWN (STR_OPEN9X + OFS_VBEEPCOUNTDOWN)
|
||||
#endif
|
||||
|
||||
#if defined(PXX)
|
||||
#define STR_COUNTRYCODES (STR_OPEN9X + OFS_COUNTRYCODES)
|
||||
#define STR_VFAILSAFE (STR_OPEN9X + OFS_VFAILSAFE)
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define STR_VTRAINERMODES (STR_OPEN9X + OFS_VTRAINERMODES)
|
||||
#endif
|
||||
|
||||
#if defined(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
|
||||
|
||||
extern const pm_char STR_POPUPS[];
|
||||
#define STR_EXIT (STR_POPUPS + OFS_EXIT)
|
||||
extern const pm_char STR_MENUWHENDONE[];
|
||||
extern const pm_char STR_FREE[];
|
||||
#define LEN_FREE PSIZE(TR_FREE)
|
||||
extern const pm_char STR_DELETEMODEL[];
|
||||
extern const pm_char STR_COPYINGMODEL[];
|
||||
extern const pm_char STR_MOVINGMODEL[];
|
||||
extern const pm_char STR_LOADINGMODEL[];
|
||||
extern const pm_char STR_NAME[];
|
||||
extern const pm_char STR_BITMAP[];
|
||||
extern const pm_char STR_TIMER[];
|
||||
extern const pm_char STR_ELIMITS[];
|
||||
extern const pm_char STR_ETRIMS[];
|
||||
extern const pm_char STR_TRIMINC[];
|
||||
extern const pm_char STR_TTRACE[];
|
||||
extern const pm_char STR_TTRIM[];
|
||||
extern const pm_char STR_BEEPCTR[];
|
||||
extern const pm_char STR_PROTO[];
|
||||
extern const pm_char STR_PPMFRAME[];
|
||||
extern const pm_char STR_MS[];
|
||||
extern const pm_char STR_SWITCH[];
|
||||
extern const pm_char STR_TRIMS[];
|
||||
extern const pm_char STR_FADEIN[];
|
||||
extern const pm_char STR_FADEOUT[];
|
||||
extern const pm_char STR_DEFAULT[];
|
||||
extern const pm_char STR_CHECKTRIMS[];
|
||||
extern const pm_char STR_SWASHTYPE[];
|
||||
extern const pm_char STR_COLLECTIVE[];
|
||||
extern const pm_char STR_SWASHRING[];
|
||||
extern const pm_char STR_ELEDIRECTION[];
|
||||
extern const pm_char STR_AILDIRECTION[];
|
||||
extern const pm_char STR_COLDIRECTION[];
|
||||
extern const pm_char STR_MODE[];
|
||||
#if defined(AUDIO) && defined(BUZZER)
|
||||
extern const pm_char STR_SPEAKER[];
|
||||
extern const pm_char STR_BUZZER[];
|
||||
#else
|
||||
#define STR_SPEAKER STR_MODE
|
||||
#define STR_BUZZER STR_MODE
|
||||
#endif
|
||||
extern const pm_char STR_NOFREEEXPO[];
|
||||
extern const pm_char STR_NOFREEMIXER[];
|
||||
extern const pm_char STR_INSERTMIX[];
|
||||
extern const pm_char STR_EDITMIX[];
|
||||
extern const pm_char STR_SOURCE[];
|
||||
extern const pm_char STR_WEIGHT[];
|
||||
extern const pm_char STR_EXPO[];
|
||||
extern const pm_char STR_SIDE[];
|
||||
extern const pm_char STR_DIFFERENTIAL[];
|
||||
extern const pm_char STR_OFFSET[];
|
||||
extern const pm_char STR_TRIM[];
|
||||
extern const pm_char STR_DREX[];
|
||||
extern const pm_char STR_CURVE[];
|
||||
extern const pm_char STR_FLMODE[];
|
||||
extern const pm_char STR_MIXWARNING[];
|
||||
extern const pm_char STR_OFF[];
|
||||
extern const pm_char STR_MULTPX[];
|
||||
extern const pm_char STR_DELAYDOWN[];
|
||||
extern const pm_char STR_DELAYUP[];
|
||||
extern const pm_char STR_SLOWDOWN[];
|
||||
extern const pm_char STR_SLOWUP[];
|
||||
extern const pm_char STR_MIXER[];
|
||||
extern const pm_char STR_CV[];
|
||||
extern const pm_char STR_GV[];
|
||||
extern const pm_char STR_ACHANNEL[];
|
||||
extern const pm_char STR_RANGE[];
|
||||
extern const pm_char STR_BAR[];
|
||||
extern const pm_char STR_ALARM[];
|
||||
extern const pm_char STR_USRDATA[];
|
||||
extern const pm_char STR_BLADES[];
|
||||
extern const pm_char STR_SCREEN[];
|
||||
extern const pm_char STR_SOUND_LABEL[];
|
||||
extern const pm_char STR_LENGTH[];
|
||||
extern const pm_char STR_SPKRPITCH[];
|
||||
extern const pm_char STR_HAPTIC_LABEL[];
|
||||
extern const pm_char STR_HAPTICSTRENGTH[];
|
||||
extern const pm_char STR_CONTRAST[];
|
||||
extern const pm_char STR_ALARMS_LABEL[];
|
||||
#if defined(BATTGRAPH) || defined(PCBTARANIS)
|
||||
extern const pm_char STR_BATTERY_RANGE[];
|
||||
#endif
|
||||
extern const pm_char STR_BATTERYWARNING[];
|
||||
extern const pm_char STR_INACTIVITYALARM[];
|
||||
extern const pm_char STR_MEMORYWARNING[];
|
||||
extern const pm_char STR_ALARMWARNING[];
|
||||
extern const pm_char STR_RENAVIG[];
|
||||
extern const pm_char STR_THROTTLEREVERSE[];
|
||||
extern const pm_char STR_MINUTEBEEP[];
|
||||
extern const pm_char STR_BEEPCOUNTDOWN[];
|
||||
extern const pm_char STR_PERSISTENT[];
|
||||
extern const pm_char STR_BACKLIGHT_LABEL[];
|
||||
extern const pm_char STR_BLDELAY[];
|
||||
#if defined(PWM_BACKLIGHT)
|
||||
extern const pm_char STR_BLONBRIGHTNESS[];
|
||||
extern const pm_char STR_BLOFFBRIGHTNESS[];
|
||||
#endif
|
||||
extern const pm_char STR_SPLASHSCREEN[];
|
||||
extern const pm_char STR_THROTTLEWARNING[];
|
||||
extern const pm_char STR_SWITCHWARNING[];
|
||||
extern const pm_char STR_TIMEZONE[];
|
||||
extern const pm_char STR_GPSCOORD[];
|
||||
extern const pm_char STR_VARIO[];
|
||||
extern const pm_char STR_RXCHANNELORD[];
|
||||
extern const pm_char STR_SLAVE[];
|
||||
extern const pm_char STR_MODESRC[];
|
||||
extern const pm_char STR_MULTIPLIER[];
|
||||
#define LEN_MULTIPLIER PSIZE(TR_MULTIPLIER)
|
||||
extern const pm_char STR_CAL[];
|
||||
extern const pm_char STR_VTRIM[];
|
||||
extern const pm_char STR_BG[];
|
||||
extern const pm_char STR_MENUTOSTART[];
|
||||
extern const pm_char STR_SETMIDPOINT[];
|
||||
extern const pm_char STR_MOVESTICKSPOTS[];
|
||||
extern const pm_char STR_RXBATT[];
|
||||
extern const pm_char STR_TX[];
|
||||
#define STR_RX (STR_TX+OFS_RX)
|
||||
extern const pm_char STR_ACCEL[];
|
||||
extern const pm_char STR_NODATA[];
|
||||
extern const pm_char STR_TM1TM2[];
|
||||
extern const pm_char STR_THRTHP[];
|
||||
extern const pm_char STR_TOT[];
|
||||
extern const pm_char STR_TMR1LATMAXUS[];
|
||||
extern const pm_char STR_TMR1LATMINUS[];
|
||||
extern const pm_char STR_TMR1JITTERUS[];
|
||||
extern const pm_char STR_TMIXMAXMS[];
|
||||
extern const pm_char STR_FREESTACKMINB[];
|
||||
extern const pm_char STR_MENUTORESET[];
|
||||
extern const pm_char STR_PPM[];
|
||||
extern const pm_char STR_CH[];
|
||||
extern const pm_char STR_MODEL[];
|
||||
extern const pm_char STR_FP[];
|
||||
#if defined(CPUARM)
|
||||
extern const pm_char STR_MIX[];
|
||||
#endif
|
||||
extern const pm_char STR_EEPROMLOWMEM[];
|
||||
extern const pm_char STR_ALERT[];
|
||||
extern const pm_char STR_PRESSANYKEYTOSKIP[];
|
||||
extern const pm_char STR_THROTTLENOTIDLE[];
|
||||
extern const pm_char STR_ALARMSDISABLED[];
|
||||
extern const pm_char STR_PRESSANYKEY[];
|
||||
#define LEN_PRESSANYKEY PSIZE(TR_PRESSANYKEY)
|
||||
extern const pm_char STR_BADEEPROMDATA[];
|
||||
extern const pm_char STR_EEPROMFORMATTING[];
|
||||
extern const pm_char STR_EEPROMOVERFLOW[];
|
||||
extern const pm_char STR_TRIMS2OFFSETS[];
|
||||
extern const pm_char STR_MENURADIOSETUP[];
|
||||
extern const pm_char STR_MENUDATEANDTIME[];
|
||||
extern const pm_char STR_MENUTRAINER[];
|
||||
extern const pm_char STR_MENUVERSION[];
|
||||
extern const pm_char STR_MENUDIAG[];
|
||||
extern const pm_char STR_MENUANA[];
|
||||
extern const pm_char STR_MENUCALIBRATION[];
|
||||
extern const pm_char STR_MENUMODELSEL[];
|
||||
extern const pm_char STR_MENUSETUP[];
|
||||
extern const pm_char STR_MENUFLIGHTPHASE[];
|
||||
extern const pm_char STR_MENUFLIGHTPHASES[];
|
||||
extern const pm_char STR_MENUHELISETUP[];
|
||||
extern const pm_char STR_MENUINPUTS[];
|
||||
extern const pm_char STR_MENULIMITS[];
|
||||
extern const pm_char STR_MENUCURVES[];
|
||||
extern const pm_char STR_MENUCURVE[];
|
||||
extern const pm_char STR_MENUCUSTOMSWITCH[];
|
||||
extern const pm_char STR_MENUCUSTOMSWITCHES[];
|
||||
extern const pm_char STR_MENUCUSTOMFUNC[];
|
||||
extern const pm_char STR_MENUCUSTOMSCRIPTS[];
|
||||
extern const pm_char STR_MENUCUSTOMSCRIPT[];
|
||||
extern const pm_char STR_MENUTELEMETRY[];
|
||||
extern const pm_char STR_MENUTEMPLATES[];
|
||||
extern const pm_char STR_MENUSTAT[];
|
||||
extern const pm_char STR_MENUDEBUG[];
|
||||
extern const pm_char STR_MENUGLOBALVARS[];
|
||||
extern const pm_char STR_INVERT_THR[];
|
||||
extern const pm_char STR_AND_SWITCH[];
|
||||
extern const pm_char STR_CF[];
|
||||
|
||||
#if defined(DSM2) || defined(PXX)
|
||||
extern const pm_char STR_RXNUM[];
|
||||
#endif
|
||||
|
||||
#if defined(PXX)
|
||||
extern const pm_char STR_SYNCMENU[];
|
||||
extern const pm_char STR_INTERNALRF[];
|
||||
extern const pm_char STR_EXTERNALRF[];
|
||||
extern const pm_char STR_FAILSAFE[];
|
||||
extern const pm_char STR_FAILSAFESET[];
|
||||
extern const pm_char STR_COUNTRYCODE[];
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY)
|
||||
extern const pm_char STR_LIMIT[];
|
||||
#endif
|
||||
|
||||
#ifdef FRSKY_HUB
|
||||
extern const pm_char STR_MINRSSI[];
|
||||
extern const pm_char STR_LATITUDE[];
|
||||
extern const pm_char STR_LONGITUDE[];
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM) || defined(CPUM2560)
|
||||
extern const pm_char STR_SHUTDOWN[];
|
||||
#endif
|
||||
|
||||
extern const pm_char STR_BATT_CALIB[];
|
||||
|
||||
#if defined(CPUARM) || defined(FRSKY)
|
||||
extern const pm_char STR_VOLTAGE[];
|
||||
extern const pm_char STR_CURRENT[];
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
extern const pm_char STR_CURRENT_CALIB[];
|
||||
#define LEN_CALIB_FIELDS (PSIZE(TR_BATT_CALIB) > PSIZE(TR_CURRENT_CALIB) ? PSIZE(TR_BATT_CALIB) : PSIZE(TR_CURRENT_CALIB))
|
||||
extern const pm_char STR_UNITSSYSTEM[];
|
||||
extern const pm_char STR_VOICELANG[];
|
||||
extern const pm_char STR_MODELIDUSED[];
|
||||
extern const pm_char STR_BEEP_VOLUME[];
|
||||
extern const pm_char STR_WAV_VOLUME[];
|
||||
extern const pm_char STR_VARIO_VOLUME[];
|
||||
extern const pm_char STR_BG_VOLUME[];
|
||||
extern const pm_char STR_PERSISTENT_MAH[];
|
||||
#else
|
||||
#define LEN_CALIB_FIELDS PSIZE(TR_BATT_CALIB)
|
||||
#endif
|
||||
|
||||
#if defined(NAVIGATION_MENUS)
|
||||
extern const pm_char STR_SELECT_MODEL[];
|
||||
extern const pm_char STR_CREATE_MODEL[];
|
||||
extern const pm_char STR_COPY_MODEL[];
|
||||
extern const pm_char STR_MOVE_MODEL[];
|
||||
extern const pm_char STR_DELETE_MODEL[];
|
||||
extern const pm_char STR_EDIT[];
|
||||
extern const pm_char STR_INSERT_BEFORE[];
|
||||
extern const pm_char STR_INSERT_AFTER[];
|
||||
extern const pm_char STR_COPY[];
|
||||
extern const pm_char STR_MOVE[];
|
||||
extern const pm_char STR_PASTE[];
|
||||
extern const pm_char STR_INSERT[];
|
||||
extern const pm_char STR_DELETE[];
|
||||
extern const pm_char STR_RESET_FLIGHT[];
|
||||
extern const pm_char STR_RESET_TIMER1[];
|
||||
extern const pm_char STR_RESET_TIMER2[];
|
||||
extern const pm_char STR_RESET_TELEMETRY[];
|
||||
extern const pm_char STR_STATISTICS[];
|
||||
extern const pm_char STR_ABOUT_US[];
|
||||
#endif
|
||||
|
||||
extern const pm_char STR_RESET_BTN[];
|
||||
|
||||
#if defined(SDCARD)
|
||||
extern const pm_char STR_BACKUP_MODEL[];
|
||||
extern const pm_char STR_RESTORE_MODEL[];
|
||||
extern const pm_char STR_SDCARD_ERROR[];
|
||||
extern const pm_char STR_NO_SDCARD[];
|
||||
extern const pm_char STR_INCOMPATIBLE[];
|
||||
extern const pm_char STR_LOGS_PATH[];
|
||||
extern const pm_char STR_LOGS_EXT[];
|
||||
extern const pm_char STR_MODELS_PATH[];
|
||||
extern const pm_char STR_MODELS_EXT[];
|
||||
#define STR_UPDATE_LIST STR_DELAYDOWN
|
||||
#endif
|
||||
|
||||
extern const pm_uchar font_5x7[];
|
||||
extern const pm_uchar font_10x14[];
|
||||
|
||||
#if defined(CPUARM)
|
||||
extern const pm_uchar font_3x5[];
|
||||
extern const pm_uchar font_4x6[];
|
||||
extern const pm_uchar font_8x10[];
|
||||
extern const pm_uchar font_5x7_extra[];
|
||||
extern const pm_uchar font_10x14_extra[];
|
||||
extern const pm_uchar font_4x6_extra[];
|
||||
#endif
|
||||
|
||||
extern const pm_char STR_WARNING[];
|
||||
extern const pm_char STR_EEPROMWARN[];
|
||||
extern const pm_char STR_THROTTLEWARN[];
|
||||
extern const pm_char STR_ALARMSWARN[];
|
||||
extern const pm_char STR_SWITCHWARN[];
|
||||
|
||||
extern const pm_char STR_SPEAKER_VOLUME[];
|
||||
extern const pm_char STR_LCD[];
|
||||
extern const pm_char STR_BRIGHTNESS[];
|
||||
extern const pm_char STR_CPU_TEMP[];
|
||||
extern const pm_char STR_CPU_CURRENT[];
|
||||
extern const pm_char STR_CPU_MAH[];
|
||||
extern const pm_char STR_COPROC[];
|
||||
extern const pm_char STR_COPROC_TEMP[];
|
||||
extern const pm_char STR_CAPAWARNING[];
|
||||
extern const pm_char STR_TEMPWARNING[];
|
||||
extern const pm_char STR_FUNC[];
|
||||
extern const pm_char STR_V1[];
|
||||
extern const pm_char STR_V2[];
|
||||
extern const pm_char STR_DURATION[];
|
||||
extern const pm_char STR_DELAY[];
|
||||
extern const pm_char STR_SD_CARD[];
|
||||
extern const pm_char STR_SDHC_CARD[];
|
||||
extern const pm_char STR_NO_SOUNDS_ON_SD[];
|
||||
extern const pm_char STR_NO_MODELS_ON_SD[];
|
||||
extern const pm_char STR_NO_BITMAPS_ON_SD[];
|
||||
extern const pm_char STR_NO_SCRIPTS_ON_SD[];
|
||||
extern const pm_char STR_PLAY_FILE[];
|
||||
extern const pm_char STR_ASSIGN_BITMAP[];
|
||||
extern const pm_char STR_EXECUTE_FILE[];
|
||||
extern const pm_char STR_DELETE_FILE[];
|
||||
extern const pm_char STR_COPY_FILE[];
|
||||
extern const pm_char STR_RENAME_FILE[];
|
||||
extern const pm_char STR_REMOVED[];
|
||||
extern const pm_char STR_SD_INFO[];
|
||||
extern const pm_char STR_SD_FORMAT[];
|
||||
extern const pm_char STR_NA[];
|
||||
extern const pm_char STR_HARDWARE[];
|
||||
extern const pm_char STR_FORMATTING[];
|
||||
extern const pm_char STR_TEMP_CALIB[];
|
||||
extern const pm_char STR_TIME[];
|
||||
extern const pm_char STR_BAUDRATE[];
|
||||
extern const pm_char STR_SD_INFO_TITLE[];
|
||||
extern const pm_char STR_SD_TYPE[];
|
||||
extern const pm_char STR_SD_SPEED[];
|
||||
extern const pm_char STR_SD_SECTORS[];
|
||||
extern const pm_char STR_SD_SIZE[];
|
||||
extern const pm_char STR_TYPE[];
|
||||
extern const pm_char STR_GLOBAL_VARS[];
|
||||
extern const pm_char STR_GLOBAL_VAR[];
|
||||
extern const pm_char STR_OWN[];
|
||||
extern const pm_char STR_ROTARY_ENCODER[];
|
||||
extern const pm_char STR_DATE[];
|
||||
extern const pm_char STR_CHANNELS_MONITOR[];
|
||||
extern const pm_char STR_PATH_TOO_LONG[];
|
||||
extern const pm_char STR_VIEW_TEXT[];
|
||||
|
||||
#if defined(VOICE) && defined(CPUARM)
|
||||
struct LanguagePack {
|
||||
const char *id;
|
||||
const char *name;
|
||||
void (*playNumber)(getvalue_t number, uint8_t unit, uint8_t att, uint8_t id);
|
||||
void (*playDuration)(int16_t seconds, uint8_t id);
|
||||
};
|
||||
extern LanguagePack * languagePacks[];
|
||||
extern LanguagePack * currentLanguagePack;
|
||||
extern uint8_t currentLanguagePackIdx;
|
||||
#define LANGUAGE_PACK_DECLARE(lng, name) LanguagePack lng ## LanguagePack = { #lng, name, lng ## _ ## playNumber, lng ## _ ## playDuration }
|
||||
#define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name) LANGUAGE_PACK_DECLARE(lng, name); LanguagePack * currentLanguagePack = & lng ## LanguagePack; uint8_t currentLanguagePackIdx
|
||||
inline PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) { currentLanguagePack->playNumber(number, unit, att, id); }
|
||||
inline PLAY_FUNCTION(playDuration, int16_t seconds) { currentLanguagePack->playDuration(seconds, id); }
|
||||
#elif defined(VOICE)
|
||||
PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att);
|
||||
PLAY_FUNCTION(playDuration, int16_t seconds);
|
||||
#define LANGUAGE_PACK_DECLARE(lng, name)
|
||||
#define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name)
|
||||
#else
|
||||
#define LANGUAGE_PACK_DECLARE(lng, name)
|
||||
#define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name)
|
||||
#endif
|
||||
|
||||
#if LCD_W >= 212
|
||||
extern const pm_char STR_MODELNAME[];
|
||||
extern const pm_char STR_PHASENAME[];
|
||||
extern const pm_char STR_MIXNAME[];
|
||||
extern const pm_char STR_EXPONAME[];
|
||||
#else
|
||||
#define STR_MODELNAME STR_NAME
|
||||
#define STR_PHASENAME STR_NAME
|
||||
#define STR_MIXNAME STR_NAME
|
||||
#define STR_EXPONAME STR_NAME
|
||||
#endif
|
||||
|
||||
#if LCD_W >= 212
|
||||
extern const char * STR_PHASES_HEADERS[];
|
||||
extern const char * STR_LIMITS_HEADERS[];
|
||||
extern const char * STR_CSW_HEADERS[];
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
extern const pm_char STR_BYTES[];
|
||||
extern const pm_char STR_MODULE_BIND[];
|
||||
extern const pm_char STR_SET[];
|
||||
extern const pm_char STR_TRAINER[];
|
||||
extern const pm_char STR_ANTENNAPROBLEM[];
|
||||
extern const pm_char STR_MODULE[];
|
||||
extern const pm_char STR_CHANNELRANGE[];
|
||||
extern const pm_char STR_LOWALARM[];
|
||||
extern const pm_char STR_CRITICALALARM[];
|
||||
extern const pm_char STR_ENABLE_POPUP[];
|
||||
extern const pm_char STR_DISABLE_POPUP[];
|
||||
extern const pm_char STR_CURVE_PRESET[];
|
||||
extern const pm_char STR_PRESET[];
|
||||
extern const pm_char STR_MIRROR[];
|
||||
extern const pm_char STR_CLEAR[];
|
||||
extern const pm_char STR_RESET[];
|
||||
extern const pm_char STR_COPY_TRIMS_TO_OFFSET[];
|
||||
extern const pm_char STR_TOP_BAR[];
|
||||
extern const pm_char STR_ALTITUDE[];
|
||||
extern const pm_char STR_SCALE[];
|
||||
extern const pm_char STR_VIEW_CHANNELS[];
|
||||
extern const pm_char STR_VIEW_NOTES[];
|
||||
#endif
|
||||
|
||||
#if MENUS_LOCK == 1
|
||||
extern const pm_char STR_UNLOCKED[];
|
||||
extern const pm_char STR_MODS_FORBIDDEN[];
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS) || defined(DSM2)
|
||||
extern const pm_char STR_MODULE_RANGE[];
|
||||
#endif
|
||||
|
||||
#if defined(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
|
||||
|
||||
#if !defined(CPUM64)
|
||||
extern const pm_char STR_ABOUTUS[];
|
||||
extern const pm_char STR_ABOUT_OPENTX_1[];
|
||||
extern const pm_char STR_ABOUT_OPENTX_2[];
|
||||
extern const pm_char STR_ABOUT_OPENTX_3[];
|
||||
extern const pm_char STR_ABOUT_OPENTX_4[];
|
||||
extern const pm_char STR_ABOUT_OPENTX_5[];
|
||||
|
||||
extern const pm_char STR_ABOUT_BERTRAND_1[];
|
||||
extern const pm_char STR_ABOUT_BERTRAND_2[];
|
||||
extern const pm_char STR_ABOUT_BERTRAND_3[];
|
||||
|
||||
extern const pm_char STR_ABOUT_MIKE_1[];
|
||||
extern const pm_char STR_ABOUT_MIKE_2[];
|
||||
extern const pm_char STR_ABOUT_MIKE_3[];
|
||||
extern const pm_char STR_ABOUT_MIKE_4[];
|
||||
|
||||
extern const pm_char STR_ABOUT_ROMOLO_1[];
|
||||
extern const pm_char STR_ABOUT_ROMOLO_2[];
|
||||
extern const pm_char STR_ABOUT_ROMOLO_3[];
|
||||
|
||||
extern const pm_char STR_ABOUT_ANDRE_1[];
|
||||
extern const pm_char STR_ABOUT_ANDRE_2[];
|
||||
extern const pm_char STR_ABOUT_ANDRE_3[];
|
||||
|
||||
extern const pm_char STR_ABOUT_ROB_1[];
|
||||
extern const pm_char STR_ABOUT_ROB_2[];
|
||||
|
||||
extern const pm_char STR_ABOUT_MARTIN_1[];
|
||||
extern const pm_char STR_ABOUT_MARTIN_2[];
|
||||
|
||||
extern const pm_char STR_ABOUT_HARDWARE_1[];
|
||||
extern const pm_char STR_ABOUT_HARDWARE_2[];
|
||||
extern const pm_char STR_ABOUT_HARDWARE_3[];
|
||||
|
||||
extern const pm_char STR_ABOUT_PARENTS_1[];
|
||||
extern const pm_char STR_ABOUT_PARENTS_2[];
|
||||
extern const pm_char STR_ABOUT_PARENTS_3[];
|
||||
extern const pm_char STR_ABOUT_PARENTS_4[];
|
||||
#endif
|
||||
|
||||
#define CHR_SHORT TR_CHR_SHORT
|
||||
#define CHR_LONG TR_CHR_LONG
|
||||
#define CHR_TOGGLE TR_CHR_TOGGLE
|
||||
#define CHR_HOUR TR_CHR_HOUR
|
||||
|
||||
#endif
|
|
@ -447,6 +447,8 @@
|
|||
#define TR_ALARM INDENT"Alarm"
|
||||
#define TR_USRDATA "UsrData"
|
||||
#define TR_BLADES INDENT"Blades"
|
||||
#define TR_SPURGEAR INDENT"Spur Gear" // T.Foley
|
||||
#define TR_PINIONGEAR INDENT"Pinion Gear" // T.Foley
|
||||
#define TR_SCREEN "Screen "
|
||||
#define TR_SOUND_LABEL "Sound"
|
||||
#define TR_LENGTH INDENT"Length"
|
||||
|
|
765
radio/src/translations/en.h~
Normal file
765
radio/src/translations/en.h~
Normal file
|
@ -0,0 +1,765 @@
|
|||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Andreas Weitl
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Gabriel Birkus
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
// NON ZERO TERMINATED STRINGS
|
||||
#define LEN_OFFON "\003"
|
||||
#define TR_OFFON "OFF""ON\0"
|
||||
|
||||
#define LEN_MMMINV "\003"
|
||||
#define TR_MMMINV "---""INV"
|
||||
|
||||
#define LEN_NCHANNELS "\004"
|
||||
#define TR_NCHANNELS "\0014CH\0016CH\0018CH10CH12CH14CH16CH"
|
||||
|
||||
#define LEN_VBEEPMODE "\005"
|
||||
#define TR_VBEEPMODE "Quiet""Alarm""NoKey""All "
|
||||
|
||||
#define LEN_VBEEPLEN "\005"
|
||||
#define TR_VBEEPLEN "0====""=0===""==0==""===0=""====0"
|
||||
|
||||
#define LEN_VRENAVIG "\003"
|
||||
#define TR_VRENAVIG "No REaREb"
|
||||
|
||||
#define LEN_VBLMODE TR("\004", "\010")
|
||||
#define TR_VBLMODE TR("OFF\0""Keys""Ctrl""Both""ON\0 ", "OFF\0 ""Keys\0 ""Controls""Both\0 ""ON\0 ")
|
||||
|
||||
#define LEN_TRNMODE "\003"
|
||||
#define TR_TRNMODE "OFF"" +="" :="
|
||||
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATE:""TIME:"
|
||||
|
||||
#define LEN_VLCD "\006"
|
||||
#define TR_VLCD "NormalOptrex"
|
||||
|
||||
#define LEN_COUNTRYCODES TR("\002", "\007")
|
||||
#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0")
|
||||
|
||||
#define LEN_VTRIMINC TR("\006","\013")
|
||||
#define TR_VTRIMINC TR("Expo ""ExFine""Fine ""Medium""Coarse","Exponential""Extra Fine ""Fine ""Medium ""Coarse ")
|
||||
|
||||
#define LEN_VBEEPCOUNTDOWN "\006"
|
||||
#define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voice\0"
|
||||
|
||||
#define LEN_RETA123 "\001"
|
||||
|
||||
#if defined(PCBGRUVIN9X)
|
||||
#if ROTARY_ENCODERS > 2
|
||||
#define TR_RETA123 "RETA123abcd"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#endif
|
||||
#elif defined(PCBTARANIS)
|
||||
#define TR_RETA123 "RETA12LR"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123"
|
||||
#endif
|
||||
|
||||
#define LEN_VPROTOS "\006"
|
||||
|
||||
#if defined(PXX)
|
||||
#define TR_PXX "PXX\0 "
|
||||
#elif defined(DSM2) || defined(IRPROTOS)
|
||||
#define TR_PXX "[PXX]\0"
|
||||
#else
|
||||
#define TR_PXX
|
||||
#endif
|
||||
|
||||
#if defined(DSM2)
|
||||
#define TR_DSM2 "LP45\0 ""DSM2\0 ""DSMX\0 "
|
||||
#elif defined(IRPROTOS)
|
||||
#define TR_DSM2 "[LP45]""[DSM2]""[DSMX]"
|
||||
#else
|
||||
#define TR_DSM2
|
||||
#endif
|
||||
|
||||
#if defined(IRPROTOS)
|
||||
#define TR_IRPROTOS "SILV TRAC09PICZ SWIFT\0"
|
||||
#else
|
||||
#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"
|
||||
#define TR_POSNEG "POS""NEG"
|
||||
|
||||
#define LEN_VCURVEFUNC "\003"
|
||||
#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|"
|
||||
|
||||
#define LEN_VMLTPX "\010"
|
||||
#define TR_VMLTPX "Add\0 ""Multiply""Replace\0"
|
||||
|
||||
#define LEN_VMLTPX2 "\002"
|
||||
#define TR_VMLTPX2 "+=""*="":="
|
||||
|
||||
#define LEN_VMIXTRIMS "\003"
|
||||
#define TR_VMIXTRIMS "OFF""ON\0""Rud""Ele""Thr""Ail"
|
||||
|
||||
#define LEN_VCSWFUNC "\005"
|
||||
#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""a<x\0 ""|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 ""a=b\0 ""a>b\0 ""a<b\0 ""d}x\0 ""|d|}x""TIM\0"
|
||||
|
||||
#define LEN_VFSWFUNC "\012"
|
||||
|
||||
#if defined(VARIO)
|
||||
#define TR_VVARIO "Vario\0 "
|
||||
#else
|
||||
#define TR_VVARIO "[Vario]\0 "
|
||||
#endif
|
||||
|
||||
#if defined(AUDIO)
|
||||
#define TR_SOUND "Play Sound"
|
||||
#else
|
||||
#define TR_SOUND "Beep\0 "
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_HAPTIC
|
||||
#elif defined(HAPTIC)
|
||||
#define TR_HAPTIC "Haptic\0 "
|
||||
#else
|
||||
#define TR_HAPTIC "[Haptic]\0 "
|
||||
#endif
|
||||
|
||||
#if defined(VOICE)
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_PLAY_TRACK "Play\0 "
|
||||
#else
|
||||
#define TR_PLAY_TRACK "Play Track"
|
||||
#endif
|
||||
#define TR_PLAY_BOTH "Play Both\0"
|
||||
#define TR_PLAY_VALUE TR("Play Val\0 ", "Play Value")
|
||||
#else
|
||||
#define TR_PLAY_TRACK "[Play Trk]"
|
||||
#define TR_PLAY_BOTH "[Play Bth]"
|
||||
#define TR_PLAY_VALUE "[Play Val]"
|
||||
#endif
|
||||
|
||||
#define TR_CFN_VOLUME "Volume\0 "
|
||||
#define TR_CFN_BG_MUSIC "BgMusic\0 ""BgMusic ||"
|
||||
|
||||
#if defined(SDCARD)
|
||||
#define TR_SDCLOGS "SD Logs\0 "
|
||||
#else
|
||||
#define TR_SDCLOGS "[SD Logs]\0"
|
||||
#endif
|
||||
|
||||
#ifdef GVARS
|
||||
#define TR_CFN_ADJUST_GVAR "Adjust \0 "
|
||||
#else
|
||||
#define TR_CFN_ADJUST_GVAR
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#define TR_CFN_TEST "Test\0"
|
||||
#else
|
||||
#define TR_CFN_TEST
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC "Safety\0 ""Trainer\0 ""Inst. Trim" TR_SOUND TR_HAPTIC "Reset\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_VALUE TR_SDCLOGS TR_CFN_VOLUME "Backlight\0" TR_CFN_BG_MUSIC TR_CFN_ADJUST_GVAR TR_CFN_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC "Safety\0 ""Trainer\0 ""Inst. Trim" TR_SOUND TR_HAPTIC "Reset\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_SDCLOGS "Backlight\0" TR_CFN_ADJUST_GVAR TR_CFN_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC "Safety\0 ""Trainer\0 ""Inst. Trim" TR_SOUND TR_HAPTIC "Reset\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Backlight\0" TR_CFN_ADJUST_GVAR TR_CFN_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\005", "\011")
|
||||
|
||||
#if defined(FRSKY)
|
||||
#define TR_FSW_RESET_TELEM TR("Telem", "Telemetry")
|
||||
#else
|
||||
#define TR_FSW_RESET_TELEM
|
||||
#endif
|
||||
|
||||
#if ROTARY_ENCODERS == 2
|
||||
#define TR_FSW_RESET_ROTENC TR("REa\0 ""REb\0 ", "RotEnc A\0""RotEnc B\0")
|
||||
#elif ROTARY_ENCODERS == 1
|
||||
#define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ")
|
||||
#else
|
||||
#define TR_FSW_RESET_ROTENC
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR("Tmr1\0""Tmr2\0""All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, "Timer 1 ""Timer 2 ""All " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
|
||||
#define LEN_FUNCSOUNDS TR("\004", "\006")
|
||||
#define TR_FUNCSOUNDS TR("Bp1\0""Bp2\0""Bp3\0""Wrn1""Wrn2""Chee""Rata""Tick""Sirn""Ring""SciF""Robt""Chrp""Tada""Crck""Alrm", "Beep1 ""Beep2 ""Beep3 ""Warn1 ""Warn2 ""Cheep ""Ratata""Tick ""Siren ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""AlmClk")
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_RSSI_0 "SWR\0"
|
||||
#define TR_RSSI_1 "RSSI"
|
||||
#else
|
||||
#define TR_RSSI_0 "Tx\0 "
|
||||
#define TR_RSSI_1 "Rx\0 "
|
||||
#endif
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_RSSI_0 TR_RSSI_1 "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""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Pwr+""Acc\0""Time"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_VUNITSSYSTEM TR("\006", "\010")
|
||||
#define TR_VUNITSSYSTEM TR("Metric""Imper.", "Metric\0 ""Imperial")
|
||||
#define LEN_VTELEMUNIT_NORM "\003"
|
||||
#define TR_VTELEMUNIT_NORM "v\0 ""A\0 ""m/s""-\0 ""kmh""m\0 ""@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#define LEN_VTELEMUNIT_IMP "\003"
|
||||
#define TR_VTELEMUNIT_IMP "v\0 ""A\0 ""m/s""-\0 ""kts""ft\0""@\0 ""%\0 ""mA\0""mAh""W\0 "
|
||||
#else
|
||||
#if defined(IMPERIAL_UNITS)
|
||||
#define LENGTH_UNIT "ft\0"
|
||||
#define SPEED_UNIT "kts"
|
||||
#else
|
||||
#define LENGTH_UNIT "m\0 "
|
||||
#define SPEED_UNIT "kmh"
|
||||
#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)
|
||||
|
||||
#define LEN_VALARM "\003"
|
||||
#define TR_VALARM "---""Yel""Org""Red"
|
||||
|
||||
#define LEN_VALARMFN "\001"
|
||||
#define TR_VALARMFN "<>"
|
||||
|
||||
#define LEN_VTELPROTO "\007"
|
||||
#define TR_VTELPROTO "None\0 ""Hub\0 ""WSHHigh"
|
||||
|
||||
#define LEN_VOLTSRC "\003"
|
||||
#define TR_VOLTSRC "---""A1\0""A2\0""FAS""Cel"
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
#if defined(FRSKY_SPORT)
|
||||
#define TR_VARIOSRC "Vario""A1\0 ""A2\0"
|
||||
#else
|
||||
#define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#define LEN_VSCREEN "\004"
|
||||
#define TR_VSCREEN "Nums""Bars"
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Clear Mixes\0\0""Simple 4-CH \0""Sticky-T-Cut\0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0"
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS TR(" Menu"" Exit"" Down"" Up""Right"" Left", " Menu"" Exit""Enter"" Page"" Plus""Minus")
|
||||
|
||||
#define LEN_VRENCODERS "\003"
|
||||
#define TR_VRENCODERS "REa""REb"
|
||||
|
||||
#define LEN_VSWITCHES "\003"
|
||||
#define LEN_VSRCRAW "\004"
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||
#elif defined(EXTRA_3POS)
|
||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||
#define TR_SW_VSRCRAW "3P1\0""3P2\0"
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2""ID3""ID4""ID5"
|
||||
#else
|
||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 "
|
||||
#define TR_SW_VSRCRAW "3POS"
|
||||
#define TR_9X_3POS_SWITCHES "ID0""ID1""ID2"
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC""CSD""CSE""CSF""CSG""CSH""CSI""CSJ""CSK""CSL""CSM""CSN""CSO""CSP""CSQ""CSR""CSS""CST""CSU""CSV""CSW"
|
||||
#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128)
|
||||
#define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC""CSD""CSE""CSF"
|
||||
#else
|
||||
#define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC"
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_CUSTOMSW "One"
|
||||
#else
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "One"
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REnc"
|
||||
#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS > 2
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#endif
|
||||
|
||||
#if defined(HELI)
|
||||
#define TR_CYC_VSRCRAW "CYC1""CYC2""CYC3"
|
||||
#else
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW
|
||||
|
||||
#define LEN_VTMRMODES "\003"
|
||||
#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt"
|
||||
|
||||
#define LEN_VTRAINERMODES "\006"
|
||||
#define TR_VTRAINERMODES "Master""Slave\0"
|
||||
|
||||
#define LEN_VFAILSAFE "\011"
|
||||
#define TR_VFAILSAFE "Hold\0 ""Custom\0 ""No pulses"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define LEN_MAVLINK_BAUDS "\006"
|
||||
#define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200"
|
||||
#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
|
||||
|
||||
// ZERO TERMINATED STRINGS
|
||||
#define INDENT "\001"
|
||||
#define LEN_INDENT 1
|
||||
#define INDENT_WIDTH (FW/2)
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
#endif
|
||||
|
||||
#define TR_POPUPS TR_ENTER "\010[EXIT]"
|
||||
#define OFS_EXIT sizeof(TR_ENTER)
|
||||
|
||||
#define TR_MENUWHENDONE CENTER "\006" TR_ENTER " WHEN DONE"
|
||||
#define TR_FREE "free"
|
||||
#define TR_DELETEMODEL "DELETE MODEL"
|
||||
#define TR_COPYINGMODEL "Copying model..."
|
||||
#define TR_MOVINGMODEL "Moving model..."
|
||||
#define TR_LOADINGMODEL "Loading model..."
|
||||
#define TR_NAME "Name"
|
||||
#define TR_MODELNAME "Model Name"
|
||||
#define TR_PHASENAME "Mode Name"
|
||||
#define TR_MIXNAME "Mix Name"
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_EXPONAME "Line Name"
|
||||
#else
|
||||
#define TR_EXPONAME "Expo Name"
|
||||
#endif
|
||||
#define TR_BITMAP "Model Image"
|
||||
#define TR_TIMER TR("Timer","Timer ")
|
||||
#define TR_ELIMITS TR("E.Limits","Extended Limits")
|
||||
#define TR_ETRIMS TR("E.Trims","Extended Trims")
|
||||
#define TR_TRIMINC "Trim Step"
|
||||
#define TR_TTRACE TR("T-Source","Throttle Source")
|
||||
#define TR_TTRIM TR("T-Trim","Throttle Trim")
|
||||
#define TR_BEEPCTR TR("Ctr Beep","Center Beep")
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protocol")
|
||||
#define TR_PPMFRAME TR("PPM frame", INDENT "PPM frame")
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH "Switch"
|
||||
#define TR_TRIMS "Trims"
|
||||
#define TR_FADEIN "Fade In"
|
||||
#define TR_FADEOUT "Fade Out"
|
||||
#define TR_DEFAULT "(default)"
|
||||
#define TR_CHECKTRIMS CENTER "\006Check\012Trims"
|
||||
#define OFS_CHECKTRIMS CENTER_OFS+(9*FW)
|
||||
#define TR_SWASHTYPE "Swash Type"
|
||||
#define TR_COLLECTIVE TR("Collective","Collective source")
|
||||
#define TR_SWASHRING "Swash Ring"
|
||||
#define TR_ELEDIRECTION TR("ELE Direction","Long. cyc. direction")
|
||||
#define TR_AILDIRECTION TR("AIL Direction","Lateral cyc. direction")
|
||||
#define TR_COLDIRECTION TR("PIT Direction","Coll. pitch direction")
|
||||
#define TR_MODE INDENT"Mode"
|
||||
#define TR_NOFREEEXPO "No free expo!"
|
||||
#define TR_NOFREEMIXER "No free mixer!"
|
||||
#define TR_INSERTMIX "INSERT MIX "
|
||||
#define TR_EDITMIX "EDIT MIX "
|
||||
#define TR_SOURCE INDENT"Source"
|
||||
#define TR_WEIGHT "Weight"
|
||||
#define TR_EXPO TR("Expo","Exponential")
|
||||
#define TR_SIDE "Side"
|
||||
#define TR_DIFFERENTIAL "Differ"
|
||||
#define TR_OFFSET INDENT"Offset"
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Curve"
|
||||
#define TR_FLMODE TR("Mode","Modes")
|
||||
#define TR_MIXWARNING "Warning"
|
||||
#define TR_OFF "OFF"
|
||||
#define TR_MULTPX "Multpx"
|
||||
#define TR_DELAYDOWN "Delay Dn"
|
||||
#define TR_DELAYUP "Delay Up"
|
||||
#define TR_SLOWDOWN "Slow Dn"
|
||||
#define TR_SLOWUP "Slow Up"
|
||||
#define TR_MIXER "MIXER"
|
||||
#define TR_CV "CV"
|
||||
#define TR_GV "GV"
|
||||
#define TR_ACHANNEL "A\004channel"
|
||||
#define TR_RANGE INDENT"Range"
|
||||
#define TR_BAR "Bar"
|
||||
#define TR_ALARM INDENT"Alarm"
|
||||
#define TR_USRDATA "UsrData"
|
||||
#define TR_BLADES INDENT"Blades"
|
||||
#define TR_SCREEN "Screen "
|
||||
#define TR_SOUND_LABEL "Sound"
|
||||
#define TR_LENGTH INDENT"Length"
|
||||
#define TR_SPKRPITCH INDENT"Pitch"
|
||||
#define TR_HAPTIC_LABEL "Haptic"
|
||||
#define TR_HAPTICSTRENGTH INDENT"Strength"
|
||||
#define TR_CONTRAST "Contrast"
|
||||
#define TR_ALARMS_LABEL "Alarms"
|
||||
#define TR_BATTERY_RANGE TR("Battery range","Battery meter range")
|
||||
#define TR_BATTERYWARNING INDENT"Battery Low"
|
||||
#define TR_INACTIVITYALARM INDENT"Inactivity"
|
||||
#define TR_MEMORYWARNING INDENT"Memory Low"
|
||||
#define TR_ALARMWARNING INDENT"Sound Off"
|
||||
#define TR_RENAVIG "RotEnc Navig"
|
||||
#define TR_THROTTLEREVERSE TR("T-Reverse", "Throttle reverse")
|
||||
#define TR_MINUTEBEEP TR(INDENT"Minute",INDENT"Minute call")
|
||||
#define TR_BEEPCOUNTDOWN INDENT"Countdown"
|
||||
#define TR_PERSISTENT TR(INDENT"Persist.",INDENT"Persistent")
|
||||
#define TR_BACKLIGHT_LABEL "Backlight"
|
||||
#define TR_BLDELAY INDENT"Duration"
|
||||
#define TR_BLONBRIGHTNESS INDENT"ON Brightness"
|
||||
#define TR_BLOFFBRIGHTNESS INDENT"OFF Brightness"
|
||||
#define TR_SPLASHSCREEN "Splash screen"
|
||||
#define TR_THROTTLEWARNING TR("T-Warning","Throttle Warning")
|
||||
#define TR_SWITCHWARNING TR("S-Warning","Switch Warning")
|
||||
#define TR_TIMEZONE TR("Time Zone","GPS Time zone")
|
||||
#define TR_RXCHANNELORD TR("Rx Channel Ord","Default channel order")
|
||||
#define TR_SLAVE "Slave"
|
||||
#define TR_MODESRC "Mode\006% Source"
|
||||
#define TR_MULTIPLIER "Multiplier"
|
||||
#define TR_CAL "Cal"
|
||||
#define TR_VTRIM "Trim- +"
|
||||
#define TR_BG "BG:"
|
||||
#define TR_MENUTOSTART CENTER "\006" TR_ENTER " TO START"
|
||||
#define TR_SETMIDPOINT TR(CENTER "\003SET STICKS MIDPOINT",CENTER "\003CENTER STICKS/SLIDERS")
|
||||
#define TR_MOVESTICKSPOTS CENTER "\006MOVE STICKS/POTS"
|
||||
#define TR_RXBATT "Rx Batt:"
|
||||
#define TR_TXnRX "Tx:\0Rx:"
|
||||
#define OFS_RX 4
|
||||
#define TR_ACCEL "Acc:"
|
||||
#define TR_NODATA CENTER "NO DATA"
|
||||
#define TR_TM1TM2 "TM1\032TM2"
|
||||
#define TR_THRTHP "THR\032TH%"
|
||||
#define TR_TOT "TOT"
|
||||
#define TR_TMR1LATMAXUS "Tmr1Lat max\006us"
|
||||
#define STR_US (STR_TMR1LATMAXUS+12)
|
||||
#define TR_TMR1LATMINUS "Tmr1Lat min\006us"
|
||||
#define TR_TMR1JITTERUS "Tmr1 Jitter\006us"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TMIXMAXMS "Tmix max"
|
||||
#define TR_FREESTACKMINB "Free Stack"
|
||||
#else
|
||||
#define TR_TMIXMAXMS "Tmix max\014ms"
|
||||
#define TR_FREESTACKMINB "Free Stack\010b"
|
||||
#endif
|
||||
|
||||
#define TR_MENUTORESET CENTER TR_ENTER " to reset"
|
||||
#define TR_PPM "PPM"
|
||||
#define TR_CH "CH"
|
||||
#define TR_MODEL "MODEL"
|
||||
#define TR_FP "FM"
|
||||
#define TR_MIX "MIX"
|
||||
#define TR_EEPROMLOWMEM "EEPROM low mem"
|
||||
#define TR_ALERT "\016ALERT"
|
||||
#define TR_PRESSANYKEYTOSKIP "Press any key to skip"
|
||||
#define TR_THROTTLENOTIDLE "Throttle not idle"
|
||||
#define TR_ALARMSDISABLED "Alarms Disabled"
|
||||
#define TR_PRESSANYKEY TR("\010Press any Key", "Press any Key")
|
||||
#define TR_BADEEPROMDATA "Bad EEprom Data"
|
||||
#define TR_EEPROMFORMATTING "Formatting EEPROM"
|
||||
#define TR_EEPROMOVERFLOW "EEPROM overflow"
|
||||
#define TR_MENURADIOSETUP "RADIO SETUP"
|
||||
#define TR_MENUDATEANDTIME "DATE AND TIME"
|
||||
#define TR_MENUTRAINER "TRAINER"
|
||||
#define TR_MENUVERSION "VERSION"
|
||||
#define TR_MENUDIAG TR("SWITCHES","SWITCH TEST")
|
||||
#define TR_MENUANA TR("ANAS","ANALOG INPUTS")
|
||||
#define TR_MENUCALIBRATION "CALIBRATION"
|
||||
#define TR_TRIMS2OFFSETS "\006Trims => Offsets"
|
||||
#define TR_MENUMODELSEL TR("MODELSEL","MODEL SELECTION")
|
||||
#define TR_MENUSETUP TR("SETUP","MODEL SETUP")
|
||||
#define TR_MENUFLIGHTPHASE "FLIGHT MODE"
|
||||
#define TR_MENUFLIGHTPHASES "FLIGHT MODES"
|
||||
#define TR_MENUHELISETUP "HELI SETUP"
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_MENUINPUTS "INPUTS"
|
||||
#define TR_MENULIMITS "SERVOS"
|
||||
#elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ...
|
||||
#define TR_MENUINPUTS "STICKS"
|
||||
#define TR_MENULIMITS "SERVOS"
|
||||
#else
|
||||
#define TR_MENUINPUTS "DR/EXPO"
|
||||
#define TR_MENULIMITS "LIMITS"
|
||||
#endif
|
||||
|
||||
#define TR_MENUCURVES "CURVES"
|
||||
#define TR_MENUCURVE "CURVE"
|
||||
#define TR_MENUCUSTOMSWITCH "CUSTOM SWITCH"
|
||||
#define TR_MENUCUSTOMSWITCHES "CUSTOM SWITCHES"
|
||||
#define TR_MENUCUSTOMFUNC "CUSTOM FUNCTIONS"
|
||||
#define TR_MENUTELEMETRY "TELEMETRY"
|
||||
#define TR_MENUTEMPLATES "TEMPLATES"
|
||||
#define TR_MENUSTAT "STATS"
|
||||
#define TR_MENUDEBUG "DEBUG"
|
||||
#define TR_RXNUM TR("RxNum", INDENT"Receiver No.")
|
||||
#define TR_SYNCMENU "[Sync]"
|
||||
#define TR_LIMIT INDENT"Limit"
|
||||
#define TR_MINRSSI "Min Rssi"
|
||||
#define TR_LATITUDE "Latitude"
|
||||
#define TR_LONGITUDE "Longitude"
|
||||
#define TR_GPSCOORD TR("GPS Coords", "GPS coordinate format")
|
||||
#define TR_VARIO TR("Vario", "Variometer")
|
||||
#define TR_SHUTDOWN "SHUTTING DOWN"
|
||||
#define TR_BATT_CALIB "Battery Calib"
|
||||
#define TR_CURRENT_CALIB "Current Calib"
|
||||
#define TR_VOLTAGE INDENT"Voltage"
|
||||
#define TR_CURRENT INDENT"Current"
|
||||
#define TR_SELECT_MODEL "Select Model"
|
||||
#define TR_CREATE_MODEL "Create Model"
|
||||
#define TR_COPY_MODEL "Copy Model"
|
||||
#define TR_MOVE_MODEL "Move Model"
|
||||
#define TR_BACKUP_MODEL "Backup Model"
|
||||
#define TR_DELETE_MODEL "Delete Model"
|
||||
#define TR_RESTORE_MODEL "Restore Model"
|
||||
#define TR_SDCARD_ERROR "SDCARD Error"
|
||||
#define TR_NO_SDCARD "No SDCARD"
|
||||
#define TR_INCOMPATIBLE "Incompatible"
|
||||
#define TR_WARNING "WARNING"
|
||||
#define TR_EEPROMWARN "EEPROM"
|
||||
#define TR_THROTTLEWARN "THROTTLE"
|
||||
#define TR_ALARMSWARN "ALARMS"
|
||||
#define TR_SWITCHWARN "SWITCH"
|
||||
#define TR_INVERT_THR TR("Invert Thr?","Invert Throttle?")
|
||||
#define TR_SPEAKER_VOLUME INDENT "Volume"
|
||||
#define TR_LCD "LCD"
|
||||
#define TR_BRIGHTNESS INDENT "Brightness"
|
||||
#define TR_CPU_TEMP "CPU Temp.\016>"
|
||||
#define TR_CPU_CURRENT "Current\022>"
|
||||
#define TR_CPU_MAH "Consumpt."
|
||||
#define TR_COPROC "CoProc."
|
||||
#define TR_COPROC_TEMP "MB Temp. \016>"
|
||||
#define TR_CAPAWARNING INDENT "Capacity Low"
|
||||
#define TR_TEMPWARNING INDENT "Overheat"
|
||||
#define TR_FUNC "Func"
|
||||
#define TR_V1 "V1"
|
||||
#define TR_V2 "V2"
|
||||
#define TR_DURATION "Duration"
|
||||
#define TR_DELAY "Delay"
|
||||
#define TR_SD_CARD "SD CARD"
|
||||
#define TR_SDHC_CARD "SD-HC CARD"
|
||||
#define TR_NO_SOUNDS_ON_SD "No Sounds on SD"
|
||||
#define TR_NO_MODELS_ON_SD "No Models on SD"
|
||||
#define TR_NO_BITMAPS_ON_SD "No Bitmaps on SD"
|
||||
#define TR_PLAY_FILE "Play"
|
||||
#define TR_DELETE_FILE "Delete"
|
||||
#define TR_COPY_FILE "Copy"
|
||||
#define TR_RENAME_FILE "Rename"
|
||||
#define TR_ASSIGN_BITMAP "Assign Bitmap"
|
||||
#define TR_REMOVED " removed"
|
||||
#define TR_SD_INFO "Information"
|
||||
#define TR_SD_FORMAT "Format"
|
||||
#define TR_NA "N/A"
|
||||
#define TR_HARDWARE "HARDWARE"
|
||||
#define TR_FORMATTING "Formatting..."
|
||||
#define TR_TEMP_CALIB "Temp. Calib"
|
||||
#define TR_TIME "Time"
|
||||
#define TR_BAUDRATE "BT Baudrate"
|
||||
#define TR_SD_INFO_TITLE "SD INFO"
|
||||
#define TR_SD_TYPE "Type:"
|
||||
#define TR_SD_SPEED "Speed:"
|
||||
#define TR_SD_SECTORS "Sectors:"
|
||||
#define TR_SD_SIZE "Size:"
|
||||
#define TR_TYPE "Type"
|
||||
#define TR_GLOBAL_VARS "Global Variables"
|
||||
#define TR_GLOBAL_VAR "Global Variable"
|
||||
#define TR_MENUGLOBALVARS "GLOBAL VARIABLES"
|
||||
#define TR_OWN "Own"
|
||||
#define TR_DATE "Date"
|
||||
#define TR_ROTARY_ENCODER "R.Encs"
|
||||
#define TR_CHANNELS_MONITOR "CHANNEL MONITOR"
|
||||
#define TR_INTERNALRF "Internal RF"
|
||||
#define TR_EXTERNALRF "External RF"
|
||||
#define TR_FAILSAFE INDENT "Failsafe mode"
|
||||
#define TR_FAILSAFESET "FAILSAFE SETTINGS"
|
||||
#define TR_COUNTRYCODE "Country Code"
|
||||
#define TR_VOICELANG "Voice Language"
|
||||
#define TR_UNITSSYSTEM "Units"
|
||||
#define TR_EDIT "Edit"
|
||||
#define TR_INSERT_BEFORE "Insert Before"
|
||||
#define TR_INSERT_AFTER "Insert After"
|
||||
#define TR_COPY "Copy"
|
||||
#define TR_MOVE "Move"
|
||||
#define TR_PASTE "Paste"
|
||||
#define TR_DELETE "Delete"
|
||||
#define TR_INSERT "Insert"
|
||||
#define TR_RESET_FLIGHT "Reset Flight"
|
||||
#define TR_RESET_TIMER1 "Reset Timer1"
|
||||
#define TR_RESET_TIMER2 "Reset Timer2"
|
||||
#define TR_RESET_TELEMETRY "Reset Telemetry"
|
||||
#define TR_STATISTICS "Statistics"
|
||||
#define TR_ABOUT_US "About"
|
||||
#define TR_AND_SWITCH "AND Switch"
|
||||
#define TR_CF "CF"
|
||||
#define TR_SPEAKER INDENT"Speaker"
|
||||
#define TR_BUZZER INDENT"Buzzer"
|
||||
#define TR_BYTES "bytes"
|
||||
#define TR_MODULE_BIND "[Bind]"
|
||||
#define TR_MODULE_RANGE "[Range]"
|
||||
#define TR_RESET_BTN "[Reset]"
|
||||
#define TR_SET "[Set]"
|
||||
#define TR_TRAINER "Trainer"
|
||||
#define TR_ANTENNAPROBLEM CENTER "TX Antenna problem!"
|
||||
#define TR_MODELIDUSED TR("ID already used","Model ID already used")
|
||||
#define TR_MODULE INDENT "Module"
|
||||
#define TR_CHANNELRANGE INDENT "Channel Range"
|
||||
#define TR_LOWALARM INDENT "Low Alarm"
|
||||
#define TR_CRITICALALARM INDENT "Critical Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
|
||||
#if defined(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
|
||||
|
||||
|
||||
|
||||
// Taranis column headers
|
||||
#define TR_PHASES_HEADERS { " Name ", " Switch ", " Trims ", " Fade In ", " Fade Out " }
|
||||
#define TR_LIMITS_HEADERS { " Name ", " Subtrim ", " Min ", " Max ", " Direction ", " Curve ", " PPM Center ", " Subtrim mode " }
|
||||
#define TR_CSW_HEADERS { " Function ", " V1 ", " V2 ", " AND Switch ", " Duration ", " Delay " }
|
||||
|
||||
// About screen
|
||||
#define TR_ABOUTUS TR(" ABOUT ", "ABOUT")
|
||||
|
||||
#define TR_ABOUT_OPENTX_1 TR("OpenTX\001is\001open\001source,\001non", "OpenTX is open source, non-")
|
||||
#define TR_ABOUT_OPENTX_2 TR("commercial,\001wo\001warranties.", "commercial and comes with no")
|
||||
#define TR_ABOUT_OPENTX_3 TR("It\001was\001developed\001for\001free.", "warranties. It was developed")
|
||||
#define TR_ABOUT_OPENTX_4 TR("Support through donations", "for free. Support through")
|
||||
#define TR_ABOUT_OPENTX_5 TR("is welcome!", "donations is welcome!")
|
||||
|
||||
#define TR_ABOUT_BERTRAND_1 "Bertrand Songis"
|
||||
#define TR_ABOUT_BERTRAND_2 "OpenTX main author"
|
||||
#define TR_ABOUT_BERTRAND_3 "Companion9x co-author"
|
||||
|
||||
#define TR_ABOUT_MIKE_1 "Mike Blandford"
|
||||
#define TR_ABOUT_MIKE_2 "Code and drivers guru"
|
||||
#define TR_ABOUT_MIKE_3 TR("Arguably,\001one\001of\001the\001best", "Arguably, one of the best")
|
||||
#define TR_ABOUT_MIKE_4 "Inspirational"
|
||||
|
||||
#define TR_ABOUT_ROMOLO_1 "Romolo Manfredini"
|
||||
#define TR_ABOUT_ROMOLO_2 "Companion9x co-author"
|
||||
#define TR_ABOUT_ROMOLO_3 ""
|
||||
|
||||
#define TR_ABOUT_ANDRE_1 "Andre Bernet"
|
||||
#define TR_ABOUT_ANDRE_2 "Functionality, usability,"
|
||||
#define TR_ABOUT_ANDRE_3 "debugging, documentation"
|
||||
|
||||
#define TR_ABOUT_ROB_1 "Rob Thomson"
|
||||
#define TR_ABOUT_ROB_2 "openrcforums webmaster"
|
||||
|
||||
#define TR_ABOUT_MARTIN_1 "Martin Hotar"
|
||||
#define TR_ABOUT_MARTIN_2 "Graphics designer"
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_ABOUT_HARDWARE_1 "FrSky"
|
||||
#define TR_ABOUT_HARDWARE_2 "Hardware designer/producer"
|
||||
#define TR_ABOUT_HARDWARE_3 "Firmware contributor"
|
||||
#else
|
||||
#define TR_ABOUT_HARDWARE_1 "Brent Nelson"
|
||||
#define TR_ABOUT_HARDWARE_2 "Sky9x designer/producer"
|
||||
#define TR_ABOUT_HARDWARE_3 ""
|
||||
#endif
|
||||
|
||||
#define TR_ABOUT_PARENTS_1 "Parent projects"
|
||||
#define TR_ABOUT_PARENTS_2 TR("Ersky9x (Mike Blandford)", "Ersky9x (Mike Blandford)")
|
||||
#define TR_ABOUT_PARENTS_3 "ER9X (Erez Raviv)"
|
||||
#define TR_ABOUT_PARENTS_4 "TH9X (Thomas Husterer)"
|
||||
|
||||
#define TR_CHR_SHORT 's'
|
||||
#define TR_CHR_LONG 'l'
|
||||
#define TR_CHR_TOGGLE 't'
|
||||
#define TR_CHR_HOUR 'h'
|
||||
|
||||
#define TR_BEEP_VOLUME "Beep Volume"
|
||||
#define TR_WAV_VOLUME "Wav Volume"
|
||||
#define TR_VARIO_VOLUME "Vario Volume"
|
||||
#define TR_BG_VOLUME "Bg Volume"
|
||||
|
||||
#define TR_TOP_BAR "Top Bar"
|
||||
#define TR_ALTITUDE INDENT "Altitude"
|
||||
#define TR_MODS_FORBIDDEN "Modifications forbidden!"
|
||||
#define TR_UNLOCKED "Unlocked"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue