Placeholder for hardware diag pages
This commit is contained in:
@@ -48,6 +48,8 @@ set(GUI_SRC
|
||||
radio_trainer.cpp
|
||||
radio_version.cpp
|
||||
radio_hardware.cpp
|
||||
radio_diagkeys.cpp
|
||||
radio_diaganas.cpp
|
||||
radio_calibration.cpp
|
||||
view_main.cpp
|
||||
menu_screen.cpp
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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"
|
||||
#include "radio_diaganas.h"
|
||||
|
||||
void RadioAnaDiagsPage::buildHeader(Window * window)
|
||||
{
|
||||
new StaticText(window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP + 10, LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT}, STR_MENU_RADIO_ANALOGS, 0, MENU_COLOR);
|
||||
}
|
||||
|
||||
void RadioAnaDiagsPage::buildBody(Window * window)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
RadioAnaDiagsPage::RadioAnaDiagsPage():
|
||||
Page(ICON_MODEL_SETUP)
|
||||
{
|
||||
buildHeader(&header);
|
||||
buildBody(&body);
|
||||
setFocus();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 "page.h"
|
||||
|
||||
class RadioAnaDiagsPage: public Page {
|
||||
public:
|
||||
explicit RadioAnaDiagsPage();
|
||||
|
||||
protected:
|
||||
void buildHeader(Window * window);
|
||||
void buildBody(Window * window);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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"
|
||||
#include "radio_diagkeys.h"
|
||||
|
||||
void RadioKeyDiagsPage::buildHeader(Window * window)
|
||||
{
|
||||
new StaticText(window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP + 10, LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT}, STR_MENU_RADIO_SWITCHES, 0, MENU_COLOR);
|
||||
}
|
||||
|
||||
void RadioKeyDiagsPage::buildBody(Window * window)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
RadioKeyDiagsPage::RadioKeyDiagsPage():
|
||||
Page(ICON_MODEL_SETUP)
|
||||
{
|
||||
buildHeader(&header);
|
||||
buildBody(&body);
|
||||
setFocus();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 "page.h"
|
||||
|
||||
class RadioKeyDiagsPage: public Page {
|
||||
public:
|
||||
explicit RadioKeyDiagsPage();
|
||||
|
||||
protected:
|
||||
void buildHeader(Window * window);
|
||||
void buildBody(Window * window);
|
||||
};
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "radio_hardware.h"
|
||||
#include "radio_calibration.h"
|
||||
#include "radio_diagkeys.h"
|
||||
#include "radio_diaganas.h"
|
||||
#include "opentx.h"
|
||||
|
||||
#define SET_DIRTY() storageDirty(EE_GENERAL)
|
||||
@@ -49,6 +51,8 @@ class RTCBattValue: public Window
|
||||
lastValue = getRTCBatteryVoltage();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
Window::checkEvents();
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -202,13 +206,22 @@ void RadioHardwarePage::build(FormWindow * window)
|
||||
|
||||
// Debugs
|
||||
new StaticText(window, grid.getLabelSlot(), STR_DEBUG, 0, FONT(BOLD));
|
||||
auto debugAnalogs = new TextButton(window, grid.getFieldSlot(2, 0), STR_ANALOGS_BTN);
|
||||
debugAnalogs->setPressHandler([=]() -> uint8_t {
|
||||
//TODO
|
||||
auto debugAnas = new TextButton(window, grid.getFieldSlot(2, 0), STR_ANALOGS_BTN);
|
||||
debugAnas->setPressHandler([=]() -> uint8_t {
|
||||
auto debugAnasPage = new RadioAnaDiagsPage();
|
||||
debugAnasPage->setCloseHandler([=]() {
|
||||
calib->setFocus();
|
||||
});
|
||||
return 0;
|
||||
});
|
||||
|
||||
auto debugKeys = new TextButton(window, grid.getFieldSlot(2, 1), STR_KEYS_BTN);
|
||||
debugKeys->setPressHandler([=]() -> uint8_t {
|
||||
//TODO
|
||||
auto debugKeysPage = new RadioKeyDiagsPage();
|
||||
debugKeysPage->setCloseHandler([=]() {
|
||||
calib->setFocus();
|
||||
});
|
||||
return 0;
|
||||
});
|
||||
grid.nextLine();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user