More AVR removal
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar font_5x7[] = {
|
||||
const unsigned char font_5x7[] = {
|
||||
#include "font_05x07.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_05x07.lbm"
|
||||
@@ -44,13 +44,13 @@ const pm_uchar font_5x7[] = {
|
||||
};
|
||||
|
||||
#if defined(BOLD_SPECIFIC_FONT)
|
||||
const pm_uchar font_5x7_B[] = {
|
||||
const unsigned char font_5x7_B[] = {
|
||||
#include "font_05x07_B_compressed.lbm"
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !defined(BOOT)
|
||||
const pm_uchar font_10x14[] = {
|
||||
const unsigned char font_10x14[] = {
|
||||
#include "font_10x14_compressed.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_10x14.lbm"
|
||||
@@ -75,10 +75,10 @@ const pm_uchar font_10x14[] = {
|
||||
#endif
|
||||
|
||||
#if !defined(BOOT)
|
||||
const pm_uchar font_3x5[] = {
|
||||
const unsigned char font_3x5[] = {
|
||||
#include "font_03x05.lbm"
|
||||
};
|
||||
const pm_uchar font_4x6[] = {
|
||||
const unsigned char font_4x6[] = {
|
||||
#include "font_04x06.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_04x06.lbm"
|
||||
@@ -101,7 +101,7 @@ const pm_uchar font_4x6[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_8x10[] = {
|
||||
const unsigned char font_8x10[] = {
|
||||
#include "font_08x10.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_08x10.lbm"
|
||||
@@ -124,19 +124,19 @@ const pm_uchar font_8x10[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_22x38_num[] = {
|
||||
const unsigned char font_22x38_num[] = {
|
||||
#include "font_22x38_num.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_4x6_extra[] = {
|
||||
const unsigned char font_4x6_extra[] = {
|
||||
#include "font_04x06_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_5x7_extra[] = {
|
||||
const unsigned char font_5x7_extra[] = {
|
||||
#include "font_05x07_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_10x14_extra[] = {
|
||||
const unsigned char font_10x14_extra[] = {
|
||||
#include "font_10x14_extra.lbm"
|
||||
};
|
||||
|
||||
|
||||
+11
-11
@@ -160,11 +160,11 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
#define CURSOR_ON_LINE() (0)
|
||||
#endif
|
||||
|
||||
void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow);
|
||||
void check(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, const uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow);
|
||||
void check_simple(event_t event, uint8_t curr, const MenuHandlerFunc *menuTab, uint8_t menuTabSize, vertpos_t maxrow);
|
||||
void check_submenu_simple(event_t event, uint8_t maxrow);
|
||||
|
||||
void title(const pm_char * s);
|
||||
void title(const char * s);
|
||||
#define TITLE(str) title(str)
|
||||
|
||||
#define MENU_TAB(...) const uint8_t mstate_tab[] = __VA_ARGS__
|
||||
@@ -225,8 +225,8 @@ void title(const pm_char * s);
|
||||
|
||||
typedef int choice_t;
|
||||
|
||||
choice_t editChoice(coord_t x, coord_t y, const pm_char * label, const pm_char *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event);
|
||||
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const pm_char * label, LcdFlags attr, event_t event);
|
||||
choice_t editChoice(coord_t x, coord_t y, const char * label, const char *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event);
|
||||
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char * label, LcdFlags attr, event_t event);
|
||||
int8_t editSwitch(coord_t x, coord_t y, int8_t value, LcdFlags attr, event_t event);
|
||||
|
||||
#define ON_OFF_MENU_ITEM(value, x, y, label, attr, event) value = editCheckBox(value, x, y, label, attr, event)
|
||||
@@ -258,17 +258,17 @@ void gvarWeightItem(coord_t x, coord_t y, MixData * md, LcdFlags attr, event_t e
|
||||
|
||||
void editName(coord_t x, coord_t y, char * name, uint8_t size, event_t event, uint8_t active, LcdFlags attr=ZCHAR);
|
||||
|
||||
void editSingleName(coord_t x, coord_t y, const pm_char * label, char * name, uint8_t size, event_t event, uint8_t active);
|
||||
void editSingleName(coord_t x, coord_t y, const char * label, char * name, uint8_t size, event_t event, uint8_t active);
|
||||
|
||||
uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const pm_char * str, uint8_t delay);
|
||||
uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const char * str, uint8_t delay);
|
||||
#define EDIT_DELAY(x, y, event, attr, str, delay) editDelay(y, event, attr, str, delay)
|
||||
|
||||
#define WARNING_TYPE_ASTERISK 0
|
||||
#define WARNING_TYPE_CONFIRM 1
|
||||
#define WARNING_TYPE_INPUT 2
|
||||
|
||||
extern const pm_char * warningText;
|
||||
extern const pm_char * warningInfoText;
|
||||
extern const char * warningText;
|
||||
extern const char * warningInfoText;
|
||||
extern uint8_t warningInfoLength;
|
||||
extern uint8_t warningResult;
|
||||
extern uint8_t warningType;
|
||||
@@ -361,7 +361,7 @@ void deleteExpoMix(uint8_t expo, uint8_t idx);
|
||||
|
||||
void drawCheckBox(coord_t x, coord_t y, uint8_t value, LcdFlags attr);
|
||||
|
||||
extern const pm_uchar sticks[] ;
|
||||
extern const unsigned char sticks[] ;
|
||||
|
||||
void drawSplash();
|
||||
void drawSecondSplash();
|
||||
@@ -376,10 +376,10 @@ void drawSleepBitmap();
|
||||
void drawVerticalScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uint16_t count, uint8_t visible);
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
void drawAlertBox(const pm_char * title, const pm_char * text, const char * action);
|
||||
void drawAlertBox(const char * title, const char * text, const char * action);
|
||||
#endif
|
||||
|
||||
void showAlertBox(const pm_char * title, const pm_char * text, const char * action , uint8_t sound);
|
||||
void showAlertBox(const char * title, const char * text, const char * action , uint8_t sound);
|
||||
|
||||
#define SET_SCROLLBAR_X(x)
|
||||
#define LOAD_MODEL_BITMAP()
|
||||
|
||||
@@ -67,7 +67,7 @@ void lcdPutPattern(coord_t x, coord_t y, const uint8_t * pattern, uint8_t width,
|
||||
else if (i<=width) {
|
||||
uint8_t skip = true;
|
||||
for (uint8_t j=0; j<lines; j++) {
|
||||
b[j] = pgm_read_byte(pattern++); /*top byte*/
|
||||
b[j] = *(pattern++); /*top byte*/
|
||||
if (b[j] != 0xff) {
|
||||
skip = false;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ uint8_t getCharWidth(char c, LcdFlags flags)
|
||||
|
||||
void lcdDrawChar(coord_t x, coord_t y, const unsigned char c, LcdFlags flags)
|
||||
{
|
||||
const pm_uchar * q;
|
||||
const unsigned char * q;
|
||||
|
||||
lcdNextPos = x-1;
|
||||
|
||||
@@ -303,7 +303,7 @@ uint8_t getTextWidth(const char * s, uint8_t len, LcdFlags flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const pm_char * s, uint8_t len, LcdFlags flags)
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, uint8_t len, LcdFlags flags)
|
||||
{
|
||||
const coord_t orig_x = x;
|
||||
|
||||
@@ -331,7 +331,7 @@ void lcdDrawSizedText(coord_t x, coord_t y, const pm_char * s, uint8_t len, LcdF
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
c = pgm_read_byte(s);
|
||||
c = *s;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -388,31 +388,31 @@ void lcdDrawSizedText(coord_t x, coord_t y, const pm_char * s, uint8_t len, LcdF
|
||||
#endif
|
||||
}
|
||||
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const pm_char * s, uint8_t len)
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, uint8_t len)
|
||||
{
|
||||
lcdDrawSizedText(x, y, s, len, 0);
|
||||
}
|
||||
|
||||
void lcdDrawText(coord_t x, coord_t y, const pm_char * s, LcdFlags flags)
|
||||
void lcdDrawText(coord_t x, coord_t y, const char * s, LcdFlags flags)
|
||||
{
|
||||
lcdDrawSizedText(x, y, s, 255, flags);
|
||||
}
|
||||
|
||||
void lcdDrawText(coord_t x, coord_t y, const pm_char * s)
|
||||
void lcdDrawText(coord_t x, coord_t y, const char * s)
|
||||
{
|
||||
lcdDrawText(x, y, s, 0);
|
||||
}
|
||||
|
||||
void lcdDrawTextAlignedLeft(coord_t y, const pm_char * s)
|
||||
void lcdDrawTextAlignedLeft(coord_t y, const char * s)
|
||||
{
|
||||
lcdDrawText(0, y, s);
|
||||
}
|
||||
|
||||
#if !defined(BOOT)
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const pm_char * s,uint8_t idx, LcdFlags flags)
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char * s,uint8_t idx, LcdFlags flags)
|
||||
{
|
||||
uint8_t length;
|
||||
length = pgm_read_byte(s++);
|
||||
length = *(s++);
|
||||
lcdDrawSizedText(x, y, s+length*idx, length, flags & ~(BSS|ZCHAR));
|
||||
}
|
||||
|
||||
|
||||
@@ -108,26 +108,19 @@ extern coord_t lcdNextPos;
|
||||
#define DISPLAY_END (displayBuf + DISPLAY_BUFFER_SIZE)
|
||||
#define ASSERT_IN_DISPLAY(p) assert((p) >= displayBuf && (p) < DISPLAY_END)
|
||||
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
extern volatile uint8_t lcdLock ;
|
||||
extern volatile uint32_t lcdInputs ;
|
||||
#endif
|
||||
|
||||
#if defined(BOOT)
|
||||
// TODO quick & dirty :(
|
||||
typedef const unsigned char pm_uchar;
|
||||
typedef const char pm_char;
|
||||
#endif
|
||||
|
||||
void lcdDrawChar(coord_t x, coord_t y, const unsigned char c);
|
||||
void lcdDrawChar(coord_t x, coord_t y, const unsigned char c, LcdFlags flags);
|
||||
void lcdDrawText(coord_t x, coord_t y, const pm_char * s, LcdFlags flags);
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const pm_char * s, uint8_t idx, LcdFlags flags);
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const pm_char * s, unsigned char len, LcdFlags flags);
|
||||
void lcdDrawText(coord_t x, coord_t y, const pm_char * s);
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const pm_char * s, unsigned char len);
|
||||
void lcdDrawTextAlignedLeft(coord_t y, const pm_char * s);
|
||||
void lcdDrawText(coord_t x, coord_t y, const char * s, LcdFlags flags);
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char * s, uint8_t idx, LcdFlags flags);
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len, LcdFlags flags);
|
||||
void lcdDrawText(coord_t x, coord_t y, const char * s);
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len);
|
||||
void lcdDrawTextAlignedLeft(coord_t y, const char * s);
|
||||
|
||||
#define lcdDrawTextAlignedCenter(y, s) lcdDrawText((LCD_W-sizeof(TR_##s)*FW+FW+1)/2, y, STR_##s)
|
||||
|
||||
@@ -137,7 +130,7 @@ void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags mode, uint8_t le
|
||||
void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags mode=0);
|
||||
void lcdDraw8bitsNumber(coord_t x, coord_t y, int8_t val);
|
||||
|
||||
void drawStringWithIndex(coord_t x, coord_t y, const pm_char * str, uint8_t idx, LcdFlags att=0);
|
||||
void drawStringWithIndex(coord_t x, coord_t y, const char * str, uint8_t idx, LcdFlags att=0);
|
||||
void putsModelName(coord_t x, coord_t y, char * name, uint8_t id, LcdFlags att);
|
||||
#if !defined(BOOT) // TODO not here ...
|
||||
void drawSwitch(coord_t x, coord_t y, swsrc_t swtch, LcdFlags att=0);
|
||||
@@ -202,7 +195,7 @@ void drawTelemetryTopBar();
|
||||
|
||||
|
||||
void lcdClear(void);
|
||||
void lcdDraw1bitBitmap(coord_t x, coord_t y, const pm_uchar * img, uint8_t idx, LcdFlags att=0);
|
||||
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)
|
||||
{
|
||||
lcdDraw1bitBitmap(x, y, bitmap, 0);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "opentx.h"
|
||||
|
||||
|
||||
uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const pm_char * str, uint8_t delay)
|
||||
uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const char * str, uint8_t delay)
|
||||
{
|
||||
lcdDrawTextAlignedLeft(y, str);
|
||||
lcdDrawNumber(MIXES_2ND_COLUMN, y, (10/DELAY_STEP)*delay, attr|PREC1|LEFT);
|
||||
@@ -39,7 +39,7 @@ uint8_t s_copySrcCh;
|
||||
uint8_t editNameCursorPos = 0;
|
||||
|
||||
|
||||
void editSingleName(coord_t x, coord_t y, const pm_char * label, char * name, uint8_t size, event_t event, uint8_t active)
|
||||
void editSingleName(coord_t x, coord_t y, const char * label, char * name, uint8_t size, event_t event, uint8_t active)
|
||||
{
|
||||
lcdDrawTextAlignedLeft(y, label);
|
||||
editName(x, y, name, size, event, active);
|
||||
|
||||
@@ -67,12 +67,12 @@ void menuModelFlightModeOne(event_t event)
|
||||
#if defined(GVARS) && !defined(GVARS_IN_CURVES_SCREEN)
|
||||
#if defined(PCBTARANIS)
|
||||
#define VERTICAL_SHIFT (ITEM_MODEL_FLIGHT_MODE_FADE_IN-ITEM_MODEL_FLIGHT_MODE_TRIMS)
|
||||
static const pm_uint8_t mstate_tab_fm1[] = {0, 3, 0, 0, (uint8_t)-1, 1, 1, 1, 1, 1, 1};
|
||||
static const uint8_t mstate_tab_fm1[] = {0, 3, 0, 0, (uint8_t)-1, 1, 1, 1, 1, 1, 1};
|
||||
#else
|
||||
#define VERTICAL_SHIFT (ITEM_MODEL_FLIGHT_MODE_FADE_IN-ITEM_MODEL_FLIGHT_MODE_SWITCH)
|
||||
static const pm_uint8_t mstate_tab_fm1[] = {0, 0, 0, (uint8_t)-1, 1, 1, 1, 1, 1};
|
||||
static const uint8_t mstate_tab_fm1[] = {0, 0, 0, (uint8_t)-1, 1, 1, 1, 1, 1};
|
||||
#endif
|
||||
static const pm_uint8_t mstate_tab_others[] = {0, 0, 3, IF_ROTARY_ENCODERS(NUM_ROTARY_ENCODERS-1) 0, 0, (uint8_t)-1, 2, 2, 2, 2, 2};
|
||||
static const uint8_t mstate_tab_others[] = {0, 0, 3, IF_ROTARY_ENCODERS(NUM_ROTARY_ENCODERS-1) 0, 0, (uint8_t)-1, 2, 2, 2, 2, 2};
|
||||
|
||||
check(event, 0, NULL, 0, (s_currIdx == 0) ? mstate_tab_fm1 : mstate_tab_others, DIM(mstate_tab_others)-1, ITEM_MODEL_FLIGHT_MODE_MAX - HEADER_LINE - (s_currIdx==0 ? (ITEM_MODEL_FLIGHT_MODE_FADE_IN-ITEM_MODEL_FLIGHT_MODE_SWITCH-1) : 0));
|
||||
|
||||
|
||||
@@ -266,7 +266,6 @@ void menuModelLimits(event_t event)
|
||||
}
|
||||
|
||||
for (uint8_t j=0; j<ITEM_OUTPUTS_COUNT; j++) {
|
||||
if (attr && (s_editMode>0 || p1valdiff)) STICK_SCROLL_DISABLE();
|
||||
switch (j) {
|
||||
case ITEM_OUTPUTS_OFFSET:
|
||||
#if defined(PPM_UNIT_US)
|
||||
|
||||
@@ -493,7 +493,7 @@ void menuModelSetup(event_t event)
|
||||
#if defined(PCBTARANIS)
|
||||
{
|
||||
#define FIRSTSW_STR STR_VSRCRAW+(MIXSRC_FIRST_SWITCH-MIXSRC_Rud+1)*length
|
||||
uint8_t length = pgm_read_byte(STR_VSRCRAW);
|
||||
uint8_t length = STR_VSRCRAW[0];
|
||||
horzpos_t l_posHorz = menuHorizontalPosition;
|
||||
|
||||
if (i>=NUM_BODY_LINES-2 && getSwitchWarningsCount() > 5*(NUM_BODY_LINES-i)) {
|
||||
@@ -606,7 +606,7 @@ void menuModelSetup(event_t event)
|
||||
else {
|
||||
if ((states & 0x01) && swactive)
|
||||
attr = INVERS;
|
||||
c = pgm_read_byte(STR_VSWITCHES - 2 + 9 + (3*(i+1)));
|
||||
c = *(STR_VSWITCHES - 2 + 9 + (3*(i+1)));
|
||||
states >>= 1;
|
||||
}
|
||||
if (line && (menuHorizontalPosition == i)) {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_char * warningText = NULL;
|
||||
const pm_char * warningInfoText;
|
||||
const char * warningText = NULL;
|
||||
const char * warningInfoText;
|
||||
uint8_t warningInfoLength;
|
||||
uint8_t warningType;
|
||||
uint8_t warningResult = 0;
|
||||
@@ -39,7 +39,7 @@ void drawMessageBox()
|
||||
// could be a place for a warningInfoText
|
||||
}
|
||||
|
||||
void showMessageBox(const pm_char * str)
|
||||
void showMessageBox(const char * str)
|
||||
{
|
||||
warningText = str;
|
||||
drawMessageBox();
|
||||
@@ -47,11 +47,11 @@ void showMessageBox(const pm_char * str)
|
||||
lcdRefresh();
|
||||
}
|
||||
|
||||
const pm_uchar ASTERISK_BITMAP[] = {
|
||||
const unsigned char ASTERISK_BITMAP[] = {
|
||||
#include "asterisk.lbm"
|
||||
};
|
||||
|
||||
void drawAlertBox(const pm_char * title, const pm_char * text, const char * action)
|
||||
void drawAlertBox(const char * title, const char * text, const char * action)
|
||||
{
|
||||
lcdClear();
|
||||
lcdDraw1bitBitmap(2, 0, ASTERISK_BITMAP, 0, 0);
|
||||
@@ -77,7 +77,7 @@ void drawAlertBox(const pm_char * title, const pm_char * text, const char * acti
|
||||
#undef MESSAGE_LCD_OFFSET
|
||||
}
|
||||
|
||||
void showAlertBox(const pm_char * title, const pm_char * text, const char * action , uint8_t sound)
|
||||
void showAlertBox(const char * title, const char * text, const char * action , uint8_t sound)
|
||||
{
|
||||
drawAlertBox(title, text, action);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define WARNING_LINE_Y 3*FH
|
||||
|
||||
void drawMessageBox();
|
||||
void showMessageBox(const pm_char * title);
|
||||
void showMessageBox(const char * title);
|
||||
void runPopupWarning(event_t event);
|
||||
|
||||
#define DRAW_MESSAGE_BOX(title) (warningText = title, drawMessageBox(), warningText = NULL)
|
||||
|
||||
@@ -118,7 +118,6 @@ void menuCommonCalib(event_t event)
|
||||
|
||||
case CALIB_MOVE_STICKS:
|
||||
// MOVE STICKS/POTS
|
||||
STICK_SCROLL_DISABLE();
|
||||
lcdDrawText(0*FW, MENU_HEADER_HEIGHT+FH, STR_MOVESTICKSPOTS, INVERS);
|
||||
lcdDrawTextAlignedLeft(MENU_HEADER_HEIGHT+2*FH, STR_MENUWHENDONE);
|
||||
for (uint8_t i=0; i<NUM_STICKS+NUM_POTS+NUM_SLIDERS; i++) {
|
||||
|
||||
@@ -33,8 +33,6 @@ void menuRadioDiagAnalogs(event_t event)
|
||||
|
||||
SIMPLE_MENU(STR_MENU_RADIO_ANALOGS, menuTabGeneral, MENU_RADIO_ANALOGS_TEST, HEADER_LINE+ANAS_ITEMS_COUNT);
|
||||
|
||||
STICK_SCROLL_DISABLE();
|
||||
|
||||
for (uint8_t i=0; i<NUM_STICKS+NUM_POTS+NUM_SLIDERS; i++) {
|
||||
#if (NUM_STICKS+NUM_POTS+NUM_SLIDERS) > 9
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + (i/3)*FH;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar sticks[] = {
|
||||
const unsigned char sticks[] = {
|
||||
#include "sticks.lbm"
|
||||
};
|
||||
|
||||
@@ -166,8 +166,8 @@ void menuRadioSetup(event_t event)
|
||||
{
|
||||
int16_t year = TM_YEAR_BASE + t.tm_year;
|
||||
int8_t dlim = (((((year%4==0) && (year%100!=0)) || (year%400==0)) && (t.tm_mon==1)) ? 1 : 0);
|
||||
static const pm_uint8_t dmon[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
dlim += pgm_read_byte(&dmon[t.tm_mon]);
|
||||
static const uint8_t dmon[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
dlim += dmon[t.tm_mon];
|
||||
lcdDrawNumber(RADIO_SETUP_DATE_COLUMN+6*FW-4, y, t.tm_mday, rowattr|LEADING0|RIGHT, 2);
|
||||
if (rowattr && (s_editMode>0 || p1valdiff)) t.tm_mday = checkIncDec(event, t.tm_mday, 1, dlim, 0);
|
||||
break;
|
||||
@@ -559,7 +559,7 @@ void menuRadioSetup(event_t event)
|
||||
case ITEM_SETUP_STICK_MODE:
|
||||
lcdDrawChar(2*FW, y, '1'+reusableBuffer.generalSettings.stickMode, attr);
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
drawSource((5*FW-3)+i*(4*FW+2), y, MIXSRC_Rud + pgm_read_byte(modn12x3 + 4*reusableBuffer.generalSettings.stickMode + i), 0);
|
||||
drawSource((5*FW-3)+i*(4*FW+2), y, MIXSRC_Rud + *(modn12x3 + 4*reusableBuffer.generalSettings.stickMode + i), 0);
|
||||
}
|
||||
if (attr && s_editMode>0) {
|
||||
CHECK_INCDEC_GENVAR(event, reusableBuffer.generalSettings.stickMode, 0, 3);
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH)
|
||||
const pm_uchar splashdata[] = {
|
||||
const unsigned char splashdata[] = {
|
||||
'S','P','S',0,
|
||||
#include "bitmaps/128x64/splash.lbm"
|
||||
'S','P','E',0 };
|
||||
|
||||
const pm_uchar * const splash_lbm = splashdata+4;
|
||||
const unsigned char * const splash_lbm = splashdata+4;
|
||||
|
||||
void drawSplash()
|
||||
{
|
||||
@@ -65,12 +65,12 @@ void drawSplash()
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH_FRSKY)
|
||||
const pm_uchar splashdata2[] = {
|
||||
const unsigned char splashdata2[] = {
|
||||
'S','F','S',0,
|
||||
#include "bitmaps/128x64/splash_frsky.lbm"
|
||||
'S','F','E',0 };
|
||||
|
||||
const pm_uchar * const splash2_lbm = splashdata2+4;
|
||||
const unsigned char * const splash2_lbm = splashdata2+4;
|
||||
|
||||
void drawSecondSplash()
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar about_bmp[] = {
|
||||
const unsigned char about_bmp[] = {
|
||||
#include "about.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -303,8 +303,6 @@ void onMainViewMenu(const char *result)
|
||||
|
||||
void menuMainView(event_t event)
|
||||
{
|
||||
STICK_SCROLL_DISABLE();
|
||||
|
||||
uint8_t view = g_eeGeneral.view;
|
||||
uint8_t view_base = view & 0x0f;
|
||||
|
||||
|
||||
@@ -65,12 +65,12 @@ void drawVerticalScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uin
|
||||
lcdDrawVerticalLine(x, y + yofs, yhgt, SOLID, FORCE);
|
||||
}
|
||||
|
||||
void title(const pm_char * s)
|
||||
void title(const char * s)
|
||||
{
|
||||
lcdDrawText(0, 0, s, INVERS);
|
||||
}
|
||||
|
||||
choice_t editChoice(coord_t x, coord_t y, const pm_char * label, const pm_char *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event)
|
||||
choice_t editChoice(coord_t x, coord_t y, const char * label, const char *values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event)
|
||||
{
|
||||
drawFieldLabel(x, y, label);
|
||||
if (values) lcdDrawTextAtIndex(x, y, values, value-min, attr);
|
||||
@@ -78,7 +78,7 @@ choice_t editChoice(coord_t x, coord_t y, const pm_char * label, const pm_char *
|
||||
return value;
|
||||
}
|
||||
|
||||
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const pm_char *label, LcdFlags attr, event_t event )
|
||||
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char *label, LcdFlags attr, event_t event )
|
||||
{
|
||||
#if defined(GRAPHICS)
|
||||
drawCheckBox(x, y, value, attr);
|
||||
@@ -246,7 +246,7 @@ void drawProgressBar(const char * label, int num, int den)
|
||||
lcdRefresh();
|
||||
}
|
||||
|
||||
const pm_uchar SLEEP_BITMAP[] = {
|
||||
const unsigned char SLEEP_BITMAP[] = {
|
||||
#include "sleep.lbm"
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user