Use size encoded symbols
Update make_translation.py
This commit is contained in:
@@ -19,9 +19,9 @@ void performCJCC(void) {
|
||||
OLED::setCursor(0, 0);
|
||||
OLED::print(translatedString(Tr->CJCCalibrating), FontStyle::SMALL);
|
||||
OLED::setCursor(0, 8);
|
||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||
for (uint8_t x = 0; x < (i / 4); x++)
|
||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||
OLED::refresh();
|
||||
osDelay(100);
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ void showDebugMenu(void) {
|
||||
uint8_t screen = 0;
|
||||
ButtonState b;
|
||||
for (;;) {
|
||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
OLED::print(SymbolVersionNumber, FontStyle::SMALL); // Print version number
|
||||
OLED::setCursor(0, 8); // second line
|
||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
OLED::print(SmallSymbolVersionNumber, FontStyle::SMALL); // Print version number
|
||||
OLED::setCursor(0, 8); // second line
|
||||
OLED::print(DebugMenu[screen], FontStyle::SMALL);
|
||||
switch (screen) {
|
||||
case 0: // Build Date
|
||||
@@ -74,7 +74,7 @@ void showDebugMenu(void) {
|
||||
break;
|
||||
case 6: // Handle Temp in °C
|
||||
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);
|
||||
break;
|
||||
case 7: // Max Temp Limit in °C
|
||||
@@ -88,7 +88,7 @@ void showDebugMenu(void) {
|
||||
break;
|
||||
case 10: // Tip Resistance in Ω
|
||||
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);
|
||||
break;
|
||||
case 11: // Raw Tip in µV
|
||||
|
||||
@@ -118,14 +118,14 @@ void drawHomeScreen(bool buttonLockout) {
|
||||
}
|
||||
uint32_t Vlt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
||||
OLED::printNumber(Vlt / 10, 2, FontStyle::LARGE);
|
||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
||||
OLED::print(LargeSymbolDot, FontStyle::LARGE);
|
||||
OLED::printNumber(Vlt % 10, 1, FontStyle::LARGE);
|
||||
if (OLED::getRotation()) {
|
||||
OLED::setCursor(48, 8);
|
||||
} else {
|
||||
OLED::setCursor(91, 8);
|
||||
}
|
||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
} else {
|
||||
if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (tipTemp > 55) && (xTaskGetTickCount() % 1000 < 300)))
|
||||
// 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
|
||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||
OLED::print(SymbolDegF, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDegF, FontStyle::SMALL);
|
||||
else
|
||||
OLED::print(SymbolDegC, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDegC, FontStyle::SMALL);
|
||||
if (OLED::getRotation()) {
|
||||
OLED::setCursor(0, 8);
|
||||
} else {
|
||||
OLED::setCursor(67, 8); // bottom right
|
||||
}
|
||||
printVoltage(); // draw voltage then symbol (v)
|
||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -32,14 +32,14 @@ int gui_SolderingSleepingMode(bool stayOff, bool autoStarted) {
|
||||
OLED::print(translatedString(Tr->SleepingTipAdvancedString), FontStyle::SMALL);
|
||||
OLED::printNumber(tipTemp, 3, FontStyle::SMALL);
|
||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||
OLED::print(SymbolDegF, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDegF, FontStyle::SMALL);
|
||||
else {
|
||||
OLED::print(SymbolDegC, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDegC, FontStyle::SMALL);
|
||||
}
|
||||
|
||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||
printVoltage();
|
||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
} else {
|
||||
OLED::print(translatedString(Tr->SleepingSimpleString), FontStyle::LARGE);
|
||||
OLED::printNumber(tipTemp, 3, FontStyle::LARGE);
|
||||
|
||||
@@ -119,7 +119,7 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
||||
} else {
|
||||
OLED::setCursor(55, 8);
|
||||
}
|
||||
OLED::print(SymbolPlus, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolPlus, FontStyle::SMALL);
|
||||
}
|
||||
|
||||
if (OLED::getRotation()) {
|
||||
@@ -128,9 +128,9 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
||||
OLED::setCursor(67, 0);
|
||||
}
|
||||
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::print(SymbolWatts, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolWatts, FontStyle::SMALL);
|
||||
|
||||
if (OLED::getRotation()) {
|
||||
OLED::setCursor(0, 8);
|
||||
@@ -138,22 +138,22 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
||||
OLED::setCursor(67, 8);
|
||||
}
|
||||
printVoltage();
|
||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
} else {
|
||||
OLED::setCursor(0, 0);
|
||||
// We switch the layout direction depending on the orientation of the oled
|
||||
if (OLED::getRotation()) {
|
||||
// battery
|
||||
gui_drawBatteryIcon();
|
||||
OLED::print(SymbolSpace, FontStyle::LARGE); // Space out gap between battery <-> temp
|
||||
gui_drawTipTemp(true, FontStyle::LARGE); // Draw current tip temp
|
||||
OLED::print(LargeSymbolSpace, FontStyle::LARGE); // Space out gap between battery <-> temp
|
||||
gui_drawTipTemp(true, FontStyle::LARGE); // Draw current tip temp
|
||||
|
||||
// We draw boost arrow if boosting, or else gap temp <-> heat
|
||||
// indicator
|
||||
if (boostModeOn)
|
||||
OLED::drawSymbol(2);
|
||||
else
|
||||
OLED::print(SymbolSpace, FontStyle::LARGE);
|
||||
OLED::print(LargeSymbolSpace, FontStyle::LARGE);
|
||||
|
||||
// Draw heating/cooling symbols
|
||||
OLED::drawHeatSymbol(X10WattsToPWM(x10WattHistory.average()));
|
||||
@@ -165,10 +165,10 @@ void gui_solderingMode(uint8_t jumpToSleep) {
|
||||
if (boostModeOn)
|
||||
OLED::drawSymbol(2);
|
||||
else
|
||||
OLED::print(SymbolSpace, FontStyle::LARGE);
|
||||
OLED::print(LargeSymbolSpace, FontStyle::LARGE);
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -87,23 +87,23 @@ void gui_solderingTempAdjust(void) {
|
||||
return; // exit if user just doesn't press anything for a bit
|
||||
|
||||
if (OLED::getRotation()) {
|
||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? SymbolPlus : SymbolMinus, FontStyle::LARGE);
|
||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolPlus : LargeSymbolMinus, FontStyle::LARGE);
|
||||
} 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);
|
||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||
OLED::drawSymbol(0);
|
||||
else {
|
||||
OLED::drawSymbol(1);
|
||||
}
|
||||
OLED::print(SymbolSpace, FontStyle::LARGE);
|
||||
OLED::print(LargeSymbolSpace, FontStyle::LARGE);
|
||||
if (OLED::getRotation()) {
|
||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? SymbolMinus : SymbolPlus, FontStyle::LARGE);
|
||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolMinus : LargeSymbolPlus, FontStyle::LARGE);
|
||||
} else {
|
||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? SymbolPlus : SymbolMinus, FontStyle::LARGE);
|
||||
OLED::print(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled) ? LargeSymbolPlus : LargeSymbolMinus, FontStyle::LARGE);
|
||||
}
|
||||
OLED::refresh();
|
||||
GUIDelay();
|
||||
|
||||
@@ -8,23 +8,23 @@ void showPDDebug(void) {
|
||||
uint8_t screen = 0;
|
||||
ButtonState b;
|
||||
for (;;) {
|
||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
OLED::print(SymbolPDDebug, FontStyle::SMALL); // Print Title
|
||||
OLED::setCursor(0, 8); // second line
|
||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
OLED::print(SmallSymbolPDDebug, FontStyle::SMALL); // Print Title
|
||||
OLED::setCursor(0, 8); // second line
|
||||
if (screen == 0) {
|
||||
// Print the PD state machine
|
||||
OLED::print(SymbolState, FontStyle::SMALL);
|
||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolState, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||
OLED::printNumber(USBPowerDelivery::getStateNumber(), 2, FontStyle::SMALL, true);
|
||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||
// Also print vbus mod status
|
||||
if (USBPowerDelivery::fusbPresent()) {
|
||||
if (USBPowerDelivery::negotiationComplete() || (xTaskGetTickCount() > (TICKS_SECOND * 10))) {
|
||||
if (!USBPowerDelivery::isVBUSConnected()) {
|
||||
OLED::print(SymbolNoVBus, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolNoVBus, FontStyle::SMALL);
|
||||
} else {
|
||||
OLED::print(SymbolVBus, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolVBus, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,22 +56,22 @@ void showPDDebug(void) {
|
||||
} else {
|
||||
// print out this entry of the proposal
|
||||
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) {
|
||||
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::print(SymbolVolts, FontStyle::SMALL);
|
||||
OLED::print(SymbolSpace, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolSpace, FontStyle::SMALL);
|
||||
if (wattage) {
|
||||
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 {
|
||||
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::print(SymbolAmps, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolAmps, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -21,9 +21,9 @@ void gui_drawTipTemp(bool symbol, const FontStyle font) {
|
||||
} else {
|
||||
// Otherwise fall back to chars
|
||||
if (getSettingValue(SettingsOptions::TemperatureInF))
|
||||
OLED::print(SymbolDegF, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDegF, FontStyle::SMALL);
|
||||
else
|
||||
OLED::print(SymbolDegC, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDegC, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,6 @@
|
||||
void printVoltage(void) {
|
||||
uint32_t volt = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
|
||||
OLED::printNumber(volt / 10, 2, FontStyle::SMALL);
|
||||
OLED::print(SymbolDot, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolDot, FontStyle::SMALL);
|
||||
OLED::printNumber(volt % 10, 1, FontStyle::SMALL);
|
||||
}
|
||||
@@ -22,7 +22,7 @@ bool checkForUnderVoltage(void) {
|
||||
OLED::setCursor(0, 8);
|
||||
OLED::print(translatedString(Tr->InputVoltageString), FontStyle::SMALL);
|
||||
printVoltage();
|
||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolVolts, FontStyle::SMALL);
|
||||
} else {
|
||||
OLED::print(translatedString(Tr->UVLOWarningString), FontStyle::LARGE);
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ void printCountdownUntilSleep(int sleepThres) {
|
||||
TickType_t downCount = sleepThres - xTaskGetTickCount() + lastEventTime;
|
||||
if (downCount > (99 * TICKS_SECOND)) {
|
||||
OLED::printNumber(downCount / 60000 + 1, 2, FontStyle::SMALL);
|
||||
OLED::print(SymbolMinutes, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolMinutes, FontStyle::SMALL);
|
||||
} else {
|
||||
OLED::printNumber(downCount / 1000 + 1, 2, FontStyle::SMALL);
|
||||
OLED::print(SymbolSeconds, FontStyle::SMALL);
|
||||
OLED::print(SmallSymbolSeconds, FontStyle::SMALL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user