Massive clean thanks to Schwabe : unifdef -m -DCPUARM -UCPUM64 -UCPUM2560 -UPCBSTD -UPCBMEGA2560 -UPCBGRUVIN9X -UPCB9X $(find . -name "*.cpp" -or -name "*.h")
This commit is contained in:
@@ -83,7 +83,6 @@ void onSdManagerMenu(const char * result)
|
||||
else if (result == STR_SD_FORMAT) {
|
||||
POPUP_CONFIRMATION(STR_CONFIRM_FORMAT);
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
else if (result == STR_COPY_FILE) {
|
||||
clipboard.type = CLIPBOARD_TYPE_SD_FILE;
|
||||
f_getcwd(clipboard.data.sd.directory, CLIPBOARD_PATH_LEN);
|
||||
@@ -111,7 +110,6 @@ void onSdManagerMenu(const char * result)
|
||||
s_editMode = EDIT_MODIFY_STRING;
|
||||
editNameCursorPos = 0;
|
||||
}
|
||||
#endif
|
||||
else if (result == STR_DELETE_FILE) {
|
||||
getSelectionFullPath(lfn);
|
||||
f_unlink(lfn);
|
||||
@@ -120,13 +118,11 @@ void onSdManagerMenu(const char * result)
|
||||
showStatusLine();
|
||||
REFRESH_FILES();
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
else if (result == STR_PLAY_FILE) {
|
||||
getSelectionFullPath(lfn);
|
||||
audioQueue.stopAll();
|
||||
audioQueue.playFile(lfn, 0, ID_PLAY_FROM_SD_MANAGER);
|
||||
}
|
||||
#endif
|
||||
#if LCD_DEPTH > 1
|
||||
else if (result == STR_ASSIGN_BITMAP) {
|
||||
strAppendFilename(g_model.header.bitmap, line, sizeof(g_model.header.bitmap));
|
||||
@@ -134,12 +130,10 @@ void onSdManagerMenu(const char * result)
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
else if (result == STR_VIEW_TEXT) {
|
||||
getSelectionFullPath(lfn);
|
||||
pushMenuTextView(lfn);
|
||||
}
|
||||
#endif
|
||||
#if defined(PCBTARANIS)
|
||||
else if (result == STR_FLASH_BOOTLOADER) {
|
||||
getSelectionFullPath(lfn);
|
||||
@@ -176,9 +170,7 @@ void menuRadioSdManager(event_t _event)
|
||||
#if defined(PCBSKY9X)
|
||||
Card_state = SD_ST_DATA;
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
audioQueue.stopSD();
|
||||
#endif
|
||||
if(sdCardFormat()) {
|
||||
f_chdir("/");
|
||||
REFRESH_FILES();
|
||||
@@ -258,7 +250,6 @@ void menuRadioSdManager(event_t _event)
|
||||
if (!strcmp(line, "..")) {
|
||||
break; // no menu for parent dir
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
const char * ext = getFileExtension(line);
|
||||
if (ext) {
|
||||
if (!strcasecmp(ext, SOUNDS_EXT)) {
|
||||
@@ -295,15 +286,12 @@ void menuRadioSdManager(event_t _event)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
if (!READ_ONLY()) {
|
||||
#if defined(CPUARM)
|
||||
if (IS_FILE(line))
|
||||
POPUP_MENU_ADD_ITEM(STR_COPY_FILE);
|
||||
if (clipboard.type == CLIPBOARD_TYPE_SD_FILE)
|
||||
POPUP_MENU_ADD_ITEM(STR_PASTE);
|
||||
POPUP_MENU_ADD_ITEM(STR_RENAME_FILE);
|
||||
#endif
|
||||
if (IS_FILE(line))
|
||||
POPUP_MENU_ADD_ITEM(STR_DELETE_FILE);
|
||||
}
|
||||
@@ -404,7 +392,6 @@ void menuRadioSdManager(event_t _event)
|
||||
if (IS_DIRECTORY(reusableBuffer.sdmanager.lines[i])) {
|
||||
lcdDrawChar(0, y, '[', s_editMode == EDIT_MODIFY_STRING ? 0 : attr);
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if (s_editMode == EDIT_MODIFY_STRING && attr) {
|
||||
uint8_t extlen, efflen;
|
||||
const char * ext = getFileExtension(reusableBuffer.sdmanager.originalName, 0, 0, NULL, &extlen);
|
||||
@@ -424,9 +411,6 @@ void menuRadioSdManager(event_t _event)
|
||||
else {
|
||||
lcdDrawText(lcdNextPos, y, reusableBuffer.sdmanager.lines[i], attr);
|
||||
}
|
||||
#else
|
||||
lcdDrawText(lcdNextPos, y, reusableBuffer.sdmanager.lines[i], attr);
|
||||
#endif
|
||||
if (IS_DIRECTORY(reusableBuffer.sdmanager.lines[i])) {
|
||||
lcdDrawChar(lcdNextPos, y, ']', s_editMode == EDIT_MODIFY_STRING ? 0 : attr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user