mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 00:35:18 +03:00
parent
170a8ff996
commit
6516029fd1
26 changed files with 72 additions and 84 deletions
|
@ -452,12 +452,12 @@ void lcdDraw8bitsNumber(coord_t x, coord_t y, int8_t val)
|
|||
lcdDrawNumber(x, y, val);
|
||||
}
|
||||
|
||||
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags flags)
|
||||
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags flags)
|
||||
{
|
||||
lcdDrawNumber(x, y, val, flags, 0);
|
||||
}
|
||||
|
||||
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags flags, uint8_t len)
|
||||
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags flags, uint8_t len)
|
||||
{
|
||||
char str[16+1];
|
||||
char *s = str+16;
|
||||
|
@ -540,7 +540,7 @@ void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat, Lc
|
|||
#endif
|
||||
|
||||
|
||||
void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlags att)
|
||||
void lcdDrawVerticalLine(coord_t x, coord_t y, coord_t h, uint8_t pat, LcdFlags att)
|
||||
{
|
||||
if (x >= LCD_W) return;
|
||||
// should never happen on 9X
|
||||
|
@ -576,7 +576,7 @@ void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlag
|
|||
}
|
||||
}
|
||||
|
||||
void lcdDrawSolidVerticalLine(coord_t x, scoord_t y, scoord_t h, LcdFlags att)
|
||||
void lcdDrawSolidVerticalLine(coord_t x, coord_t y, coord_t h, LcdFlags att)
|
||||
{
|
||||
lcdDrawVerticalLine(x, y, h, SOLID, att);
|
||||
}
|
||||
|
@ -591,9 +591,9 @@ void lcdDrawRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat, LcdFla
|
|||
}
|
||||
|
||||
#if !defined(BOOT)
|
||||
void lcdDrawFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, uint8_t pat, LcdFlags att)
|
||||
void lcdDrawFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat, LcdFlags att)
|
||||
{
|
||||
for (scoord_t i=y; i<(scoord_t)(y+h); i++) { // cast to scoord_t needed otherwise (y+h) is promoted to int (see #5055)
|
||||
for (coord_t i=y; i<y+h; i++) { // cast to coord_t needed otherwise (y+h) is promoted to int (see #5055)
|
||||
if ((att&ROUND) && (i==y || i==y+h-1))
|
||||
lcdDrawHorizontalLine(x+1, i, w-2, pat, att);
|
||||
else
|
||||
|
@ -621,7 +621,7 @@ void drawRtcTime(coord_t x, coord_t y, LcdFlags att)
|
|||
}
|
||||
#endif
|
||||
|
||||
void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att, LcdFlags att2)
|
||||
void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att, LcdFlags att2)
|
||||
{
|
||||
div_t qr;
|
||||
if (IS_RIGHT_ALIGNED(att)) {
|
||||
|
@ -841,7 +841,7 @@ void drawShortTrimMode(coord_t x, coord_t y, uint8_t fm, uint8_t idx, LcdFlags a
|
|||
}
|
||||
}
|
||||
|
||||
void drawValueWithUnit(coord_t x, coord_t y, lcdint_t val, uint8_t unit, LcdFlags att)
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int val, uint8_t unit, LcdFlags att)
|
||||
{
|
||||
// convertUnit(val, unit);
|
||||
lcdDrawNumber(x, y, val, att & (~NO_UNIT));
|
||||
|
|
|
@ -23,15 +23,14 @@
|
|||
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef int coord_t;
|
||||
typedef uint32_t LcdFlags;
|
||||
typedef uint8_t display_t;
|
||||
|
||||
#define BOX_WIDTH 23
|
||||
#define coord_t uint8_t
|
||||
#define scoord_t int8_t
|
||||
#define CENTER
|
||||
#define CENTER_OFS 0
|
||||
|
||||
typedef int32_t lcdint_t;
|
||||
typedef uint32_t lcduint_t;
|
||||
|
||||
#define FW 6
|
||||
#define FWNUM 5
|
||||
#define FH 8
|
||||
|
@ -89,9 +88,6 @@
|
|||
#define TIMEHOUR 0x2000
|
||||
#define STREXPANDED 0x4000
|
||||
|
||||
typedef uint32_t LcdFlags;
|
||||
|
||||
#define display_t uint8_t
|
||||
#define DISPLAY_BUFFER_SIZE (LCD_W*((LCD_H+7)/8))
|
||||
|
||||
extern display_t displayBuf[DISPLAY_BUFFER_SIZE];
|
||||
|
@ -122,8 +118,8 @@ void lcdDrawTextAlignedLeft(coord_t y, const char * s);
|
|||
void lcdDrawHexNumber(coord_t x, coord_t y, uint32_t val, LcdFlags mode=0);
|
||||
void lcdDrawHexChar(coord_t x, coord_t y, uint8_t val, LcdFlags flags=0);
|
||||
|
||||
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags mode, uint8_t len);
|
||||
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags mode=0);
|
||||
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags mode, uint8_t len);
|
||||
void lcdDrawNumber(coord_t x, coord_t y, int val, LcdFlags mode=0);
|
||||
void lcdDraw8bitsNumber(coord_t x, coord_t y, int8_t val);
|
||||
|
||||
void drawStringWithIndex(coord_t x, coord_t y, const char * str, uint8_t idx, LcdFlags att=0);
|
||||
|
@ -145,14 +141,12 @@ void putsChnLetter(coord_t x, coord_t y, uint8_t idx, LcdFlags attr);
|
|||
void putsVolts(coord_t x, coord_t y, uint16_t volts, LcdFlags att);
|
||||
void putsVBat(coord_t x, coord_t y, LcdFlags att);
|
||||
|
||||
|
||||
#define putstime_t int32_t
|
||||
#define FlightModesType uint16_t
|
||||
#define FlightModesType uint16_t
|
||||
|
||||
void drawRtcTime(coord_t x, coord_t y, LcdFlags att);
|
||||
void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att, LcdFlags att2);
|
||||
void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att, LcdFlags att2);
|
||||
void drawReceiverName(coord_t x, coord_t y, uint8_t moduleIdx, uint8_t receiverIdx, LcdFlags flags=0);
|
||||
inline void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att)
|
||||
inline void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att)
|
||||
{
|
||||
drawTimer(x, y, tme, att, att);
|
||||
}
|
||||
|
@ -164,13 +158,11 @@ void lcdDrawPoint(coord_t x, coord_t y, LcdFlags att=0);
|
|||
void lcdMaskPoint(uint8_t *p, uint8_t mask, LcdFlags att=0);
|
||||
void lcdDrawSolidHorizontalLine(coord_t x, coord_t y, coord_t w, LcdFlags att=0);
|
||||
void lcdDrawHorizontalLine(coord_t x, coord_t y, coord_t w, uint8_t pat, LcdFlags att=0);
|
||||
void lcdDrawSolidVerticalLine(coord_t x, scoord_t y, scoord_t h, LcdFlags att=0);
|
||||
void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlags att=0);
|
||||
|
||||
void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat=SOLID, LcdFlags att=0);
|
||||
|
||||
void lcdDrawFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, uint8_t pat=SOLID, LcdFlags att=0);
|
||||
inline void lcdDrawSolidFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, LcdFlags att=0)
|
||||
void lcdDrawSolidVerticalLine(coord_t x, coord_t y, coord_t h, LcdFlags att=0);
|
||||
void lcdDrawVerticalLine(coord_t x, coord_t y, coord_t h, uint8_t pat, LcdFlags att=0);
|
||||
void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat=SOLID, LcdFlags att=0);
|
||||
void lcdDrawFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat=SOLID, LcdFlags att=0);
|
||||
inline void lcdDrawSolidFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, LcdFlags att=0)
|
||||
{
|
||||
lcdDrawFilledRect(x, y, w, h, SOLID, att);
|
||||
}
|
||||
|
@ -178,7 +170,10 @@ void lcdDrawRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat=SOLID,
|
|||
|
||||
void lcdInvertLine(int8_t line);
|
||||
#define lcdInvertLastLine() lcdInvertLine(LCD_LINES-1)
|
||||
inline void lcdDrawSquare(coord_t x, coord_t y, coord_t w, LcdFlags att=0) { lcdDrawRect(x, y, w, w, SOLID, att); }
|
||||
inline void lcdDrawSquare(coord_t x, coord_t y, coord_t w, LcdFlags att=0)
|
||||
{
|
||||
lcdDrawRect(x, y, w, w, SOLID, att);
|
||||
}
|
||||
|
||||
void drawTelemetryTopBar();
|
||||
|
||||
|
@ -188,7 +183,7 @@ void drawTelemetryTopBar();
|
|||
lcdDrawSolidVerticalLine(xx+1,yy-ll,ll)
|
||||
|
||||
|
||||
void lcdClear(void);
|
||||
void lcdClear();
|
||||
void lcdDraw1bitBitmap(coord_t x, coord_t y, const unsigned char * img, uint8_t idx, LcdFlags att=0);
|
||||
inline void lcdDrawBitmap(coord_t x, coord_t y, const uint8_t * bitmap)
|
||||
{
|
||||
|
|
|
@ -759,7 +759,7 @@ void menuModelSetup(event_t event)
|
|||
|
||||
case ITEM_MODEL_SETUP_INTERNAL_MODULE_TYPE:
|
||||
{
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_MODE);
|
||||
#if defined(INTERNAL_MODULE_PXX1)
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_INTERNAL_MODULE_PROTOCOLS, g_model.moduleData[INTERNAL_MODULE].type, menuHorizontalPosition==0 ? attr : 0);
|
||||
if (isModuleXJT(INTERNAL_MODULE))
|
||||
|
@ -821,7 +821,7 @@ void menuModelSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_MODEL_SETUP_EXTERNAL_MODULE_TYPE:
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_MODE);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_EXTERNAL_MODULE_PROTOCOLS, g_model.moduleData[EXTERNAL_MODULE].type, menuHorizontalPosition==0 ? attr : 0);
|
||||
if (isModuleXJT(EXTERNAL_MODULE))
|
||||
lcdDrawTextAtIndex(lcdNextPos + 3, y, STR_ACCST_RF_PROTOCOLS, 1+g_model.moduleData[EXTERNAL_MODULE].rfProtocol, menuHorizontalPosition==1 ? attr : 0);
|
||||
|
@ -963,7 +963,7 @@ void menuModelSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_MODEL_SETUP_TRAINER_MODE:
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_MODE);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_VTRAINERMODES, g_model.trainerData.mode, attr);
|
||||
if (attr) {
|
||||
g_model.trainerData.mode = checkIncDec(event, g_model.trainerData.mode, 0, TRAINER_MODE_MAX(), EE_MODEL, isTrainerModeAvailable);
|
||||
|
|
|
@ -354,7 +354,7 @@ void menuRadioSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_SETUP_HAPTIC_MODE:
|
||||
g_eeGeneral.hapticMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_MODE, STR_VBEEPMODE, g_eeGeneral.hapticMode, -2, 1, attr, event);
|
||||
g_eeGeneral.hapticMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, INDENT TR_MODE, STR_VBEEPMODE, g_eeGeneral.hapticMode, -2, 1, attr, event);
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_HAPTIC_LENGTH:
|
||||
|
@ -464,7 +464,7 @@ void menuRadioSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_SETUP_BACKLIGHT_MODE:
|
||||
g_eeGeneral.backlightMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_MODE, STR_VBLMODE, g_eeGeneral.backlightMode, e_backlight_mode_off, e_backlight_mode_on, attr, event);
|
||||
g_eeGeneral.backlightMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, INDENT TR_MODE, STR_VBLMODE, g_eeGeneral.backlightMode, e_backlight_mode_off, e_backlight_mode_on, attr, event);
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_FLASH_BEEP:
|
||||
|
@ -603,7 +603,7 @@ void menuRadioSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_SETUP_STICK_MODE_LABELS:
|
||||
lcdDrawTextAlignedLeft(y, NO_INDENT(STR_MODE));
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
lcdDraw1bitBitmap(5*FW+i*(4*FW+2), y, sticks, i, 0);
|
||||
#if defined(FRSKY_STICKS) && !defined(PCBTARANIS)
|
||||
|
|
|
@ -477,7 +477,7 @@ void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat, Lc
|
|||
}
|
||||
#endif
|
||||
|
||||
void lcdDrawSolidVerticalLine(coord_t x, scoord_t y, scoord_t h, LcdFlags att)
|
||||
void lcdDrawSolidVerticalLine(coord_t x, coord_t y, coord_t h, LcdFlags att)
|
||||
{
|
||||
lcdDrawVerticalLine(x, y, h, SOLID, att);
|
||||
}
|
||||
|
@ -492,9 +492,9 @@ void lcdDrawRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat, LcdFla
|
|||
}
|
||||
|
||||
#if !defined(BOOT)
|
||||
void lcdDrawFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, uint8_t pat, LcdFlags att)
|
||||
void lcdDrawFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat, LcdFlags att)
|
||||
{
|
||||
for (scoord_t i=y; i<(scoord_t)(y+h); i++) {
|
||||
for (coord_t i=y; i<y+h; i++) {
|
||||
if ((att&ROUND) && (i==y || i==y+h-1))
|
||||
lcdDrawHorizontalLine(x+1, i, w-2, pat, att);
|
||||
else
|
||||
|
@ -526,7 +526,7 @@ void drawRtcTime(coord_t x, coord_t y, LcdFlags att)
|
|||
drawTimer(x, y, getValue(MIXSRC_TX_TIME), att, att);
|
||||
}
|
||||
|
||||
void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att, LcdFlags att2)
|
||||
void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att, LcdFlags att2)
|
||||
{
|
||||
div_t qr;
|
||||
|
||||
|
@ -735,7 +735,7 @@ void drawTrimMode(coord_t x, coord_t y, uint8_t phase, uint8_t idx, LcdFlags att
|
|||
}
|
||||
}
|
||||
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int32_t val, uint8_t unit, LcdFlags att)
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int val, uint8_t unit, LcdFlags att)
|
||||
{
|
||||
// convertUnit(val, unit);
|
||||
lcdDrawNumber(x, y, val, att & (~NO_UNIT));
|
||||
|
@ -887,7 +887,7 @@ void lcdDrawHorizontalLine(coord_t x, coord_t y, coord_t w, uint8_t pat, LcdFlag
|
|||
}
|
||||
}
|
||||
|
||||
void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlags att)
|
||||
void lcdDrawVerticalLine(coord_t x, coord_t y, coord_t h, uint8_t pat, LcdFlags att)
|
||||
{
|
||||
if (x >= LCD_W) return;
|
||||
if (y >= LCD_H) return;
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
#ifndef _LCD_H_
|
||||
#define _LCD_H_
|
||||
|
||||
typedef int coord_t;
|
||||
typedef uint32_t LcdFlags;
|
||||
typedef uint8_t display_t;
|
||||
|
||||
#define BOX_WIDTH 31
|
||||
#define coord_t int
|
||||
#define scoord_t int
|
||||
#define CENTER "\015"
|
||||
#define CENTER_OFS (7*FW-FW/2)
|
||||
|
||||
#define lcdint_t int32_t
|
||||
|
||||
#define FW 6
|
||||
#define FWNUM 5
|
||||
#define FH 8
|
||||
|
@ -84,9 +84,6 @@
|
|||
#define GREY_DEFAULT GREY(11)
|
||||
#define COLOUR_MASK(x) ((x) & 0x0F0000)
|
||||
|
||||
#define LcdFlags uint32_t
|
||||
|
||||
#define display_t uint8_t
|
||||
#define DISPLAY_BUFFER_SIZE (LCD_W*LCD_H*4/8)
|
||||
|
||||
#if (defined(PCBX9E) || defined(PCBX9DP)) && defined(LCD_DUAL_BUFFER)
|
||||
|
@ -135,11 +132,9 @@ void putsChnLetter(coord_t x, coord_t y, uint8_t idx, LcdFlags attr);
|
|||
void putsVolts(coord_t x, coord_t y, uint16_t volts, LcdFlags att);
|
||||
void putsVBat(coord_t x, coord_t y, LcdFlags att);
|
||||
|
||||
#define putstime_t int32_t
|
||||
|
||||
void drawRtcTime(coord_t x, coord_t y, LcdFlags att);
|
||||
void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att, LcdFlags att2);
|
||||
inline void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags att)
|
||||
void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att, LcdFlags att2);
|
||||
inline void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att)
|
||||
{
|
||||
drawTimer(x, y, tme, att, att);
|
||||
}
|
||||
|
@ -151,11 +146,11 @@ void lcdDrawPoint(coord_t x, coord_t y, LcdFlags att=0);
|
|||
void lcdMaskPoint(uint8_t *p, uint8_t mask, LcdFlags att=0);
|
||||
void lcdDrawSolidHorizontalLine(coord_t x, coord_t y, coord_t w, LcdFlags att=0);
|
||||
void lcdDrawHorizontalLine(coord_t x, coord_t y, coord_t w, uint8_t pat, LcdFlags att=0);
|
||||
void lcdDrawSolidVerticalLine(coord_t x, scoord_t y, scoord_t h, LcdFlags att=0);
|
||||
void lcdDrawVerticalLine(coord_t x, scoord_t y, scoord_t h, uint8_t pat, LcdFlags att=0);
|
||||
void lcdDrawSolidVerticalLine(coord_t x, coord_t y, coord_t h, LcdFlags att=0);
|
||||
void lcdDrawVerticalLine(coord_t x, coord_t y, coord_t h, uint8_t pat, LcdFlags att=0);
|
||||
void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat=SOLID, LcdFlags att=0);
|
||||
void lcdDrawFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, uint8_t pat=SOLID, LcdFlags att=0);
|
||||
inline void lcdDrawSolidFilledRect(coord_t x, scoord_t y, coord_t w, coord_t h, LcdFlags att=0)
|
||||
void lcdDrawFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t pat=SOLID, LcdFlags att=0);
|
||||
inline void lcdDrawSolidFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, LcdFlags att=0)
|
||||
{
|
||||
lcdDrawFilledRect(x, y, w, h, SOLID, att);
|
||||
}
|
||||
|
|
|
@ -717,7 +717,7 @@ void menuModelSetup(event_t event)
|
|||
|
||||
case ITEM_MODEL_SETUP_INTERNAL_MODULE_TYPE:
|
||||
{
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_MODE);
|
||||
#if defined(INTERNAL_MODULE_PXX1)
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_INTERNAL_MODULE_PROTOCOLS, g_model.moduleData[INTERNAL_MODULE].type, menuHorizontalPosition==0 ? attr : 0);
|
||||
if (isModuleXJT(INTERNAL_MODULE))
|
||||
|
@ -768,7 +768,7 @@ void menuModelSetup(event_t event)
|
|||
}
|
||||
|
||||
case ITEM_MODEL_SETUP_TRAINER_MODE:
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_MODE);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_VTRAINERMODES, g_model.trainerData.mode, attr);
|
||||
if (attr) {
|
||||
g_model.trainerData.mode = checkIncDec(event, g_model.trainerData.mode, 0, TRAINER_MODE_MAX(), EE_MODEL, isTrainerModeAvailable);
|
||||
|
@ -780,7 +780,7 @@ void menuModelSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_MODEL_SETUP_EXTERNAL_MODULE_TYPE:
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
lcdDrawTextAlignedLeft(y, INDENT TR_MODE);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_EXTERNAL_MODULE_PROTOCOLS, g_model.moduleData[EXTERNAL_MODULE].type, menuHorizontalPosition==0 ? attr : 0);
|
||||
if (isModuleXJT(EXTERNAL_MODULE))
|
||||
lcdDrawTextAtIndex(lcdNextPos + 3, y, STR_ACCST_RF_PROTOCOLS, 1+g_model.moduleData[EXTERNAL_MODULE].rfProtocol, menuHorizontalPosition==1 ? attr : 0);
|
||||
|
|
|
@ -296,7 +296,7 @@ void menuRadioSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_SETUP_HAPTIC_MODE:
|
||||
g_eeGeneral.hapticMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_MODE, STR_VBEEPMODE, g_eeGeneral.hapticMode, -2, 1, attr, event);
|
||||
g_eeGeneral.hapticMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, INDENT TR_MODE, STR_VBEEPMODE, g_eeGeneral.hapticMode, -2, 1, attr, event);
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_HAPTIC_LENGTH:
|
||||
|
@ -360,7 +360,7 @@ void menuRadioSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_SETUP_BACKLIGHT_MODE:
|
||||
g_eeGeneral.backlightMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_MODE, STR_VBLMODE, g_eeGeneral.backlightMode, e_backlight_mode_off, e_backlight_mode_on, attr, event);
|
||||
g_eeGeneral.backlightMode = editChoice(RADIO_SETUP_2ND_COLUMN, y, INDENT TR_MODE, STR_VBLMODE, g_eeGeneral.backlightMode, e_backlight_mode_off, e_backlight_mode_on, attr, event);
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_FLASH_BEEP:
|
||||
|
@ -483,7 +483,7 @@ void menuRadioSetup(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_SETUP_STICK_MODE_LABELS:
|
||||
lcdDrawTextAlignedLeft(y, NO_INDENT(STR_MODE));
|
||||
lcdDrawTextAlignedLeft(y, STR_MODE);
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
lcdDraw1bitBitmap((6+4*i)*FW, y, sticks, i, 0);
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ void menuTraceBuffer(event_t event)
|
|||
const struct TraceElement * te = getTraceElement(k);
|
||||
if (te) {
|
||||
//time
|
||||
putstime_t tme = te->time % SECS_PER_DAY;
|
||||
int32_t tme = te->time % SECS_PER_DAY;
|
||||
drawTimer(4*FW, y, tme, TIMEHOUR|LEFT, TIMEHOUR|LEFT);
|
||||
//event
|
||||
lcdDrawNumber(14*FW, y, te->event, LEADING0|LEFT, 3);
|
||||
|
|
|
@ -250,7 +250,7 @@ void drawRtcTime(coord_t x, coord_t y, LcdFlags flags)
|
|||
drawTimer(x, y, getValue(MIXSRC_TX_TIME), flags);
|
||||
}
|
||||
|
||||
void drawTimer(coord_t x, coord_t y, putstime_t tme, LcdFlags flags)
|
||||
void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags flags)
|
||||
{
|
||||
char str[LEN_TIMER_STRING];
|
||||
getTimerString(str, tme, (flags & TIMEHOUR) != 0);
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
|
||||
#define CENTER
|
||||
|
||||
#define lcdint_t int32_t
|
||||
|
||||
/* lcd common flags */
|
||||
#define BLINK 0x01
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ bool menuStatsTraces(event_t event)
|
|||
const struct TraceElement * te = getTraceElement(k);
|
||||
if (te) {
|
||||
// time
|
||||
putstime_t tme = te->time % SECS_PER_DAY;
|
||||
int32_t tme = te->time % SECS_PER_DAY;
|
||||
drawTimer(STATS_TRACES_TIME_POS, y, tme, TIMEHOUR|LEFT);
|
||||
// event
|
||||
lcdDrawNumber(STATS_TRACES_EVENT_POS, y, te->event, LEADING0|LEFT, 3);
|
||||
|
|
|
@ -31,7 +31,7 @@ void drawStringWithIndex(coord_t x, coord_t y, const char * str, int idx, LcdFla
|
|||
lcdDrawText(x, y, s, flags);
|
||||
}
|
||||
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int32_t val, uint8_t unit, LcdFlags att)
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int val, uint8_t unit, LcdFlags att)
|
||||
{
|
||||
// convertUnit(val, unit);
|
||||
if (!(att & NO_UNIT) && unit != UNIT_RAW) {
|
||||
|
|
|
@ -91,7 +91,7 @@ void drawFlightMode(coord_t x, coord_t y, int8_t idx, LcdFlags att=0);
|
|||
swsrc_t checkIncDecMovedSwitch(swsrc_t val);
|
||||
|
||||
#include "telemetry/telemetry_sensors.h"
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int32_t val, uint8_t unit, LcdFlags flags);
|
||||
void drawValueWithUnit(coord_t x, coord_t y, int val, uint8_t unit, LcdFlags flags);
|
||||
void drawCurveRef(coord_t x, coord_t y, CurveRef & curve, LcdFlags flags=0);
|
||||
void drawDate(coord_t x, coord_t y, TelemetryItem & telemetryItem, LcdFlags flags=0);
|
||||
void drawTelemScreenDate(coord_t x, coord_t y, source_t sensor, LcdFlags flags=0);
|
||||
|
|
|
@ -170,7 +170,7 @@ char * strAppendStringWithIndex(char * dest, const char * s, int idx)
|
|||
return strAppendUnsigned(strAppend(dest, s), abs(idx));
|
||||
}
|
||||
|
||||
char * getTimerString(char * dest, putstime_t tme, uint8_t hours)
|
||||
char * getTimerString(char * dest, int32_t tme, uint8_t hours)
|
||||
{
|
||||
char * s = dest;
|
||||
div_t qr;
|
||||
|
|
|
@ -532,7 +532,7 @@
|
|||
#define TR_ELEDIRECTION "Směr:Výškovka"
|
||||
#define TR_AILDIRECTION "\012Křidélka"
|
||||
#define TR_COLDIRECTION "\012Kolektiv"
|
||||
#define TR_MODE INDENT"Mód"
|
||||
#define TR_MODE "Mód"
|
||||
#define TR_SUBTYPE INDENT "Subtyp"
|
||||
#define TR_NOFREEEXPO "Není volné expo!"
|
||||
#define TR_NOFREEMIXER "Není volný mix!"
|
||||
|
|
|
@ -539,7 +539,7 @@
|
|||
#define TR_ELEDIRECTION TR("Nick Richtung", "Nick Servo Richtung")
|
||||
#define TR_AILDIRECTION TR("Roll Richtung", "Roll Servo Richtung")
|
||||
#define TR_COLDIRECTION TR("Pitch Richtung", "Pitch Servo Richtung")
|
||||
#define TR_MODE INDENT "Modus"
|
||||
#define TR_MODE "Modus"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "Expos voll!"
|
||||
#define TR_NOFREEMIXER "Mischer voll!"
|
||||
|
|
|
@ -534,7 +534,7 @@
|
|||
#define TR_ELEDIRECTION "ELE Direction"
|
||||
#define TR_AILDIRECTION "AIL Direction"
|
||||
#define TR_COLDIRECTION "PIT Direction"
|
||||
#define TR_MODE INDENT "Mode"
|
||||
#define TR_MODE "Mode"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "No free expo!"
|
||||
#define TR_NOFREEMIXER "No free mixer!"
|
||||
|
|
|
@ -550,7 +550,7 @@
|
|||
#define TR_ELEDIRECTION TR("ELE Direccion","Largo cyc. direccion")
|
||||
#define TR_AILDIRECTION TR("AIL Direccion","Lateral cyc. direccion")
|
||||
#define TR_COLDIRECTION TR("PIT Direccion","Coll. pitch direccion")
|
||||
#define TR_MODE INDENT"Modo"
|
||||
#define TR_MODE "Modo"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "No expo libre!"
|
||||
#define TR_NOFREEMIXER "No mezcla lib!"
|
||||
|
|
|
@ -542,7 +542,7 @@
|
|||
#define TR_ELEDIRECTION TR("ELE Direction","Long. cyc. direction")
|
||||
#define TR_AILDIRECTION TR("AIL Direction","Lateral cyc. direction")
|
||||
#define TR_COLDIRECTION TR("PIT Direction","Coll. pitch direction")
|
||||
#define TR_MODE INDENT"Mode"
|
||||
#define TR_MODE "Mode"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "No free expo!"
|
||||
#define TR_NOFREEMIXER "No free mixer!"
|
||||
|
|
|
@ -548,7 +548,7 @@
|
|||
#define TR_ELEDIRECTION TR("Inv. longitud.", "Inversion longitudinal")
|
||||
#define TR_AILDIRECTION TR("Inv. latéral", "Inversion latéral")
|
||||
#define TR_COLDIRECTION TR("Inv. collectif", "Inversion collectif")
|
||||
#define TR_MODE INDENT "Mode"
|
||||
#define TR_MODE "Mode"
|
||||
#define TR_SUBTYPE INDENT "Sous-type"
|
||||
#define TR_NOFREEEXPO "Max expos atteint!"
|
||||
#define TR_NOFREEMIXER "Max mixages atteint!"
|
||||
|
|
|
@ -549,7 +549,7 @@
|
|||
#define TR_ELEDIRECTION TR("Direzione ELE","Direzione Long. cyc.")
|
||||
#define TR_AILDIRECTION TR("Direzione AIL","Direzione Lateral cyc.")
|
||||
#define TR_COLDIRECTION TR("Direzione PIT","Direzione Coll. Passo")
|
||||
#define TR_MODE INDENT"Modo"
|
||||
#define TR_MODE "Modo"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "Expo pieni!"
|
||||
#define TR_NOFREEMIXER "Mixer pieni!"
|
||||
|
|
|
@ -531,7 +531,7 @@ TR_GYR_VSRCRAW
|
|||
#define TR_ELEDIRECTION "ELE Direction"
|
||||
#define TR_AILDIRECTION "AIL Direction"
|
||||
#define TR_COLDIRECTION "PIT Direction"
|
||||
#define TR_MODE INDENT "Mode"
|
||||
#define TR_MODE "Mode"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "Geen vrije expo!"
|
||||
#define TR_NOFREEMIXER "Geen vrije mixer!"
|
||||
|
|
|
@ -549,7 +549,7 @@
|
|||
#define TR_ELEDIRECTION TR("Ster Wysokośc","Dług. Kierunku cyklu")
|
||||
#define TR_AILDIRECTION TR("Kierunek Lotk","Lateral cyc. direction")
|
||||
#define TR_COLDIRECTION TR("PIT Direction","Coll. pitch direction")
|
||||
#define TR_MODE INDENT "Tryb"
|
||||
#define TR_MODE "Tryb"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "BrakWoln.Expo!"
|
||||
#define TR_NOFREEMIXER "BrakWoln.Mixów!"
|
||||
|
|
|
@ -535,7 +535,7 @@
|
|||
#define TR_ELEDIRECTION "PFD Sentido"
|
||||
#define TR_AILDIRECTION "AIL Sentido"
|
||||
#define TR_COLDIRECTION "COL Sentido"
|
||||
#define TR_MODE INDENT"Modo"
|
||||
#define TR_MODE "Modo"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "No free expo!"
|
||||
#define TR_NOFREEMIXER "No free mixer!"
|
||||
|
|
|
@ -548,7 +548,7 @@
|
|||
#define TR_ELEDIRECTION "HöJD Riktning"
|
||||
#define TR_AILDIRECTION "SKEV Riktning"
|
||||
#define TR_COLDIRECTION "PITCH Riktn. "
|
||||
#define TR_MODE INDENT"Läge"
|
||||
#define TR_MODE "Läge"
|
||||
#define TR_SUBTYPE INDENT "Subtype"
|
||||
#define TR_NOFREEEXPO "Expo saknas!"
|
||||
#define TR_NOFREEMIXER "Mixer saknas!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue