Rework debug menu

This commit is contained in:
Ben V. Brown
2019-07-03 15:32:02 +10:00
parent d7e8bd77e4
commit 3f69dbd5a3
5 changed files with 31 additions and 14 deletions

View File

@@ -67,4 +67,5 @@ extern const char* SymbolDC;
extern const char* SymbolCellCount;
extern const char* SymbolVersionNumber;
extern const char* DebugMenu[];
#endif /* TRANSLATION_H_ */

View File

@@ -11,7 +11,7 @@
#include <stdint.h>
// max size = 127
template <class T=uint16_t, uint8_t SIZE=15>
template <class T, uint8_t SIZE>
struct history {
static const uint8_t size = SIZE;
T buf[size];

View File

@@ -674,17 +674,6 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
}
}
static const char *HEADERS[] = {
__DATE__, "Heap: ", "HWMG: ", "HWMP: ", "HWMM: ", "Time: ", "Move: ", "RTip: ",
"CTip: ", "Vin :", "THan: ", "Model: ",
#ifdef MODEL_TS80
"QCV: ", "Tr ",
#else
"Tm ", "Ralim-",
#endif
};
void showVersion(void) {
uint8_t screen = 0;
ButtonState b;
@@ -698,7 +687,7 @@ void showVersion(void) {
OLED::print(SymbolVersionNumber); // Print version number
#endif
OLED::setCursor(0, 8); // second line
OLED::print(HEADERS[screen]);
OLED::print(DebugMenu[screen]);
switch (screen) {
case 1:
OLED::printNumber(xPortGetFreeHeapSize(), 5);
@@ -744,7 +733,7 @@ void showVersion(void) {
#ifdef MODEL_TS80
OLED::printNumber(calculateTipR(), 5);
#else
OLED::print("Tek.com");
OLED::printNumber(8500,5));
#endif
break;
default: