Rework debug menu
This commit is contained in:
0
Translation Editor/fontTables.py
Normal file → Executable file
0
Translation Editor/fontTables.py
Normal file → Executable file
27
Translation Editor/make_translation.py
Normal file → Executable file
27
Translation Editor/make_translation.py
Normal file → Executable file
@@ -115,6 +115,23 @@ def getTipModelEnumTS100():
|
|||||||
constants.append("User")
|
constants.append("User")
|
||||||
return constants
|
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):
|
def getLetterCounts(defs, lang):
|
||||||
textList = []
|
textList = []
|
||||||
@@ -160,6 +177,7 @@ def getLetterCounts(defs, lang):
|
|||||||
constants = getConstants()
|
constants = getConstants()
|
||||||
for x in constants:
|
for x in constants:
|
||||||
textList.append(x[1])
|
textList.append(x[1])
|
||||||
|
textList.extend(getDebugMenuHeaders())
|
||||||
textList.extend(getTipModelEnumTS100())
|
textList.extend(getTipModelEnumTS100())
|
||||||
textList.extend(getTipModelEnumTS80())
|
textList.extend(getTipModelEnumTS80())
|
||||||
|
|
||||||
@@ -343,6 +361,15 @@ def writeLanguage(languageCode, defs, f):
|
|||||||
|
|
||||||
f.write(to_unicode("};\n\n"))
|
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 Options
|
||||||
|
|
||||||
# Menu type
|
# Menu type
|
||||||
|
|||||||
@@ -67,4 +67,5 @@ extern const char* SymbolDC;
|
|||||||
extern const char* SymbolCellCount;
|
extern const char* SymbolCellCount;
|
||||||
extern const char* SymbolVersionNumber;
|
extern const char* SymbolVersionNumber;
|
||||||
|
|
||||||
|
extern const char* DebugMenu[];
|
||||||
#endif /* TRANSLATION_H_ */
|
#endif /* TRANSLATION_H_ */
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// max size = 127
|
// max size = 127
|
||||||
template <class T=uint16_t, uint8_t SIZE=15>
|
template <class T, uint8_t SIZE>
|
||||||
struct history {
|
struct history {
|
||||||
static const uint8_t size = SIZE;
|
static const uint8_t size = SIZE;
|
||||||
T buf[size];
|
T buf[size];
|
||||||
|
|||||||
@@ -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) {
|
void showVersion(void) {
|
||||||
uint8_t screen = 0;
|
uint8_t screen = 0;
|
||||||
ButtonState b;
|
ButtonState b;
|
||||||
@@ -698,7 +687,7 @@ void showVersion(void) {
|
|||||||
OLED::print(SymbolVersionNumber); // Print version number
|
OLED::print(SymbolVersionNumber); // Print version number
|
||||||
#endif
|
#endif
|
||||||
OLED::setCursor(0, 8); // second line
|
OLED::setCursor(0, 8); // second line
|
||||||
OLED::print(HEADERS[screen]);
|
OLED::print(DebugMenu[screen]);
|
||||||
switch (screen) {
|
switch (screen) {
|
||||||
case 1:
|
case 1:
|
||||||
OLED::printNumber(xPortGetFreeHeapSize(), 5);
|
OLED::printNumber(xPortGetFreeHeapSize(), 5);
|
||||||
@@ -744,7 +733,7 @@ void showVersion(void) {
|
|||||||
#ifdef MODEL_TS80
|
#ifdef MODEL_TS80
|
||||||
OLED::printNumber(calculateTipR(), 5);
|
OLED::printNumber(calculateTipR(), 5);
|
||||||
#else
|
#else
|
||||||
OLED::print("Tek.com");
|
OLED::printNumber(8500,5));
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user