RTOS refactoring + more AVR removal

This commit is contained in:
Bertrand Songis
2018-08-05 12:06:48 +02:00
parent f60733b561
commit f3bfde242b
80 changed files with 1111 additions and 1054 deletions
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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;
+1 -1
View File
@@ -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>,