1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-21 23:35:17 +03:00

Merge of ARM branch

This commit is contained in:
bsongis 2012-04-26 14:43:52 +00:00
parent ea53713580
commit 30be30212c
15 changed files with 209 additions and 61 deletions

View file

@ -629,7 +629,7 @@ endif
# Concatenate all sources files in one big file to optimize size
allsrc.cpp: Makefile $(BOARDSRC) $(CPPSRC) $(EXTRABOARDSRC)
@echo -n > allsrc.cpp
@rm -f allsrc.cpp
for f in $(BOARDSRC) $(CPPSRC) $(EXTRABOARDSRC) ; do echo "# 1 \"$$f\"" >> allsrc.cpp; cat "$$f" >> allsrc.cpp; done
remallsrc:

View file

@ -45,11 +45,20 @@ uint8_t getEvent()
return evt;
}
#if defined(PCBARM)
#define KEY_LONG_DELAY 32
#else
#define KEY_LONG_DELAY 24
#endif
Key keys[NUM_KEYS];
void Key::input(bool val, EnumKeys enuk)
{
// uint8_t old=m_vals;
m_vals <<= 1; if(val) m_vals |= 1; //portbit einschieben
uint8_t t_vals = m_vals ;
t_vals <<= 1 ;
if(val) t_vals |= 1; //portbit einschieben
m_vals = t_vals ;
m_cnt++;
if(m_state && m_vals==0){ //gerade eben sprung auf 0
@ -81,7 +90,7 @@ void Key::input(bool val, EnumKeys enuk)
break;
case KSTATE_RPTDELAY: // gruvin: delay state before first key repeat
if(m_cnt == 24) putEvent(EVT_KEY_LONG(enuk));
if(m_cnt == KEY_LONG_DELAY) putEvent(EVT_KEY_LONG(enuk));
if (m_cnt == 40) {
m_state = 16;
m_cnt = 0;

View file

@ -477,18 +477,21 @@ void eeLoadModel(uint8_t id)
memset(&g_model, 0, sizeof(g_model));
if ( size > sizeof(g_model) )
{
#ifdef SIMU
if (size > 0 && size != sizeof(g_model)) {
printf("Model data read=%d bytes vs %d bytes\n", size, (int)sizeof(ModelData));
}
#endif
if (size > sizeof(g_model)) {
size = sizeof(g_model) ;
}
if(size<256) // if not loaded a fair amount
{
if(size < 256) { // if not loaded a fair amount
modelDefault(id) ;
eeCheck(true);
}
else
{
else {
read32_eeprom_data( ( File_system[id+1].block_no << 12) + sizeof( struct t_eeprom_header), ( uint8_t *)&g_model, size, 0 ) ;
}

View file

@ -851,7 +851,7 @@ static const pm_uint8_t bchunit_ar[] PROGMEM = {
UNIT_PERCENT, // Fuel
UNIT_DEGREES, // T1
UNIT_DEGREES, // T2
UNIT_KMH, // Speed
UNIT_KTS, // Speed
UNIT_METERS, // Dist
UNIT_METERS, // GPS Alt
};

View file

@ -239,7 +239,9 @@ void menuProcSetup(uint8_t event)
b = 100 - g_eeGeneral.backlightBright;
CHECK_INCDEC_GENVAR(event, b, 0, 100);
g_eeGeneral.backlightBright = 100 - b;
#ifndef SIMU
PWM->PWM_CH_NUM[0].PWM_CDTYUPD = g_eeGeneral.backlightBright ;
#endif
}
break;
#endif

View file

@ -843,7 +843,12 @@ void menuProcPhasesAll(uint8_t event)
uint8_t att;
for (uint8_t i=0; i<MAX_PHASES; i++) {
#if defined(PCBARM)
int8_t y = (1+i-s_pgOfs)*FH;
if (y<1*FH || y>7*FH) continue;
#else
uint8_t y=(i+1)*FH;
#endif
att = i==sub ? INVERS : 0;
PhaseData *p = phaseaddress(i);
#if defined(EXTRA_ROTARY_ENCODERS)
@ -887,6 +892,10 @@ void menuProcPhasesAll(uint8_t event)
lcd_putc(20*FW+2, y, (p->fadeIn && p->fadeOut) ? '*' : (p->fadeIn ? 'I' : 'O'));
}
#if defined(PCBARM)
if (s_pgOfs != MAX_PHASES-6) return;
#endif
att = (sub==MAX_PHASES && !trimsCheckTimer) ? INVERS : 0;
lcd_putsAtt(0, 7*FH, STR_CHECKTRIMS, att);
putsFlightPhase(6*FW, 7*FH, getFlightPhase()+1, att);
@ -1306,9 +1315,14 @@ inline void editExpoVals(uint8_t event, uint8_t which, bool edit, uint8_t y, uin
#ifdef FLIGHT_PHASES
case EXPO_FIELD_FLIGHT_PHASE:
{
#if defined(PCBARM)
putsFlightPhase(6*FW+5, y, ed->phase, invBlk);
if(edit) { ed->phase = checkIncDecModel(event, ed->phase, -MAX_PHASES, MAX_PHASES); }
#else
int8_t phase = ed->negPhase ? -ed->phase : +ed->phase;
putsFlightPhase(6*FW+5, y, phase, invBlk);
if(edit) { phase = checkIncDecModel(event, phase, -MAX_PHASES, MAX_PHASES); ed->negPhase = (phase < 0); ed->phase = abs(phase); }
#endif
}
break;
#endif
@ -1535,8 +1549,12 @@ inline void displayExpoLine(uint8_t row, uint8_t expo, uint8_t ch, uint8_t idx,
if (attr != 0)
CHECK_INCDEC_MODELVAR(event, ed->weight, 0, 100);
lcd_outdezAtt(9*FW+1, y, ed->expo, 0);
#ifdef FLIGHT_PHASES
#if defined(FLIGHT_PHASES)
#if defined(PCBARM)
putsFlightPhase(10*FW, y, ed->phase);
#else
putsFlightPhase(10*FW, y, ed->negPhase ? -ed->phase : +ed->phase);
#endif
#endif
putsSwitches(13*FW+4, y, ed->swtch, 0); // normal switches
if (ed->mode!=3) lcd_putc(17*FW, y, ed->mode == 2 ? 126 : 127);//'|' : (stkVal[i] ? '<' : '>'),0);*/
@ -2041,17 +2059,17 @@ void menuProcFunctionSwitches(uint8_t event)
case 1:
if (sd->swtch) {
uint8_t func_displayed;
if (sd->func < NUM_CHNOUT) {
if (sd->func < 16) {
func_displayed = 0;
putsChnRaw(14*FW-2, y, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS+2+3+NUM_PPM+sd->func+1, attr);
}
else if (sd->func < NUM_CHNOUT + NUM_STICKS + 1) {
else if (sd->func < 16 + NUM_STICKS + 1) {
func_displayed = 1;
if (sd->func != FUNC_TRAINER)
putsChnRaw(13*FW-2, y, sd->func-FUNC_TRAINER, attr);
}
else
func_displayed = 2 + sd->func - NUM_CHNOUT - NUM_STICKS - 1;
func_displayed = 2 + sd->func - 16 - NUM_STICKS - 1;
lcd_putsiAtt(5*FW-2, y, STR_VFSWFUNC, func_displayed, attr);
if (active) {
CHECK_INCDEC_MODELVAR( event, sd->func, 0, FUNC_MAX-1);

View file

@ -48,8 +48,10 @@
#define WARN_MEM (!(g_eeGeneral.warnOpts & WARN_MEM_BIT))
#define BEEP_VAL ( (g_eeGeneral.warnOpts & WARN_BVAL_BIT) >>3 )
#if defined(PCBV4)
#define EEPROM_VER 207
#if defined(PCBARM)
#define EEPROM_VER 208
#elif defined(PCBV4)
#define EEPROM_VER 208
#else
#define EEPROM_VER 205
#endif
@ -147,6 +149,17 @@ PACK(typedef struct t_EEGeneral {
// eeprom modelspec
#if defined(PCBARM)
PACK(typedef struct t_ExpoData {
uint8_t mode; // 0=end, 1=pos, 2=neg, 3=both
uint8_t chn;
int8_t curve; // 0=no curve, 1-6=std curves, 7-10=CV1-CV4, 11-15=CV9-CV13
int8_t swtch;
int8_t phase; // if negPhase is 0: 0=normal, 5=FP4 if negPhase is 1: 5=!FP4
uint8_t weight;
int8_t expo;
}) ExpoData;
#else
PACK(typedef struct t_ExpoData {
uint8_t mode:2; // 0=end, 1=pos, 2=neg, 3=both
uint8_t chn:2;
@ -157,6 +170,7 @@ PACK(typedef struct t_ExpoData {
uint8_t weight:7;
int8_t expo;
}) ExpoData;
#endif
PACK(typedef struct t_LimitData {
int8_t min;
@ -218,6 +232,25 @@ enum MixSources {
#define MLTPX_MUL 1
#define MLTPX_REP 2
#if defined(PCBARM)
PACK(typedef struct t_MixData {
uint8_t destCh;
int8_t phase;
int8_t weight;
int8_t swtch;
uint8_t mltpx; // multiplex method: 0 means +=, 1 means *=, 2 means :=
int8_t curve;
uint8_t mixWarn; // mixer warning
uint8_t delayUp;
uint8_t delayDown;
uint8_t speedUp; // Servogeschwindigkeit aus Tabelle (10ms Cycle)
uint8_t speedDown; // 0 nichts
uint8_t srcRaw; //
int8_t differential;
uint8_t carryTrim;
int8_t sOffset;
}) MixData;
#else
PACK(typedef struct t_MixData {
uint8_t destCh:4; // 0, 1..NUM_CHNOUT
int8_t phase:4; // -5=!FP4, 0=normal, 5=FP4
@ -235,6 +268,7 @@ PACK(typedef struct t_MixData {
uint16_t carryTrim:2;
int8_t sOffset;
}) MixData;
#endif
PACK(typedef struct t_CustomSwData { // Custom Switches data
int8_t v1; //input
@ -278,9 +312,8 @@ enum TelemetryUnit {
UNIT_VOLTS,
UNIT_AMPS,
UNIT_RAW,
UNIT_KTS,
UNIT_KMH,
UNIT_MPH,
UNIT_KTS = UNIT_KMH,
UNIT_METERS,
UNIT_FEET = UNIT_METERS,
UNIT_DEGREES,
@ -396,22 +429,25 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
#if defined(PCBV4)
#if defined(EXTRA_ROTARY_ENCODERS)
#define NUM_EXTRA_ROTARY_ENCODERS 3
#else //EXTRA_ROTARY_ENCODERS
#else
#define NUM_EXTRA_ROTARY_ENCODERS 0
#endif //EXTRA_ROTARY_ENCODERS
#endif
#define NUM_ROTARY_ENCODERS (2+NUM_EXTRA_ROTARY_ENCODERS)
#define ROTARY_ENCODER_MAX 1024
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[NUM_ROTARY_ENCODERS];
#else //PCBV4
#else
#define NUM_ROTARY_ENCODERS 0
#define ROTARY_ENCODER_ARRAY
#endif //PCBV4
#endif
#if defined(PCBSTD)
#define TRIM_ARRAY int8_t trim[4]; int8_t trim_ext:8
#else
#define TRIM_ARRAY int16_t trim[4]
#endif
PACK(typedef struct t_PhaseData {
// TODO perhaps not a so good idea to have 10bits trims instead of 16bits ...
int8_t trim[4]; // -500..500 => trim value, 501 => use trim of phase 0, 502, 503, 504 => use trim of phases 1|2|3|4 instead
int8_t trim_ext:8; // 2 less significant extra bits per trim (10bits trims)
TRIM_ARRAY;
int8_t swtch; // swtch of phase[0] is not used
char name[6];
uint8_t fadeIn:4;
@ -421,22 +457,33 @@ PACK(typedef struct t_PhaseData {
#if defined(PCBARM)
#define MAX_MODELS 60
#define NUM_CHNOUT 32 // number of real output channels CH1-CH32
#define MAX_PHASES 9
#define MAX_MIXERS 64
#define MAX_EXPOS 32
#define NUM_CSW 32 // number of custom switches
#define NUM_FSW 32 // number of functions assigned to switches
#elif defined(PCBV4)
#define MAX_MODELS 30
#else
#define MAX_MODELS 16
#endif
#define MAX_TIMERS 2
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
#define MAX_PHASES 5
#define MAX_MIXERS 32
#define MAX_EXPOS 14
#define MAX_CURVE5 8
#define MAX_CURVE9 8
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
#define NUM_CSW 12 // number of custom switches
#define NUM_FSW 16 // number of functions assigned to switches
#else
#define MAX_MODELS 16
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
#define MAX_PHASES 5
#define MAX_MIXERS 32
#define MAX_EXPOS 14
#define NUM_CSW 12 // number of custom switches
#define NUM_FSW 16 // number of functions assigned to switches
#endif
#define MAX_TIMERS 2
#define MAX_CURVE5 8
#define MAX_CURVE9 8
#define TMRMODE_NONE 0
#define TMRMODE_ABS 1
@ -454,6 +501,7 @@ enum Protocols {
PROTO_DSM2,
PROTO_PPM16,
PROTO_FAAST,
PROTO_PPMSIM,
PROTO_MAX
};
@ -469,7 +517,7 @@ enum Dsm2Variants {
#define EXTDATA FrSkyData frsky
#endif
#if defined(PCBV4)
#if defined(PCBV4) || defined(PCBARM)
#define BeepANACenter uint16_t
#else
#define BeepANACenter uint8_t

View file

@ -333,15 +333,26 @@ void applyExpos(int16_t *anas, uint8_t phase)
for (uint8_t i=0; i<MAX_EXPOS; i++) {
ExpoData &ed = g_model.expoData[i];
#if defined(PCBARM)
int8_t ed_phase = ed.phase;
#else
uint8_t ed_phase = ed.phase;
#endif
if (ed.mode==0) break; // end of list
if (ed.chn == cur_chn)
continue;
if (ed_phase != 0) {
#if defined(PCBARM)
if (ed_phase < 0) {
if (phase == -ed_phase)
continue;
}
#else
if (ed.negPhase) {
if (phase == ed_phase)
continue;
}
#endif
else {
if (phase != ed_phase)
continue;
@ -587,7 +598,11 @@ int16_t getRawTrimValue(uint8_t phase, uint8_t idx)
}
else {
PhaseData *p = phaseaddress(phase);
#if defined(PCBSTD)
result = (((int16_t)p->trim[idx]) << 2) + ((p->trim_ext >> (2*idx)) & 0x03);
#else
result = p->trim[idx];
#endif
}
return result;
}
@ -604,8 +619,12 @@ void setTrimValue(uint8_t phase, uint8_t idx, int16_t trim)
}
else {
PhaseData *p = phaseaddress(phase);
#if defined(PCBSTD)
p->trim[idx] = (int8_t)(trim >> 2);
p->trim_ext = (p->trim_ext & ~(0x03 << (2*idx))) + (((trim & 0x03) << (2*idx)));
#else
p->trim[idx] = trim;
#endif
}
STORE_MODELVARS;
}
@ -668,8 +687,12 @@ void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t
// m to ft *105/32
val = val * 3 + ( val >> 2 ) + (val >> 5) ;
}
#else
if (unit == UNIT_KTS) {
// kts to km/h
val = (val * 463) / 250;
}
#endif
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!
if (~att & NO_UNIT && unit != UNIT_RAW)
lcd_putsiAtt(lcd_lastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
@ -868,10 +891,10 @@ void message(const pm_char *title, const pm_char *s, const pm_char *t, const cha
if (last) {
lcd_putsLeft(7*FH, last);
AUDIO_ERROR();
clearKeyEvents();
}
refreshDisplay();
lcdSetRefVolt(g_eeGeneral.contrast);
clearKeyEvents();
}
int8_t *s_trimPtr[NUM_STICKS] = { NULL, NULL, NULL, NULL };
@ -2610,7 +2633,6 @@ int main(void)
eeCheck(true);
lcd_clear() ;
refreshDisplay() ;
// TODO needed? lcdSetRefVolt(0);
soft_power_off(); // Only turn power off if necessary
#endif
@ -2625,11 +2647,14 @@ int main(void)
#endif
#if defined(PCBARM) || defined(PCBV4)
lcdSetRefVolt(0); // TODO before soft_power_off?
#endif
#if defined(PCBV4)
//never return from main() - there is no code to return back, if any daelays occurs in physical power it does dead loop.
wdt_disable();
for(;;){}
#endif
}
#endif

View file

@ -377,7 +377,11 @@ extern Key keys[NUM_KEYS];
#define MAX_SWITCH (MAX_PSWITCH+NUM_CSW)
#define SWITCH_ON (1+MAX_SWITCH)
#define SWITCH_OFF (-SWITCH_ON)
#if defined(PCBARM)
#define MAX_DRSWITCH (MAX_PSWITCH+NUM_CSW) // 15(9+6) !switches + 0 + 15 switches: 5 bits needed
#else
#define MAX_DRSWITCH (MAX_PSWITCH+NUM_CSW/2) // 15(9+6) !switches + 0 + 15 switches: 5 bits needed
#endif
#define NUM_STICKS 4
#define NUM_POTS 3

View file

@ -78,10 +78,12 @@ static void init_main_ppm( uint32_t period, uint32_t out_enable )
pwmptr = PWM ;
// PWM3 for PPM output
pwmptr->PWM_CH_NUM[3].PWM_CMR = 0x0000000B ; // CLKA
if (g_model.pulsePol)
pwmptr->PWM_CH_NUM[3].PWM_CMR |= 0x00000200 ; // CPOL
pwmptr->PWM_CH_NUM[3].PWM_CPDR = period ; // Period in half uS
pwmptr->PWM_CH_NUM[3].PWM_CPDRUPD = period ; // Period in half uS
pwmptr->PWM_CH_NUM[3].PWM_CDTY = 600 ; // Duty in half uS
pwmptr->PWM_CH_NUM[3].PWM_CDTYUPD = 600 ; // Duty in half uS
pwmptr->PWM_CH_NUM[3].PWM_CDTY = g_model.ppmDelay*100+600; // Duty in half uS
pwmptr->PWM_CH_NUM[3].PWM_CDTYUPD = g_model.ppmDelay*100+600; // Duty in half uS
pwmptr->PWM_ENA = PWM_ENA_CHID3 ; // Enable channel 3
NVIC_EnableIRQ(PWM_IRQn) ;
@ -151,6 +153,10 @@ void setupPulsesPPM() // Don't enable interrupts through here
uint32_t p = 8 + g_model.ppmNCH * 2; //Channels *2
pwmptr->PWM_CH_NUM[3].PWM_CDTYUPD = (g_model.ppmDelay * 50 + 300) * 2; //Stoplen *2
if (g_model.pulsePol)
pwmptr->PWM_CH_NUM[3].PWM_CMR |= 0x00000200 ; // CPOL
else
pwmptr->PWM_CH_NUM[3].PWM_CMR &= ~0x00000200 ; // CPOL
uint16_t rest = 22500u * 2; //Minimum Framelen=22.5 ms
rest += (int16_t(g_model.ppmFrameLength)) * 1000;

View file

@ -228,6 +228,8 @@ void eeprom_read_block (void *pointer_ram,
const void *pointer_eeprom,
size_t size)
{
assert(size);
if (fp) {
memset(pointer_ram, 0, size);
if (fseek(fp, (long) pointer_eeprom, SEEK_SET)==-1) perror("error in seek");

View file

@ -340,7 +340,9 @@ void Open9xSim::refreshDiplay()
static FXuint keys2[]={KEY_F8, KEY_F7, KEY_F4, KEY_F3, KEY_F6, KEY_F5, KEY_F1, KEY_F2 };
#endif
#if defined(PCBARM)
PIOA->PIO_PDSR &= ~(0x00800000 | 0x01000000 | 0x00000002 | 0x00000001 );
PIOA->PIO_PDSR |= (0x00800000 | 0x01000000 | 0x00000002 | 0x00000001);
PIOB->PIO_PDSR |= (0x00000010);
PIOC->PIO_PDSR |= (0x10000000 | 0x00000400 | 0x00000200);
#elif defined(PCBV4)
pinj = 0;
#else

View file

@ -46,8 +46,8 @@
#define TR_RETA123 "RETA123"
#endif
#define LEN_VPROTOS "\005"
#define TR_VPROTOS "PPM\0 ""PXX\0 ""DSM2\0""PPM16""FUT\0 "
#define LEN_VPROTOS "\006"
#define TR_VPROTOS "PPM\0 ""PXX\0 ""DSM2\0 ""PPM16\0""FUT\0 ""PPMsim"
#define LEN_POSNEG "\003"
#define TR_POSNEG "POS""NEG"
@ -64,7 +64,7 @@
#else
#define TR_EXPLABEL_FP
#endif
#define TR_EXPLABELS "Weight""Expo ""Curve " TR_EXPLABEL_FP "Swtch ""When "" " // TODO remove all the trailing spaces
#define TR_EXPLABELS "Weight""Expo ""Curve " TR_EXPLABEL_FP "Swtch ""Side "" " // TODO remove all the trailing spaces
#define LEN_VMLTPX "\010"
#define TR_VMLTPX "Add ""Multiply""Replace "
@ -115,14 +115,16 @@
#define LEN_VTELEMCHNS "\004"
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Acc\0""Time"
#define LEN_VTELEMUNIT "\003"
#ifdef IMPERIAL_UNITS
#define LENGTH_UNIT "ft\0"
#define SPEED_UNIT "kts"
#else
#define LENGTH_UNIT "m\0 "
#define SPEED_UNIT "kmh"
#endif
#define TR_VTELEMUNIT "v\0 ""A\0 ""-\0 ""kts""kmh""M/h" LENGTH_UNIT "@\0 ""%\0 ""mA\0"
#define LEN_VTELEMUNIT "\003"
#define TR_VTELEMUNIT "v\0 ""A\0 ""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0"
#define STR_V (STR_VTELEMUNIT+1)
#define STR_A (STR_VTELEMUNIT+4)
@ -158,7 +160,11 @@
#define TR_RE1RE2 "RE1""RE2"
#define LEN_VSWITCHES "\003"
#if defined(PCBARM)
#define TR_VSWITCHES "THR""RUD""ELE""ID0""ID1""ID2""AIL""GEA""TRN""SW1""SW2""SW3""SW4""SW5""SW6""SW7""SW8""SW9""SWA""SWB""SWC""SWD""SWE""SWF""SWG""SWH""SWI""SWJ""SWK""SWL""SWM""SWN""SWO""SWP""SWQ""SWR""SWS""SWT""SWU""SWV""SWW"
#else
#define TR_VSWITCHES "THR""RUD""ELE""ID0""ID1""ID2""AIL""GEA""TRN""SW1""SW2""SW3""SW4""SW5""SW6""SW7""SW8""SW9""SWA""SWB""SWC"
#endif
#define LEN_VSRCRAW "\004"
#if defined(PCBV4)

View file

@ -46,8 +46,8 @@
#define TR_RETA123 "RETA123"
#endif
#define LEN_VPROTOS "\005"
#define TR_VPROTOS "PPM\0 ""PXX\0 ""DSM2\0""PPM16""FUT\0 "
#define LEN_VPROTOS "\006"
#define TR_VPROTOS "PPM\0 ""PXX\0 ""DSM2\0 ""PPM16\0""FUT\0 PPMsim"
#define LEN_POSNEG "\003"
#define TR_POSNEG "POS""NEG"
@ -115,9 +115,16 @@
#define LEN_VTELEMCHNS "\004"
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Acc\0""Time"
#define LEN_VTELEMUNIT "\003"
#define TR_VTELEMUNIT "v\0 ""A\0 ""-\0 ""kts""kmh""M/h""m\0 ""@\0 ""%\0 ""mA\0""ft\0"
#ifdef 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 ""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0"
#define STR_V (STR_VTELEMUNIT+1)
#define STR_A (STR_VTELEMUNIT+4)
@ -156,7 +163,11 @@
#define TR_RE1RE2 "RE1""RE2"
#define LEN_VSWITCHES "\003"
#if defined(PCBARM)
#define TR_VSWITCHES "GAZ""DIR""PRF""ID0""ID1""ID2""AIL""GEA""TRN""SW1""SW2""SW3""SW4""SW5""SW6""SW7""SW8""SW9""SWA""SWB""SWC""SWD""SWE""SWF""SWG""SWH""SWI""SWJ""SWK""SWL""SWM""SWN""SWO""SWP""SWQ""SWR""SWS""SWT""SWU""SWV""SWW"
#else
#define TR_VSWITCHES "GAZ""DIR""PRF""ID0""ID1""ID2""AIL""GEA""TRN""SW1""SW2""SW3""SW4""SW5""SW6""SW7""SW8""SW9""SWA""SWB""SWC"
#endif
#define LEN_VSRCRAW "\004"
#if defined(PCBV4)

View file

@ -46,8 +46,8 @@
#define TR_RETA123 "RETA123"
#endif
#define LEN_VPROTOS "\005"
#define TR_VPROTOS "PPM\0 ""PXX\0 ""DSM2\0""PPM16""FUT\0 "
#define LEN_VPROTOS "\006"
#define TR_VPROTOS "PPM\0 ""PXX\0 ""DSM2\0 ""PPM16\0""FUT\0 PPMsim"
#define LEN_POSNEG "\003"
#define TR_POSNEG "POS""NEG"
@ -115,8 +115,16 @@
#define LEN_VTELEMCHNS "\004"
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Tank""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Acc\0""Tid\0"
#ifdef 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 ""-\0 ""kts""kmh""M/h""m\0 ""@\0 ""%\0 ""mA\0""ft\0"
#define TR_VTELEMUNIT "v\0 ""A\0 ""-\0 " SPEED_UNIT LENGTH_UNIT "@\0 ""%\0 ""mA\0"
#define STR_V (STR_VTELEMUNIT+1)
#define STR_A (STR_VTELEMUNIT+4)
@ -155,7 +163,11 @@
#define TR_RE1RE2 "RE1""RE2"
#define LEN_VSWITCHES "\003"
#if defined(PCBARM)
#define TR_VSWITCHES "GAS""SID""H\205J""ID0""ID1""ID2""SKE""LAN""TRN""BR1""BR2""BR3""BR4""BR5""BR6""BR7""BR8""BR9""BRA""BRB""BRC""BRD""BRE""BRF""BRG""BRH""BRI""BRJ""BRK""BRL""BRM""BRN""BRO""BRP""BRQ""BRR""BRS""BRT""BRU""BRV""BRW"
#else
#define TR_VSWITCHES "GAS""SID""H\205J""ID0""ID1""ID2""SKE""LAN""TRN""BR1""BR2""BR3""BR4""BR5""BR6""BR7""BR8""BR9""BRA""BRB""BRC"
#endif
#define LEN_VSRCRAW "\004"
#if defined(PCBV4)