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

0
Translation Editor/fontTables.py Normal file → Executable file
View File

27
Translation Editor/make_translation.py Normal file → Executable file
View File

@@ -115,6 +115,23 @@ def getTipModelEnumTS100():
constants.append("User")
return constants
def getDebugMenuHeaders():
constants = []
constants.append("DateHere")
constants.append("Heap: ")
constants.append("HWMG: ")
constants.append("HWMP: ")
constants.append("HWMM: ")
constants.append("Time: ")
constants.append("Move: ")
constants.append("RTip: ")
constants.append("CTip: ")
constants.append("Vin: ")
constants.append("THan: ")
constants.append("Model: ")
constants.append("Tres: ")
return constants
def getLetterCounts(defs, lang):
textList = []
@@ -160,6 +177,7 @@ def getLetterCounts(defs, lang):
constants = getConstants()
for x in constants:
textList.append(x[1])
textList.extend(getDebugMenuHeaders())
textList.extend(getTipModelEnumTS100())
textList.extend(getTipModelEnumTS80())
@@ -343,6 +361,15 @@ def writeLanguage(languageCode, defs, f):
f.write(to_unicode("};\n\n"))
# -- Debugging Menu
f.write(to_unicode("const char* DebugMenu[] = {\n"))
for c in getDebugMenuHeaders():
f.write(to_unicode("\t \"" + convStr(symbolConversionTable, c) + "\","+ "//{} \n".format(c)))
f.write(to_unicode("};\n\n"))
# ----- Menu Options
# Menu type

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: