RTOS refactoring + more AVR removal
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar font_5x7[] PROGMEM = {
|
||||
const pm_uchar font_5x7[] = {
|
||||
#include "font_05x07.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_05x07.lbm"
|
||||
@@ -44,13 +44,13 @@ const pm_uchar font_5x7[] PROGMEM = {
|
||||
};
|
||||
|
||||
#if defined(BOLD_SPECIFIC_FONT)
|
||||
const pm_uchar font_5x7_B[] PROGMEM = {
|
||||
const pm_uchar font_5x7_B[] = {
|
||||
#include "font_05x07_B_compressed.lbm"
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !defined(BOOT)
|
||||
const pm_uchar font_10x14[] PROGMEM = {
|
||||
const pm_uchar 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[] PROGMEM = {
|
||||
#endif
|
||||
|
||||
#if !defined(BOOT)
|
||||
const pm_uchar font_3x5[] PROGMEM = {
|
||||
const pm_uchar font_3x5[] = {
|
||||
#include "font_03x05.lbm"
|
||||
};
|
||||
const pm_uchar font_4x6[] PROGMEM = {
|
||||
const pm_uchar font_4x6[] = {
|
||||
#include "font_04x06.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_04x06.lbm"
|
||||
@@ -101,7 +101,7 @@ const pm_uchar font_4x6[] PROGMEM = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_8x10[] PROGMEM = {
|
||||
const pm_uchar font_8x10[] = {
|
||||
#include "font_08x10.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_08x10.lbm"
|
||||
@@ -124,19 +124,19 @@ const pm_uchar font_8x10[] PROGMEM = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_22x38_num[] PROGMEM = {
|
||||
const pm_uchar font_22x38_num[] = {
|
||||
#include "font_22x38_num.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_4x6_extra[] PROGMEM = {
|
||||
const pm_uchar font_4x6_extra[] = {
|
||||
#include "font_04x06_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_5x7_extra[] PROGMEM = {
|
||||
const pm_uchar font_5x7_extra[] = {
|
||||
#include "font_05x07_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_10x14_extra[] PROGMEM = {
|
||||
const pm_uchar font_10x14_extra[] = {
|
||||
#include "font_10x14_extra.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -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[] PROGMEM;
|
||||
extern const pm_uchar sticks[] ;
|
||||
|
||||
void drawSplash();
|
||||
void drawSecondSplash();
|
||||
|
||||
@@ -93,7 +93,7 @@ void menuRadioDiagAnalogs(event_t event);
|
||||
void menuRadioHardware(event_t event);
|
||||
void menuRadioCalibration(event_t event);
|
||||
|
||||
static const MenuHandlerFunc menuTabGeneral[] PROGMEM = {
|
||||
static const MenuHandlerFunc menuTabGeneral[] = {
|
||||
menuRadioSetup,
|
||||
CASE_SDCARD(menuRadioSdManager)
|
||||
menuRadioSpecialFunctions,
|
||||
@@ -144,7 +144,7 @@ void menuModelDisplay(event_t event);
|
||||
void menuModelTemplates(event_t event);
|
||||
void menuModelGVarOne(event_t event);
|
||||
|
||||
static const MenuHandlerFunc menuTabModel[] PROGMEM = {
|
||||
static const MenuHandlerFunc menuTabModel[] = {
|
||||
menuModelSelect,
|
||||
menuModelSetup,
|
||||
CASE_HELI(menuModelHeli)
|
||||
|
||||
@@ -166,9 +166,9 @@ void menuModelCurveOne(event_t event)
|
||||
lcdDrawFilledRect(3, 2*FH+4, 7*FW-2, 4*FH-2, SOLID, ERASE);
|
||||
lcdDrawRect(3, 2*FH+4, 7*FW-2, 4*FH-2);
|
||||
drawStringWithIndex(7, 3*FH, STR_PT, i+1, LEFT);
|
||||
lcdDrawText(7, 4*FH, PSTR("x="));
|
||||
lcdDrawText(7, 4*FH, "x=");
|
||||
lcdDrawNumber(7+2*FW+1, 4*FH, x, LEFT|(selectionMode==1?attr:0));
|
||||
lcdDrawText(7, 5*FH, PSTR("y="));
|
||||
lcdDrawText(7, 5*FH, "y=");
|
||||
lcdDrawNumber(7+2*FW+1, 5*FH, points[i], LEFT|(selectionMode==2?attr:0));
|
||||
|
||||
// Selection square
|
||||
|
||||
@@ -123,7 +123,7 @@ void menuModelDisplay(event_t event)
|
||||
uint8_t screenIndex = TELEMETRY_CURRENT_SCREEN(k);
|
||||
drawStringWithIndex(0*FW, y, STR_SCREEN, screenIndex+1);
|
||||
TelemetryScreenType oldScreenType = TELEMETRY_SCREEN_TYPE(screenIndex);
|
||||
TelemetryScreenType newScreenType = (TelemetryScreenType)editChoice(DISPLAY_COL2, y, PSTR(""), STR_VTELEMSCREENTYPE, oldScreenType, 0, TELEMETRY_SCREEN_TYPE_MAX, (menuHorizontalPosition==0 ? attr : 0), event);
|
||||
TelemetryScreenType newScreenType = (TelemetryScreenType)editChoice(DISPLAY_COL2, y, "", STR_VTELEMSCREENTYPE, oldScreenType, 0, TELEMETRY_SCREEN_TYPE_MAX, (menuHorizontalPosition==0 ? attr : 0), event);
|
||||
if (newScreenType != oldScreenType) {
|
||||
g_model.frsky.screensType = (g_model.frsky.screensType & (~(0x03 << (2*screenIndex)))) | (newScreenType << (2*screenIndex));
|
||||
memset(&g_model.frsky.screens[screenIndex], 0, sizeof(g_model.frsky.screens[screenIndex]));
|
||||
|
||||
@@ -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[] PROGMEM = {0, 3, 0, 0, (uint8_t)-1, 1, 1, 1, 1, 1, 1};
|
||||
static const pm_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[] PROGMEM = {0, 0, 0, (uint8_t)-1, 1, 1, 1, 1, 1};
|
||||
static const pm_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[] PROGMEM = {0, 0, 3, IF_ROTARY_ENCODERS(NUM_ROTARY_ENCODERS-1) 0, 0, (uint8_t)-1, 2, 2, 2, 2, 2};
|
||||
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};
|
||||
|
||||
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));
|
||||
|
||||
|
||||
@@ -460,7 +460,7 @@ void menuModelMixOne(event_t event)
|
||||
}
|
||||
}
|
||||
else {
|
||||
lcdDrawText(COLUMN_X+MIXES_2ND_COLUMN, y, PSTR("Diff"), menuHorizontalPosition==0 ? attr : 0);
|
||||
lcdDrawText(COLUMN_X+MIXES_2ND_COLUMN, y, "Diff", menuHorizontalPosition==0 ? attr : 0);
|
||||
md2->curveParam = GVAR_MENU_ITEM(COLUMN_X+MIXES_2ND_COLUMN+5*FW, y, curveParam, -100, 100, LEFT|(menuHorizontalPosition==1 ? attr : 0), 0, editMode>0 ? event : 0);
|
||||
if (attr && editMode>0 && menuHorizontalPosition==0) {
|
||||
int8_t tmp = 0;
|
||||
@@ -508,7 +508,7 @@ void menuModelMixOne(event_t event)
|
||||
}
|
||||
}
|
||||
|
||||
#define _STR_MAX(x) PSTR("/" #x)
|
||||
#define _STR_MAX(x) "/" #x
|
||||
#define STR_MAX(x) _STR_MAX(x)
|
||||
|
||||
#define EXPO_LINE_WEIGHT_POS 7*FW+1
|
||||
|
||||
@@ -613,7 +613,7 @@ void menuModelSetup(event_t event)
|
||||
attr = BLINK | INVERS;
|
||||
}
|
||||
lcdDrawChar(MODEL_SETUP_2ND_COLUMN+i*FW, y, (swactive) ? c : '-', attr);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN+(NUM_SWITCHES*FW), y, PSTR("<]"), (menuHorizontalPosition == NUM_SWITCHES-1 && !NO_HIGHLIGHT()) ? line : 0);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN+(NUM_SWITCHES*FW), y, "<]", (menuHorizontalPosition == NUM_SWITCHES-1 && !NO_HIGHLIGHT()) ? line : 0);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
@@ -621,7 +621,7 @@ void menuModelSetup(event_t event)
|
||||
#if defined(PCBTARANIS)
|
||||
case ITEM_MODEL_POTS_WARNING:
|
||||
lcdDrawTextAlignedLeft(y, STR_POTWARNING);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, PSTR("\004""OFF\0""Man\0""Auto"), g_model.potsWarnMode, (menuHorizontalPosition == 0) ? attr : 0);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, "\004""OFF\0""Man\0""Auto", g_model.potsWarnMode, (menuHorizontalPosition == 0) ? attr : 0);
|
||||
if (attr && (menuHorizontalPosition == 0)) {
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.potsWarnMode, POTS_WARN_OFF, POTS_WARN_AUTO);
|
||||
storageDirty(EE_MODEL);
|
||||
@@ -1269,7 +1269,7 @@ void menuModelSetup(event_t event)
|
||||
|
||||
#if 0
|
||||
case ITEM_MODEL_PPM2_PROTOCOL:
|
||||
lcdDrawTextAlignedLeft(y, PSTR("Port2"));
|
||||
lcdDrawTextAlignedLeft(y, "Port2");
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_VPROTOS, 0, 0);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN+4*FW+3, y, STR_CH, menuHorizontalPosition<=0 ? attr : 0);
|
||||
lcdDrawNumber(lcdLastRightPos, y, g_model.moduleData[1].channelsStart+1, LEFT | (menuHorizontalPosition<=0 ? attr : 0));
|
||||
|
||||
@@ -545,10 +545,10 @@ void menuModelTelemetryFrsky(event_t event)
|
||||
#if defined(MULTIMODULE)
|
||||
if (telemetryProtocol == PROTOCOL_MULTIMODULE &&
|
||||
g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MM_RF_PROTO_FS_AFHDS2A)
|
||||
lcdDrawTextAlignedLeft(y, PSTR("RSNR"));
|
||||
lcdDrawTextAlignedLeft(y, "RSNR");
|
||||
else
|
||||
#endif
|
||||
lcdDrawTextAlignedLeft(y, PSTR("RSSI"));
|
||||
lcdDrawTextAlignedLeft(y, "RSSI");
|
||||
break;
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_ALARM1:
|
||||
|
||||
@@ -47,7 +47,7 @@ void showMessageBox(const pm_char * str)
|
||||
lcdRefresh();
|
||||
}
|
||||
|
||||
const pm_uchar ASTERISK_BITMAP[] PROGMEM = {
|
||||
const pm_uchar ASTERISK_BITMAP[] = {
|
||||
#include "asterisk.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ void menuRadioDiagAnalogs(event_t event)
|
||||
#else
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + (i/2)*FH;
|
||||
uint8_t x = (i & 1) ? LCD_W/2+FW : 0;
|
||||
drawStringWithIndex(x, y, PSTR("A"), i+1);
|
||||
drawStringWithIndex(x, y, "A", i+1);
|
||||
lcdDrawChar(lcdNextPos, y, ':');
|
||||
#endif
|
||||
lcdDrawHexNumber(x+3*FW-1, y, anaIn(i));
|
||||
|
||||
@@ -52,7 +52,7 @@ void menuRadioHardware(event_t event)
|
||||
break;
|
||||
|
||||
case ITEM_RADIO_HARDWARE_STICKS_GAINS_LABELS:
|
||||
lcdDrawTextAlignedLeft(y, PSTR("Sticks"));
|
||||
lcdDrawTextAlignedLeft(y, "Sticks");
|
||||
break;
|
||||
|
||||
case ITEM_RADIO_HARDWARE_STICK_LV_GAIN:
|
||||
@@ -60,8 +60,8 @@ void menuRadioHardware(event_t event)
|
||||
case ITEM_RADIO_HARDWARE_STICK_RV_GAIN:
|
||||
case ITEM_RADIO_HARDWARE_STICK_RH_GAIN:
|
||||
{
|
||||
lcdDrawTextAtIndex(INDENT_WIDTH, y, PSTR("\002LVLHRVRH"), k-ITEM_RADIO_HARDWARE_STICK_LV_GAIN, 0);
|
||||
lcdDrawText(INDENT_WIDTH+3*FW, y, PSTR("Gain"));
|
||||
lcdDrawTextAtIndex(INDENT_WIDTH, y, "\002LVLHRVRH", k-ITEM_RADIO_HARDWARE_STICK_LV_GAIN, 0);
|
||||
lcdDrawText(INDENT_WIDTH+3*FW, y, "Gain");
|
||||
uint8_t mask = (1<<(k-ITEM_RADIO_HARDWARE_STICK_LV_GAIN));
|
||||
uint8_t val = (g_eeGeneral.sticksGain & mask ? 1 : 0);
|
||||
lcdDrawChar(HW_SETTINGS_COLUMN, y, val ? '2' : '1', attr);
|
||||
@@ -77,13 +77,13 @@ void menuRadioHardware(event_t event)
|
||||
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
case ITEM_RADIO_HARDWARE_ROTARY_ENCODER:
|
||||
g_eeGeneral.rotarySteps = editChoice(HW_SETTINGS_COLUMN, y, PSTR("Rotary Encoder"), PSTR("\0062steps4steps"), g_eeGeneral.rotarySteps, 0, 1, attr, event);
|
||||
g_eeGeneral.rotarySteps = editChoice(HW_SETTINGS_COLUMN, y, "Rotary Encoder", "\0062steps4steps", g_eeGeneral.rotarySteps, 0, 1, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(BLUETOOTH)
|
||||
case ITEM_RADIO_HARDWARE_BT_BAUDRATE:
|
||||
g_eeGeneral.bluetoothBaudrate = editChoice(HW_SETTINGS_COLUMN, y, STR_BAUDRATE, PSTR("\005115k 9600 19200"), g_eeGeneral.bluetoothBaudrate, 0, 2, attr, event);
|
||||
g_eeGeneral.bluetoothBaudrate = editChoice(HW_SETTINGS_COLUMN, y, STR_BAUDRATE, "\005115k 9600 19200", g_eeGeneral.bluetoothBaudrate, 0, 2, attr, event);
|
||||
if (attr && checkIncDec_Ret) {
|
||||
btInit();
|
||||
}
|
||||
@@ -235,7 +235,7 @@ void menuRadioHardware(event_t event)
|
||||
pauseMixerCalculations();
|
||||
pausePulses();
|
||||
EXTERNAL_MODULE_OFF();
|
||||
CoTickDelay(10); // 20ms so that the pulses interrupt will reinit the frame rate
|
||||
RTOS_WAIT_MS(20); // 20ms so that the pulses interrupt will reinit the frame rate
|
||||
telemetryProtocol = 255; // force telemetry port + module reinitialization
|
||||
EXTERNAL_MODULE_ON();
|
||||
resumePulses();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar sticks[] PROGMEM = {
|
||||
const pm_uchar sticks[] = {
|
||||
#include "sticks.lbm"
|
||||
};
|
||||
|
||||
@@ -166,7 +166,7 @@ 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[] PROGMEM = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
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]);
|
||||
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);
|
||||
@@ -507,12 +507,12 @@ void menuRadioSetup(event_t event)
|
||||
|
||||
#if defined(FAI_CHOICE)
|
||||
case ITEM_SETUP_FAI:
|
||||
editCheckBox(g_eeGeneral.fai, RADIO_SETUP_2ND_COLUMN, y, PSTR("FAI Mode"), attr, event);
|
||||
editCheckBox(g_eeGeneral.fai, RADIO_SETUP_2ND_COLUMN, y, "FAI Mode", attr, event);
|
||||
if (attr && checkIncDec_Ret) {
|
||||
if (g_eeGeneral.fai)
|
||||
POPUP_WARNING(PSTR("FAI\001mode blocked!"));
|
||||
POPUP_WARNING("FAI\001mode blocked!");
|
||||
else
|
||||
POPUP_CONFIRMATION(PSTR("FAI mode?"));
|
||||
POPUP_CONFIRMATION("FAI mode?");
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -37,11 +37,11 @@ void menuRadioVersion(event_t event)
|
||||
|
||||
#if defined(COPROCESSOR)
|
||||
if (Coproc_valid == 1) {
|
||||
lcdDrawTextAlignedLeft(6*FH, PSTR("CoPr:"));
|
||||
lcdDrawTextAlignedLeft(6*FH, "CoPr:");
|
||||
lcdDraw8bitsNumber(10*FW, 6*FH, Coproc_read);
|
||||
}
|
||||
else {
|
||||
lcdDrawTextAlignedLeft(6*FH, PSTR("CoPr: ---"));
|
||||
lcdDrawTextAlignedLeft(6*FH, "CoPr: ---");
|
||||
}
|
||||
#elif defined(EEPROM_RLC)
|
||||
lcdDrawTextAlignedLeft(MENU_HEADER_HEIGHT+5*FH+1, STR_EEBACKUP);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH)
|
||||
const pm_uchar splashdata[] PROGMEM = {
|
||||
const pm_uchar splashdata[] = {
|
||||
'S','P','S',0,
|
||||
#include "bitmaps/128x64/splash.lbm"
|
||||
'S','P','E',0 };
|
||||
@@ -65,7 +65,7 @@ void drawSplash()
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH_FRSKY)
|
||||
const pm_uchar splashdata2[] PROGMEM = {
|
||||
const pm_uchar splashdata2[] = {
|
||||
'S','F','S',0,
|
||||
#include "bitmaps/128x64/splash_frsky.lbm"
|
||||
'S','F','E',0 };
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar about_bmp[] PROGMEM = {
|
||||
const pm_uchar about_bmp[] = {
|
||||
#include "about.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -564,12 +564,12 @@ void menuMainView(event_t event)
|
||||
warningText = STR_GLOBAL_VAR;
|
||||
drawMessageBox();
|
||||
lcdDrawSizedText(16, 5*FH, g_model.gvars[gvarLastChanged].name, LEN_GVAR_NAME, ZCHAR);
|
||||
lcdDrawText(16+6*FW, 5*FH, PSTR("["), BOLD);
|
||||
lcdDrawText(16+6*FW, 5*FH, "[", BOLD);
|
||||
drawGVarValue(lcdLastRightPos, 5*FH, gvarLastChanged, GVAR_VALUE(gvarLastChanged, getGVarFlightMode(mixerCurrentFlightMode, gvarLastChanged)), LEFT|BOLD);
|
||||
if (g_model.gvars[gvarLastChanged].unit) {
|
||||
lcdDrawText(lcdLastRightPos, 5*FH, "%", BOLD);
|
||||
}
|
||||
lcdDrawText(lcdLastRightPos, 5*FH, PSTR("]"), BOLD);
|
||||
lcdDrawText(lcdLastRightPos, 5*FH, "]", BOLD);
|
||||
warningText = NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -577,7 +577,7 @@ void menuMainView(event_t event)
|
||||
#if defined(DSM2)
|
||||
if (moduleFlag[0] == MODULE_BIND) {
|
||||
// Issue 98
|
||||
lcdDrawText(15*FW, 0, PSTR("BIND"), 0);
|
||||
lcdDrawText(15*FW, 0, "BIND", 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -187,13 +187,13 @@ void menuStatisticsDebug(event_t event)
|
||||
lcdDrawTextAlignedLeft(MENU_DEBUG_Y_COPROC, STR_COPROC_TEMP);
|
||||
|
||||
if (Coproc_read==0) {
|
||||
lcdDrawText(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_COPROC, PSTR("Co Proc NACK"),INVERS);
|
||||
lcdDrawText(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_COPROC, "Co Proc NACK",INVERS);
|
||||
}
|
||||
else if (Coproc_read==0x81) {
|
||||
lcdDrawText(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_COPROC, PSTR("Inst.TinyApp"),INVERS);
|
||||
lcdDrawText(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_COPROC, "Inst.TinyApp",INVERS);
|
||||
}
|
||||
else if (Coproc_read<3) {
|
||||
lcdDrawText(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_COPROC, PSTR("Upgr.TinyApp"),INVERS);
|
||||
lcdDrawText(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_COPROC, "Upgr.TinyApp",INVERS);
|
||||
}
|
||||
else {
|
||||
drawValueWithUnit(MENU_DEBUG_COL1_OFS, MENU_DEBUG_Y_COPROC, Coproc_temp, UNIT_TEMPERATURE, LEFT);
|
||||
|
||||
@@ -246,7 +246,7 @@ void drawProgressBar(const char * label, int num, int den)
|
||||
lcdRefresh();
|
||||
}
|
||||
|
||||
const pm_uchar SLEEP_BITMAP[] PROGMEM = {
|
||||
const pm_uchar SLEEP_BITMAP[] = {
|
||||
#include "sleep.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar font_5x7[] PROGMEM = {
|
||||
const pm_uchar font_5x7[] = {
|
||||
#include "font_05x07.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_05x07.lbm"
|
||||
@@ -43,12 +43,12 @@ const pm_uchar font_5x7[] PROGMEM = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_5x7_B[] PROGMEM = {
|
||||
const pm_uchar font_5x7_B[] = {
|
||||
#include "font_05x07_B_compressed.lbm"
|
||||
};
|
||||
|
||||
#if !defined(BOOT)
|
||||
const pm_uchar font_10x14[] PROGMEM = {
|
||||
const pm_uchar font_10x14[] = {
|
||||
#include "font_10x14_compressed.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_10x14.lbm"
|
||||
@@ -71,11 +71,11 @@ const pm_uchar font_10x14[] PROGMEM = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_3x5[] PROGMEM = {
|
||||
const pm_uchar font_3x5[] = {
|
||||
#include "font_03x05.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_4x6[] PROGMEM = {
|
||||
const pm_uchar font_4x6[] = {
|
||||
#include "font_04x06.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_04x06.lbm"
|
||||
@@ -98,7 +98,7 @@ const pm_uchar font_4x6[] PROGMEM = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_8x10[] PROGMEM = {
|
||||
const pm_uchar font_8x10[] = {
|
||||
#include "font_08x10.lbm"
|
||||
#if defined(TRANSLATIONS_DE)
|
||||
#include "font_de_08x10.lbm"
|
||||
@@ -121,19 +121,19 @@ const pm_uchar font_8x10[] PROGMEM = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const pm_uchar font_22x38_num[] PROGMEM = {
|
||||
const pm_uchar font_22x38_num[] = {
|
||||
#include "font_22x38_num.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_4x6_extra[] PROGMEM = {
|
||||
const pm_uchar font_4x6_extra[] = {
|
||||
#include "font_04x06_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_5x7_extra[] PROGMEM = {
|
||||
const pm_uchar font_5x7_extra[] = {
|
||||
#include "font_05x07_extra.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar font_10x14_extra[] PROGMEM = {
|
||||
const pm_uchar font_10x14_extra[] = {
|
||||
#include "font_10x14_extra.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ uint8_t switchToMix(uint8_t source);
|
||||
extern coord_t scrollbar_X;
|
||||
#define SET_SCROLLBAR_X(x) scrollbar_X = (x);
|
||||
|
||||
extern const pm_uchar sticks[] PROGMEM;
|
||||
extern const pm_uchar sticks[] ;
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
void displayFlightModes(coord_t x, coord_t y, FlightModesType value);
|
||||
|
||||
@@ -125,7 +125,7 @@ void menuModelDisplay(event_t event)
|
||||
uint8_t screenIndex = TELEMETRY_CURRENT_SCREEN(k);
|
||||
drawStringWithIndex(0*FW, y, STR_SCREEN, screenIndex+1);
|
||||
TelemetryScreenType oldScreenType = TELEMETRY_SCREEN_TYPE(screenIndex);
|
||||
TelemetryScreenType newScreenType = (TelemetryScreenType)editChoice(DISPLAY_COL2, y, PSTR(""), STR_VTELEMSCREENTYPE, oldScreenType, 0, TELEMETRY_SCREEN_TYPE_MAX, (menuHorizontalPosition==0 ? attr : 0), event);
|
||||
TelemetryScreenType newScreenType = (TelemetryScreenType)editChoice(DISPLAY_COL2, y, "", STR_VTELEMSCREENTYPE, oldScreenType, 0, TELEMETRY_SCREEN_TYPE_MAX, (menuHorizontalPosition==0 ? attr : 0), event);
|
||||
if (newScreenType != oldScreenType) {
|
||||
g_model.frsky.screensType = (g_model.frsky.screensType & (~(0x03 << (2*screenIndex)))) | (newScreenType << (2*screenIndex));
|
||||
memset(&g_model.frsky.screens[screenIndex], 0, sizeof(g_model.frsky.screens[screenIndex]));
|
||||
|
||||
@@ -574,7 +574,7 @@ void menuModelSetup(event_t event)
|
||||
#endif
|
||||
|
||||
lcdDrawTextAlignedLeft(y, STR_POTWARNING);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, PSTR("\004""OFF\0""Man\0""Auto"), g_model.potsWarnMode, (menuHorizontalPosition == 0) ? attr : 0);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, "\004""OFF\0""Man\0""Auto", g_model.potsWarnMode, (menuHorizontalPosition == 0) ? attr : 0);
|
||||
if (attr && (menuHorizontalPosition == 0)) {
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.potsWarnMode, POTS_WARN_OFF, POTS_WARN_AUTO);
|
||||
storageDirty(EE_MODEL);
|
||||
|
||||
@@ -519,10 +519,10 @@ void menuModelTelemetryFrsky(event_t event)
|
||||
if (g_model.moduleData[INTERNAL_MODULE].type != MODULE_TYPE_XJT &&
|
||||
g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE &&
|
||||
g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MM_RF_PROTO_FS_AFHDS2A)
|
||||
lcdDrawTextAlignedLeft(y, PSTR("RSNR"));
|
||||
lcdDrawTextAlignedLeft(y, "RSNR");
|
||||
else
|
||||
#endif
|
||||
lcdDrawTextAlignedLeft(y, PSTR("RSSI"));
|
||||
lcdDrawTextAlignedLeft(y, "RSSI");
|
||||
break;
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_ALARM1:
|
||||
|
||||
@@ -44,7 +44,7 @@ void showMessageBox(const char * title)
|
||||
lcdRefresh();
|
||||
}
|
||||
|
||||
const pm_uchar ASTERISK_BITMAP[] PROGMEM = {
|
||||
const pm_uchar ASTERISK_BITMAP[] = {
|
||||
#include "asterisk.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar sticks[] PROGMEM = {
|
||||
const pm_uchar sticks[] = {
|
||||
#include "sticks.lbm"
|
||||
};
|
||||
|
||||
@@ -149,7 +149,7 @@ 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[] PROGMEM = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
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]);
|
||||
lcdDrawNumber(RADIO_SETUP_DATE_COLUMN+6*FW-4, y, t.tm_mday, rowattr|LEADING0|RIGHT, 2);
|
||||
if (rowattr && s_editMode>0) t.tm_mday = checkIncDec(event, t.tm_mday, 1, dlim, 0);
|
||||
@@ -455,12 +455,12 @@ void menuRadioSetup(event_t event)
|
||||
|
||||
#if defined(FAI_CHOICE)
|
||||
case ITEM_SETUP_FAI:
|
||||
editCheckBox(g_eeGeneral.fai, RADIO_SETUP_2ND_COLUMN, y, PSTR("FAI Mode"), attr, event);
|
||||
editCheckBox(g_eeGeneral.fai, RADIO_SETUP_2ND_COLUMN, y, "FAI Mode"), attr, event;
|
||||
if (attr && checkIncDec_Ret) {
|
||||
if (g_eeGeneral.fai)
|
||||
POPUP_WARNING(PSTR("FAI\001mode blocked!"));
|
||||
POPUP_WARNING("FAI\001mode blocked!");
|
||||
else
|
||||
POPUP_CONFIRMATION(PSTR("FAI mode?"));
|
||||
POPUP_CONFIRMATION("FAI mode?");
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(SPLASH)
|
||||
const pm_uchar splashdata[] PROGMEM = {
|
||||
const pm_uchar splashdata[] = {
|
||||
'S','P','S',0,
|
||||
#include "bitmaps/212x64/splash.lbm"
|
||||
'S','P','E',0 };
|
||||
@@ -44,7 +44,7 @@ void drawSplash()
|
||||
#endif
|
||||
|
||||
#if defined(SPLASH_FRSKY)
|
||||
const pm_uchar splashdata2[] PROGMEM = {
|
||||
const pm_uchar splashdata2[] = {
|
||||
'S','F','S',0,
|
||||
#include "bitmaps/212x64/splash_frsky.lbm"
|
||||
'S','F','E',0 };
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar about_bmp[] PROGMEM = {
|
||||
const pm_uchar about_bmp[] = {
|
||||
#include "about.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
#define TRIM_LEN 27
|
||||
#define MARKER_WIDTH 5
|
||||
|
||||
const pm_uchar logo_taranis[] PROGMEM = {
|
||||
const pm_uchar logo_taranis[] = {
|
||||
#include "logo.lbm"
|
||||
};
|
||||
|
||||
const pm_uchar icons[] PROGMEM = {
|
||||
const pm_uchar icons[] = {
|
||||
#include "icons.lbm"
|
||||
};
|
||||
|
||||
@@ -594,9 +594,9 @@ void menuMainView(event_t event)
|
||||
lcdDrawRect(BITMAP_X, BITMAP_Y, 64, 32);
|
||||
drawStringWithIndex(BITMAP_X+FW, BITMAP_Y+FH-1, STR_GV, gvarLastChanged+1);
|
||||
lcdDrawSizedText(BITMAP_X+4*FW+FW/2, BITMAP_Y+FH-1, g_model.gvars[gvarLastChanged].name, LEN_GVAR_NAME, ZCHAR);
|
||||
lcdDrawText(BITMAP_X+FW, BITMAP_Y+2*FH+3, PSTR("["), BOLD);
|
||||
lcdDrawText(BITMAP_X+FW, BITMAP_Y+2*FH+3, "[", BOLD;
|
||||
drawGVarValue(BITMAP_X+2*FW, BITMAP_Y+2*FH+3, gvarLastChanged, GVAR_VALUE(gvarLastChanged, getGVarFlightMode(mixerCurrentFlightMode, gvarLastChanged)), LEFT|BOLD);
|
||||
lcdDrawText(lcdLastRightPos, BITMAP_Y+2*FH+3, PSTR("]"), BOLD);
|
||||
lcdDrawText(lcdLastRightPos, BITMAP_Y+2*FH+3, "]", BOLD;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar SLEEP_BITMAP[] PROGMEM = {
|
||||
const pm_uchar SLEEP_BITMAP[] = {
|
||||
#include "../../bitmaps/212x64/sleep.lbm"
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ void drawSleepBitmap()
|
||||
}
|
||||
|
||||
#if defined(PWR_BUTTON_PRESS)
|
||||
const pm_uchar SHUTDOWN_BITMAP[] PROGMEM = {
|
||||
const pm_uchar SHUTDOWN_BITMAP[] = {
|
||||
#include "../../bitmaps/212x64/shutdown.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ bool menuStatsDebug(event_t event);
|
||||
bool menuStatsAnalogs(event_t event);
|
||||
bool menuStatsTraces(event_t event);
|
||||
|
||||
static const MenuHandlerFunc menuTabStats[] PROGMEM = {
|
||||
static const MenuHandlerFunc menuTabStats[] = {
|
||||
menuStatsGraph,
|
||||
menuStatsDebug,
|
||||
menuStatsAnalogs,
|
||||
@@ -243,7 +243,7 @@ extern uint8_t lastMonitorPage;
|
||||
extern void drawSingleMixerBar(coord_t, coord_t, coord_t, coord_t, uint8_t);
|
||||
extern void drawSingleOutputBar(coord_t, coord_t, coord_t, coord_t, uint8_t);
|
||||
|
||||
extern const MenuHandlerFunc menuTabScreensSetup[1+MAX_CUSTOM_SCREENS] PROGMEM;
|
||||
extern const MenuHandlerFunc menuTabScreensSetup[1+MAX_CUSTOM_SCREENS] ;
|
||||
|
||||
bool menuFirstCalib(event_t event);
|
||||
bool menuMainView(event_t event);
|
||||
|
||||
@@ -303,7 +303,7 @@ bool menuModelExpoOne(event_t event)
|
||||
return true;
|
||||
}
|
||||
|
||||
#define _STR_MAX(x) PSTR("/" #x)
|
||||
#define _STR_MAX(x) "/" #x
|
||||
#define STR_MAX(x) _STR_MAX(x)
|
||||
|
||||
#define EXPO_LINE_WEIGHT_POS 125
|
||||
|
||||
@@ -280,7 +280,7 @@ bool menuModelMixOne(event_t event)
|
||||
return true;
|
||||
}
|
||||
|
||||
#define _STR_MAX(x) PSTR("/" #x)
|
||||
#define _STR_MAX(x) "/" #x
|
||||
#define STR_MAX(x) _STR_MAX(x)
|
||||
|
||||
#define MIX_LINE_WEIGHT_POS 105
|
||||
|
||||
@@ -530,7 +530,7 @@ bool menuModelSetup(event_t event)
|
||||
|
||||
case ITEM_MODEL_SLIDPOT_WARNING_STATE:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y,STR_POTWARNINGSTATE);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, PSTR("\004""OFF\0""Man\0""Auto"), g_model.potsWarnMode, attr);
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, "\004""OFF\0""Man\0""Auto", g_model.potsWarnMode, attr);
|
||||
if (attr) {
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.potsWarnMode, POTS_WARN_OFF, POTS_WARN_AUTO);
|
||||
storageDirty(EE_MODEL);
|
||||
|
||||
@@ -526,10 +526,10 @@ bool menuModelTelemetryFrsky(event_t event)
|
||||
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF &&
|
||||
g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE &&
|
||||
g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MM_RF_PROTO_FS_AFHDS2A)
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, PSTR("RSNR"));
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, "RSNR");
|
||||
else
|
||||
#endif
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, PSTR("RSSI"));
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, "RSSI");
|
||||
break;
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_ALARM1:
|
||||
|
||||
@@ -179,7 +179,7 @@ bool menuRadioHardware(event_t event)
|
||||
pauseMixerCalculations();
|
||||
pausePulses();
|
||||
EXTERNAL_MODULE_OFF();
|
||||
CoTickDelay(10); // 20ms so that the pulses interrupt will reinit the frame rate
|
||||
RTOS_WAIT_MS(20); // 20ms so that the pulses interrupt will reinit the frame rate
|
||||
telemetryProtocol = 255; // force telemetry port + module reinitialization
|
||||
EXTERNAL_MODULE_ON();
|
||||
resumePulses();
|
||||
|
||||
@@ -67,7 +67,7 @@ inline bool isFilenameLower(bool isfile, const char * fn, const char * line)
|
||||
void getSelectionFullPath(char * lfn)
|
||||
{
|
||||
f_getcwd(lfn, _MAX_LFN);
|
||||
strcat(lfn, PSTR("/"));
|
||||
strcat(lfn, "/");
|
||||
strcat(lfn, reusableBuffer.sdmanager.lines[menuVerticalPosition - menuVerticalOffset]);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ void onSdManagerMenu(const char * result)
|
||||
f_getcwd(lfn, _MAX_LFN);
|
||||
// if destination is dir, copy into that dir
|
||||
if (IS_DIRECTORY(line)) {
|
||||
strcat(lfn, PSTR("/"));
|
||||
strcat(lfn, "/");
|
||||
strcat(lfn, line);
|
||||
}
|
||||
if (strcmp(clipboard.data.sd.directory, lfn)) { // prevent copying to the same directory
|
||||
|
||||
@@ -154,7 +154,7 @@ bool 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[] PROGMEM = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
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]);
|
||||
lcdDrawNumber(lcdNextPos+3, y, t.tm_mday, flags|rowattr|LEADING0, 2);
|
||||
if (rowattr && s_editMode>0) t.tm_mday = checkIncDec(event, t.tm_mday, 1, dlim, 0);
|
||||
@@ -427,15 +427,15 @@ bool menuRadioSetup(event_t event)
|
||||
|
||||
#if defined(FAI_CHOICE)
|
||||
case ITEM_SETUP_FAI:
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, PSTR("FAI Mode"));
|
||||
lcdDrawText(MENUS_MARGIN_LEFT, y, "FAI Mode");
|
||||
if (g_eeGeneral.fai) {
|
||||
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, PSTR("Locked in FAI Mode"));
|
||||
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, "Locked in FAI Mode");
|
||||
}
|
||||
else {
|
||||
g_eeGeneral.fai = editCheckBox(g_eeGeneral.fai, RADIO_SETUP_2ND_COLUMN, y, attr, event);
|
||||
if (attr && checkIncDec_Ret) {
|
||||
g_eeGeneral.fai = false;
|
||||
POPUP_CONFIRMATION(PSTR("FAI mode?"));
|
||||
POPUP_CONFIRMATION("FAI mode?");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -43,7 +43,7 @@ bool menuChannelsMonitor(event_t event)
|
||||
return menuChannelsMonitor(event, index);
|
||||
}
|
||||
|
||||
const MenuHandlerFunc menuTabMonitors[] PROGMEM = {
|
||||
const MenuHandlerFunc menuTabMonitors[] = {
|
||||
menuChannelsMonitor<0>,
|
||||
menuChannelsMonitor<1>,
|
||||
menuChannelsMonitor<2>,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#define _STR_MAX(x) PSTR("/" #x)
|
||||
#define _STR_MAX(x) "/" #x
|
||||
#define STR_MAX(x) _STR_MAX(x)
|
||||
|
||||
uint8_t getExposCount()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#define _STR_MAX(x) PSTR("/" #x)
|
||||
#define _STR_MAX(x) "/" #x
|
||||
#define STR_MAX(x) _STR_MAX(x)
|
||||
|
||||
uint8_t getMixesCount()
|
||||
|
||||
@@ -64,7 +64,7 @@ inline bool isFilenameLower(bool isfile, const char * fn, const char * line)
|
||||
void getSelectionFullPath(char * lfn)
|
||||
{
|
||||
f_getcwd(lfn, _MAX_LFN);
|
||||
strcat(lfn, PSTR("/"));
|
||||
strcat(lfn, "/");
|
||||
strcat(lfn, reusableBuffer.sdmanager.lines[menuVerticalPosition - HEADER_LINE - menuVerticalOffset]);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ void onSdManagerMenu(const char * result)
|
||||
f_getcwd(lfn, _MAX_LFN);
|
||||
// if destination is dir, copy into that dir
|
||||
if (IS_DIRECTORY(line)) {
|
||||
strcat(lfn, PSTR("/"));
|
||||
strcat(lfn, "/");
|
||||
strcat(lfn, line);
|
||||
}
|
||||
if (strcmp(clipboard.data.sd.directory, lfn)) { // prevent copying to the same directory
|
||||
@@ -114,7 +114,7 @@ void onSdManagerMenu(const char * result)
|
||||
getSelectionFullPath(lfn);
|
||||
f_unlink(lfn);
|
||||
strncpy(statusLineMsg, line, 13);
|
||||
strcpy_P(statusLineMsg+min((uint8_t)strlen(statusLineMsg), (uint8_t)13), STR_REMOVED);
|
||||
strcpy(statusLineMsg+min((uint8_t)strlen(statusLineMsg), (uint8_t)13), STR_REMOVED);
|
||||
showStatusLine();
|
||||
REFRESH_FILES();
|
||||
}
|
||||
|
||||
@@ -647,53 +647,53 @@ int getFirstAvailable(int min, int max, IsValueAvailable isValueAvailable)
|
||||
// we don't need the special eeprom/flash string handling, just define them as
|
||||
// local strings
|
||||
|
||||
const pm_char STR_SUBTYPE_FLYSKY[] PROGMEM = "\004""Std\0""V9x9""V6x6""V912""CX20";
|
||||
const pm_char STR_SUBTYPE_FLYSKY[] = "\004""Std\0""V9x9""V6x6""V912""CX20";
|
||||
|
||||
const pm_char STR_SUBTYPE_AFHDS2A[] PROGMEM = "\010""PWM,IBUS""PPM,IBUS""PWM,SBUS""PPM,SBUS";
|
||||
const pm_char STR_SUBTYPE_AFHDS2A[] = "\010""PWM,IBUS""PPM,IBUS""PWM,SBUS""PPM,SBUS";
|
||||
|
||||
const pm_char STR_SUBTYPE_FRSKY[] PROGMEM = "\007""D16\0 ""D8\0 ""D16 8ch""V8\0 ""LBT(EU)""LBT 8ch";
|
||||
const pm_char STR_SUBTYPE_FRSKY[] = "\007""D16\0 ""D8\0 ""D16 8ch""V8\0 ""LBT(EU)""LBT 8ch";
|
||||
|
||||
const pm_char STR_SUBTYPE_HISKY[] PROGMEM = "\005""HiSky""HK310";
|
||||
const pm_char STR_SUBTYPE_HISKY[] = "\005""HiSky""HK310";
|
||||
|
||||
const pm_char STR_SUBTYPE_DSM[] PROGMEM = "\006""2 22ms""2 11ms""X 22ms""X 11ms";
|
||||
const pm_char STR_SUBTYPE_DSM[] = "\006""2 22ms""2 11ms""X 22ms""X 11ms";
|
||||
|
||||
const pm_char STR_SUBTYPE_YD717[] PROGMEM = "\007""YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 ";
|
||||
const pm_char STR_SUBTYPE_YD717[] = "\007""YD717\0 ""SKYWLKR""Syma X2""XINXUN\0""NIHUI\0 ";
|
||||
|
||||
const pm_char STR_SUBTYPE_SYMAX[] PROGMEM = "\003""Std""5c\0";
|
||||
const pm_char STR_SUBTYPE_SYMAX[] = "\003""Std""5c\0";
|
||||
|
||||
const pm_char STR_SUBTYPE_SLT[] PROGMEM = "\005""SLT\0 ""Vista";
|
||||
const pm_char STR_SUBTYPE_SLT[] = "\005""SLT\0 ""Vista";
|
||||
|
||||
const pm_char STR_SUBTYPE_CX10[] PROGMEM = "\007""Green\0 ""Blue\0 ""DM007\0 ""-\0 ""JC3015a""JC3015b""MK33041""Q242\0 ";
|
||||
const pm_char STR_SUBTYPE_CX10[] = "\007""Green\0 ""Blue\0 ""DM007\0 ""-\0 ""JC3015a""JC3015b""MK33041""Q242\0 ";
|
||||
|
||||
const pm_char STR_SUBTYPE_CG023[] PROGMEM = "\005""CG023""YD829";
|
||||
const pm_char STR_SUBTYPE_CG023[] = "\005""CG023""YD829";
|
||||
|
||||
const pm_char STR_SUBTYPE_KN[] PROGMEM = "\006""WLtoys""FeiLun";
|
||||
const pm_char STR_SUBTYPE_KN[] = "\006""WLtoys""FeiLun";
|
||||
|
||||
const pm_char STR_SUBTYPE_MT99[] PROGMEM = "\005""MT99\0""H7\0 ""YZ\0 ""LS\0 ""FY805";
|
||||
const pm_char STR_SUBTYPE_MT99[] = "\005""MT99\0""H7\0 ""YZ\0 ""LS\0 ""FY805";
|
||||
|
||||
const pm_char STR_SUBTYPE_MJXQ[] PROGMEM = "\005""WLH08""X600\0""X800\0""H26D\0""E010\0""H26WH";
|
||||
const pm_char STR_SUBTYPE_MJXQ[] = "\005""WLH08""X600\0""X800\0""H26D\0""E010\0""H26WH";
|
||||
|
||||
const pm_char STR_SUBTYPE_HONTAI[] PROGMEM = "\007""Std\0 ""JJRC X1""X5C1cln";
|
||||
const pm_char STR_SUBTYPE_HONTAI[] = "\007""Std\0 ""JJRC X1""X5C1cln";
|
||||
|
||||
const pm_char STR_SUBTYPE_Q2X2[] PROGMEM = "\004""Q222""Q242""Q282";
|
||||
const pm_char STR_SUBTYPE_Q2X2[] = "\004""Q222""Q242""Q282";
|
||||
|
||||
const pm_char STR_SUBTYPE_Q303[] PROGMEM = "\006""Q303\0 ""CX35\0 ""CX10D\0""CX10WD";
|
||||
const pm_char STR_SUBTYPE_Q303[] = "\006""Q303\0 ""CX35\0 ""CX10D\0""CX10WD";
|
||||
|
||||
const pm_char STR_SUBTYPE_WK2x01[] PROGMEM = "\006""WK2801""WK2401""W6_5_1""W6_6_1""W6_Hel""W6_HeI";
|
||||
const pm_char STR_SUBTYPE_WK2x01[] = "\006""WK2801""WK2401""W6_5_1""W6_6_1""W6_Hel""W6_HeI";
|
||||
|
||||
const pm_char STR_SUBTYPE_V2X2[] PROGMEM = "\006""V2x2\0 ""JXD506";
|
||||
const pm_char STR_SUBTYPE_V2X2[] = "\006""V2x2\0 ""JXD506";
|
||||
|
||||
const pm_char STR_SUBTYPE_BAYANG[] PROGMEM = "\007""Bayang\0""H8S3D\0 ""X16 AH\0 ""irdrone";
|
||||
const pm_char STR_SUBTYPE_BAYANG[] = "\007""Bayang\0""H8S3D\0 ""X16 AH\0 ""irdrone";
|
||||
|
||||
const pm_char STR_SUBTYPE_FY326[] PROGMEM = "\005""FY326""FY319";
|
||||
const pm_char STR_SUBTYPE_FY326[] = "\005""FY326""FY319";
|
||||
|
||||
const pm_char STR_SUBTYPE_CABELL[] PROGMEM = "\006""CAB_V3""C_TELM""-\0 ""-\0 ""-\0 ""-\0 ""F_SAFE""UNBIND";
|
||||
const pm_char STR_SUBTYPE_CABELL[] = "\006""CAB_V3""C_TELM""-\0 ""-\0 ""-\0 ""-\0 ""F_SAFE""UNBIND";
|
||||
|
||||
const pm_char STR_SUBTYPE_H83D[] PROGMEM = "\006""H8_3D\0""H20H\0 ""H20Mini""H30Mini";
|
||||
const pm_char STR_SUBTYPE_H83D[] = "\006""H8_3D\0""H20H\0 ""H20Mini""H30Mini";
|
||||
|
||||
const pm_char STR_SUBTYPE_CORONA[] PROGMEM = "\005""V1\0 ""V2\0 ""FD V3";
|
||||
const pm_char STR_SUBTYPE_CORONA[] = "\005""V1\0 ""V2\0 ""FD V3";
|
||||
|
||||
const pm_char STR_SUBTYPE_HITEC[] PROGMEM = "\006""Optima\0""Minima";
|
||||
const pm_char STR_SUBTYPE_HITEC[] = "\006""Optima\0""Minima";
|
||||
|
||||
const mm_protocol_definition multi_protocols[] = {
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ const char * writeScreenshot()
|
||||
char filename[42]; // /SCREENSHOTS/screen-2013-01-01-123540.bmp
|
||||
|
||||
// check and create folder here
|
||||
strcpy_P(filename, SCREENSHOTS_PATH);
|
||||
strcpy(filename, SCREENSHOTS_PATH);
|
||||
const char * error = sdCheckAndCreateDirectory(filename);
|
||||
if (error) {
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user