diff --git a/radio/src/gui/128x64/CMakeLists.txt b/radio/src/gui/128x64/CMakeLists.txt index ba48b93f6..1cfdcb12e 100644 --- a/radio/src/gui/128x64/CMakeLists.txt +++ b/radio/src/gui/128x64/CMakeLists.txt @@ -17,7 +17,6 @@ set(GUI_SRC menu_radio.cpp radio_setup.cpp radio_trainer.cpp - radio_version.cpp radio_hardware.cpp radio_calibration.cpp view_main.cpp diff --git a/radio/src/gui/212x64/CMakeLists.txt b/radio/src/gui/212x64/CMakeLists.txt index ba48b93f6..1cfdcb12e 100644 --- a/radio/src/gui/212x64/CMakeLists.txt +++ b/radio/src/gui/212x64/CMakeLists.txt @@ -17,7 +17,6 @@ set(GUI_SRC menu_radio.cpp radio_setup.cpp radio_trainer.cpp - radio_version.cpp radio_hardware.cpp radio_calibration.cpp view_main.cpp diff --git a/radio/src/gui/212x64/radio_version.cpp b/radio/src/gui/212x64/radio_version.cpp deleted file mode 100644 index b3fbaca32..000000000 --- a/radio/src/gui/212x64/radio_version.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 menuRadioVersion(event_t event) -{ - char id[27]; - if (warningResult) { - warningResult = 0; - showMessageBox(STR_STORAGE_FORMAT); - storageEraseAll(false); - NVIC_SystemReset(); - } - - getCPUUniqueID(id); - - SIMPLE_MENU(STR_MENUVERSION, menuTabGeneral, MENU_RADIO_VERSION, 1); - - lcdDrawTextAlignedLeft(MENU_HEADER_HEIGHT+1, vers_stamp); - lcdDrawTextAlignedLeft(MENU_HEADER_HEIGHT+4*FH+1, "UID\037\033:"); - lcdDrawText(5*FW+3, MENU_HEADER_HEIGHT+4*FH+1, id); - - lcdDrawText(INDENT_WIDTH, MENU_HEADER_HEIGHT+5*FH+1, "[ENTER Long] " STR_EEBACKUP); - lcdDrawText(INDENT_WIDTH, MENU_HEADER_HEIGHT+6*FH+1, "[MENU Long] " STR_FACTORYRESET); - lcdDrawFilledRect(0, MENU_HEADER_HEIGHT+5*FH, LCD_W, 2*FH+1, SOLID); - - if (event == EVT_KEY_LONG(KEY_ENTER)) { - eepromBackup(); - } - else if (event == EVT_KEY_LONG(KEY_MENU)) { - POPUP_CONFIRMATION(STR_CONFIRMRESET, nullptr); - } -} diff --git a/radio/src/gui/common/stdlcd/CMakeLists.txt b/radio/src/gui/common/stdlcd/CMakeLists.txt index 6453c1673..1b213b765 100644 --- a/radio/src/gui/common/stdlcd/CMakeLists.txt +++ b/radio/src/gui/common/stdlcd/CMakeLists.txt @@ -13,6 +13,7 @@ set(GUI_SRC ../common/stdlcd/model_notes.cpp ../common/stdlcd/model_curves.cpp ../common/stdlcd/radio_tools.cpp + ../common/stdlcd/radio_version.cpp model_curve_edit.cpp ) diff --git a/radio/src/gui/128x64/radio_version.cpp b/radio/src/gui/common/stdlcd/radio_version.cpp similarity index 98% rename from radio/src/gui/128x64/radio_version.cpp rename to radio/src/gui/common/stdlcd/radio_version.cpp index 054c56063..72ca74a55 100644 --- a/radio/src/gui/128x64/radio_version.cpp +++ b/radio/src/gui/common/stdlcd/radio_version.cpp @@ -207,10 +207,9 @@ void menuRadioVersion(event_t event) { SIMPLE_MENU(STR_MENUVERSION, menuTabGeneral, MENU_RADIO_VERSION, ITEM_RADIO_VERSION_COUNT); - coord_t y = MENU_HEADER_HEIGHT + 1; - lcdDrawTextAlignedLeft(y, vers_stamp); - y += 4*FH; - // TODO this was good on AVR radios, but horrible now ... + lcdDrawText(FW, FH + 2, vers_stamp, SMLSIZE); + + coord_t y = MENU_HEADER_HEIGHT + 4*FH; #if defined(COPROCESSOR) if (Coproc_valid == 1) {