1
0
forked from me/IronOS

Merge pull request #1183 from Ralim/updating-translation-editor

Updating translation editor + new Settings.md docs that are auto generated
This commit is contained in:
Ben V. Brown
2022-01-21 09:38:56 +11:00
committed by GitHub
8 changed files with 1233 additions and 532 deletions

View File

@@ -20,54 +20,71 @@ Use the following steps to set up a build environment for IronOS on the command
1. [Follow steps 1 3 here to install the toolchain](https://github.com/glegrain/STM32-with-macOS#0---installing-the-toolchain) needed to compile for STM32 microcontrollers.
2. Install `python`:
```
brew install python
```
3. (Optional) Update `pip` so it doesn't warn you about being out-of-date:
```
python3 -m pip install --upgrade pip
```
4. Change to the `source` directory:
```
cd source
```
5. Create a Python virtual environment for IronOS named `ironos-venv` to keep your Python installation clean:
```
python3 -m venv ironos-venv
```
6. Activate the Python virtual environment:
```
source ironos-venv/bin/activate
```
7. Install the dependencies required to run `make-translation.py`:
```
pip install bdflib
```
8. All done! See some examples below for how you can build your own IronOS.
### Examples
To build a single language Simplified Chinese firmware for the TS80P with 8 simultaneous jobs:
To build a single language Simplified Chinese firmware for the TS80P with 8 simultaneous jobs:
```
make -j8 model=TS80P firmware-ZH_CN
```
To build a European multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on Linux:
To build a European multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on Linux:
```
make -j$(nproc) model=Pinecil firmware-multi_European
```
To build a Cyrillic compressed multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on macOS:
To build a Cyrillic compressed multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on macOS:
```
make -j$(sysctl -n hw.logicalcpu) model=Pinecil firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian
```
To build a custom multi-language firmware including English and Simplified Chinese for the TS80:
To build a custom multi-language firmware including English and Simplified Chinese for the TS80:
```
make -j8 model=TS80 custom_multi_langs="EN ZH_CN" firmware-multi_Custom
```
To build a custom compressed multi-language firmware including German, Spanish, and French for the TS100 (note if `model` is unspecified, it will default to `TS100`):
To build a custom compressed multi-language firmware including German, Spanish, and French for the TS100 (note if `model` is unspecified, it will default to `TS100`):
```
make -j8 custom_multi_langs="DE ES FR" firmware-multi_compressed_Custom
```
@@ -77,6 +94,7 @@ To build a release instead, run the `build.sh` script. This will update translat
## Updating languages
To update the language translation files and their associated font maps, execute the `make_translation.py` code from the `Translations` directory.
If you edit the translation definitions or the english translation, please also run `gen_menu_docs.py` to update the settings menu documentation automatically.
## Building Pinecil

302
Documentation/Settings.md Normal file
View File

@@ -0,0 +1,302 @@
<!-- This is an automatically generated file. DO NOT EDIT. Edit gen_menu_docs.py instead -->
# IronOS Settings Menu
The below breaks down the menu's and what each setting means.
## Menu Categories
In the menu there are a few main categories that are used to keep the list manageable.
### Category: Power settings
Menu for settings related to power. Main settings to do with the input voltage.
### Category: Soldering settings
Settings for soldering mode, such as boost temps, the increment used when pressing buttons and if button locking is enabled.
### Category: Sleep mode
Settings to do with power saving, such as sleep mode, sleep temps, and shutdown modes.
### Category: User interface
User interface related settings, such as units.
### Category: Advanced settings
Advanced settings. Misc catchall for settings that don't fit anywhere else or settings that require some thought before use.
## Settings
These are all of the settings possible in the menu.
**Not all settings are visible for all devices.**
For example, the TS100 does not have USB-PD settings.
When using the device, if unsure you can pause (press nothing) on a setting and after a short delay help text will scroll across the screen.
This is the "on device help text".
### Setting: Power source
When the device is powered by a battery, this adjusts the low voltage threshold for when the unit should turn off the heater to protect the battery.
On device help text:
Power source. Sets cutoff voltage. (DC 10V) (S 3.3V per cell, disable power limit)
### Setting: Sleep temp
Temperature the device will drop down to while asleep. Typically around halfway between off and soldering temperature.
On device help text:
Tip temperature while in "sleep mode"
### Setting: Sleep timeout
How long of a period without movement / button-pressing is required before the device drops down to the sleep temperature.
On device help text:
Interval before "sleep mode" kicks in (S=seconds | M=minutes)
### Setting: Shutdown timeout
How long of a period without movement / button-pressing is required before the device turns off the tip heater completely and returns to the main idle screen.
On device help text:
Interval before the iron shuts down (M=minutes)
### Setting: Motion sensitivity
Scale of how sensitive the device is to movement. Higher numbers == more sensitive. 0 == motion detection turned off.
On device help text:
0=off | 1=least sensitive | ... | 9=most sensitive
### Setting: Temperature unit
If the device shows temperatures in °C or °F.
On device help text:
C=Celsius | F=Fahrenheit
### Setting: Detailed idle screen
Should the device show an 'advanced' view on the idle screen. The advanced view uses text to show more details than the typical icons.
On device help text:
Display detailed information in a smaller font on the idle screen
### Setting: Display orientation
If the display should rotate automatically or if it should be fixed for left- or right-handed mode.
On device help text:
R=right-handed | L=left-handed | A=automatic
### Setting: Boost temp
When the unit is in soldering mode. You can hold down the button at the front of the device to temporarily override the soldering temperature to this value. This SETS the temperature, it does not ADD to it.
On device help text:
Temperature used in "boost mode"
### Setting: Heat on power up
When the device powers up, should it enter into a special mode. These settings set it to either start into soldering mode, sleeping mode or auto mode (Enters into soldering mode on the first movement).
On device help text:
O=off | S=soldering temp | Z=standby at sleep temp until moved | R=standby without heating until moved
### Setting: Cooldown blink
If the idle screen should blink the tip temperature for attention while the tip is over 50°C. Intended as a 'tip is still hot' warning.
On device help text:
Flash the temperature reading after heating was halted while the tip is still hot
### Setting: Calibrate temperature?
Used to calibrate the ADC+Op-amp offsets for the tip. This calibration must be performed when the tip temperature and the handle temperature are equal. Generally not required unless your device is reading more than 5°C off target.
On device help text:
Start tip temperature offset calibration
### Setting: Factory reset?
Resets all settings and calibrations to factory defaults. Does NOT erase custom user boot up logo's.
On device help text:
Reset settings to default
### Setting: Calibrate input voltage?
Enters an adjustment mode where you can gradually adjust the measured voltage to compensate for any unit-to-unit variance in the voltage sense resistors.
On device help text:
Start VIN calibration (long press to exit)
### Setting: Detailed solder screen
Should the device show an 'advanced' soldering view. This is a text-based view that shows more information at the cost of no nice graphics.
On device help text:
Display detailed information in a smaller font on soldering screen
### Setting: Scrolling speed
How fast the description text scrolls when hovering on a menu. Faster speeds may induce tearing, but allow reading the whole description faster.
On device help text:
Speed info text scrolls past at (S=slow | F=fast)
### Setting: QC voltage
This adjusts the maximum voltage the QC negotiation will adjust to. Does NOT affect USB-PD. Should be set safely based on the current rating of your power supply.
On device help text:
Max QC voltage the iron should negotiate for
### Setting: PD timeout
How long until firmware stops trying to negotiate for USB-PD and tries QC instead. Longer times may help dodgy / old PD adapters, faster times move onto PD quickly. Units of 100ms. Recommended to keep small values.
On device help text:
PD negotiation timeout in 100ms steps for compatibility with some QC chargers
### Setting: Power limit
Allows setting a custom wattage for the device to aim to keep the AVERAGE power below. The unit can't control its peak power no matter how you set this. (Except for MHP30 which will regulate nicely to this). If USB-PD is in use, the limit will be set to the lower of this and the supplies advertised wattage.
On device help text:
Maximum power the iron can use (W=watt)
### Setting: Reverse + - keys
Swaps which button increments and decrements on temperature change screens.
On device help text:
Reverse assignment of buttons for temperature adjustment
### Setting: Temp change short
Factor by which the temperature is changed with a quick press of the buttons.
On device help text:
Temperature-change-increment on short button press
### Setting: Temp change long
Factor by which the temperature is changed with a hold of the buttons.
On device help text:
Temperature-change-increment on long button press
### Setting: Power pulse
Enables and sets the wattage of the power pulse. Power pulse causes the device to briefly turn on the heater to draw power to avoid power banks going to sleep.
On device help text:
Intensity of power of keep-awake-pulse (watt)
### Setting: Hall sensor sensitivity
If the unit has a hall effect sensor (Pinecil), this adjusts how sensitive it is at detecting a magnet to put the device into sleep mode.
On device help text:
Sensitivity of the Hall effect sensor to detect sleep (O=off | L=low | M=medium | H=high)
### Setting: Allow locking buttons
If locking the buttons against accidental presses is enabled.
On device help text:
While soldering, hold down both buttons to toggle locking them (D=disable | B=boost mode only | F=full locking)
### Setting: Minimum voltage
When powered by a battery, this adjusts the minimum voltage per cell before shutdown. (This is multiplied by the cell count.)
On device help text:
Minimum allowed voltage per cell (3S: 3 - 3.7V | 4-6S: 2.4 - 3.7V)
### Setting: Anim. loop
Should the menu animations loop. Only visible if the animation speed is not set to "Off"
On device help text:
Loop icon animations in main menu
### Setting: Anim. speed
How fast should the menu animations loop, or if they should not loop at all.
On device help text:
Pace of icon animations in menu (O=off | S=slow | M=medium | F=fast)
### Setting: Power pulse delay
Adjusts the time interval between power pulses. Longer gaps reduce undesired heating of the tip, but needs to be fast enough to keep your power bank awake.
On device help text:
Delay before keep-awake-pulse is triggered (x 2.5s)
### Setting: Power pulse duration
How long should the power pulse go for. Some power banks require seeing the power draw be sustained for a certain duration to keep awake. Should be kept as short as possible to avoid wasting power / undesired heating of the tip.
On device help text:
Keep-awake-pulse duration (x 250ms)
### Setting: Language: EN English
Changes the device language on multi-lingual builds.
On device help text:
Current firmware language
### Setting: Screen contrast
Display brightness. Higher values age the OLED faster due to burn-in. (However, it is notable that most of these screens die from other causes first.)
On device help text:
Adjust the brightness of the OLED screen
### Setting: Invert screen
Inverts the entire OLED.
On device help text:
Invert the colours of the OLED screen

File diff suppressed because it is too large Load Diff

115
Translations/gen_menu_docs.py Executable file
View File

@@ -0,0 +1,115 @@
#!/usr/bin/env python3
import argparse
import functools
import hashlib
import json
import logging
import os
import sys
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
HERE = Path(__file__).resolve().parent
TRANSLATION_DEFS_PATH = os.path.join(HERE, "translations_def.js")
ENGLISH_TRANSLATION_PATH = os.path.join(HERE, "translation_EN.json")
MENU_DOCS_FILE_PATH = os.path.join(HERE.parent, "Documentation/Settings.md")
# Loading a single JSON file
def load_json(filename: str, skip_first_line: bool) -> dict:
with open(filename) as f:
if skip_first_line:
f.readline()
return json.loads(f.read())
def write_header(filep):
"""
Writes the markdown constant header area out
"""
constant_header = """<!-- This is an automatically generated file. DO NOT EDIT. Edit gen_menu_docs.py instead -->
# IronOS Settings Menu
The below breaks down the menu's and what each setting means.
"""
filep.write(constant_header)
def write_menu_categories(filep, defs, translation_data):
"""
Writes the menu categories section out
"""
menu_cat_pretense = """
## Menu Categories
In the menu there are a few main categories that are used to keep the list manageable.
"""
filep.write(menu_cat_pretense)
for menu in defs.get("menuGroups", {}):
menu_id = menu.get("id", "")
entry = translation_data.get("menuGroups", {}).get(menu_id, "")
name = " ".join(entry.get("text2", []))
desc = menu.get("description", "")
section = f"""
### Category: {name}
{desc}
"""
filep.write(section)
def write_menu_entries(filep, defs, translation_data):
"""
Writes the menu entries section out
"""
menu_entries_pretense = """
## Settings
These are all of the settings possible in the menu.
**Not all settings are visible for all devices.**
For example, the TS100 does not have USB-PD settings.
When using the device, if unsure you can pause (press nothing) on a setting and after a short delay help text will scroll across the screen.
This is the "on device help text".
"""
filep.write(menu_entries_pretense)
for menu in defs.get("menuOptions", {}):
menu_id = menu.get("id", "")
entry = translation_data.get("menuOptions", {}).get(menu_id, "")
name = " ".join(entry.get("text2", []))
desc = menu.get("description", "")
on_device_desc = entry.get("desc", "")
section = f"""
### Setting: {name}
{desc}
On device help text:
{on_device_desc}
"""
filep.write(section)
def main() -> None:
json_dir = HERE
print(json_dir)
logging.info("Loading translation definitions")
defs = load_json(TRANSLATION_DEFS_PATH, True)
eng_translation = load_json(ENGLISH_TRANSLATION_PATH, False)
with open(MENU_DOCS_FILE_PATH, "w") as outputf:
write_header(outputf)
write_menu_categories(outputf, defs, eng_translation)
write_menu_entries(outputf, defs, eng_translation)
logging.info("Done")
if __name__ == "__main__":
main()

View File

@@ -5,7 +5,7 @@
"tempUnitFahrenheit": true,
"messages": {
"SettingsCalibrationWarning": "Please ensure the tip is at room temperature, before proceeding!",
"SettingsResetWarning": "Sure you want to restore default settings?",
"SettingsResetWarning": "Are you sure you want to restore default settings?",
"UVLOWarningString": "DC LOW",
"UndervoltageString": "Undervoltage",
"InputVoltageString": "Input V: ",

View File

@@ -2,367 +2,426 @@ var def =
{
"messages": [
{
"id": "SettingsCalibrationWarning"
"id": "SettingsCalibrationWarning",
"description": "Confirmation message shown before performing an offset calibration. Should warn the user to make sure tip and handle are at the same temperature."
},
{
"id": "SettingsResetWarning"
"id": "SettingsResetWarning",
"description": "Confirmation message shown before confirming a settings reset."
},
{
"id": "UVLOWarningString",
"maxLen": 8
"maxLen": 8,
"description": "Warning text shown when the unit turns off due to undervoltage in simple mode."
},
{
"id": "UndervoltageString",
"maxLen": 16
"maxLen": 16,
"description": "Warning text shown when the unit turns off due to undervoltage in advanced mode."
},
{
"id": "InputVoltageString",
"maxLen": 11,
"note": "Preferably end with a space"
"note": "Preferably end with a space",
"description": "Prefix text for 'Input Voltage' shown before showing the input voltage reading."
},
{
"id": "SleepingSimpleString",
"maxLen": 4
"maxLen": 4,
"description": "The text shown to indicate the unit is in sleep mode when the advanced view is NOT on."
},
{
"id": "SleepingAdvancedString",
"maxLen": 16
"maxLen": 16,
"description": "The text shown to indicate the unit is in sleep mode when the advanced view is turned on."
},
{
"id": "SleepingTipAdvancedString",
"maxLen": 6
},
{
"id": "IdleTipString",
"lenSum":
{
"fields": ["IdleTipString", "IdleSetString"],
"maxLen": 10
}
},
{
"id": "IdleSetString",
"lenSum":
{
"fields": ["IdleTipString", "IdleSetString"],
"maxLen": 10
},
"note": "Preferably start with a space"
},
{
"id": "TipDisconnectedString",
"maxLen": 16
},
{
"id": "SolderingAdvancedPowerPrompt",
"maxLen": null
"maxLen": 6,
"description": "The prefix text shown before tip temperature when the unit is sleeping with advanced view on."
},
{
"id": "OffString",
"maxLen": 3
"maxLen": 3,
"description": "Shown when a setting is turned off."
}
],
"messagesWarn": [
{
"id": "ResetOKMessage"
"id": "SettingsResetMessage",
"description": "Shown when the settings are reset to factory defaults either by the user or by incompatible firmware changes."
},
{
"id": "SettingsResetMessage"
"id": "NoAccelerometerMessage",
"description": "No accelerometer could be communicated with. This means that either the device's accelerometer is broken or unknown to IronOS. All motion-based settings are disabled and motion-based features will not work."
},
{
"id": "NoAccelerometerMessage"
"id": "NoPowerDeliveryMessage",
"description": "The IC required for USB-PD could not be communicated with. This is an error warning that USB-PD WILL NOT FUNCTION. Generally indicative of either a hardware or software issues."
},
{
"id": "NoPowerDeliveryMessage"
"id": "LockingKeysString",
"description": "Shown when keys are locked"
},
{
"id": "LockingKeysString"
"id": "UnlockingKeysString",
"description": "Shown when keys are unlocked"
},
{
"id": "UnlockingKeysString"
"id": "WarningKeysLockedString",
"description": "Warning that is shown when input is ignored due to the key lock being on"
},
{
"id": "WarningKeysLockedString"
},
{
"id": "WarningThermalRunaway"
"id": "WarningThermalRunaway",
"description": "Warning text shown when the software has disabled the heater as a safety precaution as the temperature reading didn't react as expected."
}
],
"characters": [
{
"id": "SettingRightChar",
"len": 1
"len": 1,
"description": "Shown for fixed Right-handed display rotation."
},
{
"id": "SettingLeftChar",
"len": 1
"len": 1,
"description": "Shown for fixed Left-handed display rotation."
},
{
"id": "SettingAutoChar",
"len": 1
"len": 1,
"description": "Shown for automatic display rotation."
},
{
"id": "SettingFastChar",
"len": 1
"len": 1,
"description": "Shown when a setting is set to a fast value i.e. animation speed"
},
{
"id": "SettingSlowChar",
"len": 1
"len": 1,
"description": "Shown when a setting is set to a slow value i.e. animation speed"
},
{
"id": "SettingMediumChar",
"len": 1
"len": 1,
"description": "Shown when a setting is set to a medium value i.e. animation speed"
},
{
"id": "SettingOffChar",
"len": 1
"len": 1,
"description": "Shown when a setting is turned off"
},
{
"id": "SettingStartSolderingChar",
"len": 1
"len": 1,
"description": "Shown when the auto start mode is set to go straight to soldering."
},
{
"id": "SettingStartSleepChar",
"len": 1
"len": 1,
"description": "Shown when the auto start mode is set to start in sleep mode."
},
{
"id": "SettingStartSleepOffChar",
"len": 1
"len": 1,
"description": "Shown when the auto start state is set to go to an off state, but on movement wake into soldering mode."
},
{
"id": "SettingStartNoneChar",
"len": 1
"len": 1,
"description": "Shown when autostart state is to do nothing and go to a normal boot"
},
{
"id": "SettingSensitivityOff",
"len": 1
"len": 1,
"description": "Shown when a sensitivity (hall effect sensor) is disabled. Turning off the sensor."
},
{
"id": "SettingSensitivityLow",
"len": 1
"len": 1,
"description": "Shown when a sensitivity (hall effect) is not very sensitive"
},
{
"id": "SettingSensitivityMedium",
"len": 1
"len": 1,
"description": "Shown when a sensitivity (hall effect) is average sensitive"
},
{
"id": "SettingSensitivityHigh",
"len": 1
"len": 1,
"description": "Shown when a sensitivity (hall effect) is highly sensitive"
},
{
"id": "SettingLockDisableChar",
"len": 1,
"default": "D"
"default": "D",
"description": "Shown when locking mode is turned off."
},
{
"id": "SettingLockBoostChar",
"len": 1,
"default": "B"
"default": "B",
"description": "Shown when the locking mode is set to lock all buttons except for boost mode."
},
{
"id": "SettingLockFullChar",
"len": 1,
"default": "F"
},
{
"id": "SettingNAChar",
"len": 3,
"default": "N/A"
"default": "F",
"description": "Shown when the locking mode is set to lock all buttons."
}
],
"menuGroups": [
{
"id": "PowerMenu",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "Menu for settings related to power. Main settings to do with the input voltage."
},
{
"id": "SolderingMenu",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "Settings for soldering mode, such as boost temps, the increment used when pressing buttons and if button locking is enabled."
},
{
"id": "PowerSavingMenu",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "Settings to do with power saving, such as sleep mode, sleep temps, and shutdown modes."
},
{
"id": "UIMenu",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "User interface related settings, such as units."
},
{
"id": "AdvancedMenu",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "Advanced settings. Misc catchall for settings that don't fit anywhere else or settings that require some thought before use."
}
],
"menuOptions": [
{
"id": "DCInCutoff",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "When the device is powered by a battery, this adjusts the low voltage threshold for when the unit should turn off the heater to protect the battery."
},
{
"id": "SleepTemperature",
"maxLen": 4,
"maxLen2": 9
"maxLen2": 9,
"description": "Temperature the device will drop down to while asleep. Typically around halfway between off and soldering temperature."
},
{
"id": "SleepTimeout",
"maxLen": 4,
"maxLen2": 9
"maxLen2": 9,
"description": "How long of a period without movement / button-pressing is required before the device drops down to the sleep temperature."
},
{
"id": "ShutdownTimeout",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "How long of a period without movement / button-pressing is required before the device turns off the tip heater completely and returns to the main idle screen."
},
{
"id": "MotionSensitivity",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "Scale of how sensitive the device is to movement. Higher numbers == more sensitive. 0 == motion detection turned off."
},
{
"id": "TemperatureUnit",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "If the device shows temperatures in °C or °F."
},
{
"id": "AdvancedIdle",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "Should the device show an 'advanced' view on the idle screen. The advanced view uses text to show more details than the typical icons."
},
{
"id": "DisplayRotation",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "If the display should rotate automatically or if it should be fixed for left- or right-handed mode."
},
{
"id": "BoostTemperature",
"maxLen": 4,
"maxLen2": 9
"maxLen2": 9,
"description": "When the unit is in soldering mode. You can hold down the button at the front of the device to temporarily override the soldering temperature to this value. This SETS the temperature, it does not ADD to it."
},
{
"id": "AutoStart",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "When the device powers up, should it enter into a special mode. These settings set it to either start into soldering mode, sleeping mode or auto mode (Enters into soldering mode on the first movement)."
},
{
"id": "CooldownBlink",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "If the idle screen should blink the tip temperature for attention while the tip is over 50°C. Intended as a 'tip is still hot' warning."
},
{
"id": "TemperatureCalibration",
"maxLen": 8,
"maxLen2": 16
"maxLen2": 16,
"description": "Used to calibrate the ADC+Op-amp offsets for the tip. This calibration must be performed when the tip temperature and the handle temperature are equal. Generally not required unless your device is reading more than 5°C off target."
},
{
"id": "SettingsReset",
"maxLen": 8,
"maxLen2": 16
"maxLen2": 16,
"description": "Resets all settings and calibrations to factory defaults. Does NOT erase custom user boot up logo's."
},
{
"id": "VoltageCalibration",
"maxLen": 8,
"maxLen2": 16
"maxLen2": 16,
"description": "Enters an adjustment mode where you can gradually adjust the measured voltage to compensate for any unit-to-unit variance in the voltage sense resistors."
},
{
"id": "AdvancedSoldering",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "Should the device show an 'advanced' soldering view. This is a text-based view that shows more information at the cost of no nice graphics."
},
{
"id": "ScrollingSpeed",
"maxLen": 6,
"maxLen2": 11
"maxLen2": 11,
"description": "How fast the description text scrolls when hovering on a menu. Faster speeds may induce tearing, but allow reading the whole description faster."
},
{
"id": "QCMaxVoltage",
"maxLen": 8,
"maxLen2": 16
"maxLen2": 16,
"description": "This adjusts the maximum voltage the QC negotiation will adjust to. Does NOT affect USB-PD. Should be set safely based on the current rating of your power supply."
},
{
"id": "PDNegTimeout",
"maxLen": 8,
"maxLen2": 16
"maxLen2": 16,
"description": "How long until firmware stops trying to negotiate for USB-PD and tries QC instead. Longer times may help dodgy / old PD adapters, faster times move onto PD quickly. Units of 100ms. Recommended to keep small values."
},
{
"id": "PowerLimit",
"maxLen": 5,
"maxLen2": 11
"maxLen2": 11,
"description": "Allows setting a custom wattage for the device to aim to keep the AVERAGE power below. The unit can't control its peak power no matter how you set this. (Except for MHP30 which will regulate nicely to this). If USB-PD is in use, the limit will be set to the lower of this and the supplies advertised wattage."
},
{
"id": "ReverseButtonTempChange",
"maxLen": 6,
"maxLen2": 16
"maxLen2": 16,
"description": "Swaps which button increments and decrements on temperature change screens."
},
{
"id": "TempChangeShortStep",
"maxLen": 8,
"maxLen2": 16
"maxLen2": 16,
"description": "Factor by which the temperature is changed with a quick press of the buttons."
},
{
"id": "TempChangeLongStep",
"maxLen": 6,
"maxLen2": 16
"maxLen2": 16,
"description": "Factor by which the temperature is changed with a hold of the buttons."
},
{
"id": "PowerPulsePower",
"maxLen": 6,
"maxLen2": 16
"maxLen2": 16,
"description": "Enables and sets the wattage of the power pulse. Power pulse causes the device to briefly turn on the heater to draw power to avoid power banks going to sleep."
},
{
"id": "HallEffSensitivity",
"maxLen": 6,
"maxLen2": 8
"maxLen2": 8,
"description": "If the unit has a hall effect sensor (Pinecil), this adjusts how sensitive it is at detecting a magnet to put the device into sleep mode."
},
{
"id": "LockingMode",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "If locking the buttons against accidental presses is enabled."
},
{
"id": "MinVolCell",
"maxLen": 4,
"maxLen2": 9
"maxLen2": 9,
"description": "When powered by a battery, this adjusts the minimum voltage per cell before shutdown. (This is multiplied by the cell count.)"
},
{
"id": "AnimLoop",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "Should the menu animations loop. Only visible if the animation speed is not set to \"Off\""
},
{
"id": "AnimSpeed",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "How fast should the menu animations loop, or if they should not loop at all."
},
{
"id": "PowerPulseWait",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "Adjusts the time interval between power pulses. Longer gaps reduce undesired heating of the tip, but needs to be fast enough to keep your power bank awake."
},
{
"id": "PowerPulseDuration",
"maxLen": 6,
"maxLen2": 13
"maxLen2": 13,
"description": "How long should the power pulse go for. Some power banks require seeing the power draw be sustained for a certain duration to keep awake. Should be kept as short as possible to avoid wasting power / undesired heating of the tip."
},
{
"id": "LanguageSwitch",
"maxLen": 7,
"maxLen2": 15
"maxLen2": 15,
"description": "Changes the device language on multi-lingual builds."
},
{
"id": "Brightness",
"maxLen": 7,
"maxLen2": 15
"maxLen2": 15,
"description": "Display brightness. Higher values age the OLED faster due to burn-in. (However, it is notable that most of these screens die from other causes first.)"
},
{
"id": "ColourInversion",
"maxLen": 7,
"maxLen2": 15
"maxLen2": 15,
"description": "Inverts the entire OLED."
}
]
}

View File

@@ -76,13 +76,8 @@ struct TranslationIndexTable {
uint16_t SleepingSimpleString;
uint16_t SleepingAdvancedString;
uint16_t SleepingTipAdvancedString;
uint16_t IdleTipString;
uint16_t IdleSetString;
uint16_t TipDisconnectedString;
uint16_t SolderingAdvancedPowerPrompt;
uint16_t OffString;
uint16_t ResetOKMessage;
uint16_t SettingsResetMessage;
uint16_t NoAccelerometerMessage;
uint16_t NoPowerDeliveryMessage;
@@ -109,7 +104,6 @@ struct TranslationIndexTable {
uint16_t SettingLockDisableChar;
uint16_t SettingLockBoostChar;
uint16_t SettingLockFullChar;
uint16_t SettingNAChar;
uint16_t SettingsDescriptions[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)];
uint16_t SettingsShortNames[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)];
@@ -118,7 +112,8 @@ struct TranslationIndexTable {
};
extern const TranslationIndexTable *Tr;
extern const char * TranslationStrings;
extern const char *TranslationStrings;
struct TranslationData {
TranslationIndexTable indices;

View File

@@ -601,7 +601,7 @@ static void settings_displayCoolingBlinkEnabled(void) {
static bool settings_setResetSettings(void) {
if (userConfirmation(translatedString(Tr->SettingsResetWarning))) {
resetSettings();
warnUser(translatedString(Tr->ResetOKMessage), 2 * TICKS_SECOND);
warnUser(translatedString(Tr->SettingsResetMessage), 10 * TICKS_SECOND);
}
return false;
}