mirror of
https://github.com/opentx/opentx.git
synced 2025-07-14 20:10:08 +03:00
Telemetry refactoring continued
This commit is contained in:
parent
40783acc36
commit
bfbee05b25
28 changed files with 346 additions and 358 deletions
|
@ -66,7 +66,7 @@ namespace Open9xGruvin9x {
|
|||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/protocols/pulses_avr.cpp"
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Open9xM128 {
|
|||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/protocols/pulses_avr.cpp"
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
|
|
|
@ -65,9 +65,9 @@
|
|||
|
||||
namespace Open9xSky9x {
|
||||
#include "radio/src/targets/sky9x/board_sky9x.cpp"
|
||||
#include "radio/src/protocols/ppm_arm.cpp"
|
||||
#include "radio/src/protocols/pxx_arm.cpp"
|
||||
#include "radio/src/protocols/dsm2_arm.cpp"
|
||||
#include "radio/src/pulses/ppm_arm.cpp"
|
||||
#include "radio/src/pulses/pxx_arm.cpp"
|
||||
#include "radio/src/pulses/dsm2_arm.cpp"
|
||||
#include "radio/src/targets/sky9x/telemetry_driver.cpp"
|
||||
#include "radio/src/targets/sky9x/pwr_driver.cpp"
|
||||
#include "radio/src/targets/sky9x/eeprom_driver.cpp"
|
||||
|
@ -80,7 +80,7 @@ namespace Open9xSky9x {
|
|||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/targets/sky9x/pulses_driver.cpp"
|
||||
#include "radio/src/protocols/pulses_arm.cpp"
|
||||
#include "radio/src/pulses/pulses_arm.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
|
|
|
@ -71,9 +71,9 @@ inline int geteepromsize() {
|
|||
#define EESIZE geteepromsize()
|
||||
|
||||
#include "radio/src/targets/taranis/board_taranis.cpp"
|
||||
#include "radio/src/protocols/ppm_arm.cpp"
|
||||
#include "radio/src/protocols/pxx_arm.cpp"
|
||||
#include "radio/src/protocols/dsm2_arm.cpp"
|
||||
#include "radio/src/pulses/ppm_arm.cpp"
|
||||
#include "radio/src/pulses/pxx_arm.cpp"
|
||||
#include "radio/src/pulses/dsm2_arm.cpp"
|
||||
#include "radio/src/eeprom_common.cpp"
|
||||
#include "radio/src/eeprom_conversions.cpp"
|
||||
#include "radio/src/eeprom_rlc.cpp"
|
||||
|
@ -86,7 +86,7 @@ inline int geteepromsize() {
|
|||
#include "radio/src/targets/taranis/rtc_driver.cpp"
|
||||
#include "radio/src/targets/taranis/trainer_driver.cpp"
|
||||
#include "radio/src/targets/taranis/uart3_driver.cpp"
|
||||
#include "radio/src/protocols/pulses_arm.cpp"
|
||||
#include "radio/src/pulses/pulses_arm.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace Open9x {
|
|||
#include "radio/src/switches.cpp"
|
||||
#include "radio/src/curves.cpp"
|
||||
#include "radio/src/mixer.cpp"
|
||||
#include "radio/src/protocols/pulses_avr.cpp"
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
|
|
|
@ -312,7 +312,7 @@ ifeq ($(PCB), $(filter $(PCB), STD 9X 9XR))
|
|||
BOARDSRC = targets/stock/board_stock.cpp
|
||||
EXTRABOARDSRC = targets/stock/lcd_driver.cpp targets/common_avr/telemetry_driver.cpp
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
|
||||
PULSESSRC = protocols/pulses_avr.cpp
|
||||
PULSESSRC = pulses/pulses_avr.cpp
|
||||
|
||||
ifeq ($(PCB), 9XR)
|
||||
CPPDEFS += -DPCB9XR
|
||||
|
@ -375,7 +375,7 @@ ifeq ($(PCB), $(filter $(PCB), STD128 9X128 9XR128))
|
|||
BOARDSRC = targets/stock/board_stock.cpp
|
||||
EXTRABOARDSRC = targets/stock/lcd_driver.cpp targets/common_avr/telemetry_driver.cpp
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
|
||||
PULSESSRC = protocols/pulses_avr.cpp
|
||||
PULSESSRC = pulses/pulses_avr.cpp
|
||||
|
||||
ifeq ($(PCB), 9XR128)
|
||||
CPPDEFS += -DPCB9XR128
|
||||
|
@ -434,7 +434,7 @@ ifeq ($(PCB), $(filter $(PCB), 9X2561))
|
|||
BOARDSRC = targets/stock/board_stock.cpp
|
||||
EXTRABOARDSRC = targets/stock/lcd_driver.cpp targets/common_avr/telemetry_driver.cpp
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
|
||||
PULSESSRC = protocols/pulses_avr.cpp
|
||||
PULSESSRC = pulses/pulses_avr.cpp
|
||||
|
||||
ifeq ($(PCB), 9XR2561)
|
||||
CPPDEFS += -DPCB9XR2561
|
||||
|
@ -494,7 +494,7 @@ ifeq ($(PCB), GRUVIN9X)
|
|||
BOARDSRC = targets/gruvin9x/board_gruvin9x.cpp
|
||||
EXTRABOARDSRC = targets/stock/lcd_driver.cpp targets/common_avr/telemetry_driver.cpp
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
|
||||
PULSESSRC = protocols/pulses_avr.cpp
|
||||
PULSESSRC = pulses/pulses_avr.cpp
|
||||
CPPSRC += audio_avr.cpp haptic.cpp
|
||||
|
||||
ifeq ($(SDCARD), YES)
|
||||
|
@ -532,7 +532,7 @@ ifeq ($(PCB), MEGA2560)
|
|||
BOARDSRC = targets/mega2560/board_mega2560.cpp
|
||||
EXTRABOARDSRC = targets/mega2560/lcd_driver_ST7565R.cpp targets/common_avr/telemetry_driver.cpp
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
|
||||
PULSESSRC = protocols/pulses_avr.cpp
|
||||
PULSESSRC = pulses/pulses_avr.cpp
|
||||
CPPSRC += audio_avr.cpp
|
||||
|
||||
ifeq ($(SDCARD), YES)
|
||||
|
@ -588,7 +588,7 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
|
|||
SRC += targets/sky9x/usb/common/core/USBEndpointDescriptor.c targets/sky9x/usb/common/core/USBGenericRequest.c targets/sky9x/usb/common/core/USBFeatureRequest.c targets/sky9x/usb/common/core/USBInterfaceRequest.c targets/sky9x/usb/common/core/USBGetDescriptorRequest.c targets/sky9x/usb/common/core/USBSetAddressRequest.c targets/sky9x/usb/common/core/USBSetConfigurationRequest.c targets/sky9x/usb/common/core/USBConfigurationDescriptor.c targets/sky9x/usb/common/core/USBGenericDescriptor.c
|
||||
SRC += targets/sky9x/MEDSdcard.c
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_raw.cpp eeprom_conversions.cpp
|
||||
PULSESSRC = protocols/pulses_arm.cpp protocols/ppm_arm.cpp protocols/pxx_arm.cpp protocols/dsm2_arm.cpp
|
||||
PULSESSRC = pulses/pulses_arm.cpp pulses/ppm_arm.cpp pulses/pxx_arm.cpp pulses/dsm2_arm.cpp
|
||||
CPPSRC += audio_arm.cpp haptic.cpp gui/view_about.cpp
|
||||
CPPSRC += targets/sky9x/telemetry_driver.cpp targets/sky9x/pwr_driver.cpp targets/sky9x/adc_driver.cpp targets/sky9x/eeprom_driver.cpp targets/sky9x/pulses_driver.cpp targets/sky9x/keys_driver.cpp targets/sky9x/audio_driver.cpp targets/sky9x/buzzer_driver.cpp targets/sky9x/haptic_driver.cpp targets/sky9x/sdcard_driver.cpp targets/sky9x/massstorage.cpp
|
||||
CPPSRC += loadboot.cpp
|
||||
|
@ -658,7 +658,7 @@ ifeq ($(PCB), TARANIS)
|
|||
SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c
|
||||
SRC += targets/taranis/pwr_driver.c targets/taranis/usb_driver.c
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp eeprom_conversions.cpp
|
||||
PULSESSRC = protocols/pulses_arm.cpp protocols/ppm_arm.cpp protocols/pxx_arm.cpp
|
||||
PULSESSRC = pulses/pulses_arm.cpp pulses/ppm_arm.cpp pulses/pxx_arm.cpp
|
||||
CPPSRC += audio_arm.cpp
|
||||
CPPSRC += targets/taranis/pulses_driver.cpp targets/taranis/keys_driver.cpp targets/taranis/adc_driver.cpp targets/taranis/trainer_driver.cpp targets/taranis/audio_driver.cpp targets/taranis/uart3_driver.cpp targets/taranis/telemetry_driver.cpp
|
||||
CPPSRC += bmp.cpp gui/view_channels.cpp gui/view_about.cpp gui/view_text.cpp loadboot.cpp
|
||||
|
@ -713,12 +713,12 @@ ifeq ($(PCB), TARANIS)
|
|||
endif
|
||||
|
||||
ifeq ($(DSM2), PPM)
|
||||
CPPSRC += protocols/dsm2_arm.cpp
|
||||
CPPSRC += pulses/dsm2_arm.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(HUBSAN), YES)
|
||||
CPPDEFS += -DHUBSAN
|
||||
CPPSRC += protocols/hubsan.cpp
|
||||
CPPSRC += pulses/hubsan.cpp
|
||||
CPPSRC += targets/taranis/a7105_driver.cpp
|
||||
endif
|
||||
|
||||
|
|
|
@ -236,8 +236,6 @@ PACK(typedef struct {
|
|||
|
||||
FrSkyData_v215 frsky;
|
||||
|
||||
ROTARY_ENCODER_ARRAY_EXTRA
|
||||
|
||||
MODELDATA_EXTRA
|
||||
|
||||
}) ModelData_v215;
|
||||
|
@ -484,7 +482,6 @@ void ConvertModel_215_to_216(ModelData &model)
|
|||
timer.countdownBeep = oldModel.timers[i].countdownBeep;
|
||||
timer.value = oldModel.timers[i].value;
|
||||
}
|
||||
g_model.protocol = oldModel.protocol;
|
||||
g_model.thrTrim = oldModel.thrTrim;
|
||||
g_model.trimInc = oldModel.trimInc - 2;
|
||||
g_model.disableThrottleWarning = oldModel.disableThrottleWarning;
|
||||
|
|
|
@ -660,13 +660,13 @@ void menuModelSelect(uint8_t event)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
uint8_t g_moduleIdx;
|
||||
void menuModelFailsafe(uint8_t event)
|
||||
{
|
||||
static bool longNames = false;
|
||||
bool newLongNames = false;
|
||||
uint8_t ch;
|
||||
uint8_t ch = 0;
|
||||
|
||||
if (event == EVT_KEY_LONG(KEY_ENTER) && s_editMode) {
|
||||
s_noHi = NO_HI_LEN;
|
||||
|
@ -676,24 +676,35 @@ void menuModelFailsafe(uint8_t event)
|
|||
SEND_FAILSAFE_NOW(g_moduleIdx);
|
||||
}
|
||||
|
||||
SIMPLE_SUBMENU_NOTITLE(32);
|
||||
SIMPLE_SUBMENU_NOTITLE(NUM_CHNOUT);
|
||||
|
||||
SET_SCROLLBAR_X(0);
|
||||
|
||||
if (m_posVert >= 16)
|
||||
#if LCD_W >= 212
|
||||
#define COL_W (LCD_W/2)
|
||||
#define BAR_W 64
|
||||
// Column separator
|
||||
lcd_vline(LCD_W/2, FH, LCD_H-FH);
|
||||
|
||||
if (m_posVert >= 16) {
|
||||
ch = 16;
|
||||
else
|
||||
ch = 0;
|
||||
}
|
||||
#else
|
||||
#define COL_W (LCD_W)
|
||||
#define BAR_W 90
|
||||
ch = 8 * (m_posVert / 8);
|
||||
#endif
|
||||
|
||||
lcd_putsCenter(0*FH, FAILSAFESET);
|
||||
lcd_invert_line(0);
|
||||
|
||||
// Column separator
|
||||
lcd_vline(LCD_W/2, FH, LCD_H-FH);
|
||||
|
||||
for (uint8_t col=0; col<2; col++) {
|
||||
|
||||
uint8_t x = col*LCD_W/2+1;
|
||||
#if LCD_W >= 212
|
||||
for (uint8_t col=0; col<2; col++)
|
||||
#else
|
||||
uint8_t col = 0;
|
||||
#endif
|
||||
{
|
||||
uint8_t x = col*COL_W+1;
|
||||
|
||||
// Channels
|
||||
for (uint8_t line=0; line<8; line++) {
|
||||
|
@ -708,6 +719,7 @@ void menuModelFailsafe(uint8_t event)
|
|||
else
|
||||
val = g_model.moduleData[g_moduleIdx].failsafeChannels[8*col+line];
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
// Channel name if present, number if not
|
||||
uint8_t lenLabel = ZLEN(g_model.limitData[ch].name);
|
||||
if (lenLabel > 4) {
|
||||
|
@ -718,6 +730,9 @@ void menuModelFailsafe(uint8_t event)
|
|||
lcd_putsnAtt(x+1-ofs, y, g_model.limitData[ch].name, sizeof(g_model.limitData[ch].name), ZCHAR | SMLSIZE);
|
||||
else
|
||||
putsChn(x+1-ofs, y, ch+1, SMLSIZE);
|
||||
#else
|
||||
putsChn(x+1-ofs, y, ch+1, SMLSIZE);
|
||||
#endif
|
||||
|
||||
// Value
|
||||
LcdFlags flags = TINSIZE;
|
||||
|
@ -727,21 +742,21 @@ void menuModelFailsafe(uint8_t event)
|
|||
flags |= BLINK;
|
||||
}
|
||||
#if defined(PPM_UNIT_US)
|
||||
uint8_t wbar = (longNames ? 54 : 64);
|
||||
lcd_outdezAtt(x+LCD_W/2-4-wbar-ofs, y, PPM_CH_CENTER(ch)+val/2, flags);
|
||||
uint8_t wbar = (longNames ? BAR_W-10 : BAR_W);
|
||||
lcd_outdezAtt(x+COL_W-4-wbar-ofs, y, PPM_CH_CENTER(ch)+val/2, flags);
|
||||
#elif defined(PPM_UNIT_PERCENT_PREC1)
|
||||
uint8_t wbar = (longNames ? 48 : 58);
|
||||
lcd_outdezAtt(x+LCD_W/2-4-wbar-ofs, y, calcRESXto1000(val), PREC1|flags);
|
||||
uint8_t wbar = (longNames ? BAR_W-16 : BAR_W-6);
|
||||
lcd_outdezAtt(x+COL_W-4-wbar-ofs, y, calcRESXto1000(val), PREC1|flags);
|
||||
#else
|
||||
uint8_t wbar = (longNames ? 54 : 64);
|
||||
lcd_outdezAtt(x+LCD_W/2-4-wbar-ofs, y, calcRESXto1000(val)/10, flags);
|
||||
uint8_t wbar = (longNames ? BAR_W-10 : BAR_W);
|
||||
lcd_outdezAtt(x+COL_W-4-wbar-ofs, y, calcRESXto1000(val)/10, flags);
|
||||
#endif
|
||||
|
||||
// Gauge
|
||||
lcd_rect(x+LCD_W/2-3-wbar-ofs, y, wbar+1, 6);
|
||||
lcd_rect(x+COL_W-3-wbar-ofs, y, wbar+1, 6);
|
||||
uint16_t lim = g_model.extendedLimits ? 640*2 : 512*2;
|
||||
uint8_t len = limit((uint8_t)1, uint8_t((abs(val) * wbar/2 + lim/2) / lim), uint8_t(wbar/2));
|
||||
uint8_t x0 = (val>0) ? x+LCD_W/2-ofs-3-wbar/2 : x+LCD_W/2-ofs-2-wbar/2-len;
|
||||
uint8_t x0 = (val>0) ? x+COL_W-ofs-3-wbar/2 : x+COL_W-ofs-2-wbar/2-len;
|
||||
lcd_hline(x0, y+1, len);
|
||||
lcd_hline(x0, y+2, len);
|
||||
lcd_hline(x0, y+3, len);
|
||||
|
@ -896,11 +911,20 @@ enum menuModelSetupItems {
|
|||
ITEM_MODEL_TRAINER_MODE,
|
||||
ITEM_MODEL_TRAINER_CHANNELS,
|
||||
ITEM_MODEL_TRAINER_SETTINGS,
|
||||
#elif defined(PCBSKY9X) && !defined(REVX)
|
||||
ITEM_MODEL_PPM1_PROTOCOL,
|
||||
ITEM_MODEL_PPM1_PARAMS,
|
||||
ITEM_MODEL_PPM2_PROTOCOL,
|
||||
ITEM_MODEL_PPM2_PARAMS,
|
||||
#elif defined(CPUARM)
|
||||
ITEM_MODEL_EXTERNAL_MODULE_LABEL,
|
||||
ITEM_MODEL_EXTERNAL_MODULE_MODE,
|
||||
ITEM_MODEL_EXTERNAL_MODULE_CHANNELS,
|
||||
ITEM_MODEL_EXTERNAL_MODULE_BIND,
|
||||
ITEM_MODEL_EXTERNAL_MODULE_FAILSAFE,
|
||||
#if defined(PCBSKY9X) && !defined(REVX)
|
||||
ITEM_MODEL_EXTRA_MODULE_LABEL,
|
||||
ITEM_MODEL_EXTRA_MODULE_CHANNELS,
|
||||
ITEM_MODEL_EXTRA_MODULE_BIND,
|
||||
#endif
|
||||
ITEM_MODEL_TRAINER_LABEL,
|
||||
ITEM_MODEL_TRAINER_CHANNELS,
|
||||
ITEM_MODEL_TRAINER_SETTINGS,
|
||||
#else
|
||||
ITEM_MODEL_PPM1_PROTOCOL,
|
||||
ITEM_MODEL_PPM1_PARAMS,
|
||||
|
@ -915,9 +939,15 @@ enum menuModelSetupItems {
|
|||
#endif
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define MODEL_SETUP_2ND_COLUMN (LCD_W-17*FW-MENUS_SCROLLBAR_WIDTH)
|
||||
#define MODEL_SETUP_2ND_COLUMN (LCD_W-17*FW-MENUS_SCROLLBAR_WIDTH)
|
||||
#define MODEL_SETUP_BIND_OFS 3*FW
|
||||
#define MODEL_SETUP_RANGE_OFS 7*FW
|
||||
#define MODEL_SETUP_SET_FAILSAFE_OFS 10*FW
|
||||
#else
|
||||
#define MODEL_SETUP_2ND_COLUMN (LCD_W-11*FW-MENUS_SCROLLBAR_WIDTH)
|
||||
#define MODEL_SETUP_2ND_COLUMN (LCD_W-11*FW-MENUS_SCROLLBAR_WIDTH)
|
||||
#define MODEL_SETUP_BIND_OFS 2*FW+1
|
||||
#define MODEL_SETUP_RANGE_OFS 4*FW+3
|
||||
#define MODEL_SETUP_SET_FAILSAFE_OFS 7*FW-2
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS) && defined(SDCARD)
|
||||
|
@ -947,35 +977,56 @@ void onModelSetupBitmapMenu(const char *result)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define CURRENT_MODULE_EDITED(k) (k>=ITEM_MODEL_TRAINER_LABEL ? TRAINER_MODULE : (k>=ITEM_MODEL_EXTERNAL_MODULE_LABEL ? EXTERNAL_MODULE : INTERNAL_MODULE))
|
||||
#elif defined(PCBSKY9X) && defined(REVX)
|
||||
#define CURRENT_MODULE_EDITED(k) (k>=ITEM_MODEL_TRAINER_LABEL ? TRAINER_MODULE : EXTERNAL_MODULE)
|
||||
#else
|
||||
#define CURRENT_MODULE_EDITED(k) (k>=ITEM_MODEL_TRAINER_LABEL ? TRAINER_MODULE : (k>=ITEM_MODEL_EXTRA_MODULE_LABEL ? EXTRA_MODULE : EXTERNAL_MODULE))
|
||||
#endif
|
||||
|
||||
void menuModelSetup(uint8_t event)
|
||||
{
|
||||
#if defined(PCBTARANIS)
|
||||
#define IF_PORT1_ON(x) (g_model.moduleData[0].rfProtocol == RF_PROTO_OFF ? HIDDEN_ROW : (uint8_t)(x))
|
||||
#define IF_PORT2_ON(x) (g_model.externalModule == MODULE_TYPE_NONE ? HIDDEN_ROW : (uint8_t)(x))
|
||||
#define IF_TRAINER_ON(x) (g_model.trainerMode ? (uint8_t)(x) : HIDDEN_ROW)
|
||||
#define IF_PORT_ON(idx, x) (idx==0 ? IS_PORT1_ON(x) : (idx==1 ? IS_PORT2_ON(x) : IS_TRAINER_ON()))
|
||||
#define IF_PORT2_XJT(x) (IS_MODULE_XJT(1) ? (uint8_t)x : HIDDEN_ROW)
|
||||
#define IS_D8_RX(x) (g_model.moduleData[x].rfProtocol == RF_PROTO_D8)
|
||||
#define PORT1_CHANNELS_ROWS() IF_PORT1_ON(1)
|
||||
#define PORT2_CHANNELS_ROWS() IF_PORT2_ON(IS_MODULE_DSM2(1) ? (uint8_t)0 : (uint8_t)1)
|
||||
#define TRAINER_CHANNELS_ROWS() IF_TRAINER_ON(1)
|
||||
#define PORT_CHANNELS_ROWS(x) (x==0 ? PORT1_CHANNELS_ROWS() : (x==1 ? PORT2_CHANNELS_ROWS() : TRAINER_CHANNELS_ROWS()))
|
||||
#define FAILSAFE_ROWS(x) ((g_model.moduleData[x].rfProtocol==RF_PROTO_X16 || g_model.moduleData[x].rfProtocol==RF_PROTO_LR12) ? (g_model.moduleData[x].failsafeMode==FAILSAFE_CUSTOM ? (uint8_t)1 : (uint8_t)0) : HIDDEN_ROW)
|
||||
#define MODEL_SETUP_MAX_LINES (1+ITEM_MODEL_SETUP_MAX)
|
||||
#define POT_WARN_ITEMS() ((g_model.nPotsToWarn >> 6) ? (uint8_t)NUM_POTS : (uint8_t)0)
|
||||
|
||||
#define IF_INTERNAL_MODULE_ON(x) (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF ? HIDDEN_ROW : (uint8_t)(x))
|
||||
#define IF_EXTERNAL_MODULE_ON(x) (g_model.externalModule == MODULE_TYPE_NONE ? HIDDEN_ROW : (uint8_t)(x))
|
||||
#define IF_TRAINER_ON(x) (g_model.trainerMode ? (uint8_t)(x) : HIDDEN_ROW)
|
||||
#define IF_EXTERNAL_MODULE_XJT(x) (IS_MODULE_XJT(EXTERNAL_MODULE) ? (uint8_t)x : HIDDEN_ROW)
|
||||
#define IS_D8_RX(x) (g_model.moduleData[x].rfProtocol == RF_PROTO_D8)
|
||||
#define INTERNAL_MODULE_CHANNELS_ROWS() IF_INTERNAL_MODULE_ON(1)
|
||||
#define EXTERNAL_MODULE_CHANNELS_ROWS() IF_EXTERNAL_MODULE_ON(IS_MODULE_DSM2(EXTERNAL_MODULE) ? (uint8_t)0 : (uint8_t)1)
|
||||
#define TRAINER_CHANNELS_ROWS() IF_TRAINER_ON(1)
|
||||
#define PORT_CHANNELS_ROWS(x) (x==INTERNAL_MODULE ? INTERNAL_MODULE_CHANNELS_ROWS() : (x==EXTERNAL_MODULE ? EXTERNAL_MODULE_CHANNELS_ROWS() : TRAINER_CHANNELS_ROWS()))
|
||||
#define FAILSAFE_ROWS(x) ((g_model.moduleData[x].rfProtocol==RF_PROTO_X16 || g_model.moduleData[x].rfProtocol==RF_PROTO_LR12) ? (g_model.moduleData[x].failsafeMode==FAILSAFE_CUSTOM ? (uint8_t)1 : (uint8_t)0) : HIDDEN_ROW)
|
||||
#define MODEL_SETUP_MAX_LINES (1+ITEM_MODEL_SETUP_MAX)
|
||||
#define POT_WARN_ITEMS() ((g_model.nPotsToWarn >> 6) ? (uint8_t)NUM_POTS : (uint8_t)0)
|
||||
bool CURSOR_ON_CELL = (m_posHorz >= 0);
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0,CASE_PCBTARANIS(LABEL(Throttle)) 0, 0, 0,CASE_PCBTARANIS(LABEL(PreflightCheck)) CASE_PCBTARANIS(0) 0, 7, POT_WARN_ITEMS(), NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_PORT1_ON(1), IF_PORT1_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_PORT1_ON(FAILSAFE_ROWS(0)), LABEL(ExternalModule), (g_model.externalModule==MODULE_TYPE_XJT || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, PORT2_CHANNELS_ROWS(), (IS_MODULE_XJT(1) && IS_D8_RX(1)) ? (uint8_t)1 : (IS_MODULE_PPM(1) || IS_MODULE_XJT(1) || IS_MODULE_DSM2(1)) ? (uint8_t)2 : HIDDEN_ROW, IF_PORT2_XJT(FAILSAFE_ROWS(1)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)});
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0,CASE_PCBTARANIS(LABEL(Throttle)) 0, 0, 0,CASE_PCBTARANIS(LABEL(PreflightCheck)) CASE_PCBTARANIS(0) 0, 7, POT_WARN_ITEMS(), NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_INTERNAL_MODULE_ON(1), IF_INTERNAL_MODULE_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_INTERNAL_MODULE_ON(FAILSAFE_ROWS(INTERNAL_MODULE)), LABEL(ExternalModule), (IS_MODULE_XJT(EXTERNAL_MODULE) || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, EXTERNAL_MODULE_CHANNELS_ROWS(), (IS_MODULE_XJT(EXTERNAL_MODULE) && IS_D8_RX(EXTERNAL_MODULE)) ? (uint8_t)1 : (IS_MODULE_PPM(EXTERNAL_MODULE) || IS_MODULE_XJT(EXTERNAL_MODULE) || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)2 : HIDDEN_ROW, IF_EXTERNAL_MODULE_XJT(FAILSAFE_ROWS(EXTERNAL_MODULE)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)});
|
||||
#elif defined(CPUARM)
|
||||
#define IF_EXTERNAL_MODULE_XJT(x) (IS_MODULE_XJT(EXTERNAL_MODULE) ? (uint8_t)x : HIDDEN_ROW)
|
||||
#define IF_EXTERNAL_MODULE_ON(x) (g_model.externalModule == MODULE_TYPE_NONE ? HIDDEN_ROW : (uint8_t)(x))
|
||||
#define IS_D8_RX(x) (g_model.moduleData[x].rfProtocol == RF_PROTO_D8)
|
||||
#define EXTERNAL_MODULE_CHANNELS_ROWS() IF_EXTERNAL_MODULE_ON(IS_MODULE_DSM2(EXTERNAL_MODULE) ? (uint8_t)0 : (uint8_t)1)
|
||||
#define TRAINER_CHANNELS_ROWS() (1)
|
||||
#define PORT_CHANNELS_ROWS(x) (x==EXTERNAL_MODULE ? EXTERNAL_MODULE_CHANNELS_ROWS() : TRAINER_CHANNELS_ROWS())
|
||||
#define FAILSAFE_ROWS(x) ((g_model.moduleData[x].rfProtocol==RF_PROTO_X16 || g_model.moduleData[x].rfProtocol==RF_PROTO_LR12) ? (g_model.moduleData[x].failsafeMode==FAILSAFE_CUSTOM ? (uint8_t)1 : (uint8_t)0) : HIDDEN_ROW)
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES (1+ITEM_MODEL_SETUP_MAX)
|
||||
#define POT_WARN_ITEMS() ((g_model.nPotsToWarn >> 6) ? (uint8_t)NUM_POTS : (uint8_t)0)
|
||||
#if defined(REVX)
|
||||
#define EXTRA_MODULE_ROWS
|
||||
#else
|
||||
#define EXTRA_MODULE_ROWS LABEL(ExtraModule), 1, 2,
|
||||
#endif
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0,CASE_PCBTARANIS(LABEL(Throttle)) 0, 0, 0,CASE_PCBTARANIS(LABEL(PreflightCheck)) CASE_PCBTARANIS(0) 0, 6, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, LABEL(ExternalModule), (IS_MODULE_XJT(EXTERNAL_MODULE) || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, EXTERNAL_MODULE_CHANNELS_ROWS(), (IS_MODULE_XJT(EXTERNAL_MODULE) && IS_D8_RX(EXTERNAL_MODULE)) ? (uint8_t)1 : (IS_MODULE_PPM(EXTERNAL_MODULE) || IS_MODULE_XJT(EXTERNAL_MODULE) || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)2 : HIDDEN_ROW, IF_EXTERNAL_MODULE_XJT(FAILSAFE_ROWS(EXTERNAL_MODULE)), EXTRA_MODULE_ROWS LABEL(Trainer), TRAINER_CHANNELS_ROWS(), 2});
|
||||
#elif defined(CPUM64)
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX)
|
||||
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX)
|
||||
uint8_t protocol = g_model.protocol;
|
||||
MENU_TAB({ 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, 5, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2 });
|
||||
#else
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX)
|
||||
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX)
|
||||
uint8_t protocol = g_model.protocol;
|
||||
MENU_TAB({ 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, 6, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2, CASE_PCBSKY9X(1) CASE_PCBSKY9X(2) });
|
||||
#endif
|
||||
|
@ -986,6 +1037,8 @@ void menuModelSetup(uint8_t event)
|
|||
#endif
|
||||
#if defined(PCBTARANIS)
|
||||
pxxFlag[INTERNAL_MODULE] = 0;
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
pxxFlag[EXTERNAL_MODULE] = 0;
|
||||
#endif
|
||||
return;
|
||||
|
@ -1301,15 +1354,17 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
break;
|
||||
|
||||
#if defined(PCBSKY9X) && !defined(REVX)
|
||||
case ITEM_MODEL_EXTRA_MODULE_LABEL:
|
||||
lcd_putsLeft(y, "RF Port 2 (PPM)");
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
case ITEM_MODEL_INTERNAL_MODULE_LABEL:
|
||||
lcd_putsLeft(y, TR_INTERNALRF);
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_EXTERNAL_MODULE_LABEL:
|
||||
lcd_putsLeft(y, TR_EXTERNALRF);
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_INTERNAL_MODULE_MODE:
|
||||
lcd_putsLeft(y, STR_MODE);
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_XJT_PROTOCOLS, 1+g_model.moduleData[0].rfProtocol, attr);
|
||||
|
@ -1322,6 +1377,16 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_TRAINER_MODE:
|
||||
g_model.trainerMode = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_MODE, STR_VTRAINERMODES, g_model.trainerMode, 0, 1, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
case ITEM_MODEL_EXTERNAL_MODULE_LABEL:
|
||||
lcd_putsLeft(y, TR_EXTERNALRF);
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_EXTERNAL_MODULE_MODE:
|
||||
lcd_putsLeft(y, STR_MODE);
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_TARANIS_PROTOCOLS, g_model.externalModule, m_posHorz==0 ? attr : 0);
|
||||
|
@ -1354,11 +1419,22 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_TRAINER_LABEL:
|
||||
lcd_putsLeft(y, STR_TRAINER);
|
||||
break;
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
case ITEM_MODEL_INTERNAL_MODULE_CHANNELS:
|
||||
#elif defined(PCBSKY9X) && !defined(REVX)
|
||||
case ITEM_MODEL_EXTRA_MODULE_CHANNELS:
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
case ITEM_MODEL_EXTERNAL_MODULE_CHANNELS:
|
||||
case ITEM_MODEL_TRAINER_CHANNELS:
|
||||
{
|
||||
uint8_t moduleIdx = (k>=ITEM_MODEL_TRAINER_LABEL ? 2 : (k>=ITEM_MODEL_EXTERNAL_MODULE_LABEL ? 1 : 0));
|
||||
uint8_t moduleIdx = CURRENT_MODULE_EDITED(k);
|
||||
ModuleData & moduleData = g_model.moduleData[moduleIdx];
|
||||
lcd_putsLeft(y, STR_CHANNELRANGE);
|
||||
if ((int8_t)PORT_CHANNELS_ROWS(moduleIdx) >= 0) {
|
||||
|
@ -1381,12 +1457,18 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
case ITEM_MODEL_INTERNAL_MODULE_BIND:
|
||||
#elif defined(PCBSKY9X) && !defined(REVX)
|
||||
case ITEM_MODEL_EXTRA_MODULE_BIND:
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
case ITEM_MODEL_EXTERNAL_MODULE_BIND:
|
||||
case ITEM_MODEL_TRAINER_SETTINGS:
|
||||
{
|
||||
uint8_t moduleIdx = (k>=ITEM_MODEL_TRAINER_LABEL ? 2 : (k>=ITEM_MODEL_EXTERNAL_MODULE_LABEL ? 1 : 0));
|
||||
uint8_t moduleIdx = CURRENT_MODULE_EDITED(k);
|
||||
ModuleData & moduleData = g_model.moduleData[moduleIdx];
|
||||
if (IS_MODULE_PPM(moduleIdx)) {
|
||||
lcd_putsLeft(y, STR_PPMFRAME);
|
||||
|
@ -1412,7 +1494,7 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
else {
|
||||
horzpos_t l_posHorz = m_posHorz;
|
||||
uint8_t xOffsetBind = 3*FW;
|
||||
uint8_t xOffsetBind = MODEL_SETUP_BIND_OFS;
|
||||
if (IS_MODULE_XJT(moduleIdx) && IS_D8_RX(moduleIdx)) {
|
||||
xOffsetBind = 0;
|
||||
lcd_putsLeft(y, INDENT "Receiver");
|
||||
|
@ -1435,7 +1517,7 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
}
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+xOffsetBind, y, STR_MODULE_BIND, l_posHorz==1 ? attr : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+7*FW+xOffsetBind, y, STR_MODULE_RANGE, l_posHorz==2 ? attr : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+MODEL_SETUP_RANGE_OFS+xOffsetBind, y, STR_MODULE_RANGE, l_posHorz==2 ? attr : 0);
|
||||
if (IS_MODULE_XJT(moduleIdx)) {
|
||||
uint8_t newFlag = 0;
|
||||
if (attr && l_posHorz>0 && s_editMode>0) {
|
||||
|
@ -1464,16 +1546,20 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
case ITEM_MODEL_INTERNAL_MODULE_FAILSAFE:
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
case ITEM_MODEL_EXTERNAL_MODULE_FAILSAFE:
|
||||
{
|
||||
uint8_t moduleIdx = (k>=ITEM_MODEL_EXTERNAL_MODULE_LABEL ? 1 : 0);
|
||||
uint8_t moduleIdx = CURRENT_MODULE_EDITED(k);
|
||||
ModuleData & moduleData = g_model.moduleData[moduleIdx];
|
||||
lcd_putsLeft(y, TR_FAILSAFE);
|
||||
if (IS_MODULE_XJT(moduleIdx)) {
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_VFAILSAFE, moduleData.failsafeMode, m_posHorz==0 ? attr : 0);
|
||||
if (moduleData.failsafeMode == FAILSAFE_CUSTOM) lcd_putsAtt(MODEL_SETUP_2ND_COLUMN + 10*FW, y, STR_SET, m_posHorz==1 ? attr : 0);
|
||||
if (moduleData.failsafeMode == FAILSAFE_CUSTOM) lcd_putsAtt(MODEL_SETUP_2ND_COLUMN + MODEL_SETUP_SET_FAILSAFE_OFS, y, STR_SET, m_posHorz==1 ? attr : 0);
|
||||
if (attr) {
|
||||
if (moduleData.failsafeMode != FAILSAFE_CUSTOM)
|
||||
m_posHorz = 0;
|
||||
|
@ -1497,74 +1583,33 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ITEM_MODEL_TRAINER_LABEL:
|
||||
lcd_putsLeft(y, STR_TRAINER);
|
||||
break;
|
||||
|
||||
case ITEM_MODEL_TRAINER_MODE:
|
||||
g_model.trainerMode = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_MODE, STR_VTRAINERMODES, g_model.trainerMode, 0, 1, attr, event);
|
||||
break;
|
||||
|
||||
#else
|
||||
|
||||
case ITEM_MODEL_PPM1_PROTOCOL:
|
||||
#if defined(PCBSKY9X) && !defined(REVX)
|
||||
lcd_putsLeft(y, PSTR("Port1"));
|
||||
#else
|
||||
lcd_putsLeft(y, NO_INDENT(STR_PROTO));
|
||||
#endif
|
||||
|
||||
#if !defined(CPUARM)
|
||||
case ITEM_MODEL_PPM1_PROTOCOL:
|
||||
lcd_putsLeft(y, NO_INDENT(STR_PROTO));
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_VPROTOS, protocol, m_posHorz<=0 ? attr : 0);
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+4*FW+3, y, STR_CH, m_posHorz==1 ? attr : 0);
|
||||
lcd_outdezAtt(lcdLastPos, y, g_model.moduleData[0].channelsStart+1, LEFT | (m_posHorz==1 ? attr : 0));
|
||||
lcd_putc(lcdLastPos, y, '-');
|
||||
lcd_outdezAtt(lcdLastPos + FW+1, y, g_model.moduleData[0].channelsStart+NUM_PORT1_CHANNELS(), LEFT | (m_posHorz==2 ? attr : 0));
|
||||
#else
|
||||
if (IS_PPM_PROTOCOL(protocol)) {
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN+7*FW, y, STR_NCHANNELS, g_model.ppmNCH+2, m_posHorz!=0 ? attr : 0);
|
||||
}
|
||||
else if (attr) {
|
||||
MOVE_CURSOR_FROM_HERE();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (attr && (editMode>0 || p1valdiff
|
||||
#if !defined(PCBSKY9X)
|
||||
|| (!IS_PPM_PROTOCOL(protocol) && !IS_DSM2_PROTOCOL(protocol))
|
||||
#endif
|
||||
)) {
|
||||
if (attr && (editMode>0 || p1valdiff || (!IS_PPM_PROTOCOL(protocol) && !IS_DSM2_PROTOCOL(protocol)))) {
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.protocol, PROTO_MAX-1);
|
||||
break;
|
||||
case 1:
|
||||
#if defined(PCBSKY9X)
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.moduleData[0].channelsStart, 32-8-g_model.moduleData[0].channelsCount);
|
||||
g_model.moduleData[0].ppmFrameLength = max((int8_t)0, g_model.moduleData[0].channelsCount) * 4;
|
||||
SET_DEFAULT_PPM_FRAME_LENGTH(0);
|
||||
#else
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.ppmNCH, -2, 4);
|
||||
g_model.ppmFrameLength = g_model.ppmNCH * 8;
|
||||
#endif
|
||||
break;
|
||||
#if defined(PCBSKY9X)
|
||||
case 2:
|
||||
if (IS_PPM_PROTOCOL(protocol)) {
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[0].channelsCount, -4, min<int8_t>(8, 32-8-g_model.moduleData[0].channelsStart));
|
||||
SET_DEFAULT_PPM_FRAME_LENGTH(0);
|
||||
}
|
||||
else
|
||||
REPEAT_LAST_CURSOR_MOVE();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X) && !defined(REVX)
|
||||
#if 0
|
||||
case ITEM_MODEL_PPM2_PROTOCOL:
|
||||
lcd_putsLeft(y, PSTR("Port2"));
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_VPROTOS, 0, 0);
|
||||
|
@ -1609,30 +1654,8 @@ void menuModelSetup(uint8_t event)
|
|||
break;
|
||||
#endif
|
||||
|
||||
#if !defined(CPUARM)
|
||||
case ITEM_MODEL_PPM1_PARAMS:
|
||||
#if defined(PCBSKY9X)
|
||||
if (IS_PPM_PROTOCOL(protocol)) {
|
||||
lcd_putsLeft(y, STR_PPMFRAME);
|
||||
lcd_puts(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_MS);
|
||||
lcd_outdezAtt(MODEL_SETUP_2ND_COLUMN, y, (int16_t)g_model.moduleData[0].ppmFrameLength*5 + 225, (m_posHorz<=0 ? attr : 0) | PREC1|LEFT);
|
||||
lcd_putc(MODEL_SETUP_2ND_COLUMN+8*FW+2, y, 'u');
|
||||
lcd_outdezAtt(MODEL_SETUP_2ND_COLUMN+8*FW+2, y, (g_model.moduleData[0].ppmDelay*50)+300, (m_posHorz < 0 || m_posHorz==1) ? attr : 0);
|
||||
lcd_putcAtt(MODEL_SETUP_2ND_COLUMN+10*FW, y, g_model.moduleData[0].ppmPulsePol ? '+' : '-', (m_posHorz < 0 || m_posHorz==2) ? attr : 0);
|
||||
if (attr && (editMode>0 || p1valdiff)) {
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[0].ppmFrameLength, -20, 35);
|
||||
break;
|
||||
case 1:
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[0].ppmDelay, -4, 10);
|
||||
break;
|
||||
case 2:
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.moduleData[0].ppmPulsePol, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (IS_PPM_PROTOCOL(protocol)) {
|
||||
lcd_putsLeft(y, STR_PPMFRAME);
|
||||
lcd_puts(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_MS);
|
||||
|
@ -1654,7 +1677,6 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(DSM2) || defined(PXX)
|
||||
else if (IS_DSM2_PROTOCOL(protocol) || IS_PXX_PROTOCOL(protocol)) {
|
||||
if (attr && m_posHorz > 1) {
|
||||
|
@ -1665,21 +1687,10 @@ void menuModelSetup(uint8_t event)
|
|||
lcd_outdezNAtt(MODEL_SETUP_2ND_COLUMN, y, g_model.header.modelId, (m_posHorz<=0 ? attr : 0) | LEADING0|LEFT, 2);
|
||||
if (attr && (m_posHorz==0 && (editMode>0 || p1valdiff))) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.header.modelId, 99);
|
||||
#if defined(CPUARM)
|
||||
if (checkIncDec_Ret)
|
||||
modelHeaders[g_eeGeneral.currModel].modelId = g_model.header.modelId;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(PXX)
|
||||
if (protocol == PROTO_PXX) {
|
||||
#if defined(CPUARM)
|
||||
if (attr && m_posHorz==0 && editMode==0 && event==EVT_KEY_BREAK(KEY_ENTER))
|
||||
checkModelIdUnique(g_eeGeneral.currModel);
|
||||
#endif
|
||||
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+4*FW, y, STR_SYNCMENU, m_posHorz!=0 ? attr : 0);
|
||||
|
||||
uint8_t newFlag = 0;
|
||||
if (attr && m_posHorz>0 && editMode>0) {
|
||||
// send reset code
|
||||
|
@ -1688,7 +1699,6 @@ void menuModelSetup(uint8_t event)
|
|||
pxxFlag[0] = newFlag;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DSM2)
|
||||
if (IS_DSM2_PROTOCOL(protocol)) {
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+4*FW, y, STR_MODULE_RANGE, m_posHorz!=0 ? attr : 0);
|
||||
|
@ -1698,12 +1708,12 @@ void menuModelSetup(uint8_t event)
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
#endif // defined(PCBTARANIS)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
if (pxxFlag[INTERNAL_MODULE] == PXX_SEND_RANGECHECK || pxxFlag[EXTERNAL_MODULE] == PXX_SEND_RANGECHECK) {
|
||||
#if defined(CPUARM) && defined(FRSKY)
|
||||
if (IS_PXX_RANGE_CHECK_ENABLE()) {
|
||||
displayPopup("RSSI: ");
|
||||
lcd_outdezAtt(16+4*FW, 5*FH, frskyData.rssi[0].value, BOLD);
|
||||
}
|
||||
|
@ -2003,27 +2013,12 @@ void menuModelPhaseOne(uint8_t event)
|
|||
for (uint8_t t=0; t<NUM_ROTARY_ENCODERS; t++) {
|
||||
putsRotaryEncoderMode(MIXES_2ND_COLUMN+(t*FW), y, s_currIdx, t, m_posHorz==t ? attr : 0);
|
||||
if (attr && m_posHorz==t && ((editMode>0) || p1valdiff)) {
|
||||
#if ROTARY_ENCODERS > 2
|
||||
int16_t v;
|
||||
if(t < (NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA))
|
||||
v = phaseAddress(s_currIdx)->rotaryEncoders[t];
|
||||
else
|
||||
v = g_model.rotaryEncodersExtra[s_currIdx][t-(NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA)];
|
||||
#else
|
||||
int16_t v = phaseAddress(s_currIdx)->rotaryEncoders[t];
|
||||
#endif
|
||||
if (v < ROTARY_ENCODER_MAX) v = ROTARY_ENCODER_MAX;
|
||||
v = checkIncDec(event, v, ROTARY_ENCODER_MAX, ROTARY_ENCODER_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
|
||||
if (checkIncDec_Ret) {
|
||||
if (v == ROTARY_ENCODER_MAX) v = 0;
|
||||
#if ROTARY_ENCODERS > 2
|
||||
if (t < (NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA))
|
||||
phaseAddress(s_currIdx)->rotaryEncoders[t] = v;
|
||||
else
|
||||
g_model.rotaryEncodersExtra[s_currIdx][t-(NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA)] = v;
|
||||
#else
|
||||
phaseAddress(s_currIdx)->rotaryEncoders[t] = v;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -402,10 +402,10 @@ void displayBattVoltage()
|
|||
void displayVoltageOrAlarm()
|
||||
{
|
||||
if (g_vbat100mV > g_eeGeneral.vBatWarn && g_eeGeneral.temperatureWarn && getTemperature() >= g_eeGeneral.temperatureWarn) {
|
||||
putsTelemetryValue(6*FW-1, 3*FH, getTemperature(), UNIT_TEMPERATURE, BLINK|INVERS|DBLSIZE);
|
||||
putsTelemetryValue(6*FW-1, 2*FH, getTemperature(), UNIT_TEMPERATURE, BLINK|INVERS|DBLSIZE);
|
||||
}
|
||||
else if (g_vbat100mV > g_eeGeneral.vBatWarn && g_eeGeneral.mAhWarn && (g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.currentCalib)/8192/36) / 500 >= g_eeGeneral.mAhWarn) {
|
||||
putsTelemetryValue(7*FW-1, 3*FH, (g_eeGeneral.mAhUsed + Current_used*(488 + g_eeGeneral.currentCalib)/8192/36)/10, UNIT_MAH, BLINK|INVERS|DBLSIZE);
|
||||
putsTelemetryValue(7*FW-1, 2*FH, (g_eeGeneral.mAhUsed + Current_used*(488 + g_eeGeneral.currentCalib)/8192/36)/10, UNIT_MAH, BLINK|INVERS|DBLSIZE);
|
||||
}
|
||||
else {
|
||||
displayBattVoltage();
|
||||
|
|
|
@ -89,10 +89,13 @@ void menuStatisticsView(uint8_t event)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define MENU_DEBUG_COL_OFS (11*FW-2)
|
||||
#if defined(PCBTARANIS)
|
||||
#define MENU_DEBUG_COL1_OFS (11*FW-2)
|
||||
#elif defined(PCBSKY9X)
|
||||
#define MENU_DEBUG_COL1_OFS (11*FW-3)
|
||||
#define MENU_DEBUG_COL2_OFS (17*FW)
|
||||
#else
|
||||
#define MENU_DEBUG_COL_OFS (14*FW)
|
||||
#define MENU_DEBUG_COL1_OFS (14*FW)
|
||||
#endif
|
||||
|
||||
void menuStatisticsDebug(uint8_t event)
|
||||
|
@ -140,74 +143,76 @@ void menuStatisticsDebug(uint8_t event)
|
|||
#endif
|
||||
|
||||
#if defined(PCBSKY9X) && !defined(REVA)
|
||||
// current
|
||||
lcd_putsLeft(1*FH, STR_CPU_CURRENT);
|
||||
putsTelemetryValue(MENU_DEBUG_COL_OFS, 1*FH, getCurrent(), UNIT_MILLIAMPS, 0);
|
||||
putsTelemetryValue(MENU_DEBUG_COL1_OFS, 1*FH, getCurrent(), UNIT_MILLIAMPS, LEFT);
|
||||
uint32_t current_scale = 488 + g_eeGeneral.currentCalib;
|
||||
putsTelemetryValue(20*FW+2, 1*FH, Current_max*10*current_scale/8192, UNIT_RAW, 0);
|
||||
|
||||
lcd_putc(MENU_DEBUG_COL2_OFS, 1*FH, '>');
|
||||
putsTelemetryValue(MENU_DEBUG_COL2_OFS+FW+1, 1*FH, Current_max*10*current_scale/8192, UNIT_RAW, LEFT);
|
||||
// consumption
|
||||
lcd_putsLeft(2*FH, STR_CPU_MAH);
|
||||
putsTelemetryValue(MENU_DEBUG_COL_OFS, 2*FH, g_eeGeneral.mAhUsed + Current_used*current_scale/8192/36, UNIT_MAH, PREC1);
|
||||
putsTimer(17*FW+5*FWNUM+1, 2*FH, g_eeGeneral.globalTimer + sessionTimer, 0, 0);
|
||||
putsTelemetryValue(MENU_DEBUG_COL1_OFS, 2*FH, g_eeGeneral.mAhUsed + Current_used*current_scale/8192/36, UNIT_MAH, LEFT|PREC1);
|
||||
putsTimer(MENU_DEBUG_COL2_OFS, 2*FH, g_eeGeneral.globalTimer + sessionTimer, LEFT, 0);
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
lcd_putsLeft(3*FH, STR_CPU_TEMP);
|
||||
putsTelemetryValue(MENU_DEBUG_COL_OFS, 3*FH, getTemperature(), UNIT_TEMPERATURE, 0);
|
||||
putsTelemetryValue(20*FW+2, 3*FH, maxTemperature+g_eeGeneral.temperatureCalib, UNIT_TEMPERATURE, 0);
|
||||
putsTelemetryValue(MENU_DEBUG_COL1_OFS, 3*FH, getTemperature(), UNIT_TEMPERATURE, LEFT);
|
||||
lcd_putc(MENU_DEBUG_COL2_OFS, 3*FH, '>');
|
||||
putsTelemetryValue(MENU_DEBUG_COL2_OFS+FW+1, 3*FH, maxTemperature+g_eeGeneral.temperatureCalib, UNIT_TEMPERATURE, LEFT);
|
||||
#endif
|
||||
|
||||
#if defined(COPROCESSOR)
|
||||
lcd_putsLeft(4*FH, STR_COPROC_TEMP);
|
||||
|
||||
if (Coproc_read==0) {
|
||||
lcd_putsAtt(9*FW+2, 4*FH, PSTR("Co Proc NACK"),INVERS);
|
||||
lcd_putsAtt(MENU_DEBUG_COL1_OFS, 4*FH, PSTR("Co Proc NACK"),INVERS);
|
||||
}
|
||||
else if (Coproc_read==0x81) {
|
||||
lcd_putsAtt(9*FW+2, 4*FH, PSTR("Inst.TinyApp"),INVERS);
|
||||
lcd_putsAtt(MENU_DEBUG_COL1_OFS, 4*FH, PSTR("Inst.TinyApp"),INVERS);
|
||||
}
|
||||
else if (Coproc_read<3) {
|
||||
lcd_putsAtt(9*FW+2, 4*FH, PSTR("Upgr.TinyApp"),INVERS);
|
||||
lcd_putsAtt(MENU_DEBUG_COL1_OFS, 4*FH, PSTR("Upgr.TinyApp"),INVERS);
|
||||
}
|
||||
else {
|
||||
putsTelemetryValue(MENU_DEBUG_COL_OFS, 4*FH, Coproc_temp, UNIT_TEMPERATURE, 0);
|
||||
putsTelemetryValue(20*FW+2, 4*FH, Coproc_maxtemp, UNIT_TEMPERATURE, 0);
|
||||
putsTelemetryValue(MENU_DEBUG_COL1_OFS, 4*FH, Coproc_temp, UNIT_TEMPERATURE, LEFT);
|
||||
putsTelemetryValue(MENU_DEBUG_COL2_OFS, 4*FH, Coproc_maxtemp, UNIT_TEMPERATURE, LEFT);
|
||||
}
|
||||
#elif defined(PCBTARANIS) && !defined(SIMU)
|
||||
lcd_putsLeft(4*FH, "Free Mem");
|
||||
lcd_outdezAtt(MENU_DEBUG_COL_OFS, 4*FH, 0x20020000 - (unsigned int)heap, LEFT);
|
||||
lcd_outdezAtt(MENU_DEBUG_COL1_OFS, 4*FH, 0x20020000 - (unsigned int)heap, LEFT);
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
lcd_putsLeft(5*FH, STR_TMIXMAXMS);
|
||||
lcd_outdezAtt(MENU_DEBUG_COL_OFS, 5*FH, (maxMixerDuration)/20, PREC2|LEFT);
|
||||
lcd_outdezAtt(MENU_DEBUG_COL1_OFS, 5*FH, (maxMixerDuration)/20, PREC2|LEFT);
|
||||
lcd_puts(lcdLastPos, 5*FH, "ms");
|
||||
lcd_putsLeft(6*FH, STR_FREESTACKMINB);
|
||||
|
||||
#if LCD_W >= 212
|
||||
lcd_putsAtt(MENU_DEBUG_COL_OFS-1, 6*FH+1, "[Main]", SMLSIZE);
|
||||
lcd_putsAtt(MENU_DEBUG_COL1_OFS-1, 6*FH+1, "[Main]", SMLSIZE);
|
||||
lcd_outdezAtt(lcdLastPos, 6*FH, stack_free(0), UNSIGN|LEFT);
|
||||
lcd_putsAtt(lcdLastPos+2, 6*FH+1, "[Mix]", SMLSIZE);
|
||||
lcd_outdezAtt(lcdLastPos, 6*FH, stack_free(1), UNSIGN|LEFT);
|
||||
lcd_putsAtt(lcdLastPos+2, 6*FH+1, "[Audio]", SMLSIZE);
|
||||
lcd_outdezAtt(lcdLastPos, 6*FH, stack_free(2), UNSIGN|LEFT);
|
||||
#else
|
||||
lcdLastPos = MENU_DEBUG_COL_OFS;
|
||||
lcd_outdezAtt(lcdLastPos, 6*FH, stack_free(0), UNSIGN|LEFT);
|
||||
lcdLastPos += FW/2;
|
||||
lcd_outdezAtt(MENU_DEBUG_COL1_OFS, 6*FH, stack_free(0), UNSIGN|LEFT);
|
||||
lcd_puts(lcdLastPos, 6*FH, "/");
|
||||
lcd_outdezAtt(lcdLastPos, 6*FH, stack_free(1), UNSIGN|LEFT);
|
||||
lcdLastPos += FW/2;
|
||||
lcd_puts(lcdLastPos, 6*FH, "/");
|
||||
lcd_outdezAtt(lcdLastPos, 6*FH, stack_free(2), UNSIGN|LEFT);
|
||||
#endif
|
||||
|
||||
#else
|
||||
lcd_putsLeft(1*FH, STR_TMR1LATMAXUS);
|
||||
lcd_outdez8(MENU_DEBUG_COL_OFS , 1*FH, g_tmr1Latency_max/2 );
|
||||
lcd_outdez8(MENU_DEBUG_COL1_OFS , 1*FH, g_tmr1Latency_max/2 );
|
||||
lcd_putsLeft(2*FH, STR_TMR1LATMINUS);
|
||||
lcd_outdez8(MENU_DEBUG_COL_OFS , 2*FH, g_tmr1Latency_min/2 );
|
||||
lcd_outdez8(MENU_DEBUG_COL1_OFS , 2*FH, g_tmr1Latency_min/2 );
|
||||
lcd_putsLeft(3*FH, STR_TMR1JITTERUS);
|
||||
lcd_outdez8(MENU_DEBUG_COL_OFS , 3*FH, (g_tmr1Latency_max - g_tmr1Latency_min) /2 );
|
||||
lcd_outdez8(MENU_DEBUG_COL1_OFS , 3*FH, (g_tmr1Latency_max - g_tmr1Latency_min) /2 );
|
||||
lcd_putsLeft(4*FH, STR_TMIXMAXMS);
|
||||
lcd_outdezAtt(MENU_DEBUG_COL_OFS, 4*FH, (maxMixerDuration*100)/16, PREC2);
|
||||
lcd_outdezAtt(MENU_DEBUG_COL1_OFS, 4*FH, (maxMixerDuration*100)/16, PREC2);
|
||||
lcd_putsLeft(5*FH, STR_FREESTACKMINB);
|
||||
lcd_outdezAtt(14*FW, 5*FH, stack_free(), UNSIGN) ;
|
||||
#endif
|
||||
|
|
|
@ -322,8 +322,13 @@ PACK(typedef struct t_ScriptData {
|
|||
#define LIMITDATA_EXTRA char name[LEN_CHANNEL_NAME]; int8_t curve;
|
||||
#define swstate_t uint16_t
|
||||
#elif defined(PCBSKY9X)
|
||||
enum ModuleIndex {
|
||||
EXTERNAL_MODULE,
|
||||
EXTRA_MODULE,
|
||||
TRAINER_MODULE
|
||||
};
|
||||
#define MODELDATA_BITMAP
|
||||
#define MODELDATA_EXTRA ModuleData moduleData[NUM_MODULES]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS];
|
||||
#define MODELDATA_EXTRA uint8_t externalModule; uint8_t trainerMode; ModuleData moduleData[NUM_MODULES+1]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS];
|
||||
#define LIMITDATA_EXTRA
|
||||
#define swstate_t uint8_t
|
||||
#else
|
||||
|
@ -1242,31 +1247,18 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
|
|||
|
||||
#define ROTARY_ENCODER_MAX 1024
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define NUM_ROTARY_ENCODERS 0
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 0
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[1];
|
||||
#if defined(PCBTARANIS) || defined(REVX)
|
||||
#define NUM_ROTARY_ENCODERS 0
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[1];
|
||||
#elif defined(PCBSKY9X)
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 0
|
||||
#define NUM_ROTARY_ENCODERS 1
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[1];
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA
|
||||
#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS > 2
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 2
|
||||
#define NUM_ROTARY_ENCODERS (2+NUM_ROTARY_ENCODERS_EXTRA)
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[2];
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA int16_t rotaryEncodersExtra[MAX_FLIGHT_MODES][NUM_ROTARY_ENCODERS_EXTRA];
|
||||
#elif defined(CPUM2560) && ROTARY_ENCODERS <= 2
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 0
|
||||
#define NUM_ROTARY_ENCODERS 2
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[2];
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA
|
||||
#define NUM_ROTARY_ENCODERS 1
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[1];
|
||||
#elif defined(CPUM2560)
|
||||
#define NUM_ROTARY_ENCODERS 2
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[2];
|
||||
#else
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 0
|
||||
#define NUM_ROTARY_ENCODERS 0
|
||||
#define ROTARY_ENCODER_ARRAY
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA
|
||||
#define NUM_ROTARY_ENCODERS 0
|
||||
#define ROTARY_ENCODER_ARRAY
|
||||
#endif
|
||||
|
||||
#if defined(PCBSTD)
|
||||
|
@ -1680,7 +1672,8 @@ enum ThrottleSources {
|
|||
PACK(typedef struct t_ModelData {
|
||||
ModelHeader header;
|
||||
TimerData timers[MAX_TIMERS];
|
||||
uint8_t protocol:3; // not used on Taranis
|
||||
AVR_FIELD(uint8_t protocol:3);
|
||||
ARM_FIELD(uint8_t spare:3);
|
||||
uint8_t thrTrim:1; // Enable Throttle Trim
|
||||
AVR_FIELD(int8_t ppmNCH:4)
|
||||
ARM_FIELD(int8_t spare2:4)
|
||||
|
@ -1715,8 +1708,6 @@ PACK(typedef struct t_ModelData {
|
|||
|
||||
TELEMETRY_DATA
|
||||
|
||||
ROTARY_ENCODER_ARRAY_EXTRA
|
||||
|
||||
MODELDATA_EXTRA
|
||||
|
||||
}) ModelData;
|
||||
|
|
|
@ -577,15 +577,7 @@ uint8_t getRotaryEncoderFlightPhase(uint8_t idx)
|
|||
uint8_t phase = s_current_mixer_flight_mode;
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
if (phase == 0) return 0;
|
||||
#if ROTARY_ENCODERS > 2
|
||||
int16_t value;
|
||||
if(idx<(NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA))
|
||||
value = phaseAddress(phase)->rotaryEncoders[idx];
|
||||
else
|
||||
value = g_model.rotaryEncodersExtra[phase][idx-(NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA)];
|
||||
#else
|
||||
int16_t value = phaseAddress(phase)->rotaryEncoders[idx];
|
||||
#endif
|
||||
if (value <= ROTARY_ENCODER_MAX) return phase;
|
||||
uint8_t result = value-ROTARY_ENCODER_MAX-1;
|
||||
if (result >= phase) result++;
|
||||
|
@ -596,25 +588,13 @@ uint8_t getRotaryEncoderFlightPhase(uint8_t idx)
|
|||
|
||||
int16_t getRotaryEncoder(uint8_t idx)
|
||||
{
|
||||
#if ROTARY_ENCODERS > 2
|
||||
if(idx >= (NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA))
|
||||
return g_model.rotaryEncodersExtra[getRotaryEncoderFlightPhase(idx)][idx-(NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA)];
|
||||
#endif
|
||||
return phaseAddress(getRotaryEncoderFlightPhase(idx))->rotaryEncoders[idx];
|
||||
}
|
||||
|
||||
void incRotaryEncoder(uint8_t idx, int8_t inc)
|
||||
{
|
||||
g_rotenc[idx] += inc;
|
||||
#if ROTARY_ENCODERS > 2
|
||||
int16_t *value;
|
||||
if (idx < (NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA))
|
||||
value = &(phaseAddress(getRotaryEncoderFlightPhase(idx))->rotaryEncoders[idx]);
|
||||
else
|
||||
value = &(g_model.rotaryEncodersExtra[getRotaryEncoderFlightPhase(idx)][idx-(NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA)]);
|
||||
#else
|
||||
int16_t *value = &(phaseAddress(getRotaryEncoderFlightPhase(idx))->rotaryEncoders[idx]);
|
||||
#endif
|
||||
*value = limit((int16_t)-1024, (int16_t)(*value + (inc * 8)), (int16_t)+1024);
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
|
|
|
@ -417,9 +417,9 @@ enum PotType {
|
|||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#include "protocols/pulses_arm.h"
|
||||
#include "pulses/pulses_arm.h"
|
||||
#else
|
||||
#include "protocols/pulses_avr.h"
|
||||
#include "pulses/pulses_avr.h"
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
|
@ -474,26 +474,39 @@ enum PotType {
|
|||
#define IS_DSM2_SERIAL_PROTOCOL(protocol) (0)
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
static const int8_t maxChannelsModules[] = { 0, 8, 8, 0, -2 }; // relative to 8!
|
||||
static const int8_t maxChannelsXJT[] = { 0, 8, 0, 4 }; // relative to 8!
|
||||
#define NUM_CHANNELS(idx) (8+g_model.moduleData[idx].channelsCount)
|
||||
#define MAX_TRAINER_CHANNELS() (8)
|
||||
#define MAX_CHANNELS(idx) (idx==0 ? MAX_PORT1_CHANNELS() : (idx==1 ? MAX_PORT2_CHANNELS() : MAX_TRAINER_CHANNELS()))
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
static const int8_t maxChannelsModules[] = { 0, 8, 8, 0, -2 };
|
||||
static const int8_t maxChannelsXJT[] = { 0, 8, 0, 4 };
|
||||
#define IS_MODULE_XJT(idx) ((idx==0 || g_model.externalModule == MODULE_TYPE_XJT) && (g_model.moduleData[idx].rfProtocol != RF_PROTO_OFF))
|
||||
#define IS_MODULE_PPM(idx) (idx==2 || (idx==1 && g_model.externalModule == MODULE_TYPE_PPM))
|
||||
#define IS_MODULE_PPM(idx) (idx==TRAINER_MODULE || (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_PPM))
|
||||
#define IS_MODULE_XJT(idx) ((idx==INTERNAL_MODULE || g_model.externalModule==MODULE_TYPE_XJT) && (g_model.moduleData[idx].rfProtocol != RF_PROTO_OFF))
|
||||
#if defined(DSM2)
|
||||
#define IS_MODULE_DSM2(idx) (idx==1 && g_model.externalModule == MODULE_TYPE_DSM2)
|
||||
#define IS_MODULE_DSM2(idx) (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_DSM2)
|
||||
#else
|
||||
#define IS_MODULE_DSM2(idx) false
|
||||
#define IS_MODULE_DSM2(idx) (false)
|
||||
#endif
|
||||
#define NUM_CHANNELS(idx) (8+g_model.moduleData[idx].channelsCount)
|
||||
#define MAX_PORT1_CHANNELS() (maxChannelsXJT[1+g_model.moduleData[0].rfProtocol])
|
||||
#define MAX_PORT2_CHANNELS() ((g_model.externalModule == MODULE_TYPE_XJT) ? maxChannelsXJT[1+g_model.moduleData[1].rfProtocol] : maxChannelsModules[g_model.externalModule])
|
||||
#define MAX_TRAINER_CHANNELS() (8)
|
||||
#define MAX_CHANNELS(idx) (idx==0 ? MAX_PORT1_CHANNELS() : (idx==1 ? MAX_PORT2_CHANNELS() : MAX_TRAINER_CHANNELS()))
|
||||
#define MAX_PORT1_CHANNELS() (maxChannelsXJT[1+g_model.moduleData[INTERNAL_MODULE].rfProtocol])
|
||||
#define MAX_PORT2_CHANNELS() ((g_model.externalModule == MODULE_TYPE_XJT) ? maxChannelsXJT[1+g_model.moduleData[1].rfProtocol] : maxChannelsModules[g_model.externalModule])
|
||||
#define IS_PXX_RANGE_CHECK_ENABLE() (pxxFlag[INTERNAL_MODULE] == PXX_SEND_RANGECHECK || pxxFlag[EXTERNAL_MODULE] == PXX_SEND_RANGECHECK)
|
||||
#elif defined(PCBSKY9X) && defined(REVX)
|
||||
#define IS_MODULE_PPM(idx) (idx==TRAINER_MODULE || (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_PPM))
|
||||
#define IS_MODULE_XJT(idx) (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_XJT)
|
||||
#define IS_MODULE_DSM2(idx) (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_DSM2)
|
||||
#define MAX_PORT1_CHANNELS() ((g_model.externalModule == MODULE_TYPE_XJT) ? maxChannelsXJT[1+g_model.moduleData[EXTERNAL_MODULE].rfProtocol] : maxChannelsModules[g_model.externalModule])
|
||||
#define MAX_PORT2_CHANNELS() (8) // Only PPM
|
||||
#define IS_PXX_RANGE_CHECK_ENABLE() (pxxFlag[EXTERNAL_MODULE] == PXX_SEND_RANGECHECK)
|
||||
#elif defined(PCBSKY9X)
|
||||
#define IS_MODULE_XJT() (IS_PXX_PROTOCOL(g_model.protocol))
|
||||
#define NUM_PORT1_CHANNELS() (IS_PXX_PROTOCOL(g_model.protocol) ? 8 : (IS_DSM2_PROTOCOL(g_model.protocol) ? 6 : (8+g_model.moduleData[0].channelsCount)))
|
||||
#define NUM_PORT2_CHANNELS() (8+g_model.moduleData[1].channelsCount)
|
||||
#define NUM_CHANNELS(idx) (idx==0 ? NUM_PORT1_CHANNELS() : (8+g_model.moduleData[idx].channelsCount))
|
||||
#define IS_MODULE_PPM(idx) (idx==TRAINER_MODULE || idx==EXTRA_MODULE || (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_PPM))
|
||||
#define IS_MODULE_XJT(idx) (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_XJT)
|
||||
#define IS_MODULE_DSM2(idx) (idx==EXTERNAL_MODULE && g_model.externalModule==MODULE_TYPE_DSM2)
|
||||
#define MAX_PORT1_CHANNELS() ((g_model.externalModule == MODULE_TYPE_XJT) ? maxChannelsXJT[1+g_model.moduleData[0].rfProtocol] : maxChannelsModules[g_model.externalModule])
|
||||
#define MAX_PORT2_CHANNELS() (0) // Only PPM
|
||||
#define IS_PXX_RANGE_CHECK_ENABLE() (pxxFlag[EXTERNAL_MODULE] == PXX_SEND_RANGECHECK)
|
||||
#endif
|
||||
|
||||
#include "lcd.h"
|
||||
|
@ -540,6 +553,8 @@ enum BaseCurves {
|
|||
|
||||
#if defined(PCBTARANIS)
|
||||
#define SPLASH_NEEDED() (g_eeGeneral.splashMode != 3)
|
||||
#elif defined(CPUARM)
|
||||
#define SPLASH_NEEDED() (g_model.externalModule != MODULE_TYPE_DSM2 && !g_eeGeneral.splashMode)
|
||||
#else
|
||||
#define SPLASH_NEEDED() (!IS_DSM2_PROTOCOL(g_model.protocol) && !g_eeGeneral.splashMode)
|
||||
#endif
|
||||
|
|
|
@ -42,53 +42,55 @@ uint32_t failsafeCounter[NUM_MODULES] = { MODULES_INIT(100) };
|
|||
|
||||
void setupPulses(unsigned int port)
|
||||
{
|
||||
uint8_t required_protocol;
|
||||
|
||||
heartbeat |= (HEART_TIMER_PULSES << port);
|
||||
|
||||
switch (port) {
|
||||
#if defined(PCBTARANIS)
|
||||
uint8_t required_protocol;
|
||||
|
||||
if (port == INTERNAL_MODULE) {
|
||||
required_protocol = g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF ? PROTO_NONE : PROTO_PXX;
|
||||
}
|
||||
else {
|
||||
port = EXTERNAL_MODULE; // ensure it's external module only
|
||||
switch (g_model.externalModule) {
|
||||
case MODULE_TYPE_PPM:
|
||||
required_protocol = PROTO_PPM;
|
||||
break;
|
||||
case MODULE_TYPE_XJT:
|
||||
required_protocol = PROTO_PXX;
|
||||
break;
|
||||
#if defined(DSM2)
|
||||
case MODULE_TYPE_DSM2:
|
||||
required_protocol = limit<uint8_t>(PROTO_DSM2_LP45, PROTO_DSM2_LP45+g_model.moduleData[EXTERNAL_MODULE].rfProtocol, PROTO_DSM2_DSMX);
|
||||
// The module is set to OFF during one second before BIND start
|
||||
{
|
||||
static tmr10ms_t bindStartTime = 0;
|
||||
if (dsm2Flag == DSM2_BIND_FLAG) {
|
||||
if (bindStartTime == 0) bindStartTime = get_tmr10ms();
|
||||
if ((tmr10ms_t)(get_tmr10ms() - bindStartTime) < 100) {
|
||||
required_protocol = PROTO_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
bindStartTime = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
required_protocol = PROTO_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
uint8_t required_protocol = g_model.protocol;
|
||||
case INTERNAL_MODULE:
|
||||
required_protocol = g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF ? PROTO_NONE : PROTO_PXX;
|
||||
break;
|
||||
#endif
|
||||
|
||||
if (s_pulses_paused)
|
||||
default:
|
||||
port = EXTERNAL_MODULE; // ensure it's external module only
|
||||
switch (g_model.externalModule) {
|
||||
case MODULE_TYPE_PPM:
|
||||
required_protocol = PROTO_PPM;
|
||||
break;
|
||||
case MODULE_TYPE_XJT:
|
||||
required_protocol = PROTO_PXX;
|
||||
break;
|
||||
#if defined(DSM2)
|
||||
case MODULE_TYPE_DSM2:
|
||||
required_protocol = limit<uint8_t>(PROTO_DSM2_LP45, PROTO_DSM2_LP45+g_model.moduleData[EXTERNAL_MODULE].rfProtocol, PROTO_DSM2_DSMX);
|
||||
// The module is set to OFF during one second before BIND start
|
||||
{
|
||||
static tmr10ms_t bindStartTime = 0;
|
||||
if (dsm2Flag == DSM2_BIND_FLAG) {
|
||||
if (bindStartTime == 0) bindStartTime = get_tmr10ms();
|
||||
if ((tmr10ms_t)(get_tmr10ms() - bindStartTime) < 100) {
|
||||
required_protocol = PROTO_NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
bindStartTime = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
required_protocol = PROTO_NONE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (s_pulses_paused) {
|
||||
required_protocol = PROTO_NONE;
|
||||
}
|
||||
|
||||
if (s_current_protocol[port] != required_protocol) {
|
||||
|
|
@ -382,7 +382,7 @@ extern OS_MutexID audioMutex;
|
|||
#define CoLeaveMutexSection(m) pthread_mutex_unlock(&(m))
|
||||
#define CoTickDelay(...)
|
||||
#define CoCreateFlag(...) 0
|
||||
#define UART3_Configure(...)
|
||||
inline void UART3_Configure(uint32_t baudrate, uint32_t masterClock) { }
|
||||
#define UART_Stop(...)
|
||||
#define UART3_Stop(...)
|
||||
#define USART_GetITStatus(...) 0
|
||||
|
|
|
@ -411,7 +411,7 @@ uint16_t anaIn(uint8_t chan)
|
|||
return 1000;
|
||||
#elif defined(PCBSKY9X)
|
||||
else if (chan == TX_VOLTAGE)
|
||||
return 1500;
|
||||
return 5.1*1500/11.3;
|
||||
else if (chan == TX_CURRENT)
|
||||
return 100;
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
|
|
|
@ -122,7 +122,7 @@ inline void setup_switches()
|
|||
#define sam_boot()
|
||||
#else
|
||||
|
||||
inline void UART3_Configure( uint32_t baudrate, uint32_t masterClock)
|
||||
inline void UART3_Configure(uint32_t baudrate, uint32_t masterClock)
|
||||
{
|
||||
// const Pin pPins[] = CONSOLE_PINS;
|
||||
register Uart *pUart = BT_USART;
|
||||
|
|
|
@ -82,13 +82,14 @@ TelemetryProtocol telemetryProtocol = PROTOCOL_NONE;
|
|||
|
||||
TelemetryProtocol getTelemetryProtocol()
|
||||
{
|
||||
if (IS_MODULE_XJT(EXTERNAL_MODULE))
|
||||
return PROTOCOL_FRSKY_SPORT;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
if (IS_MODULE_XJT(0) || IS_MODULE_XJT(1))
|
||||
if (IS_MODULE_XJT(INTERNAL_MODULE))
|
||||
return PROTOCOL_FRSKY_SPORT;
|
||||
#elif defined(PCBSKY9X)
|
||||
if (IS_MODULE_XJT())
|
||||
return PROTOCOL_FRSKY_SPORT;
|
||||
#endif
|
||||
|
||||
return PROTOCOL_FRSKY_D;
|
||||
}
|
||||
#else
|
||||
|
@ -509,12 +510,12 @@ void telemetryReset()
|
|||
void telemetryInit(void)
|
||||
{
|
||||
#if defined(PCBTARANIS)
|
||||
if (IS_MODULE_XJT(0) || IS_MODULE_XJT(1))
|
||||
if (IS_MODULE_XJT(INTERNAL_MODULE) || IS_MODULE_XJT(EXTERNAL_MODULE))
|
||||
telemetryPortInit(FRSKY_SPORT_BAUDRATE);
|
||||
else
|
||||
telemetryPortInit(FRSKY_D_BAUDRATE);
|
||||
#elif defined(PCBSKY9X)
|
||||
if (IS_MODULE_XJT())
|
||||
if (IS_MODULE_XJT(EXTERNAL_MODULE))
|
||||
telemetryPortInit(FRSKY_SPORT_BAUDRATE);
|
||||
else
|
||||
telemetryPortInit(FRSKY_D_BAUDRATE);
|
||||
|
|
|
@ -110,7 +110,7 @@ const pm_char STR_OPEN9X[] PROGMEM =
|
|||
ISTR(COUNTRYCODES)
|
||||
ISTR(VFAILSAFE)
|
||||
#endif
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
ISTR(VTRAINERMODES)
|
||||
ISTR(TARANIS_PROTOCOLS)
|
||||
ISTR(XJT_PROTOCOLS)
|
||||
|
@ -485,14 +485,17 @@ const pm_char STR_BLCOLOR[] PROGMEM = TR_BLCOLOR;
|
|||
const char * STR_CSW_HEADERS[] = TR_CSW_HEADERS;
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
const pm_char STR_TRAINER[] PROGMEM = TR_TRAINER;
|
||||
const pm_char STR_MODULE_BIND[] PROGMEM = TR_MODULE_BIND;
|
||||
const pm_char STR_CHANNELRANGE[] PROGMEM = TR_CHANNELRANGE;
|
||||
const pm_char STR_SET[] PROGMEM = TR_SET;
|
||||
#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 = TR_ENABLE_POPUP;
|
||||
|
|
|
@ -177,7 +177,7 @@ extern const pm_char STR_OPEN9X[];
|
|||
#else
|
||||
#define OFS_VTRAINERMODES (OFS_VFAILSAFE)
|
||||
#endif
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
#define OFS_TARANIS_PROTOCOLS (OFS_VTRAINERMODES + sizeof(TR_VTRAINERMODES))
|
||||
#define OFS_XJT_PROTOCOLS (OFS_TARANIS_PROTOCOLS + sizeof(TR_TARANIS_PROTOCOLS))
|
||||
#define OFS_DSM_PROTOCOLS (OFS_XJT_PROTOCOLS + sizeof(TR_XJT_PROTOCOLS))
|
||||
|
@ -274,7 +274,7 @@ extern const pm_char STR_OPEN9X[];
|
|||
#define STR_VFAILSAFE (STR_OPEN9X + OFS_VFAILSAFE)
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
#define STR_VTRAINERMODES (STR_OPEN9X + OFS_VTRAINERMODES)
|
||||
#define STR_TARANIS_PROTOCOLS (STR_OPEN9X + OFS_TARANIS_PROTOCOLS)
|
||||
#define STR_XJT_PROTOCOLS (STR_OPEN9X + OFS_XJT_PROTOCOLS)
|
||||
|
@ -665,14 +665,17 @@ extern const pm_char STR_BLCOLOR[];
|
|||
extern const char * STR_CSW_HEADERS[];
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
extern const pm_char STR_TRAINER[];
|
||||
extern const pm_char STR_MODULE_BIND[];
|
||||
extern const pm_char STR_CHANNELRANGE[];
|
||||
extern const pm_char STR_SET[];
|
||||
#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[];
|
||||
|
|
|
@ -104,14 +104,12 @@
|
|||
|
||||
#define LEN_RETA123 "\001"
|
||||
|
||||
#if defined(PCBGRUVIN9X)
|
||||
#if ROTARY_ENCODERS > 2
|
||||
#define TR_RETA123 "RETA123abcd"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#endif
|
||||
#elif defined(PCBTARANIS)
|
||||
#if defined(PCBTARANIS) || defined(REVX)
|
||||
#define TR_RETA123 "RETA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "RETA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123"
|
||||
#endif
|
||||
|
@ -678,11 +676,11 @@
|
|||
#define TR_SPEAKER_VOLUME INDENT "Volume" // TODO could be TR_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_TEMP "CPU Temp."
|
||||
#define TR_CPU_CURRENT "Current"
|
||||
#define TR_CPU_MAH "Consumpt."
|
||||
#define TR_COPROC "CoProc."
|
||||
#define TR_COPROC_TEMP "MB Temp. \016>"
|
||||
#define TR_COPROC_TEMP "MB Temp."
|
||||
#define TR_CAPAWARNING INDENT "Capacity Low"
|
||||
#define TR_TEMPWARNING INDENT "Overheat"
|
||||
#define TR_FUNC "Func"
|
||||
|
@ -732,7 +730,7 @@
|
|||
#define TR_CONFIRM_FORMAT "Confirm Format?"
|
||||
#define TR_INTERNALRF "Internal RF"
|
||||
#define TR_EXTERNALRF "External RF"
|
||||
#define TR_FAILSAFE INDENT "Failsafe mode"
|
||||
#define TR_FAILSAFE TR(INDENT "Failsafe", INDENT "Failsafe mode")
|
||||
#define TR_FAILSAFESET "FAILSAFE SETTINGS"
|
||||
#define TR_COUNTRYCODE "Country Code"
|
||||
#define TR_VOICELANG "Voice Language"
|
||||
|
@ -756,15 +754,15 @@
|
|||
#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_MODULE_BIND TR("[Bnd]", "[Bind]")
|
||||
#define TR_MODULE_RANGE TR("[Rng]", "[Range]")
|
||||
#define TR_RESET_BTN "[Reset]"
|
||||
#define TR_SET "[Set]"
|
||||
#define TR_TRAINER "Trainer Port"
|
||||
#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_CHANNELRANGE TR(INDENT "Ch. Range", INDENT "Channel Range")
|
||||
#define TR_LOWALARM INDENT "Low Alarm"
|
||||
#define TR_CRITICALALARM INDENT "Critical Alarm"
|
||||
#define TR_ENABLE_POPUP "Enable Popup"
|
||||
|
|
|
@ -104,14 +104,12 @@
|
|||
|
||||
#define LEN_RETA123 "\001"
|
||||
|
||||
#if defined(PCBGRUVIN9X)
|
||||
#if ROTARY_ENCODERS > 2
|
||||
#define TR_RETA123 "DPGA123abcd"
|
||||
#else
|
||||
#define TR_RETA123 "DPGA123ab"
|
||||
#endif
|
||||
#elif defined(PCBTARANIS)
|
||||
#if defined(PCBTARANIS) || defined(REVX)
|
||||
#define TR_RETA123 "DPGA123LR"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "DPGA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "DPGA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "DPGA123"
|
||||
#endif
|
||||
|
@ -726,7 +724,7 @@
|
|||
#define TR_CONFIRM_FORMAT "Confirmer Formatage?"
|
||||
#define TR_INTERNALRF "HF interne"
|
||||
#define TR_EXTERNALRF "HF externe"
|
||||
#define TR_FAILSAFE INDENT "Type failsafe"
|
||||
#define TR_FAILSAFE TR(INDENT "Failsafe", INDENT "Type failsafe")
|
||||
#define TR_FAILSAFESET "REGLAGES FAILSAFE"
|
||||
#define TR_COUNTRYCODE TR("Zone géo.","Zone géographique")
|
||||
#define TR_VOICELANG TR("Langue voix", "Langue annonces vocales")
|
||||
|
@ -758,7 +756,7 @@
|
|||
#define TR_ANTENNAPROBLEM CENTER "Antenne radio défectueuse!"
|
||||
#define TR_MODELIDUSED TR("ID déjà affecté", "No de modèle déjà utilisé")
|
||||
#define TR_MODULE INDENT "Type de module"
|
||||
#define TR_CHANNELRANGE INDENT "Plage de canaux"
|
||||
#define TR_CHANNELRANGE TR(INDENT "Canaux", INDENT "Plage de canaux")
|
||||
#define TR_LOWALARM INDENT "Alarme basse"
|
||||
#define TR_CRITICALALARM INDENT "Alarme critique"
|
||||
#define TR_ENABLE_POPUP "Activer Popup"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue