1
0
forked from me/IronOS

Expand USB-PD mode option (#1917)

* Use PDMode to decide if we do resistance pad

* Rename PDVpdo to USBPDMode

* Add options for PD Mode

* OLED: Allow soft line-wrap x position

* Add new translation option for menu settings values

* Use new setting value for PD Mode

* Update translations for new menu setting

* Fixup! S60

* black python
This commit is contained in:
Ben V. Brown
2024-06-01 16:36:34 +10:00
committed by GitHub
parent c135732ebb
commit 442dbd982e
47 changed files with 11370 additions and 10967 deletions

View File

@@ -76,13 +76,13 @@ def filter_translation(lang: dict, defs: dict, macros: frozenset):
return False return False
for category in ("menuOptions", "menuGroups"): for category in ("menuOptions", "menuGroups", "menuValues"):
for index, record in enumerate(defs[category]): for _, record in enumerate(defs[category]):
if check_excluded(record): if check_excluded(record):
lang[category][record["id"]]["displayText"] = "" lang[category][record["id"]]["displayText"] = ""
lang[category][record["id"]]["description"] = "" lang[category][record["id"]]["description"] = ""
for index, record in enumerate(defs["messagesWarn"]): for _, record in enumerate(defs["messagesWarn"]):
if check_excluded(record): if check_excluded(record):
lang["messagesWarn"][record["id"]]["message"] = "" lang["messagesWarn"][record["id"]]["message"] = ""
@@ -249,6 +249,15 @@ def get_letter_counts(defs: dict, lang: dict, build_version: str) -> Dict:
msg = obj[eid]["description"] msg = obj[eid]["description"]
big_font_messages.append(msg) big_font_messages.append(msg)
obj = lang["menuValues"]
for mod in defs["menuValues"]:
eid = mod["id"]
msg = obj[eid]["displayText"]
if test_is_small_font(msg):
small_font_messages.append(msg)
else:
big_font_messages.append(msg)
obj = lang["menuGroups"] obj = lang["menuGroups"]
for mod in defs["menuGroups"]: for mod in defs["menuGroups"]:
eid = mod["id"] eid = mod["id"]
@@ -1114,6 +1123,12 @@ def get_translation_strings_and_indices_text(
encode_string_and_add( encode_string_and_add(
lang_data["displayText"], "menuOptions" + record["id"] + "displayText" lang_data["displayText"], "menuOptions" + record["id"] + "displayText"
) )
for index, record in enumerate(defs["menuValues"]):
lang_data = lang["menuValues"][record["id"]]
# Add to translations the menu text and the description
encode_string_and_add(
lang_data["displayText"], "menuValues" + record["id"] + "displayText"
)
for index, record in enumerate(defs["menuGroups"]): for index, record in enumerate(defs["menuGroups"]):
lang_data = lang["menuGroups"][record["id"]] lang_data = lang["menuGroups"][record["id"]]
@@ -1201,6 +1216,21 @@ def get_translation_strings_and_indices_text(
f" .{record['id']} = {start_index}, // {escape(lang_data)}\n" f" .{record['id']} = {start_index}, // {escape(lang_data)}\n"
) )
for _, record in enumerate(defs["menuValues"]):
# Add to translations the menu text and the description
lang_data = lang["menuValues"][record["id"]]
key = "menuValues" + record["id"] + "displayText"
translated_index = translated_string_lookups[key]
string_index = translated_index.byte_encoded_translation_index
start_index = (
string_index_commulative_lengths[string_index]
+ translated_index.str_start_offset
)
translation_indices_text += (
f" .{record['id']} = {start_index}, // {escape(lang_data)}\n"
)
translation_indices_text += "\n" translation_indices_text += "\n"
# Now for the fun ones, where they are nested and ordered # Now for the fun ones, where they are nested and ordered
@@ -1230,6 +1260,7 @@ def get_translation_strings_and_indices_text(
translation_indices_text = write_grouped_indexes( translation_indices_text = write_grouped_indexes(
translation_indices_text, "SettingsShortNames", "menuOptions", "displayText" translation_indices_text, "SettingsShortNames", "menuOptions", "displayText"
) )
translation_indices_text = write_grouped_indexes( translation_indices_text = write_grouped_indexes(
translation_indices_text, translation_indices_text,
"SettingsMenuEntriesDescriptions", "SettingsMenuEntriesDescriptions",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Крыніца\nсілкавання", "displayText": "Крыніца\nсілкавання",
@@ -122,8 +133,8 @@
"displayText": "PD\nпрыпынак", "displayText": "PD\nпрыпынак",
"description": "Час чакання ўзгаднення PD з крокам 100 мс для сумяшчальнасці з некаторымі зараднымі зараднымі прыладамі QC (0: адключана)" "description": "Час чакання ўзгаднення PD з крокам 100 мс для сумяшчальнасці з некаторымі зараднымі зараднымі прыладамі QC (0: адключана)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Уключае рэжымы PPS & EPR." "description": "Уключае рэжымы PPS & EPR."
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Гранично\nнапрежение", "displayText": "Гранично\nнапрежение",
@@ -122,8 +133,8 @@
"displayText": "PD\nинтервал", "displayText": "PD\nинтервал",
"description": "PD интервал за договаряне на захранването на стъпки от 100 мс за съвместимост с някои QC захранвания (0=Изкл.)" "description": "PD интервал за договаряне на захранването на стъпки от 100 мс за съвместимост с някои QC захранвания (0=Изкл.)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Включи PPS & EPR" "description": "Включи PPS & EPR"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Zdroj\nnapájení", "displayText": "Zdroj\nnapájení",
@@ -122,8 +133,8 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "Maximální prodleva při jednání PD ve 100ms krocích pro kompatibilitu s některými QC nabíječkami" "description": "Maximální prodleva při jednání PD ve 100ms krocích pro kompatibilitu s některými QC nabíječkami"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Povoluje režimy PPS & EPR" "description": "Povoluje režimy PPS & EPR"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Strøm\nKilde", "displayText": "Strøm\nKilde",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD-forhandlingstimeout i trin på 100 ms for kompatibilitet med nogle QC-opladere" "description": "PD-forhandlingstimeout i trin på 100 ms for kompatibilitet med nogle QC-opladere"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Boost\ntemp", "displayText": "Boost\ntemp",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Spannungs-\nquelle", "displayText": "Spannungs-\nquelle",
@@ -122,8 +133,8 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD Abfragedauer in 100ms Schritten (Kompatibilität mit best. QC-Ladegeräten)" "description": "PD Abfragedauer in 100ms Schritten (Kompatibilität mit best. QC-Ladegeräten)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Aktiviert PPS & EPR" "description": "Aktiviert PPS & EPR"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Πηγή\nενέργειας", "displayText": "Πηγή\nενέργειας",
@@ -122,8 +133,8 @@
"displayText": "χρονικό όριο\nPD", "displayText": "χρονικό όριο\nPD",
"description": "Χρονικό όριο διαπραγμάτευσης PD σε βήματα 100ms για συμβατότητα με κάποιους φορτιστές QC" "description": "Χρονικό όριο διαπραγμάτευσης PD σε βήματα 100ms για συμβατότητα με κάποιους φορτιστές QC"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Ενεργοποιεί λειτουργίες PPS & EPR." "description": "Ενεργοποιεί λειτουργίες PPS & EPR."
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,10 +105,21 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Power\nsource", "displayText": "Power\nsource",
"description": "Set cutoff voltage to prevent battery overdrainage (DC 10V) (S=3.3V per cell, disable PWR limit)" "description": "Set cutoff voltage to prevent battery overdischarge (DC=10V) (S=3.3V per cell, disable PWR limit)"
}, },
"MinVolCell": { "MinVolCell": {
"displayText": "Minimum\nvoltage", "displayText": "Minimum\nvoltage",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers" "description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Boost\ntemp", "displayText": "Boost\ntemp",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Fuente\nde energía", "displayText": "Fuente\nde energía",
@@ -121,10 +132,9 @@
"PDNegTimeout": { "PDNegTimeout": {
"displayText": "PD\ntiempo de espera", "displayText": "PD\ntiempo de espera",
"description": "Timeout de negociación de PD en pasos de 100ms para compatibilidad con algunos cargadores QC (0: apagado)" "description": "Timeout de negociación de PD en pasos de 100ms para compatibilidad con algunos cargadores QC (0: apagado)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Permite modos PPS & EPR" "description": "Permite modos PPS & EPR"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Toiteallikas\nDC", "displayText": "Toiteallikas\nDC",
@@ -122,8 +133,8 @@
"displayText": "PD\naegumine", "displayText": "PD\naegumine",
"description": "PD läbirääkimise aegumine 100ms sammudena, et tagada ühilduvus osade QC laadijatega" "description": "PD läbirääkimise aegumine 100ms sammudena, et tagada ühilduvus osade QC laadijatega"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Võimaldab PPS- ja EPR-režiimi" "description": "Võimaldab PPS- ja EPR-režiimi"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Virtalähde\nDC", "displayText": "Virtalähde\nDC",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers" "description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Tehostus-\nlämpötila", "displayText": "Tehostus-\nlämpötila",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Source\nd'alim.", "displayText": "Source\nd'alim.",
@@ -122,9 +133,9 @@
"displayText": "Délai\nexpir. PD", "displayText": "Délai\nexpir. PD",
"description": "Délai de la negociation PD par étapes de 100ms pour la compatiblité avec certains chargeurs QC" "description": "Délai de la negociation PD par étapes de 100ms pour la compatiblité avec certains chargeurs QC"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Temp.\nboost", "displayText": "Temp.\nboost",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Izvor\nnapajanja", "displayText": "Izvor\nnapajanja",
@@ -122,9 +133,9 @@
"displayText": "USB-PD\ntimeout", "displayText": "USB-PD\ntimeout",
"description": "Timeout za USB-Power Delivery u koracima od 100ms za kompatibilnost s nekim QC punjačima" "description": "Timeout za USB-Power Delivery u koracima od 100ms za kompatibilnost s nekim QC punjačima"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Boost\ntemp", "displayText": "Boost\ntemp",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Áram\nforrás", "displayText": "Áram\nforrás",
@@ -122,9 +133,9 @@
"displayText": "PD\nidőtúllépés", "displayText": "PD\nidőtúllépés",
"description": "PD egyeztetés időkerete (kompatibilitás QC töltőkkel) (x 100ms)" "description": "PD egyeztetés időkerete (kompatibilitás QC töltőkkel) (x 100ms)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Boost\nhőmérséklet", "displayText": "Boost\nhőmérséklet",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Sorgente\nalimentaz", "displayText": "Sorgente\nalimentaz",
@@ -122,8 +133,8 @@
"displayText": "Abilitazione\nUSB PD", "displayText": "Abilitazione\nUSB PD",
"description": "Regola il massimo tempo utile per la negoziazione del protocollo USB Power Delivery con alimentatori compatibili [0: disattiva; multipli di 100 ms]" "description": "Regola il massimo tempo utile per la negoziazione del protocollo USB Power Delivery con alimentatori compatibili [0: disattiva; multipli di 100 ms]"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Abilita le modalità Power Delivery PPS ed EPR" "description": "Abilita le modalità Power Delivery PPS ed EPR"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "下限電圧", "displayText": "下限電圧",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "一部のQC電源との互換性のため、PDネゴシエーションをタイムアウトする時間 <x100msミリ秒>" "description": "一部のQC電源との互換性のため、PDネゴシエーションをタイムアウトする時間 <x100msミリ秒>"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD VPDO", "displayText": "PD VPDO",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "ブースト温度", "displayText": "ブースト温度",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Maitinimo\nšaltinis", "displayText": "Maitinimo\nšaltinis",
@@ -122,9 +133,9 @@
"displayText": "PD\nlaikas", "displayText": "PD\nlaikas",
"description": "PD suderinimo laikas žingsniais po 100ms suderinamumui su kai kuriais QC įkrovikliais" "description": "PD suderinimo laikas žingsniais po 100ms suderinamumui su kai kuriais QC įkrovikliais"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Turbo\ntemperat.", "displayText": "Turbo\ntemperat.",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Kilde\n", "displayText": "Kilde\n",
@@ -122,9 +133,9 @@
"displayText": "PD-\ntidsavb.", "displayText": "PD-\ntidsavb.",
"description": "PD-forhandlingstidsavbrudd i steg på 100 ms for kompatibilitet med noen QC-ladere" "description": "PD-forhandlingstidsavbrudd i steg på 100 ms for kompatibilitet med noen QC-ladere"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "KTmp\n", "displayText": "KTmp\n",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Vermogens\nbron", "displayText": "Vermogens\nbron",
@@ -122,8 +133,8 @@
"displayText": "PD ver-\nloop tijd", "displayText": "PD ver-\nloop tijd",
"description": "PD onderhandelings verlooptijd, afstemmingsduur in stappen van 100 ms (voor compatibiliteit met sommige QC laders)" "description": "PD onderhandelings verlooptijd, afstemmingsduur in stappen van 100 ms (voor compatibiliteit met sommige QC laders)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Zet PPS & EPR modes aan" "description": "Zet PPS & EPR modes aan"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Spannings-\nbron", "displayText": "Spannings-\nbron",
@@ -122,8 +133,8 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD afstemmingsduur in stappen van 100ms (voor compatibiliteit met sommige QC laders)" "description": "PD afstemmingsduur in stappen van 100ms (voor compatibiliteit met sommige QC laders)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Zet PPS & EPR modes aan" "description": "Zet PPS & EPR modes aan"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Źródło\nzasilania", "displayText": "Źródło\nzasilania",
@@ -122,8 +133,8 @@
"displayText": "Limit czasu\nPD", "displayText": "Limit czasu\nPD",
"description": "Limit czasu negocjacji PD w krokach co 100 ms dla zgodności z niektórymi ładowarkami QC (0: wyłączone)" "description": "Limit czasu negocjacji PD w krokach co 100 ms dla zgodności z niektórymi ładowarkami QC (0: wyłączone)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Włącza tryby PPS & EPR." "description": "Włącza tryby PPS & EPR."
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Fonte\nalimentação", "displayText": "Fonte\nalimentação",
@@ -122,8 +133,8 @@
"displayText": "PD tempo\nlimite", "displayText": "PD tempo\nlimite",
"description": "Tempo limite de negoiciação de PD de 100ms para compatibilidade com alguns carregadores é (0: disabled)" "description": "Tempo limite de negoiciação de PD de 100ms para compatibilidade com alguns carregadores é (0: disabled)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Activa o modo PPS & EPR" "description": "Activa o modo PPS & EPR"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Sursa de\nalimentare", "displayText": "Sursa de\nalimentare",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "Timp limită de negociere pentru tranzacţia PD, în paşi de 100ms, pentru compatibilitate cu alimentatoarele QC" "description": "Timp limită de negociere pentru tranzacţia PD, în paşi de 100ms, pentru compatibilitate cu alimentatoarele QC"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Modifică\ntemp. impuls", "displayText": "Modifică\ntemp. impuls",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Предельное\nнапряжение", "displayText": "Предельное\nнапряжение",
@@ -122,8 +133,8 @@
"displayText": "PD\nинтервал", "displayText": "PD\nинтервал",
"description": "Интервал согласования питания по Power Delivery с шагом 100 мс для совместимости с некоторыми источниками питания по QC (0=Откл.)" "description": "Интервал согласования питания по Power Delivery с шагом 100 мс для совместимости с некоторыми источниками питания по QC (0=Откл.)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Включить режимы PPS & EPR" "description": "Включить режимы PPS & EPR"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Zdroj\nnapätia", "displayText": "Zdroj\nnapätia",
@@ -122,8 +133,8 @@
"displayText": "Čas vypršania\nPower Delivery", "displayText": "Čas vypršania\nPower Delivery",
"description": "Čas vyjednávania Power Delivery v 100ms krokoch pre kompatibilitu s niektorými QC nabíjačkami (0: vypnuté)" "description": "Čas vyjednávania Power Delivery v 100ms krokoch pre kompatibilitu s niektorými QC nabíjačkami (0: vypnuté)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Zapína PPS & EPR režimy" "description": "Zapína PPS & EPR režimy"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Vir\nnapajanja", "displayText": "Vir\nnapajanja",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers" "description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Pospešena\ntemp.", "displayText": "Pospešena\ntemp.",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Врста\nнапајања", "displayText": "Врста\nнапајања",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers" "description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Темп.\nпојачања", "displayText": "Темп.\nпојачања",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Vrsta\nnapajanja", "displayText": "Vrsta\nnapajanja",
@@ -122,9 +133,9 @@
"displayText": "PD\ntimeout", "displayText": "PD\ntimeout",
"description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers" "description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Temp.\npojačanja", "displayText": "Temp.\npojačanja",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Ström-\nkälla", "displayText": "Ström-\nkälla",
@@ -122,8 +133,8 @@
"displayText": "PD\npauser", "displayText": "PD\npauser",
"description": "PD förhandlings pauser i 100ms steg för kompatibilitet med vissa PD laddare" "description": "PD förhandlings pauser i 100ms steg för kompatibilitet med vissa PD laddare"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Slår på PPS & EPR lägen" "description": "Slår på PPS & EPR lägen"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "GÇKYN\n", "displayText": "GÇKYN\n",
@@ -122,8 +133,8 @@
"displayText": "PD\nTimeout", "displayText": "PD\nTimeout",
"description": "Bazı QC şarj cihazlarıyla uyumluluk için 100ms adımlarında PD pazarlık zaman aşımı" "description": "Bazı QC şarj cihazlarıyla uyumluluk için 100ms adımlarında PD pazarlık zaman aşımı"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "PPS & EPR modlarını etkinleştirir" "description": "PPS & EPR modlarını etkinleştirir"
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Джерело\nживлення", "displayText": "Джерело\nживлення",
@@ -122,8 +133,8 @@
"displayText": "PD\nзатримка", "displayText": "PD\nзатримка",
"description": "Затримка у 100мс інкрементах для PD для сумісності з деякими QC зарядними пристроями (0: вимкнено)" "description": "Затримка у 100мс інкрементах для PD для сумісності з деякими QC зарядними пристроями (0: вимкнено)"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Вмикає режими PPS & EPR." "description": "Вмикає режими PPS & EPR."
}, },
"BoostTemperature": { "BoostTemperature": {

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "Nguon\nđien", "displayText": "Nguon\nđien",
@@ -122,9 +133,9 @@
"displayText": "PD\nsau", "displayText": "PD\nsau",
"description": "Thoi gian cho đàm phán PD trong các buoc 100ms đe tuong thích voi mot so bo sac QC" "description": "Thoi gian cho đàm phán PD trong các buoc 100ms đe tuong thích voi mot so bo sac QC"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD\nVPDO", "displayText": "PD\nMode",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "Tăng\nnhiet đo", "displayText": "Tăng\nnhiet đo",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "電源", "displayText": "電源",
@@ -122,9 +133,9 @@
"displayText": "PD逾時", "displayText": "PD逾時",
"description": "設定USB PD協定交涉嘅逾時時限為兼容某啲QC電源而設 <x100ms亳秒>" "description": "設定USB PD協定交涉嘅逾時時限為兼容某啲QC電源而設 <x100ms亳秒>"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD VPDO", "displayText": "PD VPDO",
"description": "Enables PPS & EPR modes" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
}, },
"BoostTemperature": { "BoostTemperature": {
"displayText": "增熱温度", "displayText": "增熱温度",

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "下限电压", "displayText": "下限电压",
@@ -122,7 +133,7 @@
"displayText": "PD超时", "displayText": "PD超时",
"description": "设定USB-PD协议交涉的超时时限为兼容某些QC电源而设 <x100ms亳秒>" "description": "设定USB-PD协议交涉的超时时限为兼容某些QC电源而设 <x100ms亳秒>"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD VPDO", "displayText": "PD VPDO",
"description": "启用PPS和EPR快充支持" "description": "启用PPS和EPR快充支持"
}, },

View File

@@ -105,6 +105,17 @@
"description": "" "description": ""
} }
}, },
"menuValues": {
"USBPDModeDefault": {
"displayText": "Default\nMode"
},
"USBPDModeNoDynamic": {
"displayText": "No\nDynamic"
},
"USBPDModeSafe": {
"displayText": "Safe\nMode"
}
},
"menuOptions": { "menuOptions": {
"DCInCutoff": { "DCInCutoff": {
"displayText": "電源", "displayText": "電源",
@@ -122,7 +133,7 @@
"displayText": "PD逾時", "displayText": "PD逾時",
"description": "設定USB PD協定交涉的逾時時限為兼容某些QC電源而設 <x100ms亳秒>" "description": "設定USB PD協定交涉的逾時時限為兼容某些QC電源而設 <x100ms亳秒>"
}, },
"PDVpdo": { "USBPDMode": {
"displayText": "PD VPDO", "displayText": "PD VPDO",
"description": "開啟PPS及EPR支援" "description": "開啟PPS及EPR支援"
}, },

View File

@@ -1,5 +1,6 @@
{ {
"messagesWarn": [{ "messagesWarn": [
{
"id": "CalibrationDone", "id": "CalibrationDone",
"description": "Confirmation message indicating calibration is complete." "description": "Confirmation message indicating calibration is complete."
}, },
@@ -17,9 +18,7 @@
}, },
{ {
"id": "NoPowerDeliveryMessage", "id": "NoPowerDeliveryMessage",
"include": [ "include": ["POW_PD"],
"POW_PD"
],
"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." "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."
}, },
{ {
@@ -57,58 +56,44 @@
{ {
"id": "UVLOWarningString", "id": "UVLOWarningString",
"maxLen": 8, "maxLen": 8,
"include": [ "include": ["POW_DC"],
"POW_DC"
],
"description": "Warning text shown when the unit turns off due to undervoltage in simple mode." "description": "Warning text shown when the unit turns off due to undervoltage in simple mode."
}, },
{ {
"id": "UndervoltageString", "id": "UndervoltageString",
"maxLen": 15, "maxLen": 15,
"include": [ "include": ["POW_DC"],
"POW_DC"
],
"description": "Warning text shown when the unit turns off due to undervoltage in advanced mode." "description": "Warning text shown when the unit turns off due to undervoltage in advanced mode."
}, },
{ {
"id": "InputVoltageString", "id": "InputVoltageString",
"maxLen": 11, "maxLen": 11,
"note": "Preferably end with a space", "note": "Preferably end with a space",
"include": [ "include": ["POW_DC"],
"POW_DC"
],
"description": "Prefix text for 'Input Voltage' shown before showing the input voltage reading." "description": "Prefix text for 'Input Voltage' shown before showing the input voltage reading."
}, },
{ {
"id": "ProfilePreheatString", "id": "ProfilePreheatString",
"maxLen": 9, "maxLen": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Shown in profile mode while preheating" "description": "Shown in profile mode while preheating"
}, },
{ {
"id": "ProfileCooldownString", "id": "ProfileCooldownString",
"maxLen": 9, "maxLen": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Shown in profile mode while cooling down" "description": "Shown in profile mode while cooling down"
}, },
{ {
"id": "SleepingAdvancedString", "id": "SleepingAdvancedString",
"maxLen": 15, "maxLen": 15,
"exclude": [ "exclude": ["NO_SLEEP_MODE"],
"NO_SLEEP_MODE"
],
"description": "The text shown to indicate the unit is in sleep mode when the advanced view is turned on." "description": "The text shown to indicate the unit is in sleep mode when the advanced view is turned on."
}, },
{ {
"id": "SleepingTipAdvancedString", "id": "SleepingTipAdvancedString",
"maxLen": 6, "maxLen": 6,
"exclude": [ "exclude": ["NO_SLEEP_MODE"],
"NO_SLEEP_MODE"
],
"description": "The prefix text shown before tip temperature when the unit is sleeping with advanced view on." "description": "The prefix text shown before tip temperature when the unit is sleeping with advanced view on."
}, },
{ {
@@ -119,9 +104,7 @@
{ {
"id": "TooHotToStartProfileWarning", "id": "TooHotToStartProfileWarning",
"default": "Too hot to\nstart profile", "default": "Too hot to\nstart profile",
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Shown when profile mode is started while the device is too hot." "description": "Shown when profile mode is started while the device is too hot."
} }
], ],
@@ -189,10 +172,7 @@
"id": "PowerMenu", "id": "PowerMenu",
"maxLen": 5, "maxLen": 5,
"maxLen2": 11, "maxLen2": 11,
"include": [ "include": ["POW_DC", "POW_QC"],
"POW_DC",
"POW_QC"
],
"description": "Menu for settings related to power. Main settings to do with the input voltage." "description": "Menu for settings related to power. Main settings to do with the input voltage."
}, },
{ {
@@ -220,51 +200,55 @@
"description": "Advanced settings. Misc catchall for settings that don't fit anywhere else or settings that require some thought before use." "description": "Advanced settings. Misc catchall for settings that don't fit anywhere else or settings that require some thought before use."
} }
], ],
"menuValues": [
{
"id": "USBPDModeDefault",
"description": "When in this mode we enable all PD features, and we pad resistance slightly to account for cable and PCB trace loss"
},
{
"id": "USBPDModeNoDynamic",
"description": "When in this mode we only enable fixed voltage USB-PD options, and we pad resistance slightly to account for cable and PCB trace loss"
},
{
"id": "USBPDModeSafe",
"description": "When in this mode we enable all PD features, but we don't pad resistance slightly to account for cable and PCB trace loss"
}
],
"menuOptions": [ "menuOptions": [
{ {
"id": "DCInCutoff", "id": "DCInCutoff",
"maxLen": 5, "maxLen": 5,
"maxLen2": 11, "maxLen2": 11,
"include": [ "include": ["POW_DC"],
"POW_DC"
],
"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." "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": "MinVolCell", "id": "MinVolCell",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["POW_DC"],
"POW_DC"
],
"description": "When powered by a battery, this adjusts the minimum voltage per cell before shutdown. (This is multiplied by the cell count.)" "description": "When powered by a battery, this adjusts the minimum voltage per cell before shutdown. (This is multiplied by the cell count.)"
}, },
{ {
"id": "QCMaxVoltage", "id": "QCMaxVoltage",
"maxLen": 8, "maxLen": 8,
"maxLen2": 15, "maxLen2": 15,
"include": [ "include": ["POW_QC"],
"POW_QC"
],
"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." "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", "id": "PDNegTimeout",
"maxLen": 8, "maxLen": 8,
"maxLen2": 15, "maxLen2": 15,
"include": [ "include": ["POW_PD"],
"POW_PD"
],
"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." "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": "PDVpdo", "id": "USBPDMode",
"maxLen": 7, "maxLen": 7,
"maxLen2": 15, "maxLen2": 15,
"include": [ "include": ["POW_PD"],
"POW_PD" "description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
],
"description": "Enabled PPS & EPR modes."
}, },
{ {
"id": "BoostTemperature", "id": "BoostTemperature",
@@ -300,126 +284,98 @@
"id": "ProfilePhases", "id": "ProfilePhases",
"maxLen": 6, "maxLen": 6,
"maxLen2": 13, "maxLen2": 13,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "set the number of phases for profile mode." "description": "set the number of phases for profile mode."
}, },
{ {
"id": "ProfilePreheatTemp", "id": "ProfilePreheatTemp",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Preheat to this temperature at the start of profile mode." "description": "Preheat to this temperature at the start of profile mode."
}, },
{ {
"id": "ProfilePreheatSpeed", "id": "ProfilePreheatSpeed",
"maxLen": 5, "maxLen": 5,
"maxLen2": 11, "maxLen2": 11,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "How fast the temperature is allowed to rise during the preheat phase at the start of profile mode." "description": "How fast the temperature is allowed to rise during the preheat phase at the start of profile mode."
}, },
{ {
"id": "ProfilePhase1Temp", "id": "ProfilePhase1Temp",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 1 of profile mode." "description": "Target temperature for the end of phase 1 of profile mode."
}, },
{ {
"id": "ProfilePhase1Duration", "id": "ProfilePhase1Duration",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Duration of phase 1 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature." "description": "Duration of phase 1 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature."
}, },
{ {
"id": "ProfilePhase2Temp", "id": "ProfilePhase2Temp",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 2 of profile mode." "description": "Target temperature for the end of phase 2 of profile mode."
}, },
{ {
"id": "ProfilePhase2Duration", "id": "ProfilePhase2Duration",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Duration of phase 2 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature." "description": "Duration of phase 2 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature."
}, },
{ {
"id": "ProfilePhase3Temp", "id": "ProfilePhase3Temp",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 3 of profile mode." "description": "Target temperature for the end of phase 3 of profile mode."
}, },
{ {
"id": "ProfilePhase3Duration", "id": "ProfilePhase3Duration",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Duration of phase 3 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature." "description": "Duration of phase 3 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature."
}, },
{ {
"id": "ProfilePhase4Temp", "id": "ProfilePhase4Temp",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 5 of profile mode." "description": "Target temperature for the end of phase 5 of profile mode."
}, },
{ {
"id": "ProfilePhase4Duration", "id": "ProfilePhase4Duration",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Duration of phase 5 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature." "description": "Duration of phase 5 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature."
}, },
{ {
"id": "ProfilePhase5Temp", "id": "ProfilePhase5Temp",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 5 of profile mode." "description": "Target temperature for the end of phase 5 of profile mode."
}, },
{ {
"id": "ProfilePhase5Duration", "id": "ProfilePhase5Duration",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "Duration of phase 5 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature." "description": "Duration of phase 5 of profile mode. The phase might actually take longer if it takes longer to reach the target temperature."
}, },
{ {
"id": "ProfileCooldownSpeed", "id": "ProfileCooldownSpeed",
"maxLen": 5, "maxLen": 5,
"maxLen2": 11, "maxLen2": 11,
"include": [ "include": ["PROFILE_SUPPORT"],
"PROFILE_SUPPORT"
],
"description": "How fast the temperature is allowed to drop during the cooldown phase at the end of profile mode." "description": "How fast the temperature is allowed to drop during the cooldown phase at the end of profile mode."
}, },
{ {
@@ -432,18 +388,14 @@
"id": "SleepTemperature", "id": "SleepTemperature",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"exclude": [ "exclude": ["NO_SLEEP_MODE"],
"NO_SLEEP_MODE"
],
"description": "Temperature the device will drop down to while asleep. Typically around halfway between off and soldering temperature." "description": "Temperature the device will drop down to while asleep. Typically around halfway between off and soldering temperature."
}, },
{ {
"id": "SleepTimeout", "id": "SleepTimeout",
"maxLen": 4, "maxLen": 4,
"maxLen2": 9, "maxLen2": 9,
"exclude": [ "exclude": ["NO_SLEEP_MODE"],
"NO_SLEEP_MODE"
],
"description": "How long of a period without movement / button-pressing is required before the device drops down to the sleep temperature." "description": "How long of a period without movement / button-pressing is required before the device drops down to the sleep temperature."
}, },
{ {
@@ -456,9 +408,7 @@
"id": "HallEffSensitivity", "id": "HallEffSensitivity",
"maxLen": 6, "maxLen": 6,
"maxLen2": 13, "maxLen2": 13,
"include": [ "include": ["HALL_SENSOR"],
"HALL_SENSOR"
],
"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." "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."
}, },
{ {
@@ -471,9 +421,7 @@
"id": "DisplayRotation", "id": "DisplayRotation",
"maxLen": 6, "maxLen": 6,
"maxLen2": 13, "maxLen2": 13,
"exclude": [ "exclude": ["NO_DISPLAY_ROTATE"],
"NO_DISPLAY_ROTATE"
],
"description": "If the display should rotate automatically or if it should be fixed for left- or right-handed mode." "description": "If the display should rotate automatically or if it should be fixed for left- or right-handed mode."
}, },
{ {
@@ -540,9 +488,7 @@
"id": "BluetoothLE", "id": "BluetoothLE",
"maxLen": 7, "maxLen": 7,
"maxLen2": 15, "maxLen2": 15,
"include": [ "include": ["BLE_ENABLED"],
"BLE_ENABLED"
],
"description": "Should BLE be enabled at boot time." "description": "Should BLE be enabled at boot time."
}, },
{ {

View File

@@ -157,7 +157,10 @@ void FS2711::negotiate() {
// FS2711 uses mV instead of V // FS2711 uses mV instead of V
const uint16_t vmax = USB_PD_VMAX * 1000; const uint16_t vmax = USB_PD_VMAX * 1000;
const uint8_t tip_resistance = getTipResistanceX10() + 5; uint8_t tip_resistance = getTipResistanceX10();
if (getSettingValue(SettingsOptions::USBPDMode) == 1) {
tip_resistance += 5;
}
uint16_t pdo_min_mv = 0, pdo_max_mv = 0, pdo_max_curr = 0, pdo_type = 0; uint16_t pdo_min_mv = 0, pdo_max_mv = 0, pdo_max_curr = 0, pdo_type = 0;

View File

@@ -160,7 +160,7 @@ void OLED::setFramebuffer(uint8_t *buffer) {
* UTF font handling is done using the two input chars. * UTF font handling is done using the two input chars.
* Precursor is the command char that is used to select the table. * Precursor is the command char that is used to select the table.
*/ */
void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle) { void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle, const uint8_t soft_x_limit) {
const uint8_t *currentFont; const uint8_t *currentFont;
static uint8_t fontWidth, fontHeight; static uint8_t fontWidth, fontHeight;
uint16_t index; uint16_t index;
@@ -175,7 +175,7 @@ void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle) {
case FontStyle::LARGE: case FontStyle::LARGE:
default: default:
if (charCode == '\x01' && cursor_y == 0) { // 0x01 is used as new line char if (charCode == '\x01' && cursor_y == 0) { // 0x01 is used as new line char
setCursor(0, 8); setCursor(soft_x_limit, 8);
return; return;
} else if (charCode <= 0x01) { } else if (charCode <= 0x01) {
return; return;
@@ -505,7 +505,7 @@ void OLED::setInverseDisplay(bool inverse) {
} }
// print a string to the current cursor location, len chars MAX // print a string to the current cursor location, len chars MAX
void OLED::print(const char *const str, FontStyle fontStyle, uint8_t len) { void OLED::print(const char *const str, FontStyle fontStyle, uint8_t len, const uint8_t soft_x_limit) {
const uint8_t *next = reinterpret_cast<const uint8_t *>(str); const uint8_t *next = reinterpret_cast<const uint8_t *>(str);
if (next[0] == 0x01) { if (next[0] == 0x01) {
fontStyle = FontStyle::LARGE; fontStyle = FontStyle::LARGE;
@@ -523,7 +523,7 @@ void OLED::print(const char *const str, FontStyle fontStyle, uint8_t len) {
index = (next[0] - 0xF0) * 0xFF - 15 + next[1]; index = (next[0] - 0xF0) * 0xFF - 15 + next[1];
next += 2; next += 2;
} }
drawChar(index, fontStyle); drawChar(index, fontStyle, soft_x_limit);
} }
} }
@@ -580,7 +580,7 @@ void OLED::drawHex(uint32_t x, FontStyle fontStyle, uint8_t digits) {
// print number to hex // print number to hex
for (uint_fast8_t i = 0; i < digits; i++) { for (uint_fast8_t i = 0; i < digits; i++) {
uint16_t value = (x >> (4 * (7 - i))) & 0b1111; uint16_t value = (x >> (4 * (7 - i))) & 0b1111;
drawChar(value + 2, fontStyle); drawChar(value + 2, fontStyle, 0);
} }
} }
@@ -635,7 +635,7 @@ void OLED::debugNumber(int32_t val, FontStyle fontStyle) {
void OLED::drawSymbol(uint8_t symbolID) { void OLED::drawSymbol(uint8_t symbolID) {
// draw a symbol to the current cursor location // draw a symbol to the current cursor location
drawChar(symbolID, FontStyle::EXTRAS); drawChar(symbolID, FontStyle::EXTRAS, 0);
} }
// Draw an area, but y must be aligned on 0/8 offset // Draw an area, but y must be aligned on 0/8 offset

View File

@@ -78,10 +78,7 @@ enum class FontStyle {
class OLED { class OLED {
public: public:
enum DisplayState : bool { enum DisplayState : bool { OFF = false, ON = true };
OFF = false,
ON = true
};
static void initialize(); // Startup the I2C coms (brings screen out of reset etc) static void initialize(); // Startup the I2C coms (brings screen out of reset etc)
static bool isInitDone(); static bool isInitDone();
@@ -120,7 +117,7 @@ public:
static void setInverseDisplay(bool inverted); static void setInverseDisplay(bool inverted);
static int16_t getCursorX() { return cursor_x; } static int16_t getCursorX() { return cursor_x; }
// Draw a string to the current location, with selected font; optionally - with MAX length only // Draw a string to the current location, with selected font; optionally - with MAX length only
static void print(const char *string, FontStyle fontStyle, uint8_t length = 255); static void print(const char *string, FontStyle fontStyle, uint8_t length = 255, const uint8_t soft_x_limit = 0);
static void printWholeScreen(const char *string); static void printWholeScreen(const char *string);
// Print *F or *C - in font style of Small, Large (by default) or Extra based on input arg // Print *F or *C - in font style of Small, Large (by default) or Extra based on input arg
static void printSymbolDeg(FontStyle fontStyle = FontStyle::LARGE); static void printSymbolDeg(FontStyle fontStyle = FontStyle::LARGE);
@@ -166,7 +163,7 @@ private:
displayChecksum = hash; displayChecksum = hash;
return result; return result;
} }
static void drawChar(uint16_t charCode, FontStyle fontStyle); // Draw a character to the current cursor location static void drawChar(uint16_t charCode, FontStyle fontStyle, const uint8_t soft_x_limit); // Draw a character to the current cursor location
static void setFramebuffer(uint8_t *buffer); static void setFramebuffer(uint8_t *buffer);
static uint8_t *stripPointers[4]; // Pointers to the strips to allow for buffer having extra content static uint8_t *stripPointers[4]; // Pointers to the strips to allow for buffer having extra content
static bool inLeftHandedMode; // Whether the screen is in left or not (used for offsets in GRAM) static bool inLeftHandedMode; // Whether the screen is in left or not (used for offsets in GRAM)

View File

@@ -135,7 +135,10 @@ bool parseCapabilitiesArray(const uint8_t numCaps, uint8_t *bestIndex, uint16_t
*bestVoltage = 5000; // Default 5V *bestVoltage = 5000; // Default 5V
// Fudge of 0.5 ohms to round up a little to account for us always having off periods in PWM // Fudge of 0.5 ohms to round up a little to account for us always having off periods in PWM
uint8_t tipResistance = getTipResistanceX10() + 5; uint8_t tipResistance = getTipResistanceX10();
if (getSettingValue(SettingsOptions::USBPDMode) == 1) {
tipResistance += 5;
}
#ifdef MODEL_HAS_DCDC #ifdef MODEL_HAS_DCDC
// If this device has step down DC/DC inductor to smooth out current spikes // If this device has step down DC/DC inductor to smooth out current spikes
// We can instead ignore resistance and go for max voltage we can accept; and rely on the DC/DC regulation to keep under current limit // We can instead ignore resistance and go for max voltage we can accept; and rely on the DC/DC regulation to keep under current limit
@@ -167,7 +170,7 @@ bool parseCapabilitiesArray(const uint8_t numCaps, uint8_t *bestIndex, uint16_t
} }
} }
} }
} else if ((lastCapabilities[i] & PD_PDO_TYPE) == PD_PDO_TYPE_AUGMENTED && getSettingValue(SettingsOptions::PDVpdo)) { } else if ((lastCapabilities[i] & PD_PDO_TYPE) == PD_PDO_TYPE_AUGMENTED && getSettingValue(SettingsOptions::USBPDMode)) {
bool sourceIsEPRCapable = lastCapabilities[0] & PD_PDO_SRC_FIXED_EPR_CAPABLE; bool sourceIsEPRCapable = lastCapabilities[0] & PD_PDO_SRC_FIXED_EPR_CAPABLE;
bool isPPS = false; bool isPPS = false;
bool isAVS = false; bool isAVS = false;

View File

@@ -22,7 +22,10 @@ int32_t Utils::InterpolateLookupTable(const int32_t *lookupTable, const int noIt
int32_t Utils::LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x) { return y1 + (((((x - x1) * 1000) / (x2 - x1)) * (y2 - y1))) / 1000; } int32_t Utils::LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x) { return y1 + (((((x - x1) * 1000) / (x2 - x1)) * (y2 - y1))) / 1000; }
uint16_t Utils::RequiredCurrentForTipAtVoltage(uint16_t voltageX10) { uint16_t Utils::RequiredCurrentForTipAtVoltage(uint16_t voltageX10) {
uint8_t tipResistancex10 = getTipResistanceX10() + 5; uint8_t tipResistancex10 = getTipResistanceX10();
if (getSettingValue(SettingsOptions::USBPDMode) == 1) {
tipResistancex10 += 5;
}
#ifdef MODEL_HAS_DCDC #ifdef MODEL_HAS_DCDC
// If this device has step down DC/DC inductor to smooth out current spikes // If this device has step down DC/DC inductor to smooth out current spikes
// We can instead ignore resistance and go for max voltage we can accept; and rely on the DC/DC regulation to keep under current limit // We can instead ignore resistance and go for max voltage we can accept; and rely on the DC/DC regulation to keep under current limit

View File

@@ -52,7 +52,7 @@ enum SettingsOptions {
LOGOTime = 35, // Duration the logo will be displayed for LOGOTime = 35, // Duration the logo will be displayed for
CalibrateCJC = 36, // Toggle calibrate CJC at next boot CalibrateCJC = 36, // Toggle calibrate CJC at next boot
BluetoothLE = 37, // Toggle BLE if present BluetoothLE = 37, // Toggle BLE if present
PDVpdo = 38, // Toggle PPS & EPR USBPDMode = 38, // Toggle PPS & EPR
ProfilePhases = 39, // Number of profile mode phases ProfilePhases = 39, // Number of profile mode phases
ProfilePreheatTemp = 40, // Temperature to preheat to before the first phase ProfilePreheatTemp = 40, // Temperature to preheat to before the first phase
ProfilePreheatSpeed = 41, // Maximum allowed preheat speed in degrees per second ProfilePreheatSpeed = 41, // Maximum allowed preheat speed in degrees per second

View File

@@ -59,7 +59,7 @@ enum class SettingsItemIndex : uint8_t {
MinVolCell, MinVolCell,
QCMaxVoltage, QCMaxVoltage,
PDNegTimeout, PDNegTimeout,
PDVpdo, USBPDMode,
BoostTemperature, BoostTemperature,
AutoStart, AutoStart,
TempChangeShortStep, TempChangeShortStep,
@@ -145,6 +145,9 @@ struct TranslationIndexTable {
uint16_t SettingStartSleepOffChar; uint16_t SettingStartSleepOffChar;
uint16_t SettingLockBoostChar; uint16_t SettingLockBoostChar;
uint16_t SettingLockFullChar; uint16_t SettingLockFullChar;
uint16_t USBPDModeDefault;
uint16_t USBPDModeNoDynamic;
uint16_t USBPDModeSafe;
uint16_t SettingsDescriptions[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)]; uint16_t SettingsDescriptions[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)];
uint16_t SettingsShortNames[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)]; uint16_t SettingsShortNames[static_cast<uint32_t>(SettingsItemIndex::NUM_ITEMS)];

View File

@@ -89,7 +89,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
{ 0, 6, 1, 1}, // LOGOTime { 0, 6, 1, 1}, // LOGOTime
{ 0, 1, 1, 0}, // CalibrateCJC { 0, 1, 1, 0}, // CalibrateCJC
{ 0, 1, 1, 0}, // BluetoothLE { 0, 1, 1, 0}, // BluetoothLE
{ 0, 1, 1, 1}, // PDVpdo { 0, 2, 1, 1}, // USBPDMode
{ 1, 5, 1, 4}, // ProfilePhases { 1, 5, 1, 4}, // ProfilePhases
{ MIN_TEMP_C, MAX_TEMP_F, 5, 90}, // ProfilePreheatTemp { MIN_TEMP_C, MAX_TEMP_F, 5, 90}, // ProfilePreheatTemp
{ 1, 10, 1, 1}, // ProfilePreheatSpeed { 1, 10, 1, 1}, // ProfilePreheatSpeed

View File

@@ -26,7 +26,7 @@ static void displayQCInputV(void);
#ifdef POW_PD #ifdef POW_PD
static void displayPDNegTimeout(void); static void displayPDNegTimeout(void);
static void displayPDVpdo(void); static void displayUSBPDMode(void);
#endif /* POW_PD */ #endif /* POW_PD */
static void displaySensitivity(void); static void displaySensitivity(void);
@@ -131,7 +131,7 @@ static void displayAdvancedMenu(void);
* -Minimum Voltage * -Minimum Voltage
* QC Voltage * QC Voltage
* PD Timeout * PD Timeout
* PDVpdo * USBPDMode
* *
* Soldering * Soldering
* Boost Mode Temp * Boost Mode Temp
@@ -232,7 +232,7 @@ const menuitem powerMenu[] = {
* -Minimum Voltage * -Minimum Voltage
* QC Voltage * QC Voltage
* PD Timeout * PD Timeout
* PDVpdo * USBPDMode
*/ */
#ifdef POW_DC #ifdef POW_DC
/* Voltage input */ /* Voltage input */
@@ -248,7 +248,7 @@ const menuitem powerMenu[] = {
/* PD timeout setup */ /* PD timeout setup */
{SETTINGS_DESC(SettingsItemIndex::PDNegTimeout), nullptr, displayPDNegTimeout, nullptr, SettingsOptions::PDNegTimeout, SettingsItemIndex::PDNegTimeout, 6}, {SETTINGS_DESC(SettingsItemIndex::PDNegTimeout), nullptr, displayPDNegTimeout, nullptr, SettingsOptions::PDNegTimeout, SettingsItemIndex::PDNegTimeout, 6},
/* Toggle PPS & EPR */ /* Toggle PPS & EPR */
{SETTINGS_DESC(SettingsItemIndex::PDVpdo), nullptr, displayPDVpdo, nullptr, SettingsOptions::PDVpdo, SettingsItemIndex::PDVpdo, 7}, {SETTINGS_DESC(SettingsItemIndex::USBPDMode), nullptr, displayUSBPDMode, nullptr, SettingsOptions::USBPDMode, SettingsItemIndex::USBPDMode, 4},
#endif #endif
/* vvvv end of menu marker. DO NOT REMOVE vvvv */ /* vvvv end of menu marker. DO NOT REMOVE vvvv */
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0} {0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0}
@@ -529,7 +529,26 @@ static void displayPDNegTimeout(void) {
} }
} }
static void displayPDVpdo(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::PDVpdo)); } static void displayUSBPDMode(void) {
/*
* PD Mode
* 0 = Safe mode, no PPS, no EPR
* 1 = Default mode, tolerant + PPS + EPR
* 2 = Strict mode + PPS + EPR
*/
switch (getSettingValue(SettingsOptions::USBPDMode)) {
case 1:
OLED::print(translatedString(Tr->USBPDModeDefault), FontStyle::SMALL, 255, OLED::getCursorX());
break;
case 2:
OLED::print(translatedString(Tr->USBPDModeSafe), FontStyle::SMALL, 255, OLED::getCursorX());
break;
default:
OLED::print(translatedString(Tr->USBPDModeNoDynamic), FontStyle::SMALL, 255, OLED::getCursorX());
break;
}
}
#endif /* POW_PD */ #endif /* POW_PD */

View File

@@ -256,7 +256,7 @@ if __name__ == "__main__":
sys.exit(1) sys.exit(1)
for hexf in options.hexfiles: for hexf in options.hexfiles:
ih = IntelHex(hexf) ih = IntelHex(hexf)
for (address, end) in ih.segments(): for address, end in ih.segments():
try: try:
address = address & 0xFFFFFFFF address = address & 0xFFFFFFFF
except ValueError: except ValueError:

View File

@@ -12,8 +12,12 @@ import sys
if len(sys.argv) < 2 or len(sys.argv) > 3: if len(sys.argv) < 2 or len(sys.argv) > 3:
print("Usage: metadata.py OUTPUT_FILE [model]") print("Usage: metadata.py OUTPUT_FILE [model]")
print(" OUTPUT_FILE - the name of output file in json format with meta info about binary files") print(
print(" model [optional] - name of the model (as for `make model=NAME`) to scan files for explicitly (all files in source/Hexfile by default otherwise)") " OUTPUT_FILE - the name of output file in json format with meta info about binary files"
)
print(
" model [optional] - name of the model (as for `make model=NAME`) to scan files for explicitly (all files in source/Hexfile by default otherwise)"
)
exit(1) exit(1)
# If model is provided explicitly to scan related files only for json output, then process the argument # If model is provided explicitly to scan related files only for json output, then process the argument
@@ -30,16 +34,19 @@ HexFileFolder = os.path.join(HERE, "Hexfile")
OutputJSONPath = os.path.join(HexFileFolder, sys.argv[1]) OutputJSONPath = os.path.join(HexFileFolder, sys.argv[1])
TranslationsFilesPath = os.path.join(HERE.parent, "Translations") TranslationsFilesPath = os.path.join(HERE.parent, "Translations")
def load_json(filename: str): def load_json(filename: str):
with open(filename) as f: with open(filename) as f:
return json.loads(f.read()) return json.loads(f.read())
def read_git_tag(): def read_git_tag():
if os.environ.get("GITHUB_CI_PR_SHA", "") != "": if os.environ.get("GITHUB_CI_PR_SHA", "") != "":
return os.environ["GITHUB_CI_PR_SHA"][:7].upper() return os.environ["GITHUB_CI_PR_SHA"][:7].upper()
else: else:
return f"{subprocess.check_output(['git', 'rev-parse', '--short=7', 'HEAD']).strip().decode('ascii').upper()}" return f"{subprocess.check_output(['git', 'rev-parse', '--short=7', 'HEAD']).strip().decode('ascii').upper()}"
def read_version(): def read_version():
with open(HERE / "version.h") as version_file: with open(HERE / "version.h") as version_file:
for line in version_file: for line in version_file:
@@ -49,9 +56,18 @@ def read_version():
return matches[0] return matches[0]
raise Exception("Could not parse version") raise Exception("Could not parse version")
# Fetch our file listings # Fetch our file listings
translation_files = [os.path.join(TranslationsFilesPath, f) for f in os.listdir(TranslationsFilesPath) if os.path.isfile(os.path.join(TranslationsFilesPath, f)) and f.endswith(".json")] translation_files = [
output_files = [os.path.join(HexFileFolder, f) for f in sorted(os.listdir(HexFileFolder)) if os.path.isfile(os.path.join(HexFileFolder, f))] os.path.join(TranslationsFilesPath, f)
for f in os.listdir(TranslationsFilesPath)
if os.path.isfile(os.path.join(TranslationsFilesPath, f)) and f.endswith(".json")
]
output_files = [
os.path.join(HexFileFolder, f)
for f in sorted(os.listdir(HexFileFolder))
if os.path.isfile(os.path.join(HexFileFolder, f))
]
parsed_languages = {} parsed_languages = {}
for path in translation_files: for path in translation_files:
@@ -74,7 +90,9 @@ for file_path in output_files:
if not name.startswith(ModelName + "_"): if not name.startswith(ModelName + "_"):
continue continue
# If build of interest is not multi-lang one but scanning one is not MODEL_LANG-ID here, then skip it to avoid mess in json between MODEL_LANG-ID & MODEL_multi' # If build of interest is not multi-lang one but scanning one is not MODEL_LANG-ID here, then skip it to avoid mess in json between MODEL_LANG-ID & MODEL_multi'
if not ModelName.endswith("_multi") and not re.match(r"^" + ModelName + "_" + "([A-Z]+).*$", name): if not ModelName.endswith("_multi") and not re.match(
r"^" + ModelName + "_" + "([A-Z]+).*$", name
):
continue continue
matches = re.findall(r"^([a-zA-Z0-9]+)_(.+)\.(.+)$", name) matches = re.findall(r"^([a-zA-Z0-9]+)_(.+)\.(.+)$", name)
if matches: if matches:
@@ -86,10 +104,17 @@ for file_path in output_files:
lang_file = parsed_languages.get(lang_code, None) lang_file = parsed_languages.get(lang_code, None)
if lang_file is None and lang_code.startswith("multi_"): if lang_file is None and lang_code.startswith("multi_"):
# Multi files wont match, but we fake this by just taking the filename to it # Multi files wont match, but we fake this by just taking the filename to it
lang_file = {"languageLocalName": lang_code.replace("multi_", "").replace("compressed_", "")} lang_file = {
"languageLocalName": lang_code.replace("multi_", "").replace(
"compressed_", ""
)
}
if lang_file is None: if lang_file is None:
raise Exception(f"Could not match language code {lang_code}") raise Exception(f"Could not match language code {lang_code}")
file_record = {"language_code": lang_code, "language_name": lang_file.get("languageLocalName", None)} file_record = {
"language_code": lang_code,
"language_name": lang_file.get("languageLocalName", None),
}
output_json["contents"][name] = file_record output_json["contents"][name] = file_record
else: else:
print(f"failed to parse {matches}") print(f"failed to parse {matches}")