Compilation fix

This commit is contained in:
Bertrand Songis
2019-06-14 18:25:49 +02:00
parent cb2a5ed868
commit 618bcfe72f
@@ -48,6 +48,7 @@ void addRadioModuleTool(uint8_t index, const char * label, void (* tool)(event_t
#define TOOL_NAME_MAXLEN 16 #define TOOL_NAME_MAXLEN 16
#if defined(LUA)
bool readToolName(const char * filename, char * name) bool readToolName(const char * filename, char * name)
{ {
FIL file; FIL file;
@@ -112,6 +113,7 @@ bool isRadioScriptTool(const char * filename)
const char * ext = getFileExtension(filename); const char * ext = getFileExtension(filename);
return ext && !strcasecmp(ext, SCRIPT_EXT); return ext && !strcasecmp(ext, SCRIPT_EXT);
} }
#endif
void menuRadioTools(event_t event) void menuRadioTools(event_t event)
{ {
@@ -144,6 +146,7 @@ void menuRadioTools(event_t event)
addRadioModuleTool(index++, STR_POWER_METER_EXT, menuRadioPowerMeter, EXTERNAL_MODULE); addRadioModuleTool(index++, STR_POWER_METER_EXT, menuRadioPowerMeter, EXTERNAL_MODULE);
#endif #endif
#if defined(LUA)
FILINFO fno; FILINFO fno;
DIR dir; DIR dir;
@@ -160,6 +163,7 @@ void menuRadioTools(event_t event)
addRadioScriptTool(index++, fno.fname); addRadioScriptTool(index++, fno.fname);
} }
} }
#endif
if (index == 0) { if (index == 0) {
lcdDrawCenteredText(LCD_H/2, STR_NO_TOOLS); lcdDrawCenteredText(LCD_H/2, STR_NO_TOOLS);