Use size encoded symbols
Update make_translation.py
This commit is contained in:
@@ -543,6 +543,9 @@ def get_forced_first_symbols() -> List[str]:
|
|||||||
"d",
|
"d",
|
||||||
"e",
|
"e",
|
||||||
"f",
|
"f",
|
||||||
|
" ",# We lock these to ease printing functions; and they are always included due to constants
|
||||||
|
"-",
|
||||||
|
"+"
|
||||||
]
|
]
|
||||||
return forced_first_symbols
|
return forced_first_symbols
|
||||||
|
|
||||||
@@ -1031,7 +1034,7 @@ def get_translation_common_text(
|
|||||||
if x[0].startswith("Small"):
|
if x[0].startswith("Small"):
|
||||||
translation_common_text += f'const char* {x[0]} = "{convert_string(small_symbol_conversion_table, x[1])}";//{x[1]} \n'
|
translation_common_text += f'const char* {x[0]} = "{convert_string(small_symbol_conversion_table, x[1])}";//{x[1]} \n'
|
||||||
elif x[0].startswith("Large"):
|
elif x[0].startswith("Large"):
|
||||||
str = "\n"+x[1]
|
str = x[1]
|
||||||
translation_common_text += f'const char* {x[0]} = "{convert_string(large_symbol_conversion_table, str)}";//{x[1]} \n'
|
translation_common_text += f'const char* {x[0]} = "{convert_string(large_symbol_conversion_table, str)}";//{x[1]} \n'
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Constant {x} is not size encoded")
|
raise ValueError(f"Constant {x} is not size encoded")
|
||||||
@@ -1115,14 +1118,15 @@ def get_translation_strings_and_indices_text(
|
|||||||
record = TranslatedStringLocation(len(byte_encoded_strings) - 1, 0)
|
record = TranslatedStringLocation(len(byte_encoded_strings) - 1, 0)
|
||||||
translated_string_lookups[translation_id] = record
|
translated_string_lookups[translation_id] = record
|
||||||
|
|
||||||
def encode_string_and_add(message: str, translation_id: str):
|
def encode_string_and_add(message: str, translation_id: str,force_large_text:bool=False):
|
||||||
encoded_data: bytes
|
encoded_data: bytes
|
||||||
if test_is_small_font(message):
|
if force_large_text is False and test_is_small_font(message):
|
||||||
encoded_data = convert_string_bytes(
|
encoded_data = convert_string_bytes(
|
||||||
small_font_symbol_conversion_table, message
|
small_font_symbol_conversion_table, message
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
message = "\n" + message
|
if force_large_text is False:
|
||||||
|
message = "\n" + message
|
||||||
encoded_data = convert_string_bytes(
|
encoded_data = convert_string_bytes(
|
||||||
large_font_symbol_conversion_table, message
|
large_font_symbol_conversion_table, message
|
||||||
)
|
)
|
||||||
@@ -1132,7 +1136,7 @@ def get_translation_strings_and_indices_text(
|
|||||||
lang_data = lang["menuOptions"][record["id"]]
|
lang_data = lang["menuOptions"][record["id"]]
|
||||||
# Add to translations the menu text and the description
|
# Add to translations the menu text and the description
|
||||||
encode_string_and_add(
|
encode_string_and_add(
|
||||||
lang_data["description"], "menuOptions" + record["id"] + "description"
|
lang_data["description"], "menuOptions" + record["id"] + "description",True
|
||||||
)
|
)
|
||||||
encode_string_and_add(
|
encode_string_and_add(
|
||||||
lang_data["displayText"], "menuOptions" + record["id"] + "displayText"
|
lang_data["displayText"], "menuOptions" + record["id"] + "displayText"
|
||||||
@@ -1142,7 +1146,7 @@ def get_translation_strings_and_indices_text(
|
|||||||
lang_data = lang["menuGroups"][record["id"]]
|
lang_data = lang["menuGroups"][record["id"]]
|
||||||
# Add to translations the menu text and the description
|
# Add to translations the menu text and the description
|
||||||
encode_string_and_add(
|
encode_string_and_add(
|
||||||
lang_data["description"], "menuGroups" + record["id"] + "description"
|
lang_data["description"], "menuGroups" + record["id"] + "description",True
|
||||||
)
|
)
|
||||||
encode_string_and_add(
|
encode_string_and_add(
|
||||||
lang_data["displayText"], "menuGroups" + record["id"] + "displayText"
|
lang_data["displayText"], "menuGroups" + record["id"] + "displayText"
|
||||||
@@ -1152,13 +1156,13 @@ def get_translation_strings_and_indices_text(
|
|||||||
lang_data = lang["messagesWarn"][record["id"]]
|
lang_data = lang["messagesWarn"][record["id"]]
|
||||||
# Add to translations the menu text and the description
|
# Add to translations the menu text and the description
|
||||||
encode_string_and_add(
|
encode_string_and_add(
|
||||||
lang_data["message"], "messagesWarn" + record["id"] + "Message"
|
lang_data["message"], "messagesWarn" + record["id"] + "Message",True
|
||||||
)
|
)
|
||||||
|
|
||||||
for index, record in enumerate(defs["characters"]):
|
for index, record in enumerate(defs["characters"]):
|
||||||
lang_data = lang["characters"][record["id"]]
|
lang_data = lang["characters"][record["id"]]
|
||||||
# Add to translations the menu text and the description
|
# Add to translations the menu text and the description
|
||||||
encode_string_and_add(lang_data, "characters" + record["id"] + "Message")
|
encode_string_and_add(lang_data, "characters" + record["id"] + "Message",True)
|
||||||
|
|
||||||
# ----- Write the string table:
|
# ----- Write the string table:
|
||||||
offset = 0
|
offset = 0
|
||||||
@@ -1187,7 +1191,7 @@ def get_translation_strings_and_indices_text(
|
|||||||
position = 0
|
position = 0
|
||||||
for string in byte_encoded_strings:
|
for string in byte_encoded_strings:
|
||||||
string_index_commulative_lengths.append(position)
|
string_index_commulative_lengths.append(position)
|
||||||
position += len(string)
|
position += len(string)+1
|
||||||
|
|
||||||
translation_indices_text = " .indices = {\n"
|
translation_indices_text = " .indices = {\n"
|
||||||
|
|
||||||
|
|||||||
@@ -178,14 +178,9 @@ void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle) {
|
|||||||
fontWidth = 12;
|
fontWidth = 12;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (uint32_t i = 0; i < FontSectionsCount; i++) {
|
|
||||||
const auto §ion = FontSections[i];
|
currentFont = fontStyle == FontStyle::SMALL ? FontSectionsData.font06_start_ptr : FontSectionsData.font12_start_ptr;
|
||||||
if (charCode >= section.symbol_start && charCode < section.symbol_end) {
|
index = charCode - 2;
|
||||||
currentFont = fontStyle == FontStyle::SMALL ? section.font06_start_ptr : section.font12_start_ptr;
|
|
||||||
index = charCode - section.symbol_start;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const uint8_t *charPointer = currentFont + ((fontWidth * (fontHeight / 8)) * index);
|
const uint8_t *charPointer = currentFont + ((fontWidth * (fontHeight / 8)) * index);
|
||||||
@@ -368,8 +363,8 @@ void OLED::setRotation(bool leftHanded) {
|
|||||||
// mode as driver ram is 128 wide
|
// mode as driver ram is 128 wide
|
||||||
screenBuffer[7] = inLeftHandedMode ? 95 : 0x7F; // End address of the ram segment we are writing to (96 wide)
|
screenBuffer[7] = inLeftHandedMode ? 95 : 0x7F; // End address of the ram segment we are writing to (96 wide)
|
||||||
screenBuffer[9] = inLeftHandedMode ? 0xC8 : 0xC0;
|
screenBuffer[9] = inLeftHandedMode ? 0xC8 : 0xC0;
|
||||||
//Force a screen refresh
|
// Force a screen refresh
|
||||||
const int len = FRAMEBUFFER_START + (OLED_WIDTH * 2);
|
const int len = FRAMEBUFFER_START + (OLED_WIDTH * 2);
|
||||||
I2C_CLASS::Transmit(DEVICEADDR_OLED, screenBuffer, len);
|
I2C_CLASS::Transmit(DEVICEADDR_OLED, screenBuffer, len);
|
||||||
osDelay(TICKS_10MS);
|
osDelay(TICKS_10MS);
|
||||||
}
|
}
|
||||||
@@ -388,6 +383,9 @@ void OLED::setInverseDisplay(bool inverse) {
|
|||||||
// print a string to the current cursor location
|
// print a string to the current cursor location
|
||||||
void OLED::print(const char *const str, FontStyle fontStyle) {
|
void OLED::print(const char *const str, FontStyle fontStyle) {
|
||||||
const uint8_t *next = reinterpret_cast<const uint8_t *>(str);
|
const uint8_t *next = reinterpret_cast<const uint8_t *>(str);
|
||||||
|
if (next[0] == 0x01) {
|
||||||
|
fontStyle = FontStyle::LARGE;
|
||||||
|
}
|
||||||
while (next[0]) {
|
while (next[0]) {
|
||||||
uint16_t index;
|
uint16_t index;
|
||||||
if (next[0] <= 0xF0) {
|
if (next[0] <= 0xF0) {
|
||||||
@@ -429,7 +427,7 @@ inline void stripLeaderZeros(char *buffer, uint8_t places) {
|
|||||||
// Stop 1 short so that we dont blank entire number if its zero
|
// Stop 1 short so that we dont blank entire number if its zero
|
||||||
for (int i = 0; i < (places - 1); i++) {
|
for (int i = 0; i < (places - 1); i++) {
|
||||||
if (buffer[i] == 2) {
|
if (buffer[i] == 2) {
|
||||||
buffer[i] = SymbolSpace[0];
|
buffer[i] = LargeSymbolSpace[0];
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -478,14 +476,14 @@ void OLED::printNumber(uint16_t number, uint8_t places, FontStyle fontStyle, boo
|
|||||||
|
|
||||||
void OLED::debugNumber(int32_t val, FontStyle fontStyle) {
|
void OLED::debugNumber(int32_t val, FontStyle fontStyle) {
|
||||||
if (abs(val) > 99999) {
|
if (abs(val) > 99999) {
|
||||||
OLED::print(SymbolSpace, fontStyle); // out of bounds
|
OLED::print(LargeSymbolSpace, fontStyle); // out of bounds
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (val >= 0) {
|
if (val >= 0) {
|
||||||
OLED::print(SymbolSpace, fontStyle);
|
OLED::print(LargeSymbolSpace, fontStyle);
|
||||||
OLED::printNumber(val, 5, fontStyle);
|
OLED::printNumber(val, 5, fontStyle);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(SymbolMinus, fontStyle);
|
OLED::print(LargeSymbolMinus, fontStyle);
|
||||||
OLED::printNumber(-val, 5, fontStyle);
|
OLED::printNumber(-val, 5, fontStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,12 +161,12 @@ const menuitem rootSettingsMenu[] {
|
|||||||
|
|
||||||
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
|
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
|
||||||
const menuitem powerMenu[] = {
|
const menuitem powerMenu[] = {
|
||||||
/*
|
/*
|
||||||
* Power Source
|
* Power Source
|
||||||
* -Minimum Voltage
|
* -Minimum Voltage
|
||||||
* QC Voltage
|
* QC Voltage
|
||||||
* PD Timeout
|
* PD Timeout
|
||||||
*/
|
*/
|
||||||
#ifdef POW_DC
|
#ifdef POW_DC
|
||||||
{SETTINGS_DESC(SettingsItemIndex::DCInCutoff), nullptr, displayInputVRange, nullptr, SettingsOptions::MinDCVoltageCells, SettingsItemIndex::DCInCutoff, 6}, /*Voltage input*/
|
{SETTINGS_DESC(SettingsItemIndex::DCInCutoff), nullptr, displayInputVRange, nullptr, SettingsOptions::MinDCVoltageCells, SettingsItemIndex::DCInCutoff, 6}, /*Voltage input*/
|
||||||
{SETTINGS_DESC(SettingsItemIndex::MinVolCell), nullptr, displayInputMinVRange, showInputVOptions, SettingsOptions::MinVoltageCells, SettingsItemIndex::MinVolCell, 5}, /*Minimum voltage input*/
|
{SETTINGS_DESC(SettingsItemIndex::MinVolCell), nullptr, displayInputMinVRange, showInputVOptions, SettingsOptions::MinVoltageCells, SettingsItemIndex::MinVolCell, 5}, /*Minimum voltage input*/
|
||||||
@@ -264,7 +264,7 @@ const menuitem advancedMenu[] = {
|
|||||||
* -Power Pulse Duration
|
* -Power Pulse Duration
|
||||||
* Factory Reset
|
* Factory Reset
|
||||||
*/
|
*/
|
||||||
{SETTINGS_DESC(SettingsItemIndex::PowerLimit), nullptr, displayPowerLimit, nullptr, SettingsOptions::PowerLimit, SettingsItemIndex::PowerLimit, 5}, /*Power limit*/
|
{SETTINGS_DESC(SettingsItemIndex::PowerLimit), nullptr, displayPowerLimit, nullptr, SettingsOptions::PowerLimit, SettingsItemIndex::PowerLimit, 5}, /*Power limit*/
|
||||||
{SETTINGS_DESC(SettingsItemIndex::CalibrateCJC), setCalibrate, displayCalibrate, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::CalibrateCJC,
|
{SETTINGS_DESC(SettingsItemIndex::CalibrateCJC), setCalibrate, displayCalibrate, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::CalibrateCJC,
|
||||||
7}, /*Calibrate Cold Junktion Compensation at next boot*/
|
7}, /*Calibrate Cold Junktion Compensation at next boot*/
|
||||||
{SETTINGS_DESC(SettingsItemIndex::VoltageCalibration), setCalibrateVIN, displayCalibrateVIN, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::VoltageCalibration,
|
{SETTINGS_DESC(SettingsItemIndex::VoltageCalibration), setCalibrateVIN, displayCalibrateVIN, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::VoltageCalibration,
|
||||||
@@ -273,7 +273,7 @@ const menuitem advancedMenu[] = {
|
|||||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulseWait), nullptr, displayPowerPulseWait, showPowerPulseOptions, SettingsOptions::KeepAwakePulseWait, SettingsItemIndex::PowerPulseWait,
|
{SETTINGS_DESC(SettingsItemIndex::PowerPulseWait), nullptr, displayPowerPulseWait, showPowerPulseOptions, SettingsOptions::KeepAwakePulseWait, SettingsItemIndex::PowerPulseWait,
|
||||||
7}, /*Power Pulse Wait adjustment*/
|
7}, /*Power Pulse Wait adjustment*/
|
||||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulseDuration), nullptr, displayPowerPulseDuration, showPowerPulseOptions, SettingsOptions::KeepAwakePulseDuration, SettingsItemIndex::PowerPulseDuration,
|
{SETTINGS_DESC(SettingsItemIndex::PowerPulseDuration), nullptr, displayPowerPulseDuration, showPowerPulseOptions, SettingsOptions::KeepAwakePulseDuration, SettingsItemIndex::PowerPulseDuration,
|
||||||
7}, /*Power Pulse Duration adjustment*/
|
7}, /*Power Pulse Duration adjustment*/
|
||||||
{SETTINGS_DESC(SettingsItemIndex::SettingsReset), setResetSettings, displayResetSettings, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::SettingsReset, 7}, /*Resets settings*/
|
{SETTINGS_DESC(SettingsItemIndex::SettingsReset), setResetSettings, displayResetSettings, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::SettingsReset, 7}, /*Resets settings*/
|
||||||
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0} // end of menu marker. DO NOT REMOVE
|
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0} // end of menu marker. DO NOT REMOVE
|
||||||
};
|
};
|
||||||
@@ -330,9 +330,9 @@ static void displayInputVRange(void) {
|
|||||||
|
|
||||||
if (getSettingValue(SettingsOptions::MinDCVoltageCells)) {
|
if (getSettingValue(SettingsOptions::MinDCVoltageCells)) {
|
||||||
OLED::printNumber(2 + getSettingValue(SettingsOptions::MinDCVoltageCells), 1, FontStyle::LARGE);
|
OLED::printNumber(2 + getSettingValue(SettingsOptions::MinDCVoltageCells), 1, FontStyle::LARGE);
|
||||||
OLED::print(SymbolCellCount, FontStyle::LARGE);
|
OLED::print(LargeSymbolCellCount, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(SymbolDC, FontStyle::LARGE);
|
OLED::print(LargeSymbolDC, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +340,7 @@ static bool showInputVOptions(void) { return getSettingValue(SettingsOptions::Mi
|
|||||||
static void displayInputMinVRange(void) {
|
static void displayInputMinVRange(void) {
|
||||||
|
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::MinVoltageCells) / 10, 1, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::MinVoltageCells) / 10, 1, FontStyle::LARGE);
|
||||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
OLED::print(LargeSymbolDot, FontStyle::LARGE);
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::MinVoltageCells) % 10, 1, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::MinVoltageCells) % 10, 1, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -352,7 +352,7 @@ static void displayQCInputV(void) {
|
|||||||
// Allows setting the voltage negotiated for QC
|
// Allows setting the voltage negotiated for QC
|
||||||
auto voltage = getSettingValue(SettingsOptions::QCIdealVoltage);
|
auto voltage = getSettingValue(SettingsOptions::QCIdealVoltage);
|
||||||
OLED::printNumber(voltage / 10, 2, FontStyle::LARGE);
|
OLED::printNumber(voltage / 10, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
OLED::print(LargeSymbolDot, FontStyle::LARGE);
|
||||||
OLED::printNumber(voltage % 10, 1, FontStyle::LARGE);
|
OLED::printNumber(voltage % 10, 1, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,10 +481,10 @@ static void displaySleepTime(void) {
|
|||||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||||
} else if (getSettingValue(SettingsOptions::SleepTime) < 6) {
|
} else if (getSettingValue(SettingsOptions::SleepTime) < 6) {
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::SleepTime) * 10, 2, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::SleepTime) * 10, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolSeconds, FontStyle::LARGE);
|
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::SleepTime) - 5, 2, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::SleepTime) - 5, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolMinutes, FontStyle::LARGE);
|
OLED::print(LargeSymbolMinutes, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -495,7 +495,7 @@ static void displayShutdownTime(void) {
|
|||||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::ShutdownTime), 2, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::ShutdownTime), 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolMinutes, FontStyle::LARGE);
|
OLED::print(LargeSymbolMinutes, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,7 +537,7 @@ static bool setTempF(void) {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void displayTempF(void) { OLED::print((getSettingValue(SettingsOptions::TemperatureInF)) ? SymbolDegF : SymbolDegC, FontStyle::LARGE); }
|
static void displayTempF(void) { OLED::print((getSettingValue(SettingsOptions::TemperatureInF)) ? LargeSymbolDegF : LargeSymbolDegC, FontStyle::LARGE); }
|
||||||
|
|
||||||
#ifndef NO_DISPLAY_ROTATE
|
#ifndef NO_DISPLAY_ROTATE
|
||||||
static bool setDisplayRotation(void) {
|
static bool setDisplayRotation(void) {
|
||||||
@@ -626,7 +626,7 @@ static void displayLogoTime(void) {
|
|||||||
OLED::drawArea(OLED_WIDTH - 24 - 2, 0, 24, 16, infinityIcon);
|
OLED::drawArea(OLED_WIDTH - 24 - 2, 0, 24, 16, infinityIcon);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::LOGOTime), 2, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::LOGOTime), 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolSeconds, FontStyle::LARGE);
|
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -640,7 +640,7 @@ static void displayPowerLimit(void) {
|
|||||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::PowerLimit), 2, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::PowerLimit), 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolWatts, FontStyle::LARGE);
|
OLED::print(LargeSymbolWatts, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -649,7 +649,7 @@ static bool setCalibrate(void) {
|
|||||||
if (userConfirmation(translatedString(Tr->SettingsCalibrationWarning))) {
|
if (userConfirmation(translatedString(Tr->SettingsCalibrationWarning))) {
|
||||||
// User confirmed
|
// User confirmed
|
||||||
// So we now set the tick
|
// So we now set the tick
|
||||||
setSettingValue(SettingsOptions::CalibrateCJC, 1);
|
setSettingValue(SettingsOptions::CalibrateCJC, 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setSettingValue(SettingsOptions::CalibrateCJC, 0);
|
setSettingValue(SettingsOptions::CalibrateCJC, 0);
|
||||||
@@ -667,9 +667,9 @@ static bool setCalibrateVIN(void) {
|
|||||||
OLED::setCursor(0, 0);
|
OLED::setCursor(0, 0);
|
||||||
uint16_t voltage = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
uint16_t voltage = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
||||||
OLED::printNumber(voltage / 10, 2, FontStyle::LARGE);
|
OLED::printNumber(voltage / 10, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
OLED::print(LargeSymbolDot, FontStyle::LARGE);
|
||||||
OLED::printNumber(voltage % 10, 1, FontStyle::LARGE, false);
|
OLED::printNumber(voltage % 10, 1, FontStyle::LARGE, false);
|
||||||
OLED::print(SymbolVolts, FontStyle::LARGE);
|
OLED::print(LargeSymbolVolts, FontStyle::LARGE);
|
||||||
|
|
||||||
switch (getButtonState()) {
|
switch (getButtonState()) {
|
||||||
case BUTTON_F_SHORT:
|
case BUTTON_F_SHORT:
|
||||||
@@ -704,7 +704,7 @@ static void displayPowerPulse(void) {
|
|||||||
|
|
||||||
if (getSettingValue(SettingsOptions::KeepAwakePulse)) {
|
if (getSettingValue(SettingsOptions::KeepAwakePulse)) {
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulse) / 10, 1, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulse) / 10, 1, FontStyle::LARGE);
|
||||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
OLED::print(LargeSymbolDot, FontStyle::LARGE);
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulse) % 10, 1, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulse) % 10, 1, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ void performCJCC(void) {
|
|||||||
OLED::setCursor(0, 0);
|
OLED::setCursor(0, 0);
|
||||||
OLED::print(translatedString(Tr->CJCCalibrating), FontStyle::SMALL);
|
OLED::print(translatedString(Tr->CJCCalibrating), FontStyle::SMALL);
|
||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||||
for (uint8_t x = 0; x < (i / 4); x++)
|
for (uint8_t x = 0; x < (i / 4); x++)
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||||
OLED::refresh();
|
OLED::refresh();
|
||||||
osDelay(100);
|
osDelay(100);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ void showDebugMenu(void) {
|
|||||||
uint8_t screen = 0;
|
uint8_t screen = 0;
|
||||||
ButtonState b;
|
ButtonState b;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||||
OLED::print(SymbolVersionNumber, FontStyle::SMALL); // Print version number
|
OLED::print(SmallSymbolVersionNumber, FontStyle::SMALL); // Print version number
|
||||||
OLED::setCursor(0, 8); // second line
|
OLED::setCursor(0, 8); // second line
|
||||||
OLED::print(DebugMenu[screen], FontStyle::SMALL);
|
OLED::print(DebugMenu[screen], FontStyle::SMALL);
|
||||||
switch (screen) {
|
switch (screen) {
|
||||||
case 0: // Build Date
|
case 0: // Build Date
|
||||||
@@ -74,7 +74,7 @@ void showDebugMenu(void) {
|
|||||||
break;
|
break;
|
||||||
case 6: // Handle Temp in °C
|
case 6: // Handle Temp in °C
|
||||||
OLED::printNumber(getHandleTemperature(0) / 10, 6, FontStyle::SMALL);
|
OLED::printNumber(getHandleTemperature(0) / 10, 6, FontStyle::SMALL);
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||||
OLED::printNumber(getHandleTemperature(0) % 10, 1, FontStyle::SMALL);
|
OLED::printNumber(getHandleTemperature(0) % 10, 1, FontStyle::SMALL);
|
||||||
break;
|
break;
|
||||||
case 7: // Max Temp Limit in °C
|
case 7: // Max Temp Limit in °C
|
||||||
@@ -88,7 +88,7 @@ void showDebugMenu(void) {
|
|||||||
break;
|
break;
|
||||||
case 10: // Tip Resistance in Ω
|
case 10: // Tip Resistance in Ω
|
||||||
OLED::printNumber(getTipResistanceX10() / 10, 6, FontStyle::SMALL); // large to pad over so that we cover ID left overs
|
OLED::printNumber(getTipResistanceX10() / 10, 6, FontStyle::SMALL); // large to pad over so that we cover ID left overs
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||||
OLED::printNumber(getTipResistanceX10() % 10, 1, FontStyle::SMALL);
|
OLED::printNumber(getTipResistanceX10() % 10, 1, FontStyle::SMALL);
|
||||||
break;
|
break;
|
||||||
case 11: // Raw Tip in µV
|
case 11: // Raw Tip in µV
|
||||||
|
|||||||
@@ -118,14 +118,14 @@ void drawHomeScreen(bool buttonLockout) {
|
|||||||
}
|
}
|
||||||
uint32_t Vlt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
uint32_t Vlt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
||||||
OLED::printNumber(Vlt / 10, 2, FontStyle::LARGE);
|
OLED::printNumber(Vlt / 10, 2, FontStyle::LARGE);
|
||||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
OLED::print(LargeSymbolDot, FontStyle::LARGE);
|
||||||
OLED::printNumber(Vlt % 10, 1, FontStyle::LARGE);
|
OLED::printNumber(Vlt % 10, 1, FontStyle::LARGE);
|
||||||
if (OLED::getRotation()) {
|
if (OLED::getRotation()) {
|
||||||
OLED::setCursor(48, 8);
|
OLED::setCursor(48, 8);
|
||||||
} else {
|
} else {
|
||||||
OLED::setCursor(91, 8);
|
OLED::setCursor(91, 8);
|
||||||
}
|
}
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (tipTemp > 55) && (xTaskGetTickCount() % 1000 < 300)))
|
if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (tipTemp > 55) && (xTaskGetTickCount() % 1000 < 300)))
|
||||||
// Blink temp if setting enable and temp < 55°
|
// Blink temp if setting enable and temp < 55°
|
||||||
@@ -139,16 +139,16 @@ void drawHomeScreen(bool buttonLockout) {
|
|||||||
}
|
}
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::SolderingTemp), 3, FontStyle::SMALL); // draw set temp
|
OLED::printNumber(getSettingValue(SettingsOptions::SolderingTemp), 3, FontStyle::SMALL); // draw set temp
|
||||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||||
OLED::print(SymbolDegF, FontStyle::SMALL);
|
OLED::print(SmallSymbolDegF, FontStyle::SMALL);
|
||||||
else
|
else
|
||||||
OLED::print(SymbolDegC, FontStyle::SMALL);
|
OLED::print(SmallSymbolDegC, FontStyle::SMALL);
|
||||||
if (OLED::getRotation()) {
|
if (OLED::getRotation()) {
|
||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
} else {
|
} else {
|
||||||
OLED::setCursor(67, 8); // bottom right
|
OLED::setCursor(67, 8); // bottom right
|
||||||
}
|
}
|
||||||
printVoltage(); // draw voltage then symbol (v)
|
printVoltage(); // draw voltage then symbol (v)
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -32,14 +32,14 @@ int gui_SolderingSleepingMode(bool stayOff, bool autoStarted) {
|
|||||||
OLED::print(translatedString(Tr->SleepingTipAdvancedString), FontStyle::SMALL);
|
OLED::print(translatedString(Tr->SleepingTipAdvancedString), FontStyle::SMALL);
|
||||||
OLED::printNumber(tipTemp, 3, FontStyle::SMALL);
|
OLED::printNumber(tipTemp, 3, FontStyle::SMALL);
|
||||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||||
OLED::print(SymbolDegF, FontStyle::SMALL);
|
OLED::print(SmallSymbolDegF, FontStyle::SMALL);
|
||||||
else {
|
else {
|
||||||
OLED::print(SymbolDegC, FontStyle::SMALL);
|
OLED::print(SmallSymbolDegC, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||||
printVoltage();
|
printVoltage();
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(translatedString(Tr->SleepingSimpleString), FontStyle::LARGE);
|
OLED::print(translatedString(Tr->SleepingSimpleString), FontStyle::LARGE);
|
||||||
OLED::printNumber(tipTemp, 3, FontStyle::LARGE);
|
OLED::printNumber(tipTemp, 3, FontStyle::LARGE);
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
} else {
|
} else {
|
||||||
OLED::setCursor(55, 8);
|
OLED::setCursor(55, 8);
|
||||||
}
|
}
|
||||||
OLED::print(SymbolPlus, FontStyle::SMALL);
|
OLED::print(SmallSymbolPlus, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OLED::getRotation()) {
|
if (OLED::getRotation()) {
|
||||||
@@ -128,9 +128,9 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
OLED::setCursor(67, 0);
|
OLED::setCursor(67, 0);
|
||||||
}
|
}
|
||||||
OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL);
|
OLED::printNumber(x10WattHistory.average() / 10, 2, FontStyle::SMALL);
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||||
OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL);
|
OLED::printNumber(x10WattHistory.average() % 10, 1, FontStyle::SMALL);
|
||||||
OLED::print(SymbolWatts, FontStyle::SMALL);
|
OLED::print(SmallSymbolWatts, FontStyle::SMALL);
|
||||||
|
|
||||||
if (OLED::getRotation()) {
|
if (OLED::getRotation()) {
|
||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
@@ -138,22 +138,22 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
OLED::setCursor(67, 8);
|
OLED::setCursor(67, 8);
|
||||||
}
|
}
|
||||||
printVoltage();
|
printVoltage();
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::setCursor(0, 0);
|
OLED::setCursor(0, 0);
|
||||||
// We switch the layout direction depending on the orientation of the oled
|
// We switch the layout direction depending on the orientation of the oled
|
||||||
if (OLED::getRotation()) {
|
if (OLED::getRotation()) {
|
||||||
// battery
|
// battery
|
||||||
gui_drawBatteryIcon();
|
gui_drawBatteryIcon();
|
||||||
OLED::print(SymbolSpace, FontStyle::LARGE); // Space out gap between battery <-> temp
|
OLED::print(LargeSymbolSpace, FontStyle::LARGE); // Space out gap between battery <-> temp
|
||||||
gui_drawTipTemp(true, FontStyle::LARGE); // Draw current tip temp
|
gui_drawTipTemp(true, FontStyle::LARGE); // Draw current tip temp
|
||||||
|
|
||||||
// We draw boost arrow if boosting, or else gap temp <-> heat
|
// We draw boost arrow if boosting, or else gap temp <-> heat
|
||||||
// indicator
|
// indicator
|
||||||
if (boostModeOn)
|
if (boostModeOn)
|
||||||
OLED::drawSymbol(2);
|
OLED::drawSymbol(2);
|
||||||
else
|
else
|
||||||
OLED::print(SymbolSpace, FontStyle::LARGE);
|
OLED::print(LargeSymbolSpace, FontStyle::LARGE);
|
||||||
|
|
||||||
// Draw heating/cooling symbols
|
// Draw heating/cooling symbols
|
||||||
OLED::drawHeatSymbol(X10WattsToPWM(x10WattHistory.average()));
|
OLED::drawHeatSymbol(X10WattsToPWM(x10WattHistory.average()));
|
||||||
@@ -165,10 +165,10 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
|||||||
if (boostModeOn)
|
if (boostModeOn)
|
||||||
OLED::drawSymbol(2);
|
OLED::drawSymbol(2);
|
||||||
else
|
else
|
||||||
OLED::print(SymbolSpace, FontStyle::LARGE);
|
OLED::print(LargeSymbolSpace, FontStyle::LARGE);
|
||||||
gui_drawTipTemp(true, FontStyle::LARGE); // Draw current tip temp
|
gui_drawTipTemp(true, FontStyle::LARGE); // Draw current tip temp
|
||||||
|
|
||||||
OLED::print(SymbolSpace, FontStyle::LARGE); // Space out gap between battery <-> temp
|
OLED::print(LargeSymbolSpace, FontStyle::LARGE); // Space out gap between battery <-> temp
|
||||||
|
|
||||||
gui_drawBatteryIcon();
|
gui_drawBatteryIcon();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,23 +87,23 @@ void gui_solderingTempAdjust(void) {
|
|||||||
return; // exit if user just doesn't press anything for a bit
|
return; // exit if user just doesn't press anything for a bit
|
||||||
|
|
||||||
if (OLED::getRotation()) {
|
if (OLED::getRotation()) {
|
||||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? SymbolPlus : SymbolMinus, FontStyle::LARGE);
|
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolPlus : LargeSymbolMinus, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? SymbolMinus : SymbolPlus, FontStyle::LARGE);
|
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolMinus : LargeSymbolPlus, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
OLED::print(SymbolSpace, FontStyle::LARGE);
|
OLED::print(LargeSymbolSpace, FontStyle::LARGE);
|
||||||
OLED::printNumber(getSettingValue(SettingsOptions::SolderingTemp), 3, FontStyle::LARGE);
|
OLED::printNumber(getSettingValue(SettingsOptions::SolderingTemp), 3, FontStyle::LARGE);
|
||||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||||
OLED::drawSymbol(0);
|
OLED::drawSymbol(0);
|
||||||
else {
|
else {
|
||||||
OLED::drawSymbol(1);
|
OLED::drawSymbol(1);
|
||||||
}
|
}
|
||||||
OLED::print(SymbolSpace, FontStyle::LARGE);
|
OLED::print(LargeSymbolSpace, FontStyle::LARGE);
|
||||||
if (OLED::getRotation()) {
|
if (OLED::getRotation()) {
|
||||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? SymbolMinus : SymbolPlus, FontStyle::LARGE);
|
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolMinus : LargeSymbolPlus, FontStyle::LARGE);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? SymbolPlus : SymbolMinus, FontStyle::LARGE);
|
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolPlus : LargeSymbolMinus, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
OLED::refresh();
|
OLED::refresh();
|
||||||
GUIDelay();
|
GUIDelay();
|
||||||
|
|||||||
@@ -8,23 +8,23 @@ void showPDDebug(void) {
|
|||||||
uint8_t screen = 0;
|
uint8_t screen = 0;
|
||||||
ButtonState b;
|
ButtonState b;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||||
OLED::print(SymbolPDDebug, FontStyle::SMALL); // Print Title
|
OLED::print(SmallSymbolPDDebug, FontStyle::SMALL); // Print Title
|
||||||
OLED::setCursor(0, 8); // second line
|
OLED::setCursor(0, 8); // second line
|
||||||
if (screen == 0) {
|
if (screen == 0) {
|
||||||
// Print the PD state machine
|
// Print the PD state machine
|
||||||
OLED::print(SymbolState, FontStyle::SMALL);
|
OLED::print(SmallSymbolState, FontStyle::SMALL);
|
||||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||||
OLED::printNumber(USBPowerDelivery::getStateNumber(), 2, FontStyle::SMALL, true);
|
OLED::printNumber(USBPowerDelivery::getStateNumber(), 2, FontStyle::SMALL, true);
|
||||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||||
// Also print vbus mod status
|
// Also print vbus mod status
|
||||||
if (USBPowerDelivery::fusbPresent()) {
|
if (USBPowerDelivery::fusbPresent()) {
|
||||||
if (USBPowerDelivery::negotiationComplete() || (xTaskGetTickCount() > (TICKS_SECOND * 10))) {
|
if (USBPowerDelivery::negotiationComplete() || (xTaskGetTickCount() > (TICKS_SECOND * 10))) {
|
||||||
if (!USBPowerDelivery::isVBUSConnected()) {
|
if (!USBPowerDelivery::isVBUSConnected()) {
|
||||||
OLED::print(SymbolNoVBus, FontStyle::SMALL);
|
OLED::print(SmallSymbolNoVBus, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(SymbolVBus, FontStyle::SMALL);
|
OLED::print(SmallSymbolVBus, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,22 +56,22 @@ void showPDDebug(void) {
|
|||||||
} else {
|
} else {
|
||||||
// print out this entry of the proposal
|
// print out this entry of the proposal
|
||||||
OLED::printNumber(screen, 2, FontStyle::SMALL, true); // print the entry number
|
OLED::printNumber(screen, 2, FontStyle::SMALL, true); // print the entry number
|
||||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||||
if (min_voltage > 0) {
|
if (min_voltage > 0) {
|
||||||
OLED::printNumber(min_voltage / 1000, 2, FontStyle::SMALL, true); // print the voltage
|
OLED::printNumber(min_voltage / 1000, 2, FontStyle::SMALL, true); // print the voltage
|
||||||
OLED::print(SymbolMinus, FontStyle::SMALL);
|
OLED::print(SmallSymbolMinus, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
OLED::printNumber(voltage_mv / 1000, 2, FontStyle::SMALL, true); // print the voltage
|
OLED::printNumber(voltage_mv / 1000, 2, FontStyle::SMALL, true); // print the voltage
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||||
if (wattage) {
|
if (wattage) {
|
||||||
OLED::printNumber(wattage, 3, FontStyle::SMALL, true); // print the current in 0.1A res
|
OLED::printNumber(wattage, 3, FontStyle::SMALL, true); // print the current in 0.1A res
|
||||||
OLED::print(SymbolWatts, FontStyle::SMALL);
|
OLED::print(SmallSymbolWatts, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(current_a_x100 / 100, 2, FontStyle::SMALL, true); // print the current in 0.1A res
|
OLED::printNumber(current_a_x100 / 100, 2, FontStyle::SMALL, true); // print the current in 0.1A res
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||||
OLED::printNumber(current_a_x100 % 100, 2, FontStyle::SMALL, true); // print the current in 0.1A res
|
OLED::printNumber(current_a_x100 % 100, 2, FontStyle::SMALL, true); // print the current in 0.1A res
|
||||||
OLED::print(SymbolAmps, FontStyle::SMALL);
|
OLED::print(SmallSymbolAmps, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ void gui_drawTipTemp(bool symbol, const FontStyle font) {
|
|||||||
} else {
|
} else {
|
||||||
// Otherwise fall back to chars
|
// Otherwise fall back to chars
|
||||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||||
OLED::print(SymbolDegF, FontStyle::SMALL);
|
OLED::print(SmallSymbolDegF, FontStyle::SMALL);
|
||||||
else
|
else
|
||||||
OLED::print(SymbolDegC, FontStyle::SMALL);
|
OLED::print(SmallSymbolDegC, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
void printVoltage(void) {
|
void printVoltage(void) {
|
||||||
uint32_t volt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
uint32_t volt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
||||||
OLED::printNumber(volt / 10, 2, FontStyle::SMALL);
|
OLED::printNumber(volt / 10, 2, FontStyle::SMALL);
|
||||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||||
OLED::printNumber(volt % 10, 1, FontStyle::SMALL);
|
OLED::printNumber(volt % 10, 1, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ bool checkForUnderVoltage(void) {
|
|||||||
OLED::setCursor(0, 8);
|
OLED::setCursor(0, 8);
|
||||||
OLED::print(translatedString(Tr->InputVoltageString), FontStyle::SMALL);
|
OLED::print(translatedString(Tr->InputVoltageString), FontStyle::SMALL);
|
||||||
printVoltage();
|
printVoltage();
|
||||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::print(translatedString(Tr->UVLOWarningString), FontStyle::LARGE);
|
OLED::print(translatedString(Tr->UVLOWarningString), FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ void printCountdownUntilSleep(int sleepThres) {
|
|||||||
TickType_t downCount = sleepThres - xTaskGetTickCount() + lastEventTime;
|
TickType_t downCount = sleepThres - xTaskGetTickCount() + lastEventTime;
|
||||||
if (downCount > (99 * TICKS_SECOND)) {
|
if (downCount > (99 * TICKS_SECOND)) {
|
||||||
OLED::printNumber(downCount / 60000 + 1, 2, FontStyle::SMALL);
|
OLED::printNumber(downCount / 60000 + 1, 2, FontStyle::SMALL);
|
||||||
OLED::print(SymbolMinutes, FontStyle::SMALL);
|
OLED::print(SmallSymbolMinutes, FontStyle::SMALL);
|
||||||
} else {
|
} else {
|
||||||
OLED::printNumber(downCount / 1000 + 1, 2, FontStyle::SMALL);
|
OLED::printNumber(downCount / 1000 + 1, 2, FontStyle::SMALL);
|
||||||
OLED::print(SymbolSeconds, FontStyle::SMALL);
|
OLED::print(SmallSymbolSeconds, FontStyle::SMALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user