1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

Radio tools related fixes (#7444)

Radio tools related fixes
This commit is contained in:
3djc 2020-03-16 14:50:21 +01:00 committed by GitHub
parent 02787671f8
commit 9999187dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 8 deletions

View file

@ -50,7 +50,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
enum MenuRadioIndexes enum MenuRadioIndexes
{ {
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE) #if defined(RADIO_TOOLS)
MENU_RADIO_TOOLS, MENU_RADIO_TOOLS,
#endif #endif
CASE_SDCARD(MENU_RADIO_SD_MANAGER) CASE_SDCARD(MENU_RADIO_SD_MANAGER)
@ -76,7 +76,7 @@ void menuRadioPowerMeter(event_t event);
void menuRadioCalibration(event_t event); void menuRadioCalibration(event_t event);
static const MenuHandlerFunc menuTabGeneral[MENU_RADIO_PAGES_COUNT] = { static const MenuHandlerFunc menuTabGeneral[MENU_RADIO_PAGES_COUNT] = {
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE) #if defined(RADIO_TOOLS)
menuRadioTools, menuRadioTools,
#endif #endif
CASE_SDCARD(menuRadioSdManager) CASE_SDCARD(menuRadioSdManager)

View file

@ -364,7 +364,7 @@ void menuMainView(event_t event)
break; break;
case EVT_KEY_GENERAL_MENU: case EVT_KEY_GENERAL_MENU:
pushMenu(menuRadioTools); pushMenu(menuTabGeneral[0]);
killEvents(event); killEvents(event);
break; break;
#endif #endif

View file

@ -21,7 +21,7 @@
#include "opentx.h" #include "opentx.h"
const MenuHandlerFunc menuTabGeneral[MENU_RADIO_PAGES_COUNT] = { const MenuHandlerFunc menuTabGeneral[MENU_RADIO_PAGES_COUNT] = {
#if defined(LUA) || defined(PXX2) #if defined(RADIO_TOOLS)
menuRadioTools, menuRadioTools,
#endif #endif
menuRadioSdManager, menuRadioSdManager,

View file

@ -455,7 +455,7 @@ void menuMainView(event_t event)
break; break;
case EVT_KEY_LONG(KEY_MENU): case EVT_KEY_LONG(KEY_MENU):
pushMenu(menuRadioTools); pushMenu(menuTabGeneral[0]);
killEvents(event); killEvents(event);
break; break;
#endif #endif

View file

@ -21,7 +21,7 @@
#include "opentx.h" #include "opentx.h"
const MenuHandlerFunc menuTabGeneral[MENU_RADIO_PAGES_COUNT] = { const MenuHandlerFunc menuTabGeneral[MENU_RADIO_PAGES_COUNT] = {
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE) #if defined(RADIO_TOOLS)
menuRadioTools, menuRadioTools,
#endif #endif
menuRadioSdManager, menuRadioSdManager,

View file

@ -55,8 +55,10 @@ void pushMenu(MenuHandlerFunc newMenu)
killEvents(KEY_ENTER); killEvents(KEY_ENTER);
if (menuLevel == 0) { if (menuLevel == 0) {
#if defined(RADIO_TOOLS)
if (newMenu == menuRadioTools) if (newMenu == menuRadioTools)
menuVerticalPositions[0] = 1; menuVerticalPositions[0] = 1;
#endif
if (newMenu == menuModelSetup) if (newMenu == menuModelSetup)
menuVerticalPositions[0] = 0; menuVerticalPositions[0] = 0;
} }

View file

@ -189,7 +189,7 @@ bool menuRadioDiagAnalogs(event_t event);
extern const MenuHandlerFunc menuTabModel[MENU_MODEL_PAGES_COUNT]; extern const MenuHandlerFunc menuTabModel[MENU_MODEL_PAGES_COUNT];
enum EnumTabRadio { enum EnumTabRadio {
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE) #if defined(RADIO_TOOLS)
MENU_RADIO_TOOLS, MENU_RADIO_TOOLS,
#endif #endif
MENU_RADIO_SD_MANAGER, MENU_RADIO_SD_MANAGER,
@ -203,7 +203,7 @@ enum EnumTabRadio {
const uint8_t RADIO_ICONS[MENU_RADIO_PAGES_COUNT + 1] = { const uint8_t RADIO_ICONS[MENU_RADIO_PAGES_COUNT + 1] = {
ICON_RADIO, ICON_RADIO,
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE) #if defined(RADIO_TOOLS)
ICON_RADIO_TOOLS, ICON_RADIO_TOOLS,
#endif #endif
ICON_RADIO_SD_MANAGER, ICON_RADIO_SD_MANAGER,

View file

@ -219,6 +219,10 @@
#define IS_SLAVE_TRAINER() (g_model.trainerData.mode == TRAINER_MODE_SLAVE) #define IS_SLAVE_TRAINER() (g_model.trainerData.mode == TRAINER_MODE_SLAVE)
#endif #endif
#if defined(LUA) || defined(PXX2) || defined(MULTIMODULE)
#define RADIO_TOOLS
#endif
// RESX range is used for internal calculation; The menu says -100.0 to 100.0; internally it is -1024 to 1024 to allow some optimizations // RESX range is used for internal calculation; The menu says -100.0 to 100.0; internally it is -1024 to 1024 to allow some optimizations
#define RESX_SHIFT 10 #define RESX_SHIFT 10
#define RESX 1024 #define RESX 1024