mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Change translation strs to be stored in one block
This commit is contained in:
@@ -12,6 +12,7 @@ from datetime import datetime
|
|||||||
from itertools import chain
|
from itertools import chain
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, TextIO, Tuple, Union
|
from typing import Dict, List, TextIO, Tuple, Union
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from bdflib import reader as bdfreader
|
from bdflib import reader as bdfreader
|
||||||
from bdflib.model import Font, Glyph
|
from bdflib.model import Font, Glyph
|
||||||
@@ -377,6 +378,16 @@ def convert_string(symbol_conversion_table: Dict[str, str], text: str) -> str:
|
|||||||
return output_string
|
return output_string
|
||||||
|
|
||||||
|
|
||||||
|
def escape(string: str) -> str:
|
||||||
|
return json.dumps(string, ensure_ascii=False)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class TranslationItem:
|
||||||
|
info: str
|
||||||
|
str_index: int
|
||||||
|
|
||||||
|
|
||||||
def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
||||||
language_code: str = lang["languageCode"]
|
language_code: str = lang["languageCode"]
|
||||||
logging.info(f"Generating block for {language_code}")
|
logging.info(f"Generating block for {language_code}")
|
||||||
@@ -394,28 +405,26 @@ def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
|||||||
f.write(font_table_text)
|
f.write(font_table_text)
|
||||||
f.write(f"\n// ---- {lang_name} ----\n\n")
|
f.write(f"\n// ---- {lang_name} ----\n\n")
|
||||||
|
|
||||||
# ----- Writing SettingsDescriptions
|
str_table: List[str] = []
|
||||||
|
str_group_messages: List[TranslationItem] = []
|
||||||
|
str_group_messageswarn: List[TranslationItem] = []
|
||||||
|
str_group_characters: List[TranslationItem] = []
|
||||||
|
str_group_settingdesc: List[TranslationItem] = []
|
||||||
|
str_group_settingshortnames: List[TranslationItem] = []
|
||||||
|
str_group_settingmenuentries: List[TranslationItem] = []
|
||||||
|
str_group_settingmenuentriesdesc: List[TranslationItem] = []
|
||||||
|
|
||||||
|
# ----- Reading SettingsDescriptions
|
||||||
obj = lang["menuOptions"]
|
obj = lang["menuOptions"]
|
||||||
f.write("const char* SettingsDescriptions[] = {\n")
|
|
||||||
|
|
||||||
max_len = 25
|
for index, mod in enumerate(defs["menuOptions"]):
|
||||||
index = 0
|
|
||||||
for mod in defs["menuOptions"]:
|
|
||||||
eid = mod["id"]
|
eid = mod["id"]
|
||||||
if "feature" in mod:
|
str_group_settingdesc.append(
|
||||||
f.write(f"#ifdef {mod['feature']}\n")
|
TranslationItem(f"[{index:02d}] {eid}", len(str_table))
|
||||||
f.write(f" /* [{index:02d}] {eid.ljust(max_len)[:max_len]} */ ")
|
|
||||||
f.write(
|
|
||||||
f"\"{convert_string(symbol_conversion_table, obj[eid]['desc'])}\",//{obj[eid]['desc']} \n"
|
|
||||||
)
|
)
|
||||||
|
str_table.append(obj[eid]["desc"])
|
||||||
|
|
||||||
if "feature" in mod:
|
# ----- Reading Message strings
|
||||||
f.write("#endif\n")
|
|
||||||
index += 1
|
|
||||||
|
|
||||||
f.write("};\n\n")
|
|
||||||
|
|
||||||
# ----- Writing Message strings
|
|
||||||
|
|
||||||
obj = lang["messages"]
|
obj = lang["messages"]
|
||||||
|
|
||||||
@@ -426,11 +435,8 @@ def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
|||||||
source_text = mod["default"]
|
source_text = mod["default"]
|
||||||
if eid in obj:
|
if eid in obj:
|
||||||
source_text = obj[eid]
|
source_text = obj[eid]
|
||||||
translated_text = convert_string(symbol_conversion_table, source_text)
|
str_group_messages.append(TranslationItem(eid, len(str_table)))
|
||||||
source_text = source_text.replace("\n", "_")
|
str_table.append(source_text)
|
||||||
f.write(f'const char* {eid} = "{translated_text}";//{source_text} \n')
|
|
||||||
|
|
||||||
f.write("\n")
|
|
||||||
|
|
||||||
obj = lang["messagesWarn"]
|
obj = lang["messagesWarn"]
|
||||||
|
|
||||||
@@ -443,22 +449,17 @@ def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
|||||||
source_text = obj[eid][0] + "\n" + obj[eid][1]
|
source_text = obj[eid][0] + "\n" + obj[eid][1]
|
||||||
else:
|
else:
|
||||||
source_text = "\n" + obj[eid]
|
source_text = "\n" + obj[eid]
|
||||||
translated_text = convert_string(symbol_conversion_table, source_text)
|
str_group_messageswarn.append(TranslationItem(eid, len(str_table)))
|
||||||
source_text = source_text.replace("\n", "_")
|
str_table.append(source_text)
|
||||||
f.write(f'const char* {eid} = "{translated_text}";//{source_text} \n')
|
|
||||||
|
|
||||||
f.write("\n")
|
# ----- Reading Characters
|
||||||
|
|
||||||
# ----- Writing Characters
|
|
||||||
|
|
||||||
obj = lang["characters"]
|
obj = lang["characters"]
|
||||||
|
|
||||||
for mod in defs["characters"]:
|
for mod in defs["characters"]:
|
||||||
eid: str = mod["id"]
|
eid: str = mod["id"]
|
||||||
f.write(
|
str_group_characters.append(TranslationItem(eid, len(str_table)))
|
||||||
f'const char* {eid} = "{convert_string(symbol_conversion_table, obj[eid])}";//{obj[eid]} \n'
|
str_table.append(obj[eid])
|
||||||
)
|
|
||||||
f.write("\n")
|
|
||||||
|
|
||||||
# Write out firmware constant options
|
# Write out firmware constant options
|
||||||
constants = get_constants()
|
constants = get_constants()
|
||||||
@@ -475,13 +476,10 @@ def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
|||||||
f.write(f'\t "{convert_string(symbol_conversion_table, c)}",//{c} \n')
|
f.write(f'\t "{convert_string(symbol_conversion_table, c)}",//{c} \n')
|
||||||
f.write("};\n\n")
|
f.write("};\n\n")
|
||||||
|
|
||||||
# ----- Writing SettingsDescriptions
|
# ----- Reading SettingsDescriptions
|
||||||
obj = lang["menuOptions"]
|
obj = lang["menuOptions"]
|
||||||
f.write("const char* SettingsShortNames[] = {\n")
|
|
||||||
|
|
||||||
max_len = 25
|
for index, mod in enumerate(defs["menuOptions"]):
|
||||||
index = 0
|
|
||||||
for mod in defs["menuOptions"]:
|
|
||||||
eid = mod["id"]
|
eid = mod["id"]
|
||||||
if isinstance(obj[eid]["text2"], list):
|
if isinstance(obj[eid]["text2"], list):
|
||||||
if not obj[eid]["text2"][1]:
|
if not obj[eid]["text2"][1]:
|
||||||
@@ -490,25 +488,15 @@ def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
|||||||
source_text = obj[eid]["text2"][0] + "\n" + obj[eid]["text2"][1]
|
source_text = obj[eid]["text2"][0] + "\n" + obj[eid]["text2"][1]
|
||||||
else:
|
else:
|
||||||
source_text = "\n" + obj[eid]["text2"]
|
source_text = "\n" + obj[eid]["text2"]
|
||||||
if "feature" in mod:
|
str_group_settingshortnames.append(
|
||||||
f.write(f"#ifdef {mod['feature']}\n")
|
TranslationItem(f"[{index:02d}] {eid}", len(str_table))
|
||||||
f.write(f" /* [{index:02d}] {eid.ljust(max_len)[:max_len]} */ ")
|
|
||||||
f.write(
|
|
||||||
f'{{ "{convert_string(symbol_conversion_table, source_text)}" }},//{obj[eid]["text2"]} \n'
|
|
||||||
)
|
)
|
||||||
|
str_table.append(source_text)
|
||||||
|
|
||||||
if "feature" in mod:
|
# ----- Reading Menu Groups
|
||||||
f.write("#endif\n")
|
|
||||||
index += 1
|
|
||||||
|
|
||||||
f.write("};\n\n")
|
|
||||||
|
|
||||||
# ----- Writing Menu Groups
|
|
||||||
obj = lang["menuGroups"]
|
obj = lang["menuGroups"]
|
||||||
f.write(f"const char* SettingsMenuEntries[{len(obj)}] = {{\n")
|
|
||||||
|
|
||||||
max_len = 25
|
for index, mod in enumerate(defs["menuGroups"]):
|
||||||
for mod in defs["menuGroups"]:
|
|
||||||
eid = mod["id"]
|
eid = mod["id"]
|
||||||
if isinstance(obj[eid]["text2"], list):
|
if isinstance(obj[eid]["text2"], list):
|
||||||
if not obj[eid]["text2"][1]:
|
if not obj[eid]["text2"][1]:
|
||||||
@@ -517,26 +505,91 @@ def write_language(lang: dict, defs: dict, f: TextIO) -> None:
|
|||||||
source_text = obj[eid]["text2"][0] + "\n" + obj[eid]["text2"][1]
|
source_text = obj[eid]["text2"][0] + "\n" + obj[eid]["text2"][1]
|
||||||
else:
|
else:
|
||||||
source_text = "\n" + obj[eid]["text2"]
|
source_text = "\n" + obj[eid]["text2"]
|
||||||
f.write(f" /* {eid.ljust(max_len)[:max_len]} */ ")
|
str_group_settingmenuentries.append(
|
||||||
f.write(
|
TranslationItem(f"[{index:02d}] {eid}", len(str_table))
|
||||||
f'"{convert_string(symbol_conversion_table, source_text)}",//{obj[eid]["text2"]} \n'
|
|
||||||
)
|
)
|
||||||
|
str_table.append(source_text)
|
||||||
|
|
||||||
f.write("};\n\n")
|
# ----- Reading Menu Groups Descriptions
|
||||||
|
|
||||||
# ----- Writing Menu Groups Descriptions
|
|
||||||
obj = lang["menuGroups"]
|
obj = lang["menuGroups"]
|
||||||
f.write(f"const char* SettingsMenuEntriesDescriptions[{(len(obj))}] = {{\n")
|
|
||||||
|
|
||||||
max_len = 25
|
for index, mod in enumerate(defs["menuGroups"]):
|
||||||
for mod in defs["menuGroups"]:
|
|
||||||
eid = mod["id"]
|
eid = mod["id"]
|
||||||
f.write(f" /* {eid.ljust(max_len)[:max_len]} */ ")
|
str_group_settingmenuentriesdesc.append(
|
||||||
f.write(
|
TranslationItem(f"[{index:02d}] {eid}", len(str_table))
|
||||||
f"\"{convert_string(symbol_conversion_table, (obj[eid]['desc']))}\",//{obj[eid]['desc']} \n"
|
|
||||||
)
|
)
|
||||||
|
str_table.append(obj[eid]["desc"])
|
||||||
|
|
||||||
|
f.write("\n")
|
||||||
|
|
||||||
|
# TODO: De-duplicate the strings in str_table.
|
||||||
|
|
||||||
|
# ----- Write the string table:
|
||||||
|
str_offsets = []
|
||||||
|
offset = 0
|
||||||
|
write_null = False
|
||||||
|
f.write("const char TranslationStrings[] = {\n")
|
||||||
|
for i, source_str in enumerate(str_table):
|
||||||
|
if write_null:
|
||||||
|
f.write(' "\\0"\n')
|
||||||
|
write_null = True
|
||||||
|
# Find what items use this string
|
||||||
|
is_used = False
|
||||||
|
for group, pre_info in [
|
||||||
|
(str_group_messages, "messages"),
|
||||||
|
(str_group_messageswarn, "messagesWarn"),
|
||||||
|
(str_group_characters, "characters"),
|
||||||
|
(str_group_settingdesc, "SettingsDescriptions"),
|
||||||
|
(str_group_settingshortnames, "SettingsShortNames"),
|
||||||
|
(str_group_settingmenuentries, "SettingsMenuEntries"),
|
||||||
|
(str_group_settingmenuentriesdesc, "SettingsMenuEntriesDescriptions"),
|
||||||
|
]:
|
||||||
|
for item in group:
|
||||||
|
if item.str_index == i:
|
||||||
|
is_used = True
|
||||||
|
f.write(f" // - {pre_info} {item.info}\n")
|
||||||
|
if not is_used:
|
||||||
|
str_offsets.append(-1)
|
||||||
|
write_null = False
|
||||||
|
continue
|
||||||
|
f.write(f" // {offset: >4}: {escape(source_str)}\n")
|
||||||
|
converted_str = convert_string(symbol_conversion_table, source_str)
|
||||||
|
f.write(f' "{converted_str}"')
|
||||||
|
str_offsets.append(offset)
|
||||||
|
# Sanity check: Each "char" in `converted_str` should be in format
|
||||||
|
# `\xFF`, so the length should be divisible by 4.
|
||||||
|
assert len(converted_str) % 4 == 0
|
||||||
|
# Add the length and the null terminator
|
||||||
|
offset += len(converted_str) // 4 + 1
|
||||||
|
f.write("\n};\n\n")
|
||||||
|
|
||||||
|
def get_offset(idx: int) -> int:
|
||||||
|
assert str_offsets[idx] >= 0
|
||||||
|
return str_offsets[idx]
|
||||||
|
|
||||||
|
# ----- Write the messages string indices:
|
||||||
|
for group in [str_group_messages, str_group_messageswarn, str_group_characters]:
|
||||||
|
for item in group:
|
||||||
|
f.write(
|
||||||
|
f"const uint16_t {item.info} = {get_offset(item.str_index)}; // {escape(str_table[item.str_index])}\n"
|
||||||
|
)
|
||||||
|
f.write("\n")
|
||||||
|
|
||||||
|
# ----- Write the settings index tables:
|
||||||
|
for group, name in [
|
||||||
|
(str_group_settingdesc, "SettingsDescriptions"),
|
||||||
|
(str_group_settingshortnames, "SettingsShortNames"),
|
||||||
|
(str_group_settingmenuentries, "SettingsMenuEntries"),
|
||||||
|
(str_group_settingmenuentriesdesc, "SettingsMenuEntriesDescriptions"),
|
||||||
|
]:
|
||||||
|
max_len = 30
|
||||||
|
f.write(f"const uint16_t {name}[] = {{\n")
|
||||||
|
for item in group:
|
||||||
|
f.write(
|
||||||
|
f" /* {item.info.ljust(max_len)[:max_len]} */ {get_offset(item.str_index)}, // {escape(str_table[item.str_index])}\n"
|
||||||
|
)
|
||||||
|
f.write(f"}}; // {name}\n\n")
|
||||||
|
|
||||||
f.write("};\n\n")
|
|
||||||
f.write(
|
f.write(
|
||||||
f"const bool HasFahrenheit = {('true' if lang.get('tempUnitFahrenheit', True) else 'false')};\n"
|
f"const bool HasFahrenheit = {('true' if lang.get('tempUnitFahrenheit', True) else 'false')};\n"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -12,53 +12,55 @@ extern const uint8_t USER_FONT_12[];
|
|||||||
extern const uint8_t USER_FONT_6x8[];
|
extern const uint8_t USER_FONT_6x8[];
|
||||||
extern const bool HasFahrenheit;
|
extern const bool HasFahrenheit;
|
||||||
|
|
||||||
extern const char *SettingsShortNames[];
|
extern const char TranslationStrings[];
|
||||||
extern const char *SettingsDescriptions[];
|
|
||||||
extern const char *SettingsMenuEntries[];
|
|
||||||
|
|
||||||
extern const char *SettingsCalibrationWarning;
|
extern const uint16_t SettingsShortNames[];
|
||||||
extern const char *SettingsResetWarning;
|
extern const uint16_t SettingsDescriptions[];
|
||||||
extern const char *UVLOWarningString;
|
extern const uint16_t SettingsMenuEntries[];
|
||||||
extern const char *UndervoltageString;
|
|
||||||
extern const char *InputVoltageString;
|
|
||||||
|
|
||||||
extern const char *SleepingSimpleString;
|
extern const uint16_t SettingsCalibrationWarning;
|
||||||
extern const char *SleepingAdvancedString;
|
extern const uint16_t SettingsResetWarning;
|
||||||
extern const char *SleepingTipAdvancedString;
|
extern const uint16_t UVLOWarningString;
|
||||||
extern const char *IdleTipString;
|
extern const uint16_t UndervoltageString;
|
||||||
extern const char *IdleSetString;
|
extern const uint16_t InputVoltageString;
|
||||||
extern const char *TipDisconnectedString;
|
|
||||||
extern const char *SolderingAdvancedPowerPrompt;
|
|
||||||
extern const char *OffString;
|
|
||||||
|
|
||||||
extern const char *ResetOKMessage;
|
extern const uint16_t SleepingSimpleString;
|
||||||
extern const char *SettingsResetMessage;
|
extern const uint16_t SleepingAdvancedString;
|
||||||
extern const char *NoAccelerometerMessage;
|
extern const uint16_t SleepingTipAdvancedString;
|
||||||
extern const char *NoPowerDeliveryMessage;
|
extern const uint16_t IdleTipString;
|
||||||
extern const char *LockingKeysString;
|
extern const uint16_t IdleSetString;
|
||||||
extern const char *UnlockingKeysString;
|
extern const uint16_t TipDisconnectedString;
|
||||||
extern const char *WarningKeysLockedString;
|
extern const uint16_t SolderingAdvancedPowerPrompt;
|
||||||
|
extern const uint16_t OffString;
|
||||||
|
|
||||||
extern const char *SettingRightChar;
|
extern const uint16_t ResetOKMessage;
|
||||||
extern const char *SettingLeftChar;
|
extern const uint16_t SettingsResetMessage;
|
||||||
extern const char *SettingAutoChar;
|
extern const uint16_t NoAccelerometerMessage;
|
||||||
extern const char *SettingStartSolderingChar;
|
extern const uint16_t NoPowerDeliveryMessage;
|
||||||
extern const char *SettingStartSleepChar;
|
extern const uint16_t LockingKeysString;
|
||||||
extern const char *SettingStartSleepOffChar;
|
extern const uint16_t UnlockingKeysString;
|
||||||
extern const char *SettingStartNoneChar;
|
extern const uint16_t WarningKeysLockedString;
|
||||||
extern const char *SettingSensitivityOff;
|
|
||||||
extern const char *SettingSensitivityLow;
|
|
||||||
extern const char *SettingSensitivityMedium;
|
|
||||||
extern const char *SettingSensitivityHigh;
|
|
||||||
extern const char *SettingLockDisableChar;
|
|
||||||
extern const char *SettingLockBoostChar;
|
|
||||||
extern const char *SettingLockFullChar;
|
|
||||||
extern const char *SettingNAChar;
|
|
||||||
|
|
||||||
extern const char *SettingOffChar;
|
extern const uint16_t SettingRightChar;
|
||||||
extern const char *SettingFastChar;
|
extern const uint16_t SettingLeftChar;
|
||||||
extern const char *SettingMediumChar;
|
extern const uint16_t SettingAutoChar;
|
||||||
extern const char *SettingSlowChar;
|
extern const uint16_t SettingStartSolderingChar;
|
||||||
|
extern const uint16_t SettingStartSleepChar;
|
||||||
|
extern const uint16_t SettingStartSleepOffChar;
|
||||||
|
extern const uint16_t SettingStartNoneChar;
|
||||||
|
extern const uint16_t SettingSensitivityOff;
|
||||||
|
extern const uint16_t SettingSensitivityLow;
|
||||||
|
extern const uint16_t SettingSensitivityMedium;
|
||||||
|
extern const uint16_t SettingSensitivityHigh;
|
||||||
|
extern const uint16_t SettingLockDisableChar;
|
||||||
|
extern const uint16_t SettingLockBoostChar;
|
||||||
|
extern const uint16_t SettingLockFullChar;
|
||||||
|
extern const uint16_t SettingNAChar;
|
||||||
|
|
||||||
|
extern const uint16_t SettingOffChar;
|
||||||
|
extern const uint16_t SettingFastChar;
|
||||||
|
extern const uint16_t SettingMediumChar;
|
||||||
|
extern const uint16_t SettingSlowChar;
|
||||||
|
|
||||||
extern const char *SymbolPlus;
|
extern const char *SymbolPlus;
|
||||||
extern const char *SymbolMinus;
|
extern const char *SymbolMinus;
|
||||||
@@ -112,4 +114,6 @@ constexpr uint8_t settings_item_index(const SettingsItemIndex i) { return static
|
|||||||
// Use a constexpr function for type-checking.
|
// Use a constexpr function for type-checking.
|
||||||
#define SETTINGS_DESC(i) (settings_item_index(i) + 1)
|
#define SETTINGS_DESC(i) (settings_item_index(i) + 1)
|
||||||
|
|
||||||
|
const char *translatedString(uint16_t index);
|
||||||
|
|
||||||
#endif /* TRANSLATION_H_ */
|
#endif /* TRANSLATION_H_ */
|
||||||
|
|||||||
3
source/Core/Src/Translation.cpp
Normal file
3
source/Core/Src/Translation.cpp
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#include "Translation.h"
|
||||||
|
|
||||||
|
const char *translatedString(uint16_t offset) { return TranslationStrings + offset; }
|
||||||
@@ -247,7 +247,7 @@ const menuitem advancedMenu[] = {
|
|||||||
static void printShortDescription(SettingsItemIndex settingsItemIndex, uint16_t cursorCharPosition) {
|
static void printShortDescription(SettingsItemIndex settingsItemIndex, uint16_t cursorCharPosition) {
|
||||||
// print short description (default single line, explicit double line)
|
// print short description (default single line, explicit double line)
|
||||||
uint8_t shortDescIndex = static_cast<uint8_t>(settingsItemIndex);
|
uint8_t shortDescIndex = static_cast<uint8_t>(settingsItemIndex);
|
||||||
OLED::printWholeScreen(SettingsShortNames[shortDescIndex]);
|
OLED::printWholeScreen(translatedString(SettingsShortNames[shortDescIndex]));
|
||||||
|
|
||||||
// prepare cursor for value
|
// prepare cursor for value
|
||||||
// make room for scroll indicator
|
// make room for scroll indicator
|
||||||
@@ -362,7 +362,7 @@ static bool settings_displayInputMinVRange(void) {
|
|||||||
OLED::printNumber(systemSettings.minVoltageCells % 10, 1, FontStyle::LARGE);
|
OLED::printNumber(systemSettings.minVoltageCells % 10, 1, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
printShortDescription(SettingsItemIndex::MinVolCell, 5);
|
printShortDescription(SettingsItemIndex::MinVolCell, 5);
|
||||||
OLED::print(SettingNAChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingNAChar), FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -437,7 +437,7 @@ static bool settings_setSleepTime(void) {
|
|||||||
static bool settings_displaySleepTime(void) {
|
static bool settings_displaySleepTime(void) {
|
||||||
printShortDescription(SettingsItemIndex::SleepTimeout, 5);
|
printShortDescription(SettingsItemIndex::SleepTimeout, 5);
|
||||||
if (systemSettings.SleepTime == 0) {
|
if (systemSettings.SleepTime == 0) {
|
||||||
OLED::print(OffString, FontStyle::LARGE);
|
OLED::print(translatedString(OffString), FontStyle::LARGE);
|
||||||
} else if (systemSettings.SleepTime < 6) {
|
} else if (systemSettings.SleepTime < 6) {
|
||||||
OLED::printNumber(systemSettings.SleepTime * 10, 2, FontStyle::LARGE);
|
OLED::printNumber(systemSettings.SleepTime * 10, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolSeconds, FontStyle::LARGE);
|
OLED::print(SymbolSeconds, FontStyle::LARGE);
|
||||||
@@ -461,7 +461,7 @@ static bool settings_setShutdownTime(void) {
|
|||||||
static bool settings_displayShutdownTime(void) {
|
static bool settings_displayShutdownTime(void) {
|
||||||
printShortDescription(SettingsItemIndex::ShutdownTimeout, 5);
|
printShortDescription(SettingsItemIndex::ShutdownTimeout, 5);
|
||||||
if (systemSettings.ShutdownTime == 0) {
|
if (systemSettings.ShutdownTime == 0) {
|
||||||
OLED::print(OffString, FontStyle::LARGE);
|
OLED::print(translatedString(OffString), FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(systemSettings.ShutdownTime, 2, FontStyle::LARGE);
|
OLED::printNumber(systemSettings.ShutdownTime, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolMinutes, FontStyle::LARGE);
|
OLED::print(SymbolMinutes, FontStyle::LARGE);
|
||||||
@@ -546,7 +546,7 @@ static bool settings_setPowerLimit(void) {
|
|||||||
static bool settings_displayPowerLimit(void) {
|
static bool settings_displayPowerLimit(void) {
|
||||||
printShortDescription(SettingsItemIndex::PowerLimit, 5);
|
printShortDescription(SettingsItemIndex::PowerLimit, 5);
|
||||||
if (systemSettings.powerLimit == 0) {
|
if (systemSettings.powerLimit == 0) {
|
||||||
OLED::print(OffString, FontStyle::LARGE);
|
OLED::print(translatedString(OffString), FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(systemSettings.powerLimit, 2, FontStyle::LARGE);
|
OLED::printNumber(systemSettings.powerLimit, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolWatts, FontStyle::LARGE);
|
OLED::print(SymbolWatts, FontStyle::LARGE);
|
||||||
@@ -564,7 +564,7 @@ static bool settings_setScrollSpeed(void) {
|
|||||||
|
|
||||||
static bool settings_displayScrollSpeed(void) {
|
static bool settings_displayScrollSpeed(void) {
|
||||||
printShortDescription(SettingsItemIndex::ScrollingSpeed, 7);
|
printShortDescription(SettingsItemIndex::ScrollingSpeed, 7);
|
||||||
OLED::print((systemSettings.descriptionScrollSpeed) ? SettingFastChar : SettingSlowChar, FontStyle::LARGE);
|
OLED::print(translatedString((systemSettings.descriptionScrollSpeed) ? SettingFastChar : SettingSlowChar), FontStyle::LARGE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -592,16 +592,16 @@ static bool settings_displayDisplayRotation(void) {
|
|||||||
|
|
||||||
switch (systemSettings.OrientationMode) {
|
switch (systemSettings.OrientationMode) {
|
||||||
case 0:
|
case 0:
|
||||||
OLED::print(SettingRightChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingRightChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
OLED::print(SettingLeftChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingLeftChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
OLED::print(SettingAutoChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingAutoChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
OLED::print(SettingRightChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingRightChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -637,7 +637,7 @@ static bool settings_displayBoostTemp(void) {
|
|||||||
if (systemSettings.BoostTemp) {
|
if (systemSettings.BoostTemp) {
|
||||||
OLED::printNumber(systemSettings.BoostTemp, 3, FontStyle::LARGE);
|
OLED::printNumber(systemSettings.BoostTemp, 3, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(OffString, FontStyle::LARGE);
|
OLED::print(translatedString(OffString), FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -653,19 +653,19 @@ static bool settings_displayAutomaticStartMode(void) {
|
|||||||
|
|
||||||
switch (systemSettings.autoStartMode) {
|
switch (systemSettings.autoStartMode) {
|
||||||
case 0:
|
case 0:
|
||||||
OLED::print(SettingStartNoneChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingStartNoneChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
OLED::print(SettingStartSolderingChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingStartSolderingChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
OLED::print(SettingStartSleepChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingStartSleepChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
OLED::print(SettingStartSleepOffChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingStartSleepOffChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
OLED::print(SettingStartNoneChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingStartNoneChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -682,16 +682,16 @@ static bool settings_displayLockingMode(void) {
|
|||||||
|
|
||||||
switch (systemSettings.lockingMode) {
|
switch (systemSettings.lockingMode) {
|
||||||
case 0:
|
case 0:
|
||||||
OLED::print(SettingLockDisableChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingLockDisableChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
OLED::print(SettingLockBoostChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingLockBoostChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
OLED::print(SettingLockFullChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingLockFullChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
OLED::print(SettingLockDisableChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingLockDisableChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -709,9 +709,9 @@ static bool settings_displayCoolingBlinkEnabled(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool settings_setResetSettings(void) {
|
static bool settings_setResetSettings(void) {
|
||||||
if (userConfirmation(SettingsResetWarning)) {
|
if (userConfirmation(translatedString(SettingsResetWarning))) {
|
||||||
resetSettings();
|
resetSettings();
|
||||||
warnUser(ResetOKMessage, 2 * TICKS_SECOND);
|
warnUser(translatedString(ResetOKMessage), 2 * TICKS_SECOND);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -754,7 +754,7 @@ static void setTipOffset() {
|
|||||||
// If not only do single point tuning as per usual
|
// If not only do single point tuning as per usual
|
||||||
static bool settings_setCalibrate(void) {
|
static bool settings_setCalibrate(void) {
|
||||||
|
|
||||||
if (userConfirmation(SettingsCalibrationWarning)) {
|
if (userConfirmation(translatedString(SettingsCalibrationWarning))) {
|
||||||
// User confirmed
|
// User confirmed
|
||||||
// So we now perform the actual calculation
|
// So we now perform the actual calculation
|
||||||
setTipOffset();
|
setTipOffset();
|
||||||
@@ -881,7 +881,7 @@ static bool settings_displayPowerPulse(void) {
|
|||||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
OLED::print(SymbolDot, FontStyle::LARGE);
|
||||||
OLED::printNumber(systemSettings.KeepAwakePulse % 10, 1, FontStyle::LARGE);
|
OLED::printNumber(systemSettings.KeepAwakePulse % 10, 1, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(OffString, FontStyle::LARGE);
|
OLED::print(translatedString(OffString), FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -907,16 +907,16 @@ static bool settings_displayAnimationSpeed(void) {
|
|||||||
printShortDescription(SettingsItemIndex::AnimSpeed, 7);
|
printShortDescription(SettingsItemIndex::AnimSpeed, 7);
|
||||||
switch (systemSettings.animationSpeed) {
|
switch (systemSettings.animationSpeed) {
|
||||||
case settingOffSpeed_t::SLOW:
|
case settingOffSpeed_t::SLOW:
|
||||||
OLED::print(SettingSlowChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingSlowChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case settingOffSpeed_t::MEDIUM:
|
case settingOffSpeed_t::MEDIUM:
|
||||||
OLED::print(SettingMediumChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingMediumChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case settingOffSpeed_t::FAST:
|
case settingOffSpeed_t::FAST:
|
||||||
OLED::print(SettingFastChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingFastChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
OLED::print(SettingOffChar, FontStyle::LARGE);
|
OLED::print(translatedString(SettingOffChar), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -967,17 +967,17 @@ static bool settings_displayHallEffect(void) {
|
|||||||
printShortDescription(SettingsItemIndex::HallEffSensitivity, 7);
|
printShortDescription(SettingsItemIndex::HallEffSensitivity, 7);
|
||||||
switch (systemSettings.hallEffectSensitivity) {
|
switch (systemSettings.hallEffectSensitivity) {
|
||||||
case 1:
|
case 1:
|
||||||
OLED::print(SettingSensitivityLow, FontStyle::LARGE);
|
OLED::print(translatedString(SettingSensitivityLow), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
OLED::print(SettingSensitivityMedium, FontStyle::LARGE);
|
OLED::print(translatedString(SettingSensitivityMedium), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
OLED::print(SettingSensitivityHigh, FontStyle::LARGE);
|
OLED::print(translatedString(SettingSensitivityHigh), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
OLED::print(SettingSensitivityOff, FontStyle::LARGE);
|
OLED::print(translatedString(SettingSensitivityOff), FontStyle::LARGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -996,7 +996,7 @@ static bool animOpenState = false;
|
|||||||
static void displayMenu(size_t index) {
|
static void displayMenu(size_t index) {
|
||||||
// Call into the menu
|
// Call into the menu
|
||||||
// Draw title
|
// Draw title
|
||||||
OLED::printWholeScreen(SettingsMenuEntries[index]);
|
OLED::printWholeScreen(translatedString(SettingsMenuEntries[index]));
|
||||||
// Draw symbol
|
// Draw symbol
|
||||||
// 16 pixel wide image
|
// 16 pixel wide image
|
||||||
// 2 pixel wide scrolling indicator
|
// 2 pixel wide scrolling indicator
|
||||||
@@ -1128,7 +1128,7 @@ void gui_Menu(const menuitem *menu) {
|
|||||||
// Draw description
|
// Draw description
|
||||||
if (descriptionStart == 0)
|
if (descriptionStart == 0)
|
||||||
descriptionStart = xTaskGetTickCount();
|
descriptionStart = xTaskGetTickCount();
|
||||||
const char *description = SettingsDescriptions[menu[currentScreen].description - 1];
|
const char *description = translatedString(SettingsDescriptions[menu[currentScreen].description - 1]);
|
||||||
// lower the value - higher the speed
|
// lower the value - higher the speed
|
||||||
int16_t descriptionWidth = FONT_12_WIDTH * (str_display_len(description) + 7);
|
int16_t descriptionWidth = FONT_12_WIDTH * (str_display_len(description) + 7);
|
||||||
int16_t descriptionOffset = ((xTaskGetTickCount() - descriptionStart) / (systemSettings.descriptionScrollSpeed == 1 ? (TICKS_100MS / 10) : (TICKS_100MS / 5)));
|
int16_t descriptionOffset = ((xTaskGetTickCount() - descriptionStart) / (systemSettings.descriptionScrollSpeed == 1 ? (TICKS_100MS / 10) : (TICKS_100MS / 5)));
|
||||||
|
|||||||
@@ -107,13 +107,13 @@ static bool checkVoltageForExit() {
|
|||||||
OLED::clearScreen();
|
OLED::clearScreen();
|
||||||
OLED::setCursor(0, 0);
|
OLED::setCursor(0, 0);
|
||||||
if (systemSettings.detailedSoldering) {
|
if (systemSettings.detailedSoldering) {
|
||||||
OLED::print(UndervoltageString, FontStyle::SMALL);
|
OLED::print(translatedString(UndervoltageString), FontStyle::SMALL);
|
||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
OLED::print(InputVoltageString, FontStyle::SMALL);
|
OLED::print(translatedString(InputVoltageString), FontStyle::SMALL);
|
||||||
printVoltage();
|
printVoltage();
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(UVLOWarningString, FontStyle::LARGE);
|
OLED::print(translatedString(UVLOWarningString), FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
OLED::refresh();
|
OLED::refresh();
|
||||||
@@ -326,9 +326,9 @@ static int gui_SolderingSleepingMode(bool stayOff, bool autoStarted) {
|
|||||||
OLED::clearScreen();
|
OLED::clearScreen();
|
||||||
OLED::setCursor(0, 0);
|
OLED::setCursor(0, 0);
|
||||||
if (systemSettings.detailedSoldering) {
|
if (systemSettings.detailedSoldering) {
|
||||||
OLED::print(SleepingAdvancedString, FontStyle::SMALL);
|
OLED::print(translatedString(SleepingAdvancedString), FontStyle::SMALL);
|
||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
OLED::print(SleepingTipAdvancedString, FontStyle::SMALL);
|
OLED::print(translatedString(SleepingTipAdvancedString), FontStyle::SMALL);
|
||||||
OLED::printNumber(tipTemp, 3, FontStyle::SMALL);
|
OLED::printNumber(tipTemp, 3, FontStyle::SMALL);
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
OLED::print(SymbolDegF, FontStyle::SMALL);
|
OLED::print(SymbolDegF, FontStyle::SMALL);
|
||||||
@@ -340,7 +340,7 @@ static int gui_SolderingSleepingMode(bool stayOff, bool autoStarted) {
|
|||||||
printVoltage();
|
printVoltage();
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(SleepingSimpleString, FontStyle::LARGE);
|
OLED::print(translatedString(SleepingSimpleString), FontStyle::LARGE);
|
||||||
OLED::printNumber(tipTemp, 3, FontStyle::LARGE);
|
OLED::printNumber(tipTemp, 3, FontStyle::LARGE);
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
OLED::drawSymbol(0);
|
OLED::drawSymbol(0);
|
||||||
@@ -462,7 +462,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
case BUTTON_BOTH_LONG:
|
case BUTTON_BOTH_LONG:
|
||||||
// Unlock buttons
|
// Unlock buttons
|
||||||
buttonsLocked = false;
|
buttonsLocked = false;
|
||||||
warnUser(UnlockingKeysString, TICKS_SECOND);
|
warnUser(translatedString(UnlockingKeysString), TICKS_SECOND);
|
||||||
break;
|
break;
|
||||||
case BUTTON_F_LONG:
|
case BUTTON_F_LONG:
|
||||||
// if boost mode is enabled turn it on
|
// if boost mode is enabled turn it on
|
||||||
@@ -476,7 +476,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
case BUTTON_F_SHORT:
|
case BUTTON_F_SHORT:
|
||||||
case BUTTON_B_SHORT:
|
case BUTTON_B_SHORT:
|
||||||
// Do nothing and display a lock warming
|
// Do nothing and display a lock warming
|
||||||
warnUser(WarningKeysLockedString, TICKS_SECOND / 2);
|
warnUser(translatedString(WarningKeysLockedString), TICKS_SECOND / 2);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -511,7 +511,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
if (systemSettings.lockingMode != 0) {
|
if (systemSettings.lockingMode != 0) {
|
||||||
// Lock buttons
|
// Lock buttons
|
||||||
buttonsLocked = true;
|
buttonsLocked = true;
|
||||||
warnUser(LockingKeysString, TICKS_SECOND);
|
warnUser(translatedString(LockingKeysString), TICKS_SECOND);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -523,7 +523,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
OLED::clearScreen();
|
OLED::clearScreen();
|
||||||
// Draw in the screen details
|
// Draw in the screen details
|
||||||
if (systemSettings.detailedSoldering) {
|
if (systemSettings.detailedSoldering) {
|
||||||
OLED::print(SolderingAdvancedPowerPrompt, FontStyle::SMALL); // Power:
|
OLED::print(translatedString(SolderingAdvancedPowerPrompt), FontStyle::SMALL); // Power:
|
||||||
OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL);
|
OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL);
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SymbolDot, FontStyle::SMALL);
|
||||||
OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL);
|
OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL);
|
||||||
@@ -535,7 +535,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
OLED::print(SleepingTipAdvancedString, FontStyle::SMALL);
|
OLED::print(translatedString(SleepingTipAdvancedString), FontStyle::SMALL);
|
||||||
gui_drawTipTemp(true, FontStyle::SMALL);
|
gui_drawTipTemp(true, FontStyle::SMALL);
|
||||||
|
|
||||||
if (boostModeOn) {
|
if (boostModeOn) {
|
||||||
@@ -713,7 +713,7 @@ void showDebugMenu(void) {
|
|||||||
void showWarnings() {
|
void showWarnings() {
|
||||||
// Display alert if settings were reset
|
// Display alert if settings were reset
|
||||||
if (settingsWereReset) {
|
if (settingsWereReset) {
|
||||||
warnUser(SettingsResetMessage, 10 * TICKS_SECOND);
|
warnUser(translatedString(SettingsResetMessage), 10 * TICKS_SECOND);
|
||||||
}
|
}
|
||||||
#ifndef NO_WARN_MISSING
|
#ifndef NO_WARN_MISSING
|
||||||
// We also want to alert if accel or pd is not detected / not responding
|
// We also want to alert if accel or pd is not detected / not responding
|
||||||
@@ -727,7 +727,7 @@ void showWarnings() {
|
|||||||
if (systemSettings.accelMissingWarningCounter < 2) {
|
if (systemSettings.accelMissingWarningCounter < 2) {
|
||||||
systemSettings.accelMissingWarningCounter++;
|
systemSettings.accelMissingWarningCounter++;
|
||||||
saveSettings();
|
saveSettings();
|
||||||
warnUser(NoAccelerometerMessage, 10 * TICKS_SECOND);
|
warnUser(translatedString(NoAccelerometerMessage), 10 * TICKS_SECOND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef POW_PD
|
#ifdef POW_PD
|
||||||
@@ -736,7 +736,7 @@ void showWarnings() {
|
|||||||
if (systemSettings.pdMissingWarningCounter < 2) {
|
if (systemSettings.pdMissingWarningCounter < 2) {
|
||||||
systemSettings.pdMissingWarningCounter++;
|
systemSettings.pdMissingWarningCounter++;
|
||||||
saveSettings();
|
saveSettings();
|
||||||
warnUser(NoPowerDeliveryMessage, 10 * TICKS_SECOND);
|
warnUser(translatedString(NoPowerDeliveryMessage), 10 * TICKS_SECOND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -844,16 +844,16 @@ void startGUITask(void const *argument __unused) {
|
|||||||
OLED::setCursor(0, 0);
|
OLED::setCursor(0, 0);
|
||||||
if (systemSettings.detailedIDLE) {
|
if (systemSettings.detailedIDLE) {
|
||||||
if (tipTemp > tipDisconnectedThres) {
|
if (tipTemp > tipDisconnectedThres) {
|
||||||
OLED::print(TipDisconnectedString, FontStyle::SMALL);
|
OLED::print(translatedString(TipDisconnectedString), FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(IdleTipString, FontStyle::SMALL);
|
OLED::print(translatedString(IdleTipString), FontStyle::SMALL);
|
||||||
gui_drawTipTemp(false, FontStyle::SMALL);
|
gui_drawTipTemp(false, FontStyle::SMALL);
|
||||||
OLED::print(IdleSetString, FontStyle::SMALL);
|
OLED::print(translatedString(IdleSetString), FontStyle::SMALL);
|
||||||
OLED::printNumber(systemSettings.SolderingTemp, 3, FontStyle::SMALL);
|
OLED::printNumber(systemSettings.SolderingTemp, 3, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
|
|
||||||
OLED::print(InputVoltageString, FontStyle::SMALL);
|
OLED::print(translatedString(InputVoltageString), FontStyle::SMALL);
|
||||||
printVoltage();
|
printVoltage();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ Core/Gen/Translation.%.cpp: ../Translations/translation_%.json Makefile ../Trans
|
|||||||
@python3 ../Translations/make_translation.py -o $(PWD)/$@ $*
|
@python3 ../Translations/make_translation.py -o $(PWD)/$@ $*
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -Rf $(SOURCE_CORE_DIR)/Translation.cpp Core/Gen
|
rm -Rf Core/Gen
|
||||||
rm -Rf $(OUTPUT_DIR_BASE)
|
rm -Rf $(OUTPUT_DIR_BASE)
|
||||||
rm -Rf $(HEXFILE_DIR)
|
rm -Rf $(HEXFILE_DIR)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user