Compilation fixes
This commit is contained in:
@@ -73,7 +73,6 @@ inline MenuHandlerFunc lastPopMenu()
|
||||
}
|
||||
|
||||
void onMainViewMenu(const char * result);
|
||||
|
||||
void menuFirstCalib(event_t event);
|
||||
void menuMainView(event_t event);
|
||||
void menuViewTelemetryFrsky(event_t event);
|
||||
@@ -83,11 +82,9 @@ enum MenuRadioIndexes
|
||||
{
|
||||
MENU_RADIO_SETUP,
|
||||
CASE_SDCARD(MENU_RADIO_SD_MANAGER)
|
||||
MENU_RADIO_TOOLS,
|
||||
MENU_RADIO_SPECIAL_FUNCTIONS,
|
||||
MENU_RADIO_TRAINER,
|
||||
#if defined(RADIO_SPECTRUM)
|
||||
MENU_RADIO_SPECTRUM,
|
||||
#endif
|
||||
MENU_RADIO_HARDWARE,
|
||||
MENU_RADIO_VERSION,
|
||||
MENU_RADIO_PAGES_COUNT
|
||||
@@ -101,17 +98,16 @@ void menuRadioVersion(event_t event);
|
||||
void menuRadioDiagKeys(event_t event);
|
||||
void menuRadioDiagAnalogs(event_t event);
|
||||
void menuRadioHardware(event_t event);
|
||||
void menuRadioTools(event_t event);
|
||||
void menuRadioSpectrum(event_t event);
|
||||
void menuRadioCalibration(event_t event);
|
||||
|
||||
static const MenuHandlerFunc menuTabGeneral[] = {
|
||||
menuRadioSetup,
|
||||
CASE_SDCARD(menuRadioSdManager)
|
||||
menuRadioTools,
|
||||
menuRadioSpecialFunctions,
|
||||
menuRadioTrainer,
|
||||
#if defined(RADIO_SPECTRUM)
|
||||
menuRadioSpectrum,
|
||||
#endif
|
||||
menuRadioHardware,
|
||||
menuRadioVersion
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
void menuRadioSpectrum(event_t event)
|
||||
{
|
||||
SIMPLE_MENU("SPECTRUM ANALYSER", menuTabGeneral, MENU_RADIO_SPECTRUM, 1);
|
||||
SIMPLE_SUBMENU("SPECTRUM ANALYSER", 1);
|
||||
|
||||
if (menuEvent) {
|
||||
INTERNAL_MODULE_OFF();
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
void addRadioTool(uint8_t index, const char * label, void (* tool)(event_t event), event_t event)
|
||||
{
|
||||
int8_t sub = menuVerticalPosition - HEADER_LINE;
|
||||
LcdFlags attr = (sub == index ? INVERS : 0);
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + index * FH;
|
||||
lcdDrawNumber(3, y, index + 1, LEADING0|LEFT, 2);
|
||||
lcdDrawText(3*FW, y, label, (sub == index ? INVERS : 0));
|
||||
if (attr && s_editMode > 0) {
|
||||
s_editMode = 0;
|
||||
pushMenu(tool);
|
||||
}
|
||||
}
|
||||
|
||||
void menuRadioTools(event_t event)
|
||||
{
|
||||
SIMPLE_MENU("TOOLS", menuTabGeneral, MENU_RADIO_TOOLS, HEADER_LINE + 1);
|
||||
|
||||
addRadioTool(0, "Spectrum Analyser", menuRadioSpectrum, event);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user