[all] BEEPER renamed to BUZZER, PHASES renamed to MODES
[Taranis] PPM Center Adjustable [stock] Issue 225 fixed [all] Throttle Inverted is now a Model parameter [Taranis] Issue 15 fixed (when >5 GVARS) [Gruvin9x] Issue 16 almost fixed
This commit is contained in:
+24
-20
@@ -201,9 +201,9 @@ EEPROM_PROGRESS_BAR = NO
|
||||
# Values = YES, NO
|
||||
DEBUG = NO
|
||||
|
||||
# Flight Phases
|
||||
# Flight Modes
|
||||
# Values = YES, NO
|
||||
FLIGHT_PHASES = YES
|
||||
FLIGHT_MODES = YES
|
||||
|
||||
# Curves
|
||||
# Values = YES, NO
|
||||
@@ -268,8 +268,8 @@ ifeq ($(PCB), $(filter $(PCB), STD 9X 9XR))
|
||||
CPPDEFS += -DAUDIO
|
||||
CPPSRC += audio_avr.cpp
|
||||
else
|
||||
CPPDEFS += -DBEEPER
|
||||
CPPSRC += beeper.cpp
|
||||
CPPDEFS += -DBUZZER
|
||||
CPPSRC += buzzer.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(VOICE), YES)
|
||||
@@ -280,9 +280,11 @@ ifeq ($(PCB), $(filter $(PCB), STD 9X 9XR))
|
||||
ifeq ($(PWM_BACKLIGHT), YES)
|
||||
ifeq ($(VOICE), YES)
|
||||
$(error Sorry, PWM_BACKLIGHT doesnt work on stock board with VOICE mod)
|
||||
else
|
||||
CPPDEFS += -DPWM_BACKLIGHT
|
||||
endif
|
||||
ifeq ($(AUDIO), YES)
|
||||
$(error Sorry, PWM_BACKLIGHT doesnt work on stock board with AUDIO mod)
|
||||
endif
|
||||
CPPDEFS += -DPWM_BACKLIGHT
|
||||
endif
|
||||
|
||||
ifeq ($(HAPTIC), YES)
|
||||
@@ -321,8 +323,8 @@ ifeq ($(PCB), $(filter $(PCB), STD128 9X128 9XR128))
|
||||
CPPDEFS += -DAUDIO
|
||||
CPPSRC += audio_avr.cpp
|
||||
else
|
||||
CPPDEFS += -DBEEPER
|
||||
CPPSRC += beeper.cpp
|
||||
CPPDEFS += -DBUZZER
|
||||
CPPSRC += buzzer.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(VOICE), YES)
|
||||
@@ -333,9 +335,11 @@ ifeq ($(PCB), $(filter $(PCB), STD128 9X128 9XR128))
|
||||
ifeq ($(PWM_BACKLIGHT), YES)
|
||||
ifeq ($(VOICE), YES)
|
||||
$(error Sorry, PWM_BACKLIGHT doesnt work on stock board with VOICE mod)
|
||||
else
|
||||
CPPDEFS += -DPWM_BACKLIGHT
|
||||
endif
|
||||
ifeq ($(AUDIO), YES)
|
||||
$(error Sorry, PWM_BACKLIGHT doesnt work on stock board with AUDIO mod)
|
||||
endif
|
||||
CPPDEFS += -DPWM_BACKLIGHT
|
||||
endif
|
||||
|
||||
ifeq ($(HAPTIC), YES)
|
||||
@@ -361,7 +365,7 @@ ifeq ($(PCB), GRUVIN9X)
|
||||
OPT = 2
|
||||
CPPDEFS += -DF_CPU=$(F_CPU)UL -DPCBGRUVIN9X -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC
|
||||
SDCARD = NO
|
||||
BEEPER = NO
|
||||
BUZZER = NO
|
||||
THR_TRACE = YES
|
||||
EXTRAINCDIRS = gruvin9x stock FatFs FatFs/option
|
||||
BOARDSRC = gruvin9x/board_gruvin9x.cpp
|
||||
@@ -376,9 +380,9 @@ ifeq ($(PCB), GRUVIN9X)
|
||||
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c gruvin9x/diskio.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(BEEPER), YES)
|
||||
CPPDEFS += -DBEEPER
|
||||
CPPSRC += beeper.cpp
|
||||
ifeq ($(BUZZER), YES)
|
||||
CPPDEFS += -DBUZZER
|
||||
CPPSRC += buzzer.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(VOICE), YES)
|
||||
@@ -443,7 +447,7 @@ ifeq ($(PCB), SKY9X)
|
||||
MCU = cortex-m3
|
||||
OPT = 2
|
||||
SDCARD = YES
|
||||
BEEPER = NO
|
||||
BUZZER = NO
|
||||
THR_TRACE = YES
|
||||
CPPDEFS += -DPCBSKY9X -DCPUARM -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC -DPXX -DDSM2 -DDSM2_PPM -DROTARY_ENCODERS=1
|
||||
EXTRAINCDIRS = sky9x CoOS/kernel CoOS/portable
|
||||
@@ -466,9 +470,9 @@ ifeq ($(PCB), SKY9X)
|
||||
EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c sky9x/diskio.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(BEEPER), YES)
|
||||
CPPDEFS += -DBEEPER
|
||||
CPPSRC += beeper.cpp
|
||||
ifeq ($(BUZZER), YES)
|
||||
CPPDEFS += -DBUZZER
|
||||
CPPSRC += buzzer.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(RTCLOCK), YES)
|
||||
@@ -665,8 +669,8 @@ ifeq ($(THR_TRACE), YES)
|
||||
CPPDEFS += -DTHRTRACE
|
||||
endif
|
||||
|
||||
ifeq ($(FLIGHT_PHASES), YES)
|
||||
CPPDEFS += -DFLIGHT_PHASES
|
||||
ifeq ($(FLIGHT_MODES), YES)
|
||||
CPPDEFS += -DFLIGHT_MODES
|
||||
endif
|
||||
|
||||
ifeq ($(CURVES), YES)
|
||||
|
||||
+6
-6
@@ -552,11 +552,11 @@ void AudioQueue::wakeup()
|
||||
inline uint8_t getToneLength(uint8_t tLen)
|
||||
{
|
||||
uint8_t result = tLen; // default
|
||||
if (g_eeGeneral.beeperLength < 0) {
|
||||
result /= (1-g_eeGeneral.beeperLength);
|
||||
if (g_eeGeneral.beepLength < 0) {
|
||||
result /= (1-g_eeGeneral.beepLength);
|
||||
}
|
||||
if (g_eeGeneral.beeperLength > 0) {
|
||||
result *= (1+g_eeGeneral.beeperLength);
|
||||
if (g_eeGeneral.beepLength > 0) {
|
||||
result *= (1+g_eeGeneral.beepLength);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -711,7 +711,7 @@ void audioEvent(uint8_t e, uint8_t f)
|
||||
#endif
|
||||
|
||||
if (e <= AU_ERROR || e >= AU_WARNING1) {
|
||||
#if defined(BEEPER)
|
||||
#if defined(BUZZER)
|
||||
beep();
|
||||
#endif
|
||||
|
||||
@@ -721,7 +721,7 @@ void audioEvent(uint8_t e, uint8_t f)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_eeGeneral.beeperMode>0 || (g_eeGeneral.beeperMode==0 && e>=AU_TRIM_MOVE) || (g_eeGeneral.beeperMode>=-1 && e<=AU_ERROR)) {
|
||||
if (g_eeGeneral.beepMode>0 || (g_eeGeneral.beepMode==0 && e>=AU_TRIM_MOVE) || (g_eeGeneral.beepMode>=-1 && e<=AU_ERROR)) {
|
||||
#if defined(SDCARD)
|
||||
if (e < AU_FRSKY_FIRST && isAudioFileAvailable(e, filename)) {
|
||||
audioQueue.playFile(filename);
|
||||
|
||||
+5
-9
@@ -107,11 +107,11 @@ void audioQueue::heartbeat()
|
||||
inline uint8_t audioQueue::getToneLength(uint8_t tLen)
|
||||
{
|
||||
uint8_t result = tLen; // default
|
||||
if (g_eeGeneral.beeperLength < 0) {
|
||||
result /= (1-g_eeGeneral.beeperLength);
|
||||
if (g_eeGeneral.beepLength < 0) {
|
||||
result /= (1-g_eeGeneral.beepLength);
|
||||
}
|
||||
if (g_eeGeneral.beeperLength > 0) {
|
||||
result *= (1+g_eeGeneral.beeperLength);
|
||||
if (g_eeGeneral.beepLength > 0) {
|
||||
result *= (1+g_eeGeneral.beepLength);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -168,17 +168,13 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
#endif
|
||||
|
||||
if (e <= AU_ERROR || e >= AU_WARNING1) {
|
||||
#if defined(BEEPER)
|
||||
beep();
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.alarmsFlash) {
|
||||
if (lightOffCounter < FLASH_DURATION)
|
||||
lightOffCounter = FLASH_DURATION;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_eeGeneral.beeperMode>0 || (g_eeGeneral.beeperMode==0 && e>=AU_TRIM_MOVE) || (g_eeGeneral.beeperMode>=-1 && e<=AU_ERROR)) {
|
||||
if (g_eeGeneral.beepMode>0 || (g_eeGeneral.beepMode==0 && e>=AU_TRIM_MOVE) || (g_eeGeneral.beepMode>=-1 && e<=AU_ERROR)) {
|
||||
if (e < AU_FRSKY_FIRST || empty()) {
|
||||
// TODO when VOICE enable some cases here are not needed!
|
||||
switch (e) {
|
||||
|
||||
+28
-16
@@ -107,17 +107,22 @@ class audioQueue
|
||||
|
||||
};
|
||||
|
||||
|
||||
extern audioQueue audio;
|
||||
|
||||
void audioDefevent(uint8_t e);
|
||||
|
||||
#define AUDIO_KEYPAD_UP() audioDefevent(AU_KEYPAD_UP)
|
||||
#define AUDIO_KEYPAD_DOWN() audioDefevent(AU_KEYPAD_DOWN)
|
||||
#define AUDIO_MENUS() audioDefevent(AU_MENUS)
|
||||
#define AUDIO_WARNING1() audioDefevent(AU_WARNING1)
|
||||
#define AUDIO_WARNING2() audioDefevent(AU_WARNING2)
|
||||
#define AUDIO_ERROR() audioDefevent(AU_ERROR)
|
||||
#if defined(BUZZER)
|
||||
#define AUDIO_BUZZER(evt, bz) do { audioDefevent(evt); beep(bz); } while(0)
|
||||
#else
|
||||
#define AUDIO_BUZZER(evt, bz) audioDefevent(evt)
|
||||
#endif
|
||||
|
||||
#define AUDIO_KEYPAD_UP() AUDIO_BUZZER(AU_KEYPAD_UP, 0)
|
||||
#define AUDIO_KEYPAD_DOWN() AUDIO_BUZZER(AU_KEYPAD_DOWN, 0)
|
||||
#define AUDIO_MENUS() AUDIO_BUZZER(AU_MENUS, 0)
|
||||
#define AUDIO_WARNING1() AUDIO_BUZZER(AU_WARNING1, 3)
|
||||
#define AUDIO_WARNING2() AUDIO_BUZZER(AU_WARNING2, 2)
|
||||
#define AUDIO_ERROR() AUDIO_BUZZER(AU_ERROR, 4)
|
||||
|
||||
#if defined(VOICE)
|
||||
#define AUDIO_TADA() PUSH_SYSTEM_PROMPT(AU_TADA)
|
||||
@@ -131,22 +136,29 @@ void audioDefevent(uint8_t e);
|
||||
#define AUDIO_TIMER_LT3(x) PUSH_SYSTEM_PROMPT(AU_TIMER_LT3)
|
||||
#else
|
||||
#define AUDIO_TADA()
|
||||
#define AUDIO_TX_BATTERY_LOW() audioDefevent(AU_TX_BATTERY_LOW)
|
||||
#define AUDIO_INACTIVITY() audioDefevent(AU_INACTIVITY)
|
||||
#define AUDIO_ERROR_MESSAGE(e) audioDefevent(AU_ERROR)
|
||||
#define AUDIO_TIMER_MINUTE(t) audioDefevent(AU_WARNING1)
|
||||
#define AUDIO_TX_BATTERY_LOW() AUDIO_BUZZER(AU_TX_BATTERY_LOW, 4)
|
||||
#define AUDIO_INACTIVITY() AUDIO_BUZZER(AU_INACTIVITY, 3)
|
||||
#define AUDIO_ERROR_MESSAGE(e) AUDIO_BUZZER(AU_ERROR, 4)
|
||||
#define AUDIO_TIMER_MINUTE(t) AUDIO_BUZZER(AU_WARNING1, 2)
|
||||
#define AUDIO_TIMER_30() audioDefevent(AU_TIMER_30)
|
||||
#define AUDIO_TIMER_20() audioDefevent(AU_TIMER_20)
|
||||
#define AUDIO_TIMER_10() audioDefevent(AU_TIMER_10)
|
||||
#define AUDIO_TIMER_LT3(x) audioDefevent(AU_TIMER_LT3)
|
||||
#define AUDIO_TIMER_10() AUDIO_BUZZER(AU_TIMER_10, 2)
|
||||
#define AUDIO_TIMER_LT3(x) AUDIO_BUZZER(AU_TIMER_LT3, 2)
|
||||
#endif
|
||||
|
||||
#define AUDIO_MIX_WARNING(x) audioDefevent(AU_MIX_WARNING_1+x-1)
|
||||
#define AUDIO_POT_STICK_MIDDLE() audioDefevent(AU_POT_STICK_MIDDLE)
|
||||
/* TODO BUZZER mode for these events
|
||||
#define AUDIO_TRIM(event, f) { if (!IS_KEY_FIRST(event)) warble = true; beep(1); }
|
||||
#define AUDIO_TRIM_MIDDLE(f) beep(2)
|
||||
#define AUDIO_TIMER_30() { beepAgain=2; beep(2); }
|
||||
#define AUDIO_TIMER_20() { beepAgain=1; beep(2); }
|
||||
*/
|
||||
|
||||
#define AUDIO_MIX_WARNING(x) AUDIO_BUZZER(AU_MIX_WARNING_1+x-1, 1)
|
||||
#define AUDIO_POT_STICK_MIDDLE() AUDIO_BUZZER(AU_POT_STICK_MIDDLE, 2)
|
||||
#define AUDIO_VARIO_UP() audioDefevent(AU_KEYPAD_UP)
|
||||
#define AUDIO_VARIO_DOWN() audioDefevent(AU_KEYPAD_DOWN)
|
||||
#define AUDIO_TRIM_MIDDLE(f) audio.event(AU_TRIM_MIDDLE, f)
|
||||
#define AUDIO_TRIM_END(f) AUDIO_TRIM_MIDDLE(f)
|
||||
#define AUDIO_TRIM_END(f) AUDIO_BUZZER(f, 2)
|
||||
#define AUDIO_TRIM(event, f) audio.event(AU_TRIM_MOVE, f)
|
||||
#define AUDIO_PLAY(p) audio.event(p)
|
||||
#define AUDIO_VARIO(f, t) audio.play(f, t, 0, PLAY_BACKGROUND)
|
||||
|
||||
@@ -43,15 +43,6 @@ uint8_t beepOn = false;
|
||||
bool warble = false;
|
||||
bool warbleC;
|
||||
|
||||
#if defined(AUDIO)
|
||||
static const pm_uint8_t beepTab[] PROGMEM = {
|
||||
60, 80, 100, 120, 150,
|
||||
};
|
||||
void beep()
|
||||
{
|
||||
_beep(pgm_read_byte(beepTab+(2+g_eeGeneral.beeperLength)));
|
||||
}
|
||||
#else
|
||||
// The various "beep" tone lengths
|
||||
static const pm_uint8_t beepTab[] PROGMEM = {
|
||||
// key, trim, warn2, warn1, error
|
||||
@@ -64,14 +55,16 @@ static const pm_uint8_t beepTab[] PROGMEM = {
|
||||
|
||||
void beep(uint8_t val)
|
||||
{
|
||||
#if defined(HAPTIC)
|
||||
#if defined(HAPTIC) && !defined(AUDIO)
|
||||
haptic.event(val==0 ? AU_KEYPAD_UP : (val==4 ? AU_ERROR : AU_TIMER_10+beepAgain));
|
||||
#endif
|
||||
|
||||
#if !defined(AUDIO)
|
||||
if (g_eeGeneral.alarmsFlash && val>1 && lightOffCounter<FLASH_DURATION) lightOffCounter = FLASH_DURATION;
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.beeperMode>0 || (g_eeGeneral.beeperMode==0 && val!=0) || (g_eeGeneral.beeperMode==-1 && val>=3)) {
|
||||
_beep(pgm_read_byte(beepTab+5*(2+g_eeGeneral.beeperLength)+val));
|
||||
if (g_eeGeneral.beepMode>0 || (g_eeGeneral.beepMode==0 && val!=0) || (g_eeGeneral.beepMode==-1 && val>=3)) {
|
||||
_beep(pgm_read_byte(beepTab+5*(2+g_eeGeneral.beepLength)+val));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BEEPER_H
|
||||
#define BEEPER_H
|
||||
#ifndef BUZZER_H
|
||||
#define BUZZER_H
|
||||
|
||||
extern uint8_t g_beepCnt;
|
||||
extern uint8_t beepAgain;
|
||||
@@ -59,11 +59,7 @@ inline void _beep(uint8_t b)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AUDIO)
|
||||
void beep();
|
||||
#else
|
||||
void beep(uint8_t val);
|
||||
#endif
|
||||
|
||||
#if !defined(AUDIO)
|
||||
#if defined(VOICE)
|
||||
+33
-2
@@ -46,9 +46,13 @@ void doMixerCalculations();
|
||||
memset(channelOutputs, 0, sizeof(channelOutputs)); \
|
||||
memset(ex_chans, 0, sizeof(ex_chans))
|
||||
|
||||
uint16_t anaInValues[NUM_STICKS+NUM_POTS] = { 0 };
|
||||
uint16_t anaIn(uint8_t chan)
|
||||
{
|
||||
return 0;
|
||||
if (chan < NUM_STICKS+NUM_POTS)
|
||||
return anaInValues[chan];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
TEST(Trims, greaterTrimLink)
|
||||
@@ -299,7 +303,7 @@ TEST(getSwitch, nullSW)
|
||||
EXPECT_EQ(getSwitch(0, 0), false);
|
||||
}
|
||||
|
||||
TEST(Phases, nullFadeOut_posFadeIn)
|
||||
TEST(FlightModes, nullFadeOut_posFadeIn)
|
||||
{
|
||||
MODEL_RESET();
|
||||
g_model.phaseData[1].swtch = SWSRC_ID1;
|
||||
@@ -309,6 +313,33 @@ TEST(Phases, nullFadeOut_posFadeIn)
|
||||
perMain();
|
||||
}
|
||||
|
||||
TEST(Mixer, R2029Comment)
|
||||
{
|
||||
MODEL_RESET();
|
||||
MIXER_RESET();
|
||||
g_model.mixData[0].destCh = 0;
|
||||
g_model.mixData[0].srcRaw = MIXSRC_CH2;
|
||||
g_model.mixData[0].swtch = -SWSRC_THR;
|
||||
g_model.mixData[0].weight = 100;
|
||||
g_model.mixData[1].destCh = 1;
|
||||
g_model.mixData[1].srcRaw = MIXSRC_Thr;
|
||||
g_model.mixData[1].swtch = SWSRC_THR;
|
||||
g_model.mixData[1].weight = 100;
|
||||
anaInValues[THR_STICK] = 1024;
|
||||
simuSetSwitch(0, 1);
|
||||
perOut(e_perout_mode_normal, 0);
|
||||
EXPECT_EQ(chans[0], 0);
|
||||
EXPECT_EQ(chans[1], 1024*256);
|
||||
simuSetSwitch(0, 0);
|
||||
perOut(e_perout_mode_normal, 0);
|
||||
EXPECT_EQ(chans[0], 0);
|
||||
EXPECT_EQ(chans[1], 0);
|
||||
simuSetSwitch(0, 1);
|
||||
perOut(e_perout_mode_normal, 0);
|
||||
EXPECT_EQ(chans[0], 0);
|
||||
EXPECT_EQ(chans[1], 1024*256);
|
||||
}
|
||||
|
||||
TEST(Mixer, Cascaded3Channels)
|
||||
{
|
||||
MODEL_RESET();
|
||||
|
||||
+1
-1
@@ -885,7 +885,7 @@ void putsSwitches(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
|
||||
lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att);
|
||||
}
|
||||
|
||||
#ifdef FLIGHT_PHASES
|
||||
#if defined(FLIGHT_MODES)
|
||||
void putsFlightPhase(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
|
||||
{
|
||||
if (idx==0) { lcd_putsiAtt(x, y, STR_MMMINV, 0, att); return; }
|
||||
|
||||
+15
-20
@@ -116,9 +116,9 @@ enum menuGeneralSetupItems {
|
||||
IF_RTCLOCK(ITEM_SETUP_TIME)
|
||||
IF_BATTGRAPH(ITEM_SETUP_BATT_RANGE)
|
||||
ITEM_SETUP_SOUND_LABEL,
|
||||
IF_AUDIO(ITEM_SETUP_AUDIO_MODE)
|
||||
IF_BEEPER(ITEM_SETUP_BEEPER_MODE)
|
||||
ITEM_SETUP_BEEPER_LENGTH,
|
||||
IF_AUDIO(ITEM_SETUP_BEEP_MODE)
|
||||
IF_BUZZER(ITEM_SETUP_BUZZER_MODE)
|
||||
ITEM_SETUP_BEEP_LENGTH,
|
||||
IF_AUDIO(ITEM_SETUP_SPEAKER_PITCH)
|
||||
IF_VOICE(ITEM_SETUP_SPEAKER_VOLUME)
|
||||
IF_HAPTIC(ITEM_SETUP_HAPTIC_LABEL)
|
||||
@@ -135,7 +135,6 @@ enum menuGeneralSetupItems {
|
||||
ITEM_SETUP_MEMORY_WARNING,
|
||||
ITEM_SETUP_ALARM_WARNING,
|
||||
IF_ROTARY_ENCODERS(ITEM_SETUP_RE_NAVIGATION)
|
||||
ITEM_SETUP_THROTTLE_REVERSED,
|
||||
ITEM_SETUP_BACKLIGHT_LABEL,
|
||||
ITEM_SETUP_BACKLIGHT_MODE,
|
||||
ITEM_SETUP_BACKLIGHT_DELAY,
|
||||
@@ -167,7 +166,7 @@ void menuGeneralSetup(uint8_t event)
|
||||
}
|
||||
#endif
|
||||
|
||||
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, IF_RTCLOCK(2) IF_RTCLOCK(2) IF_BATTGRAPH(1) LABEL(SOUND), IF_AUDIO(0) IF_BEEPER(0) 0, IF_AUDIO(0) IF_VOICE(0) IF_HAPTIC(LABEL(HAPTIC)) IF_HAPTIC(0) IF_HAPTIC(0) IF_HAPTIC(0) IF_PCBSKY9X(0) IF_9X(0) LABEL(ALARMS), 0, IF_PCBSKY9X(0) IF_PCBSKY9X(0) 0, 0, 0, IF_ROTARY_ENCODERS(0) 0, LABEL(BACKLIGHT), 0, 0, CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, IF_SPLASH(0) IF_FRSKY(0) IF_FRSKY(0) IF_PXX(0) IF_CPUARM(0) 0, LABEL(TX_MODE), CASE_PCBTARANIS(0) 1/*to force edit mode*/});
|
||||
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, IF_RTCLOCK(2) IF_RTCLOCK(2) IF_BATTGRAPH(1) LABEL(SOUND), IF_AUDIO(0) IF_BUZZER(0) 0, IF_AUDIO(0) IF_VOICE(0) IF_HAPTIC(LABEL(HAPTIC)) IF_HAPTIC(0) IF_HAPTIC(0) IF_HAPTIC(0) IF_PCBSKY9X(0) IF_9X(0) LABEL(ALARMS), 0, IF_PCBSKY9X(0) IF_PCBSKY9X(0) 0, 0, 0, IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, IF_SPLASH(0) IF_FRSKY(0) IF_FRSKY(0) IF_PXX(0) IF_CPUARM(0) 0, LABEL(TX_MODE), CASE_PCBTARANIS(0) 1/*to force edit mode*/});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
@@ -263,32 +262,32 @@ void menuGeneralSetup(uint8_t event)
|
||||
break;
|
||||
|
||||
#if defined(AUDIO)
|
||||
case ITEM_SETUP_AUDIO_MODE:
|
||||
g_eeGeneral.beeperMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_SPEAKER, STR_VBEEPMODE, g_eeGeneral.beeperMode, -2, 1, attr, event);
|
||||
case ITEM_SETUP_BEEP_MODE:
|
||||
g_eeGeneral.beepMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_SPEAKER, STR_VBEEPMODE, g_eeGeneral.beepMode, -2, 1, attr, event);
|
||||
#if defined(FRSKY)
|
||||
if (attr && checkIncDec_Ret) frskySendAlarms();
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if defined(BEEPER)
|
||||
case ITEM_SETUP_BEEPER_MODE:
|
||||
g_eeGeneral.alarmsBeep = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_BEEPER, STR_VBEEPMODE, g_eeGeneral.alarmsBeep, 0, 1, attr, event);
|
||||
#if defined(BUZZER)
|
||||
case ITEM_SETUP_BUZZER_MODE:
|
||||
g_eeGeneral.buzzerMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_BUZZER, STR_VBEEPMODE, g_eeGeneral.buzzerMode, -2, 1, attr, event);
|
||||
#if defined(FRSKY)
|
||||
if (attr && checkIncDec_Ret) frskySendAlarms();
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#else
|
||||
case ITEM_SETUP_BEEPER_MODE:
|
||||
g_eeGeneral.beeperMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_SPEAKER, STR_VBEEPMODE, g_eeGeneral.beeperMode, -2, 1, attr, event);
|
||||
case ITEM_SETUP_BUZZER_MODE:
|
||||
g_eeGeneral.beepMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_SPEAKER, STR_VBEEPMODE, g_eeGeneral.beepMode, -2, 1, attr, event);
|
||||
#if defined(FRSKY)
|
||||
if (attr && checkIncDec_Ret) frskySendAlarms();
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_SETUP_BEEPER_LENGTH:
|
||||
SLIDER_5POS(y, g_eeGeneral.beeperLength, STR_LENGTH, event, attr);
|
||||
case ITEM_SETUP_BEEP_LENGTH:
|
||||
SLIDER_5POS(y, g_eeGeneral.beepLength, STR_LENGTH, event, attr);
|
||||
break;
|
||||
|
||||
#if defined(AUDIO)
|
||||
@@ -421,18 +420,14 @@ void menuGeneralSetup(uint8_t event)
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_SETUP_THROTTLE_REVERSED:
|
||||
g_eeGeneral.throttleReversed = onoffMenuItem(g_eeGeneral.throttleReversed, RADIO_SETUP_2ND_COLUMN, y, STR_THROTTLEREVERSE, attr, event ) ;
|
||||
case ITEM_SETUP_BACKLIGHT_LABEL:
|
||||
lcd_putsLeft(y, STR_BACKLIGHT_LABEL);
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_BACKLIGHT_MODE:
|
||||
g_eeGeneral.backlightMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_MODE, STR_VBLMODE, g_eeGeneral.backlightMode, e_backlight_mode_off, e_backlight_mode_on, attr, event);
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_BACKLIGHT_LABEL:
|
||||
lcd_putsLeft(y, STR_BACKLIGHT_LABEL);
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_FLASH_BEEP:
|
||||
g_eeGeneral.alarmsFlash = onoffMenuItem(g_eeGeneral.alarmsFlash, RADIO_SETUP_2ND_COLUMN, y, STR_ALARM, attr, event ) ;
|
||||
break;
|
||||
|
||||
+69
-30
@@ -42,9 +42,9 @@
|
||||
|
||||
enum EnumTabModel {
|
||||
e_ModelSelect,
|
||||
e_Model,
|
||||
e_ModelSetup,
|
||||
IF_HELI(e_Heli)
|
||||
IF_FLIGHT_PHASES(e_PhasesAll)
|
||||
IF_FLIGHT_MODES(e_FlightModesAll)
|
||||
e_ExposAll,
|
||||
e_MixAll,
|
||||
e_Limits,
|
||||
@@ -61,7 +61,7 @@ enum EnumTabModel {
|
||||
void menuModelSelect(uint8_t event);
|
||||
void menuModelSetup(uint8_t event);
|
||||
void menuModelHeli(uint8_t event);
|
||||
void menuModelPhasesAll(uint8_t event);
|
||||
void menuModelFlightModesAll(uint8_t event);
|
||||
void menuModelExposAll(uint8_t event);
|
||||
void menuModelMixAll(uint8_t event);
|
||||
void menuModelLimits(uint8_t event);
|
||||
@@ -78,12 +78,12 @@ const MenuFuncP_PROGMEM menuTabModel[] PROGMEM = {
|
||||
menuModelSelect,
|
||||
menuModelSetup,
|
||||
IF_HELI(menuModelHeli)
|
||||
IF_FLIGHT_PHASES(menuModelPhasesAll)
|
||||
IF_FLIGHT_MODES(menuModelFlightModesAll)
|
||||
menuModelExposAll,
|
||||
menuModelMixAll,
|
||||
menuModelLimits,
|
||||
IF_CURVES(menuModelCurvesAll)
|
||||
#if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_PHASES)
|
||||
#if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_MODES)
|
||||
IF_GVARS(menuModelGVars)
|
||||
#endif
|
||||
menuModelCustomSwitches,
|
||||
@@ -322,6 +322,12 @@ void menuModelSelect(uint8_t event)
|
||||
|
||||
if (!check_submenu_simple(_event_, MAX_MODELS-1)) return;
|
||||
|
||||
#if defined(NAVIGATION_POT2)
|
||||
if (event==0 && p2valdiff<0) {
|
||||
event = EVT_KEY_FIRST(KEY_RIGHT);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (s_editMode > 0) s_editMode = 0;
|
||||
|
||||
#if !defined(CPUARM)
|
||||
@@ -716,6 +722,7 @@ enum menuModelSetupItems {
|
||||
ITEM_MODEL_EXTENDED_LIMITS,
|
||||
ITEM_MODEL_EXTENDED_TRIMS,
|
||||
ITEM_MODEL_TRIM_INC,
|
||||
ITEM_MODEL_THROTTLE_REVERSED,
|
||||
ITEM_MODEL_THROTTLE_TRACE,
|
||||
ITEM_MODEL_THROTTLE_TRIM,
|
||||
ITEM_MODEL_THROTTLE_WARNING,
|
||||
@@ -781,11 +788,15 @@ void menuModelSetup(uint8_t event)
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
bool CURSOR_ON_CELL = (m_posHorz >= 0);
|
||||
MENU(STR_MENUSETUP, menuTabModel, e_Model, 1+ITEM_MODEL_SETUP_MAX, { 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 0, 0, 0, 0, 0, 0, NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 2, 2, g_model.failsafeMode==FAILSAFE_CUSTOM ? (uint8_t)1 : (uint8_t)0});
|
||||
MENU(STR_MENUSETUP, menuTabModel, e_ModelSetup, 1+ITEM_MODEL_SETUP_MAX, { 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 2, 2, g_model.failsafeMode==FAILSAFE_CUSTOM ? (uint8_t)1 : (uint8_t)0});
|
||||
#elif defined(CPUM64)
|
||||
#define CURSOR_ON_CELL (true)
|
||||
uint8_t protocol = g_model.protocol;
|
||||
MENU(STR_MENUSETUP, menuTabModel, e_ModelSetup, ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX), { 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, IF_PCBSKY9X(1) 2 });
|
||||
#else
|
||||
#define CURSOR_ON_CELL (true)
|
||||
uint8_t protocol = g_model.protocol;
|
||||
MENU(STR_MENUSETUP, menuTabModel, e_Model, ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX), { 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 0, 0, 0, 0, 0, 0, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, IF_PCBSKY9X(1) 2 });
|
||||
MENU(STR_MENUSETUP, menuTabModel, e_ModelSetup, ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX), { 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, IF_PCBSKY9X(1) 2 });
|
||||
#endif
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
@@ -882,13 +893,28 @@ void menuModelSetup(uint8_t event)
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_EXTENDED_TRIMS:
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, attr, event);
|
||||
#if defined(CPUM64)
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, event);
|
||||
#else
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, m_posHorz<=0 ? attr : 0, event==EVT_KEY_BREAK(KEY_ENTER) ? event : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, PSTR("[Reset]"), m_posHorz>0 ? attr : 0);
|
||||
if (attr && m_posHorz>0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
s_editMode = 0;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
memclear(&g_model.phaseData[i], TRIMS_ARRAY_SIZE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_TRIM_INC:
|
||||
g_model.trimInc = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_TRIMINC, STR_VTRIMINC, g_model.trimInc, 0, 4, attr, event);
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_THROTTLE_REVERSED:
|
||||
g_model.throttleReversed = onoffMenuItem(g_model.throttleReversed, MODEL_SETUP_2ND_COLUMN, y, STR_THROTTLEREVERSE, attr, event ) ;
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_THROTTLE_TRACE:
|
||||
{
|
||||
lcd_putsLeft(y, STR_TTRACE);
|
||||
@@ -1249,17 +1275,17 @@ uint8_t editDelay(const uint8_t y, const uint8_t event, const uint8_t attr, cons
|
||||
#define EDIT_DELAY(x, y, event, attr, str, delay) editDelay(y, event, attr, str, delay)
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_PHASES)
|
||||
#if defined(FLIGHT_MODES)
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define PhasesType uint16_t
|
||||
#define FlightModesType uint16_t
|
||||
#else
|
||||
#define PhasesType uint8_t
|
||||
#define FlightModesType uint8_t
|
||||
#endif
|
||||
|
||||
PhasesType editPhases(uint8_t x, uint8_t y, uint8_t event, PhasesType value, uint8_t attr)
|
||||
FlightModesType editFlightModes(uint8_t x, uint8_t y, uint8_t event, FlightModesType value, uint8_t attr)
|
||||
{
|
||||
lcd_putsColumnLeft(x, y, STR_FPHASE);
|
||||
lcd_putsColumnLeft(x, y, STR_FLMODE);
|
||||
|
||||
uint8_t posHorz = m_posHorz;
|
||||
|
||||
@@ -1296,7 +1322,7 @@ PhasesType editPhases(uint8_t x, uint8_t y, uint8_t event, PhasesType value, uin
|
||||
|
||||
#if LCD_W >= 212
|
||||
|
||||
enum PhasesItems {
|
||||
enum FlightModesItems {
|
||||
ITEM_PHASES_NAME,
|
||||
ITEM_PHASES_SWITCH,
|
||||
ITEM_PHASES_TRIMS,
|
||||
@@ -1366,9 +1392,9 @@ void editPhaseTrims(uint8_t x, uint8_t y, uint8_t phase, uint8_t event, uint8_t
|
||||
}
|
||||
}
|
||||
|
||||
void menuModelPhasesAll(uint8_t event)
|
||||
void menuModelFlightModesAll(uint8_t event)
|
||||
{
|
||||
MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_PhasesAll, 1+MAX_PHASES+1, {0, NAVIGATION_LINE_BY_LINE|(ITEM_PHASES_LAST-2), NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, 0});
|
||||
MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_PHASES+1, {0, NAVIGATION_LINE_BY_LINE|(ITEM_PHASES_LAST-2), NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, 0});
|
||||
|
||||
int8_t sub = m_posVert - 1;
|
||||
|
||||
@@ -1618,9 +1644,9 @@ void menuModelPhaseOne(uint8_t event)
|
||||
#define TRIMS_OFS (FW/2)
|
||||
#endif
|
||||
|
||||
void menuModelPhasesAll(uint8_t event)
|
||||
void menuModelFlightModesAll(uint8_t event)
|
||||
{
|
||||
SIMPLE_MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_PhasesAll, 1+MAX_PHASES+1);
|
||||
SIMPLE_MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_PHASES+1);
|
||||
|
||||
int8_t sub = m_posVert - 1;
|
||||
|
||||
@@ -1690,7 +1716,7 @@ void menuModelPhasesAll(uint8_t event)
|
||||
|
||||
#endif // defined(PCBTARANIS)
|
||||
|
||||
#endif // defined(FLIGHT_PHASES)
|
||||
#endif // defined(FLIGHT_MODES)
|
||||
|
||||
#if defined(HELI)
|
||||
|
||||
@@ -2149,7 +2175,7 @@ enum ExposFields {
|
||||
EXPO_FIELD_WEIGHT,
|
||||
EXPO_FIELD_EXPO,
|
||||
IF_CURVES(EXPO_FIELD_CURVE)
|
||||
IF_FLIGHT_PHASES(EXPO_FIELD_FLIGHT_PHASE)
|
||||
IF_FLIGHT_MODES(EXPO_FIELD_FLIGHT_PHASE)
|
||||
EXPO_FIELD_SWITCH,
|
||||
EXPO_FIELD_SIDE,
|
||||
EXPO_FIELD_MAX
|
||||
@@ -2160,7 +2186,7 @@ void menuModelExpoOne(uint8_t event)
|
||||
ExpoData *ed = expoaddress(s_currIdx);
|
||||
putsMixerSource(7*FW+FW/2, 0, ed->chn+1, 0);
|
||||
|
||||
SUBMENU(STR_MENUDREXPO, EXPO_FIELD_MAX, {IF_CPUARM(0) 0, 0, IF_CURVES(0) IF_FLIGHT_PHASES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
SUBMENU(STR_MENUDREXPO, EXPO_FIELD_MAX, {IF_CPUARM(0) 0, 0, IF_CURVES(0) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
|
||||
int8_t sub = m_posVert;
|
||||
|
||||
@@ -2208,9 +2234,9 @@ void menuModelExpoOne(uint8_t event)
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#if defined(FLIGHT_PHASES)
|
||||
#if defined(FLIGHT_MODES)
|
||||
case EXPO_FIELD_FLIGHT_PHASE:
|
||||
ed->phases = editPhases(EXPO_ONE_2ND_COLUMN+3*FW-EXPO_ONE_FP_WIDTH, y, event, ed->phases, attr);
|
||||
ed->phases = editFlightModes(EXPO_ONE_2ND_COLUMN+3*FW-EXPO_ONE_FP_WIDTH, y, event, ed->phases, attr);
|
||||
break;
|
||||
#endif
|
||||
case EXPO_FIELD_SWITCH:
|
||||
@@ -2245,7 +2271,7 @@ enum MixFields {
|
||||
MIX_FIELD_OFFSET,
|
||||
MIX_FIELD_TRIM,
|
||||
IF_CURVES(MIX_FIELD_CURVE)
|
||||
IF_FLIGHT_PHASES(MIX_FIELD_FLIGHT_PHASE)
|
||||
IF_FLIGHT_MODES(MIX_FIELD_FLIGHT_PHASE)
|
||||
MIX_FIELD_SWITCH,
|
||||
MIX_FIELD_WARNING,
|
||||
MIX_FIELD_MLTPX,
|
||||
@@ -2284,11 +2310,11 @@ void menuModelMixOne(uint8_t event)
|
||||
#else
|
||||
if (m_posVert == MIX_FIELD_TRIM && md2->srcRaw > NUM_STICKS)
|
||||
#endif
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, 0, IF_CURVES(0) IF_FLIGHT_PHASES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/})
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, 0, IF_CURVES(0) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/})
|
||||
else
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, 1, IF_CURVES(1) IF_FLIGHT_PHASES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, 1, IF_CURVES(1) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
#else
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, 1, IF_CURVES(1) IF_FLIGHT_PHASES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, 1, IF_CURVES(1) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
#endif
|
||||
|
||||
#if MENU_COLUMNS > 1
|
||||
@@ -2404,9 +2430,9 @@ void menuModelMixOne(uint8_t event)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if defined(FLIGHT_PHASES)
|
||||
#if defined(FLIGHT_MODES)
|
||||
case MIX_FIELD_FLIGHT_PHASE:
|
||||
md2->phases = editPhases(COLUMN_X+MIXES_2ND_COLUMN, y, event, md2->phases, attr);
|
||||
md2->phases = editFlightModes(COLUMN_X+MIXES_2ND_COLUMN, y, event, md2->phases, attr);
|
||||
break;
|
||||
#endif
|
||||
case MIX_FIELD_SWITCH:
|
||||
@@ -3101,15 +3127,24 @@ void menuModelCurvesAll(uint8_t event)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_PHASES)
|
||||
#if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_MODES)
|
||||
void menuModelGVars(uint8_t event)
|
||||
{
|
||||
MENU(PSTR("GLOBAL VARIABLES"), menuTabModel, e_GVars, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
#if MAX_GVARS > 6
|
||||
for (uint8_t l=0; l<LCD_LINES-1; l++) {
|
||||
uint8_t i = l+s_pgOfs;
|
||||
uint8_t y = 1 + FH + l*FH;
|
||||
#elif MAX_GVARS == 6
|
||||
for (uint8_t i=0; i<MAX_GVARS; i++) {
|
||||
uint8_t y = 1 + 2*FH + i*FH;
|
||||
#else
|
||||
for (uint8_t i=0; i<MAX_GVARS; i++) {
|
||||
uint8_t y = 1 + 3*FH + i*FH;
|
||||
#endif
|
||||
|
||||
putsStrIdx(0, y, STR_GV, i+1, (sub==i && m_posHorz<0) ? INVERS : 0);
|
||||
|
||||
@@ -3117,7 +3152,11 @@ void menuModelGVars(uint8_t event)
|
||||
uint8_t attr = ((sub==i && m_posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
xcoord_t x = 12*FW + FWNUM + (j-1)*(2+3*FWNUM) - 1;
|
||||
|
||||
#if MAX_GVARS == 6
|
||||
if (i==0 && j!=9) putsStrIdx(x+2, FH+1, STR_FP, j, SMLSIZE);
|
||||
#elif MAX_GVARS <= 5
|
||||
if (i==0 && j!=9) putsStrIdx(x+2, 2*FH, STR_FP, j, SMLSIZE);
|
||||
#endif
|
||||
|
||||
switch(j)
|
||||
{
|
||||
|
||||
+11
-9
@@ -82,6 +82,10 @@ void displayScrollbar(xcoord_t x, uint8_t y, uint8_t h, uint16_t offset, uint16_
|
||||
int16_t p1valdiff;
|
||||
#endif
|
||||
|
||||
#if defined(NAVIGATION_POT2)
|
||||
int8_t p2valdiff;
|
||||
#endif
|
||||
|
||||
int8_t checkIncDec_Ret;
|
||||
int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, uint8_t i_flags)
|
||||
{
|
||||
@@ -296,10 +300,8 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t
|
||||
#ifdef NAVIGATION_POT2
|
||||
// check pot 2 - if changed -> scroll menu
|
||||
static int16_t p2valprev;
|
||||
int8_t scrollLR = (p2valprev-calibratedStick[4]) / SCROLL_TH;
|
||||
if (scrollLR) p2valprev = calibratedStick[4];
|
||||
#else
|
||||
#define scrollLR 0
|
||||
p2valdiff = (p2valprev-calibratedStick[4]) / SCROLL_TH;
|
||||
if (p2valdiff) p2valprev = calibratedStick[4];
|
||||
#endif
|
||||
|
||||
#ifdef NAVIGATION_POT3
|
||||
@@ -311,7 +313,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t
|
||||
#define scrollUD 0
|
||||
#endif
|
||||
|
||||
if (scrollLR || scrollUD || p1valdiff) backlightOn(); // on keypress turn the light on
|
||||
if (p2valdiff || scrollUD || p1valdiff) backlightOn(); // on keypress turn the light on
|
||||
|
||||
if (menuTab) {
|
||||
uint8_t attr = 0;
|
||||
@@ -345,8 +347,8 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t
|
||||
|
||||
int8_t cc = curr;
|
||||
|
||||
if (scrollLR) {
|
||||
cc = limit((int8_t)0, (int8_t)(cc - scrollLR), (int8_t)(menuTabSize-1));
|
||||
if (p2valdiff) {
|
||||
cc = limit((int8_t)0, (int8_t)(cc - p2valdiff), (int8_t)(menuTabSize-1));
|
||||
}
|
||||
|
||||
switch(event) {
|
||||
@@ -422,8 +424,8 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t
|
||||
l_posHorz = min((uint8_t)l_posHorz, MAXCOL(l_posVert));
|
||||
}
|
||||
|
||||
if (scrollLR && l_posVert>0) {
|
||||
l_posHorz = limit((int8_t)0, (int8_t)((uint8_t)l_posHorz - scrollLR), (int8_t)maxcol);
|
||||
if (p2valdiff && l_posVert>0) {
|
||||
l_posHorz = limit((int8_t)0, (int8_t)((uint8_t)l_posHorz - p2valdiff), (int8_t)maxcol);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +133,12 @@ void menuStatisticsDebug(uint8_t event);
|
||||
#define p1valdiff 0
|
||||
#endif
|
||||
|
||||
#if defined(NAVIGATION_POT2)
|
||||
extern int8_t p2valdiff;
|
||||
#else
|
||||
#define p2valdiff 0
|
||||
#endif
|
||||
|
||||
extern int8_t checkIncDec_Ret; // global helper vars
|
||||
|
||||
#define EDIT_SELECT_MENU -1
|
||||
|
||||
+17
-15
@@ -76,6 +76,7 @@ typedef char gvar_name_t[6];
|
||||
|
||||
#define RESERVE_RANGE_FOR_GVARS 10
|
||||
// even we do not spend space in EEPROM for 10 GVARS, we reserve the space inside the range of values, like offset, weight, etc.
|
||||
|
||||
#if defined(PCBSTD) && defined(GVARS)
|
||||
#define MAX_GVARS 5
|
||||
#define MODEL_GVARS_DATA gvar_t gvars[MAX_GVARS];
|
||||
@@ -195,28 +196,28 @@ PACK(typedef struct t_EEGeneral {
|
||||
int8_t vBatCalib;
|
||||
int8_t backlightMode;
|
||||
TrainerData trainer;
|
||||
uint8_t view; //index of subview in main scrren
|
||||
uint8_t spare1:3;
|
||||
int8_t beeperMode:2;
|
||||
uint8_t view; // index of view in main screen
|
||||
int8_t buzzerMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||
uint8_t spare1:1;
|
||||
int8_t beepMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||
uint8_t alarmsFlash:1;
|
||||
uint8_t disableMemoryWarning:1;
|
||||
uint8_t disableAlarmWarning:1;
|
||||
uint8_t stickMode:2;
|
||||
int8_t timezone:5;
|
||||
uint8_t alarmsBeep:1;
|
||||
uint8_t spare2:1;
|
||||
uint8_t inactivityTimer;
|
||||
uint8_t throttleReversed:1;
|
||||
uint8_t spare2:2;
|
||||
uint8_t spare3:3;
|
||||
SPLASH_MODE; /* 3bits */
|
||||
int8_t hapticMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||
uint8_t blOffBright:4;
|
||||
uint8_t blOnBright:4;
|
||||
uint8_t lightAutoOff;
|
||||
uint8_t templateSetup; //RETA order according to chout_ar array
|
||||
uint8_t templateSetup; // RETA order for receiver channels
|
||||
int8_t PPM_Multiplier;
|
||||
int8_t hapticLength;
|
||||
uint8_t reNavigation; // not used on STOCK board
|
||||
int8_t beeperLength:3;
|
||||
uint8_t reNavigation; // not used on STOCK board
|
||||
int8_t beepLength:3;
|
||||
uint8_t hapticStrength:3;
|
||||
uint8_t gpsFormat:1;
|
||||
uint8_t unexpectedShutdown:1;
|
||||
@@ -288,7 +289,6 @@ PACK(typedef struct t_LimitData {
|
||||
|
||||
}) LimitData;
|
||||
|
||||
|
||||
#define TRIM_OFF (1)
|
||||
#define TRIM_ON (0)
|
||||
#define TRIM_RUD (-1)
|
||||
@@ -825,14 +825,16 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
|
||||
#endif
|
||||
|
||||
#if defined(PCBSTD)
|
||||
#define TRIM_ARRAY int8_t trim[4]; int8_t trim_ext:8
|
||||
#define TRIMS_ARRAY int8_t trim[4]; int8_t trim_ext:8
|
||||
#define TRIMS_ARRAY_SIZE 5
|
||||
#else
|
||||
#define TRIM_ARRAY int16_t trim[4]
|
||||
#define TRIMS_ARRAY int16_t trim[4]
|
||||
#define TRIMS_ARRAY_SIZE 8
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
PACK(typedef struct t_PhaseData {
|
||||
TRIM_ARRAY;
|
||||
TRIMS_ARRAY;
|
||||
int8_t swtch; // swtch of phase[0] is not used
|
||||
char name[LEN_FP_NAME];
|
||||
uint8_t fadeIn;
|
||||
@@ -842,7 +844,7 @@ PACK(typedef struct t_PhaseData {
|
||||
}) PhaseData;
|
||||
#else
|
||||
PACK(typedef struct t_PhaseData {
|
||||
TRIM_ARRAY;
|
||||
TRIMS_ARRAY;
|
||||
int8_t swtch; // swtch of phase[0] is not used
|
||||
char name[LEN_FP_NAME];
|
||||
uint8_t fadeIn:4;
|
||||
@@ -1175,7 +1177,7 @@ PACK(typedef struct t_ModelData {
|
||||
uint8_t pulsePol:1;
|
||||
uint8_t extendedLimits:1;
|
||||
uint8_t extendedTrims:1;
|
||||
uint8_t spare1:1;
|
||||
uint8_t throttleReversed:1;
|
||||
int8_t ppmDelay;
|
||||
BeepANACenter beepANACenter; // 1<<0->A1.. 1<<6->A7
|
||||
MixData mixData[MAX_MIXERS];
|
||||
|
||||
+6
-6
@@ -1211,7 +1211,7 @@ int8_t getMovedSource()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FLIGHT_PHASES
|
||||
#if defined(FLIGHT_MODES)
|
||||
uint8_t getFlightPhase()
|
||||
{
|
||||
for (uint8_t i=1; i<MAX_PHASES; i++) {
|
||||
@@ -1578,7 +1578,7 @@ void checkTHR()
|
||||
#else
|
||||
getADC(); // if thr is down - do not display warning at all
|
||||
int16_t lowLim = g_eeGeneral.calibMid[thrchn];
|
||||
lowLim = (g_eeGeneral.throttleReversed ? - lowLim - g_eeGeneral.calibSpanPos[thrchn] : lowLim - g_eeGeneral.calibSpanNeg[thrchn]);
|
||||
lowLim = (g_model.throttleReversed ? - lowLim - g_eeGeneral.calibSpanPos[thrchn] : lowLim - g_eeGeneral.calibSpanNeg[thrchn]);
|
||||
lowLim += THRCHK_DEADBAND;
|
||||
#endif
|
||||
int16_t v = thrAnaIn(thrchn);
|
||||
@@ -1862,7 +1862,7 @@ uint16_t BandGap ;
|
||||
int16_t thrAnaIn(uint8_t chan)
|
||||
{
|
||||
int16_t v = anaIn(chan);
|
||||
return (g_eeGeneral.throttleReversed) ? -v : v;
|
||||
return (g_model.throttleReversed) ? -v : v;
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
@@ -2065,7 +2065,7 @@ FORCEINLINE void evalTrims()
|
||||
// do trim -> throttle trim if applicable
|
||||
int16_t trim = getTrimValue(phase, i);
|
||||
if (i==THR_STICK && g_model.thrTrim) {
|
||||
if (g_eeGeneral.throttleReversed)
|
||||
if (g_model.throttleReversed)
|
||||
trim = -trim;
|
||||
int16_t v = anas[i];
|
||||
int32_t vv = ((int32_t)trim-TRIM_MIN)*(RESX-v)>>(RESX_SHIFT+1);
|
||||
@@ -2123,7 +2123,7 @@ BeepANACenter evalSticks(uint8_t mode)
|
||||
v = -v;
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.throttleReversed && ch==THR_STICK)
|
||||
if (g_model.throttleReversed && ch==THR_STICK)
|
||||
v = -v;
|
||||
|
||||
#if defined(EXTRA_3POS)
|
||||
@@ -3660,7 +3660,7 @@ ISR(TIMER_10MS_VECT, ISR_NOBLOCK)
|
||||
AUDIO_HEARTBEAT();
|
||||
#endif
|
||||
|
||||
#if defined(BEEPER)
|
||||
#if defined(BUZZER)
|
||||
BUZZER_HEARTBEAT();
|
||||
#endif
|
||||
|
||||
|
||||
+12
-12
@@ -86,10 +86,10 @@
|
||||
#define IF_RTCLOCK(x)
|
||||
#endif
|
||||
|
||||
#if defined(BEEPER)
|
||||
#define IF_BEEPER(x) x,
|
||||
#if defined(BUZZER)
|
||||
#define IF_BUZZER(x) x,
|
||||
#else
|
||||
#define IF_BEEPER(x)
|
||||
#define IF_BUZZER(x)
|
||||
#endif
|
||||
|
||||
#if defined(AUDIO)
|
||||
@@ -164,10 +164,10 @@
|
||||
#define IF_TEMPLATES(x)
|
||||
#endif
|
||||
|
||||
#if defined(FLIGHT_PHASES)
|
||||
#define IF_FLIGHT_PHASES(x) x,
|
||||
#if defined(FLIGHT_MODES)
|
||||
#define IF_FLIGHT_MODES(x) x,
|
||||
#else
|
||||
#define IF_FLIGHT_PHASES(x)
|
||||
#define IF_FLIGHT_MODES(x)
|
||||
#endif
|
||||
|
||||
#if defined(CURVES)
|
||||
@@ -747,7 +747,7 @@ int8_t getMovedSwitch();
|
||||
int8_t getMovedSource();
|
||||
#endif
|
||||
|
||||
#ifdef FLIGHT_PHASES
|
||||
#if defined(FLIGHT_MODES)
|
||||
extern uint8_t getFlightPhase();
|
||||
#else
|
||||
#define getFlightPhase() 0
|
||||
@@ -1234,8 +1234,8 @@ enum AUDIO_SOUNDS {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(BEEPER)
|
||||
#include "beeper.h"
|
||||
#if defined(BUZZER)
|
||||
#include "buzzer.h"
|
||||
#endif
|
||||
|
||||
#if defined(PCBSTD) && defined(VOICE)
|
||||
@@ -1376,10 +1376,10 @@ void getGpsPilotPosition();
|
||||
void getGpsDistance();
|
||||
void varioWakeup();
|
||||
|
||||
#if defined(AUDIO) && defined(BEEPER)
|
||||
#define IS_SOUND_OFF() (!g_eeGeneral.alarmsBeep && g_eeGeneral.beeperMode == e_mode_quiet)
|
||||
#if defined(AUDIO) && defined(BUZZER)
|
||||
#define IS_SOUND_OFF() (g_eeGeneral.buzzerMode==e_mode_quiet && g_eeGeneral.beepMode==e_mode_quiet)
|
||||
#else
|
||||
#define IS_SOUND_OFF() (g_eeGeneral.beeperMode == e_mode_quiet)
|
||||
#define IS_SOUND_OFF() (g_eeGeneral.beepMode == e_mode_quiet)
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
|
||||
+8
-8
@@ -355,14 +355,14 @@ void setupPulsesPXX()
|
||||
}
|
||||
else {
|
||||
if (i < sendUpperChannels) {
|
||||
chan = limit(2048, (g_model.failsafeChannels[8+g_model.ppmSCH+i] * 512 / 682) + 3072, 4095);
|
||||
chan_1 = limit(2048, (g_model.failsafeChannels[8+g_model.ppmSCH+i+1] * 512 / 682) + 3072, 4095);
|
||||
chan = limit(2048, PPM_CH_CENTER(8+g_model.ppmSCH+i) - PPM_CENTER + (g_model.failsafeChannels[8+g_model.ppmSCH+i] * 512 / 682) + 3072, 4095);
|
||||
chan_1 = limit(2048, PPM_CH_CENTER(8+g_model.ppmSCH+i+1) - PPM_CENTER + (g_model.failsafeChannels[8+g_model.ppmSCH+i+1] * 512 / 682) + 3072, 4095);
|
||||
if (chan == 3072) chan = 3073;
|
||||
if (chan_1 == 3072) chan_1 = 3073;
|
||||
}
|
||||
else {
|
||||
chan = limit(0, (g_model.failsafeChannels[g_model.ppmSCH+i] * 512 / 682) + 1024, 2047);
|
||||
chan_1 = limit(0, (g_model.failsafeChannels[g_model.ppmSCH+i+1] * 512 / 682) + 1024, 2047);
|
||||
chan = limit(0, PPM_CH_CENTER(g_model.ppmSCH+i) - PPM_CENTER + (g_model.failsafeChannels[g_model.ppmSCH+i] * 512 / 682) + 1024, 2047);
|
||||
chan_1 = limit(0, PPM_CH_CENTER(g_model.ppmSCH+i+1) - PPM_CENTER + (g_model.failsafeChannels[g_model.ppmSCH+i+1] * 512 / 682) + 1024, 2047);
|
||||
if (chan == 1024) chan = 1025;
|
||||
if (chan_1 == 1024) chan_1 = 1025;
|
||||
}
|
||||
@@ -372,12 +372,12 @@ void setupPulsesPXX()
|
||||
#endif
|
||||
{
|
||||
if (i < sendUpperChannels) {
|
||||
chan = limit(2048, (channelOutputs[8+g_model.ppmSCH+i] * 512 / 682) + 3072, 4095);
|
||||
chan_1 = limit(2048, (channelOutputs[8+g_model.ppmSCH+i+1] * 512 / 682) + 3072, 4095);
|
||||
chan = limit(2048, PPM_CH_CENTER(8+g_model.ppmSCH+i) - PPM_CENTER + (channelOutputs[8+g_model.ppmSCH+i] * 512 / 682) + 3072, 4095);
|
||||
chan_1 = limit(2048, PPM_CH_CENTER(8+g_model.ppmSCH+i+1) - PPM_CENTER + (channelOutputs[8+g_model.ppmSCH+i+1] * 512 / 682) + 3072, 4095);
|
||||
}
|
||||
else {
|
||||
chan = limit(0, (channelOutputs[g_model.ppmSCH+i] * 512 / 682) + 1024, 2047);
|
||||
chan_1 = limit(0, (channelOutputs[g_model.ppmSCH+i+1] * 512 / 682) + 1024, 2047);
|
||||
chan = limit(0, PPM_CH_CENTER(g_model.ppmSCH+i) - PPM_CENTER + (channelOutputs[g_model.ppmSCH+i] * 512 / 682) + 1024, 2047);
|
||||
chan_1 = limit(0, PPM_CH_CENTER(g_model.ppmSCH+i+1) - PPM_CENTER + (channelOutputs[g_model.ppmSCH+i+1] * 512 / 682) + 1024, 2047);
|
||||
}
|
||||
}
|
||||
putPcmByte(chan); // Low byte of channel
|
||||
|
||||
@@ -140,9 +140,9 @@ 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(BEEPER)
|
||||
#if defined(AUDIO) && defined(BUZZER)
|
||||
const pm_char STR_SPEAKER[] PROGMEM = INDENT"Speaker";
|
||||
const pm_char STR_BEEPER[] PROGMEM = INDENT"Beeper";
|
||||
const pm_char STR_BUZZER[] PROGMEM = INDENT"Buzzer";
|
||||
#endif
|
||||
const pm_char STR_NOFREEEXPO[] PROGMEM = TR_NOFREEEXPO;
|
||||
const pm_char STR_NOFREEMIXER[] PROGMEM = TR_NOFREEMIXER;
|
||||
@@ -157,7 +157,7 @@ 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_FPHASE[] PROGMEM = TR_FPHASE;
|
||||
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;
|
||||
|
||||
+4
-4
@@ -271,12 +271,12 @@ 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(BEEPER)
|
||||
#if defined(AUDIO) && defined(BUZZER)
|
||||
extern const pm_char STR_SPEAKER[];
|
||||
extern const pm_char STR_BEEPER[];
|
||||
extern const pm_char STR_BUZZER[];
|
||||
#else
|
||||
#define STR_SPEAKER STR_MODE
|
||||
#define STR_BEEPER STR_MODE
|
||||
#define STR_BUZZER STR_MODE
|
||||
#endif
|
||||
extern const pm_char STR_NOFREEEXPO[];
|
||||
extern const pm_char STR_NOFREEMIXER[];
|
||||
@@ -291,7 +291,7 @@ 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_FPHASE[];
|
||||
extern const pm_char STR_FLMODE[];
|
||||
extern const pm_char STR_MIXWARNING[];
|
||||
extern const pm_char STR_OFF[];
|
||||
extern const pm_char STR_MULTPX[];
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DVex"
|
||||
#define TR_CURVE "K\206ivka"
|
||||
#define TR_FPHASE "F\200ze"
|
||||
#define TR_FLMODE "F\200ze"
|
||||
#define TR_MIXWARNING "Varov\200n\204"
|
||||
#define TR_OFF "VYP"
|
||||
#define TR_MULTPX "Mat.Operace"
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Kurve"
|
||||
#define TR_FPHASE TR("Phase","Phasen")
|
||||
#define TR_FLMODE TR("Phase","Phasen")
|
||||
#define TR_MIXWARNING "Warnung"
|
||||
#define TR_OFF "AUS"
|
||||
#define TR_MULTPX "Wirkung"
|
||||
|
||||
@@ -395,7 +395,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Curve"
|
||||
#define TR_FPHASE TR("Mode","Modes")
|
||||
#define TR_FLMODE TR("Mode","Modes")
|
||||
#define TR_MIXWARNING "Warning"
|
||||
#define TR_OFF "OFF"
|
||||
#define TR_MULTPX "Multpx"
|
||||
@@ -426,7 +426,7 @@
|
||||
#define TR_MEMORYWARNING INDENT"Memory Low"
|
||||
#define TR_ALARMWARNING INDENT"Sound Off"
|
||||
#define TR_RENAVIG "RotEnc Navig"
|
||||
#define TR_THROTTLEREVERSE TR("Thr reverse","Throttle reverse")
|
||||
#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")
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Curva"
|
||||
#define TR_FPHASE "Fase"
|
||||
#define TR_FLMODE "Fase"
|
||||
#define TR_MIXWARNING "Aviso"
|
||||
#define TR_OFF "OFF"
|
||||
#define TR_MULTPX "Multpx"
|
||||
|
||||
@@ -395,7 +395,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Courbe"
|
||||
#define TR_FPHASE TR("Phase","Phases")
|
||||
#define TR_FLMODE TR("Phase","Phases")
|
||||
#define TR_MIXWARNING "Alerte"
|
||||
#define TR_OFF "OFF"
|
||||
#define TR_MULTPX "Op\200ration"
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Curva"
|
||||
#define TR_FPHASE "Fase"
|
||||
#define TR_FLMODE "Fase"
|
||||
#define TR_MIXWARNING "Avviso"
|
||||
#define TR_OFF "OFF"
|
||||
#define TR_MULTPX "MultPx"
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Curvas"
|
||||
#define TR_FPHASE "Fase"
|
||||
#define TR_FLMODE "Fase"
|
||||
#define TR_MIXWARNING "Aviso"
|
||||
#define TR_OFF "OFF"
|
||||
#define TR_MULTPX "Aplicar"
|
||||
|
||||
@@ -395,7 +395,7 @@
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_DREX "DRex"
|
||||
#define TR_CURVE "Kurva"
|
||||
#define TR_FPHASE TR("Fas","Faser")
|
||||
#define TR_FLMODE TR("Fas","Faser")
|
||||
#define TR_MIXWARNING "Varning"
|
||||
#define TR_OFF "AV "
|
||||
#define TR_MULTPX "Multpx"
|
||||
|
||||
+2
-2
@@ -137,11 +137,11 @@ void doMainScreenGraphics()
|
||||
DO_CROSS(RBOX_CENTERX, RBOX_CENTERY, 3)
|
||||
|
||||
int16_t calibStickVert = calibratedStick[CONVERT_MODE(1+1)-1];
|
||||
if (g_eeGeneral.throttleReversed && CONVERT_MODE(1+1)-1 == THR_STICK)
|
||||
if (g_model.throttleReversed && CONVERT_MODE(1+1)-1 == THR_STICK)
|
||||
calibStickVert = -calibStickVert;
|
||||
lcd_square(LBOX_CENTERX+(calibratedStick[CONVERT_MODE(0+1)-1]*BOX_LIMIT/(2*RESX))-MARKER_WIDTH/2, LBOX_CENTERY-(calibStickVert*BOX_LIMIT/(2*RESX))-MARKER_WIDTH/2, MARKER_WIDTH, ROUND);
|
||||
calibStickVert = calibratedStick[CONVERT_MODE(2+1)-1];
|
||||
if (g_eeGeneral.throttleReversed && CONVERT_MODE(2+1)-1 == THR_STICK)
|
||||
if (g_model.throttleReversed && CONVERT_MODE(2+1)-1 == THR_STICK)
|
||||
calibStickVert = -calibStickVert;
|
||||
lcd_square(RBOX_CENTERX+(calibratedStick[CONVERT_MODE(3+1)-1]*BOX_LIMIT/(2*RESX))-MARKER_WIDTH/2, RBOX_CENTERY-(calibStickVert*BOX_LIMIT/(2*RESX))-MARKER_WIDTH/2, MARKER_WIDTH, ROUND);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user