aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2023-07-28 20:04:16 +1000
committerGitHub <[email protected]>2023-07-28 20:04:16 +1000
commit6d18e860f8e32f17b0a6dc0d7b6cc757a4dc2d7d (patch)
treef0c1ab9eb32d37ee488fe05c64f0833be54bfe33
parent344068d480f47e2bcbb0e07388e6ff074d90fa23 (diff)
parent55d36c98f1bb1de2c0cdce9008f5c2de9e2630ef (diff)
downloadIronOS-6d18e860f8e32f17b0a6dc0d7b6cc757a4dc2d7d.tar.gz
IronOS-6d18e860f8e32f17b0a6dc0d7b6cc757a4dc2d7d.zip
Merge branch 'dev' into Short-Detection
-rw-r--r--.github/workflows/push.yml25
-rw-r--r--Makefile8
-rw-r--r--Translations/translation_BE.json2
-rw-r--r--Translations/translation_BG.json2
-rw-r--r--Translations/translation_CS.json2
-rw-r--r--Translations/translation_DA.json2
-rw-r--r--Translations/translation_DE.json2
-rw-r--r--Translations/translation_EL.json2
-rw-r--r--Translations/translation_EN.json2
-rw-r--r--Translations/translation_ES.json2
-rw-r--r--Translations/translation_FI.json2
-rw-r--r--Translations/translation_FR.json2
-rw-r--r--Translations/translation_HR.json2
-rw-r--r--Translations/translation_HU.json2
-rw-r--r--Translations/translation_IT.json2
-rwxr-xr-xTranslations/translation_JA_JP.json2
-rw-r--r--Translations/translation_LT.json2
-rw-r--r--Translations/translation_NB.json2
-rw-r--r--Translations/translation_NL.json2
-rw-r--r--Translations/translation_NL_BE.json2
-rw-r--r--Translations/translation_PL.json2
-rw-r--r--Translations/translation_PT.json2
-rw-r--r--Translations/translation_RO.json2
-rw-r--r--Translations/translation_RU.json2
-rw-r--r--Translations/translation_SK.json2
-rw-r--r--Translations/translation_SL.json2
-rw-r--r--Translations/translation_SR_CYRL.json2
-rw-r--r--Translations/translation_SR_LATN.json2
-rw-r--r--Translations/translation_SV.json2
-rw-r--r--Translations/translation_TR.json2
-rw-r--r--Translations/translation_UK.json2
-rw-r--r--Translations/translation_VI.json2
-rw-r--r--Translations/translation_YUE_HK.json2
-rw-r--r--Translations/translation_ZH_CN.json2
-rw-r--r--Translations/translation_ZH_TW.json2
-rw-r--r--Translations/translations_definitions.json7
-rw-r--r--source/Core/BSP/Sequre_S60/BSP.cpp2
-rw-r--r--source/Core/Drivers/HUB238.cpp2
-rw-r--r--source/Core/Drivers/OLED.cpp70
-rw-r--r--source/Core/Drivers/TipThermoModel.cpp8
-rw-r--r--source/Core/Drivers/USBPD.cpp17
-rw-r--r--source/Core/Inc/Translation.h2
-rw-r--r--source/Core/Src/Settings.cpp3
-rw-r--r--source/Core/Src/settingsGUI.cpp12
-rw-r--r--source/Core/Threads/OperatingModes/CJC.cpp2
-rw-r--r--source/Makefile26
46 files changed, 131 insertions, 119 deletions
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index 639ecc9c..f8145858 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -30,9 +30,7 @@ jobs:
run: cd source && ./build.sh -m ${{ matrix.model }}
- name: Copy license files
- run: |
- cp LICENSE source/Hexfile/LICENSE
- cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
+ run: cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -47,7 +45,7 @@ jobs:
if-no-files-found: error
- name: Generate json index file
- run: cd source && python3 metadata.py ${{ matrix.model }}.json
+ run: ./source/metadata.py ${{ matrix.model }}.json
- name: Archive ${{ matrix.model }} index file
uses: actions/upload-artifact@v3
@@ -79,12 +77,10 @@ jobs:
run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Build ${{ matrix.model }}
- run: cd source && make -j$(nproc) model="${{ matrix.model }}" firmware-multi_compressed_European firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian firmware-multi_Chinese+Japanese
+ run: make -j$(nproc) model="${{ matrix.model }}" firmware-multi_compressed_European firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian firmware-multi_Chinese+Japanese
- name: Copy license files
- run: |
- cp LICENSE source/Hexfile/LICENSE
- cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
+ run: cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -99,7 +95,7 @@ jobs:
if-no-files-found: error
- name: Generate json index file
- run: cd source && python3 metadata.py ${{ matrix.model }}_multi-lang.json
+ run: ./source/metadata.py ${{ matrix.model }}_multi-lang.json
- name: Archive ${{ matrix.model }} index file
uses: actions/upload-artifact@v3
@@ -125,15 +121,10 @@ jobs:
run: python3 -m pip install bdflib
- name: Run python tests
- run: cd Translations && chmod +x make_translation_test.py && ./make_translation_test.py
+ run: ./Translations/make_translation_test.py
- name: Run BriefLZ tests
- run: |
- cd source
- make Objects/host/brieflz/libbrieflz.so
- cd ../Translations
- chmod +x brieflz_test.py
- ./brieflz_test.py
+ run: make -C source/ Objects/host/brieflz/libbrieflz.so && ./Translations/brieflz_test.py
check_c-cpp:
@@ -150,7 +141,7 @@ jobs:
submodules: true
- name: Check format style with clang-format
- run: cd source && make clean && make check-style
+ run: make clean check-style
check_python:
diff --git a/Makefile b/Makefile
index d7a4a0c5..3f9f7498 100644
--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,7 @@ test-py:
@echo ""
flake8 Translations
black --check Translations
- @make -C source/ Objects/host/brieflz/libbrieflz.so
+ @$(MAKE) -C source/ Objects/host/brieflz/libbrieflz.so
./Translations/brieflz_test.py
./Translations/make_translation_test.py
@@ -149,7 +149,7 @@ test-ccpp:
@echo ""
@echo "---- Checking C/C++ code... ----"
@echo ""
- make -C source/ clean check-style
+ $(MAKE) -C source/ clean check-style
# meta target for tests & checks based on .github/workflows/push
tests: test-md test-sh test-py test-ccpp
@@ -159,11 +159,11 @@ tests: test-md test-sh test-py test-ccpp
# pass-through target for Makefile inside source/ dir
%:
- make -C source/ $@
+ $(MAKE) -C source/ $@
# global clean-up target for produced/generated files inside tree
clean-build:
- make -C source/ clean-all
+ $(MAKE) -C source/ clean-all
rm -Rf site
rm -Rf scripts/ci/artefacts
diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json
index 6c388d18..30039009 100644
--- a/Translations/translation_BE.json
+++ b/Translations/translation_BE.json
@@ -3,7 +3,7 @@
"languageLocalName": "Беларуская",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Каліброўка\nзроблена!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_BG.json b/Translations/translation_BG.json
index 20b1c936..cbe2ca5f 100644
--- a/Translations/translation_BG.json
+++ b/Translations/translation_BG.json
@@ -3,7 +3,7 @@
"languageLocalName": "Български",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json
index 47293390..8ff55753 100644
--- a/Translations/translation_CS.json
+++ b/Translations/translation_CS.json
@@ -3,7 +3,7 @@
"languageLocalName": "Český",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibrace\ndokončena!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json
index 37ba8a3b..2e0971c0 100644
--- a/Translations/translation_DA.json
+++ b/Translations/translation_DA.json
@@ -3,7 +3,7 @@
"languageLocalName": "Dansk",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json
index efe8b370..2efa2bc1 100644
--- a/Translations/translation_DE.json
+++ b/Translations/translation_DE.json
@@ -3,7 +3,7 @@
"languageLocalName": "Deutsch",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Erfolgreich\nkalibriert!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json
index 58afba38..75ca856f 100644
--- a/Translations/translation_EL.json
+++ b/Translations/translation_EL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Greek",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Βαθμονόμηση\nολοκληρώθηκε!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json
index 3ea0a418..2ed38eaa 100644
--- a/Translations/translation_EN.json
+++ b/Translations/translation_EN.json
@@ -3,7 +3,7 @@
"languageLocalName": "English",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json
index c1b8d264..34c4125d 100644
--- a/Translations/translation_ES.json
+++ b/Translations/translation_ES.json
@@ -3,7 +3,7 @@
"languageLocalName": "Castellano",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "¡Calibracion\nlista!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json
index c0bd61d0..9c89a855 100644
--- a/Translations/translation_FI.json
+++ b/Translations/translation_FI.json
@@ -3,7 +3,7 @@
"languageLocalName": "Suomi",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_FR.json b/Translations/translation_FR.json
index c0d661b0..56bae302 100644
--- a/Translations/translation_FR.json
+++ b/Translations/translation_FR.json
@@ -3,7 +3,7 @@
"languageLocalName": "Français",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Étalonnage\nterminé!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json
index 0edc2ea1..a25f0e2e 100644
--- a/Translations/translation_HR.json
+++ b/Translations/translation_HR.json
@@ -3,7 +3,7 @@
"languageLocalName": "Hrvatski",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibracija\ndovršena!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json
index d8932804..b218dd04 100644
--- a/Translations/translation_HU.json
+++ b/Translations/translation_HU.json
@@ -3,7 +3,7 @@
"languageLocalName": "Magyar",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibráció\nkész!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json
index 89d0f44b..265ae445 100644
--- a/Translations/translation_IT.json
+++ b/Translations/translation_IT.json
@@ -3,7 +3,7 @@
"languageLocalName": "Italiano",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibrazione\ncompletata!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json
index 597c418f..5d669bb4 100755
--- a/Translations/translation_JA_JP.json
+++ b/Translations/translation_JA_JP.json
@@ -3,7 +3,7 @@
"languageLocalName": "日本語",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json
index 30956603..cbdb8f27 100644
--- a/Translations/translation_LT.json
+++ b/Translations/translation_LT.json
@@ -3,7 +3,7 @@
"languageLocalName": "Lietuvių",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json
index fba74726..b18fc0a1 100644
--- a/Translations/translation_NB.json
+++ b/Translations/translation_NB.json
@@ -3,7 +3,7 @@
"languageLocalName": "Norsk bokmål",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json
index a8c279fe..06e9075f 100644
--- a/Translations/translation_NL.json
+++ b/Translations/translation_NL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Nederlands",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json
index b8858a7f..6a684fce 100644
--- a/Translations/translation_NL_BE.json
+++ b/Translations/translation_NL_BE.json
@@ -3,7 +3,7 @@
"languageLocalName": "Vlaams",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json
index 534ac2e3..c4237c10 100644
--- a/Translations/translation_PL.json
+++ b/Translations/translation_PL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Polski",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Kalibracja\nwykonana!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json
index 84f0396b..65a85a47 100644
--- a/Translations/translation_PT.json
+++ b/Translations/translation_PT.json
@@ -3,7 +3,7 @@
"languageLocalName": "Português",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibração\nefetuada!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json
index 772c4264..0d03d0bc 100644
--- a/Translations/translation_RO.json
+++ b/Translations/translation_RO.json
@@ -3,7 +3,7 @@
"languageLocalName": "Română",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json
index 1b44a3f2..fec46722 100644
--- a/Translations/translation_RU.json
+++ b/Translations/translation_RU.json
@@ -3,7 +3,7 @@
"languageLocalName": "Русский",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Калибровка\nзавершена!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json
index 19115ed1..db16ff63 100644
--- a/Translations/translation_SK.json
+++ b/Translations/translation_SK.json
@@ -3,7 +3,7 @@
"languageLocalName": "Slovenčina",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json
index 6e8ceac6..2537823b 100644
--- a/Translations/translation_SL.json
+++ b/Translations/translation_SL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Slovenščina",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json
index 543d0378..e4fc5c83 100644
--- a/Translations/translation_SR_CYRL.json
+++ b/Translations/translation_SR_CYRL.json
@@ -3,7 +3,7 @@
"languageLocalName": "Српски",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json
index 5447bbe9..f17a35f4 100644
--- a/Translations/translation_SR_LATN.json
+++ b/Translations/translation_SR_LATN.json
@@ -3,7 +3,7 @@
"languageLocalName": "Srpski",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json
index 3380709e..b60c542f 100644
--- a/Translations/translation_SV.json
+++ b/Translations/translation_SV.json
@@ -3,7 +3,7 @@
"languageLocalName": "Svenska",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json
index 8a405572..34278c14 100644
--- a/Translations/translation_TR.json
+++ b/Translations/translation_TR.json
@@ -3,7 +3,7 @@
"languageLocalName": "Türkçe",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json
index a3be4b29..84209222 100644
--- a/Translations/translation_UK.json
+++ b/Translations/translation_UK.json
@@ -3,7 +3,7 @@
"languageLocalName": "Українська",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "КХС\nвідкалібровано!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json
index 477a6d67..514c391a 100644
--- a/Translations/translation_VI.json
+++ b/Translations/translation_VI.json
@@ -3,7 +3,7 @@
"languageLocalName": "Tieng Viet",
"tempUnitFahrenheit": false,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json
index f28e7f26..3e84fad4 100644
--- a/Translations/translation_YUE_HK.json
+++ b/Translations/translation_YUE_HK.json
@@ -3,7 +3,7 @@
"languageLocalName": "廣東話 (香港)",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json
index 5f74ea31..b8213732 100644
--- a/Translations/translation_ZH_CN.json
+++ b/Translations/translation_ZH_CN.json
@@ -3,7 +3,7 @@
"languageLocalName": "简体中文",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json
index 49e9da55..0fbca683 100644
--- a/Translations/translation_ZH_TW.json
+++ b/Translations/translation_ZH_TW.json
@@ -3,7 +3,7 @@
"languageLocalName": "正體中文",
"tempUnitFahrenheit": true,
"messagesWarn": {
- "CJCCalibrationDone": {
+ "CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json
index 4d2051d3..6fa8cb9e 100644
--- a/Translations/translations_definitions.json
+++ b/Translations/translations_definitions.json
@@ -1,8 +1,7 @@
{
- "messagesWarn": [
- {
- "id": "CJCCalibrationDone",
- "description": "Confirmation message indicating CJC calibration is complete."
+ "messagesWarn": [{
+ "id": "CalibrationDone",
+ "description": "Confirmation message indicating calibration is complete."
},
{
"id": "ResetOKMessage",
diff --git a/source/Core/BSP/Sequre_S60/BSP.cpp b/source/Core/BSP/Sequre_S60/BSP.cpp
index 7fe84f00..14e9764b 100644
--- a/source/Core/BSP/Sequre_S60/BSP.cpp
+++ b/source/Core/BSP/Sequre_S60/BSP.cpp
@@ -208,7 +208,7 @@ bool isTipDisconnected() {
void setStatusLED(const enum StatusLED state) {}
uint8_t preStartChecks() {
- if (!hub238_has_run_selection()) {
+ if (!hub238_has_run_selection() && (xTaskGetTickCount() < TICKS_SECOND * 5)) {
return 0;
}
// We check if we are in a "Limited" mode; where we have to run the PWM really fast
diff --git a/source/Core/Drivers/HUB238.cpp b/source/Core/Drivers/HUB238.cpp
index 3a88c185..6d2940b0 100644
--- a/source/Core/Drivers/HUB238.cpp
+++ b/source/Core/Drivers/HUB238.cpp
@@ -215,6 +215,6 @@ uint8_t hub238_source_currentX100() {
temp &= 0b1111;
return pdo_slot_to_currentx100(temp);
}
- return 10;//Failsafe to 0.1 amp
+ return 10; // Failsafe to 0.1 amp
}
#endif
diff --git a/source/Core/Drivers/OLED.cpp b/source/Core/Drivers/OLED.cpp
index c6e7ce67..27f103fc 100644
--- a/source/Core/Drivers/OLED.cpp
+++ b/source/Core/Drivers/OLED.cpp
@@ -33,19 +33,19 @@ uint32_t OLED::displayChecksum;
*/
I2C_CLASS::I2C_REG OLED_Setup_Array[] = {
/**/
- {0x80, OLED_OFF, 0}, /* Display off */
- {0x80, OLED_DIVIDER, 0}, /* Set display clock divide ratio / osc freq */
- {0x80, 0x52, 0}, /* Divide ratios */
- {0x80, 0xA8, 0}, /* Set Multiplex Ratio */
- {0x80, OLED_HEIGHT - 1, 0}, /* Multiplex ratio adjusts how far down the matrix it scans */
- {0x80, 0xC0, 0}, /* Set COM Scan direction */
- {0x80, 0xD3, 0}, /* Set vertical Display offset */
- {0x80, 0x00, 0}, /* 0 Offset */
- {0x80, 0x40, 0}, /* Set Display start line to 0 */
+ {0x80, OLED_OFF, 0}, /* Display off */
+ {0x80, OLED_DIVIDER, 0}, /* Set display clock divide ratio / osc freq */
+ {0x80, 0x52, 0}, /* Divide ratios */
+ {0x80, 0xA8, 0}, /* Set Multiplex Ratio */
+ {0x80, OLED_HEIGHT - 1, 0}, /* Multiplex ratio adjusts how far down the matrix it scans */
+ {0x80, 0xC0, 0}, /* Set COM Scan direction */
+ {0x80, 0xD3, 0}, /* Set vertical Display offset */
+ {0x80, 0x00, 0}, /* 0 Offset */
+ {0x80, 0x40, 0}, /* Set Display start line to 0 */
#ifdef OLED_SEGMENT_MAP_REVERSED
- {0x80, 0xA1, 0}, /* Set Segment remap to normal */
+ {0x80, 0xA1, 0}, /* Set Segment remap to normal */
#else
- {0x80, 0xA0, 0}, /* Set Segment remap to normal */
+ {0x80, 0xA0, 0}, /* Set Segment remap to normal */
#endif
{0x80, 0x8D, 0}, /* Charge Pump */
{0x80, 0x14, 0}, /* Charge Pump settings */
@@ -547,8 +547,9 @@ void OLED::printNumber(uint16_t number, uint8_t places, FontStyle fontStyle, boo
}
buffer[0] = 2 + number % 10;
- if (noLeaderZeros)
+ if (noLeaderZeros) {
stripLeaderZeros(buffer, places);
+ }
print(buffer, fontStyle);
}
@@ -574,10 +575,12 @@ void OLED::drawSymbol(uint8_t symbolID) {
// Draw an area, but y must be aligned on 0/8 offset
void OLED::drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t *ptr) {
// Splat this from x->x+wide in two strides
- if (x <= -wide)
+ if (x <= -wide) {
return; // cutoffleft
- if (x > 96)
+ }
+ if (x > 96) {
return; // cutoff right
+ }
uint8_t visibleStart = 0;
uint8_t visibleEnd = wide;
@@ -609,10 +612,12 @@ void OLED::drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uin
// For data which has octets swapped in a 16-bit word.
void OLED::drawAreaSwapped(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t *ptr) {
// Splat this from x->x+wide in two strides
- if (x <= -wide)
+ if (x <= -wide) {
return; // cutoffleft
- if (x > 96)
+ }
+ if (x > 96) {
return; // cutoff right
+ }
uint8_t visibleStart = 0;
uint8_t visibleEnd = wide;
@@ -643,10 +648,12 @@ void OLED::drawAreaSwapped(int16_t x, int8_t y, uint8_t wide, uint8_t height, co
void OLED::fillArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t value) {
// Splat this from x->x+wide in two strides
- if (x <= -wide)
+ if (x <= -wide) {
return; // cutoffleft
- if (x > 96)
+ }
+ if (x > 96) {
return; // cutoff right
+ }
uint8_t visibleStart = 0;
uint8_t visibleEnd = wide;
@@ -682,30 +689,37 @@ void OLED::drawFilledRect(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, bool c
uint8_t mask = 0xFF;
if (y0) {
mask = mask << (y0 % 8);
- for (uint8_t col = x0; col < x1; col++)
- if (clear)
+ for (uint8_t col = x0; col < x1; col++) {
+ if (clear) {
stripPointers[0][(y0 / 8) * 96 + col] &= ~mask;
- else
+ } else {
stripPointers[0][(y0 / 8) * 96 + col] |= mask;
+ }
+ }
}
// Next loop down the line the total number of solids
- if (y0 / 8 != y1 / 8)
- for (uint8_t col = x0; col < x1; col++)
+ if (y0 / 8 != y1 / 8) {
+ for (uint8_t col = x0; col < x1; col++) {
for (uint8_t r = (y0 / 8); r < (y1 / 8); r++) {
// This gives us the row index r
- if (clear)
+ if (clear) {
stripPointers[0][(r * 96) + col] = 0;
- else
+ } else {
stripPointers[0][(r * 96) + col] = 0xFF;
+ }
}
+ }
+ }
// Finally draw the tail
mask = ~(mask << (y1 % 8));
- for (uint8_t col = x0; col < x1; col++)
- if (clear)
+ for (uint8_t col = x0; col < x1; col++) {
+ if (clear) {
stripPointers[0][(y1 / 8) * 96 + col] &= ~mask;
- else
+ } else {
stripPointers[0][(y1 / 8) * 96 + col] |= mask;
+ }
+ }
}
void OLED::drawHeatSymbol(uint8_t state) {
diff --git a/source/Core/Drivers/TipThermoModel.cpp b/source/Core/Drivers/TipThermoModel.cpp
index c71f2332..ea6a0c74 100644
--- a/source/Core/Drivers/TipThermoModel.cpp
+++ b/source/Core/Drivers/TipThermoModel.cpp
@@ -44,10 +44,11 @@ uint32_t TipThermoModel::convertTipRawADCTouV(uint16_t rawADC, bool ski
if (getSettingValue(SettingsOptions::CalibrationOffset) && skipCalOffset == false) {
// Remove uV tipOffset
- if (valueuV > getSettingValue(SettingsOptions::CalibrationOffset))
+ if (valueuV > getSettingValue(SettingsOptions::CalibrationOffset)) {
valueuV -= getSettingValue(SettingsOptions::CalibrationOffset);
- else
+ } else {
valueuV = 0;
+ }
}
lastuv = valueuV;
return valueuV;
@@ -78,8 +79,9 @@ uint32_t TipThermoModel::getTipInC(bool sampleNow) {
// I found a number that doesn't unbalance the existing PID, causing overshoot.
// This could be tuned in concert with PID parameters...
- if (currentTipTempInC < 0)
+ if (currentTipTempInC < 0) {
return 0;
+ }
return currentTipTempInC;
}
diff --git a/source/Core/Drivers/USBPD.cpp b/source/Core/Drivers/USBPD.cpp
index b621ab2c..6613bb9d 100644
--- a/source/Core/Drivers/USBPD.cpp
+++ b/source/Core/Drivers/USBPD.cpp
@@ -46,7 +46,7 @@ void USBPowerDelivery::IRQOccured() { pe.IRQOccured(); }
bool USBPowerDelivery::negotiationHasWorked() { return pe.pdHasNegotiated(); }
uint8_t USBPowerDelivery::getStateNumber() { return pe.currentStateCode(true); }
void USBPowerDelivery::step() {
- while (pe.thread()) {}
+ while (pe.thread()) {}
}
void USBPowerDelivery::PPSTimerCallback() { pe.TimersCallback(); }
@@ -93,18 +93,22 @@ uint32_t *USBPowerDelivery::getLastSeenCapabilities() { return lastCapabilities;
static unsigned int sqrtI(unsigned long sqrtArg) {
unsigned int answer, x;
unsigned long temp;
- if (sqrtArg == 0)
+ if (sqrtArg == 0) {
return 0; // undefined result
- if (sqrtArg == 1)
- return 1; // identity
+ }
+ if (sqrtArg == 1) {
+ return 1; // identity
+ }
answer = 0; // integer square root
for (x = 0x8000; x > 0; x = x >> 1) { // 16 bit shift
answer |= x; // possible bit in root
temp = answer * answer; //
- if (temp == sqrtArg)
+ if (temp == sqrtArg) {
break; // exact, found it
- if (temp > sqrtArg)
+ }
+ if (temp > sqrtArg) {
answer ^= x; // too large, reverse bit
+ }
}
return answer; // approximate root
}
@@ -225,7 +229,6 @@ bool EPREvaluateCapabilityFunc(const epr_pd_msg *capabilities, pd_msg *request)
request->hdr = PD_MSGTYPE_EPR_REQUEST | PD_NUMOBJ(2);
request->obj[1] = lastCapabilities[bestIndex]; // Copy PDO into slot 2
-
if (bestIsAVS) {
request->obj[0] = PD_RDO_PROG_CURRENT_SET(PD_CA2PAI(bestIndexCurrent)) | PD_RDO_PROG_VOLTAGE_SET(PD_MV2APS(bestIndexVoltage));
} else if (bestIsPPS) {
diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h
index abd0e01e..f2b84ffa 100644
--- a/source/Core/Inc/Translation.h
+++ b/source/Core/Inc/Translation.h
@@ -107,7 +107,7 @@ enum class SettingsItemIndex : uint8_t {
};
struct TranslationIndexTable {
- uint16_t CJCCalibrationDone;
+ uint16_t CalibrationDone;
uint16_t ResetOKMessage;
uint16_t SettingsResetMessage;
uint16_t NoAccelerometerMessage;
diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp
index db6ec0a0..5196f4a4 100644
--- a/source/Core/Src/Settings.cpp
+++ b/source/Core/Src/Settings.cpp
@@ -11,6 +11,7 @@
#include "Settings.h"
#include "BSP.h"
#include "Setup.h"
+#include "Translation.h"
#include "configuration.h"
#include <string.h> // for memset
bool sanitiseSettings();
@@ -65,7 +66,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
{0, 1, 1, COOLING_TEMP_BLINK}, // CoolingTempBlink
{0, 1, 1, DETAILED_IDLE}, // DetailedIDLE
{0, 1, 1, DETAILED_SOLDERING}, // DetailedSoldering
- {0, 1, 1, TEMPERATURE_INF}, // TemperatureInF
+ {0, (uint16_t)(HasFahrenheit ? 1 : 0), 1, TEMPERATURE_INF}, // TemperatureInF
{0, 1, 1, DESCRIPTION_SCROLL_SPEED}, // DescriptionScrollSpeed
{0, 2, 1, LOCKING_MODE}, // LockingMode
{0, 99, 1, POWER_PULSE_DEFAULT}, // KeepAwakePulse
diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp
index 87a17b6a..9542b08c 100644
--- a/source/Core/Src/settingsGUI.cpp
+++ b/source/Core/Src/settingsGUI.cpp
@@ -884,19 +884,21 @@ static bool setCalibrateVIN(void) {
OLED::clearScreen();
for (;;) {
- OLED::setCursor(0, 0);
+ OLED::setCursor(25, 0);
uint16_t voltage = getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 0);
OLED::printNumber(voltage / 10, 2, FontStyle::LARGE);
OLED::print(LargeSymbolDot, FontStyle::LARGE);
OLED::printNumber(voltage % 10, 1, FontStyle::LARGE, false);
OLED::print(LargeSymbolVolts, FontStyle::LARGE);
+ OLED::setCursor(0, 8);
+ OLED::printNumber(getSettingValue(SettingsOptions::VoltageDiv), 3, FontStyle::SMALL);
switch (getButtonState()) {
case BUTTON_F_SHORT:
- nextSettingValue(SettingsOptions::VoltageDiv);
+ prevSettingValue(SettingsOptions::VoltageDiv);
break;
case BUTTON_B_SHORT:
- prevSettingValue(SettingsOptions::VoltageDiv);
+ nextSettingValue(SettingsOptions::VoltageDiv);
break;
case BUTTON_BOTH:
case BUTTON_F_LONG:
@@ -904,9 +906,9 @@ static bool setCalibrateVIN(void) {
saveSettings();
OLED::clearScreen();
OLED::setCursor(0, 0);
- OLED::printNumber(getSettingValue(SettingsOptions::VoltageDiv), 3, FontStyle::LARGE);
+ warnUser(translatedString(Tr->CalibrationDone), 3 * TICKS_SECOND);
OLED::refresh();
- waitForButtonPressOrTimeout(1 * TICKS_SECOND);
+ waitForButtonPressOrTimeout(0.5 * TICKS_SECOND);
return false;
case BUTTON_NONE:
default:
diff --git a/source/Core/Threads/OperatingModes/CJC.cpp b/source/Core/Threads/OperatingModes/CJC.cpp
index 25fef8d8..4da688f9 100644
--- a/source/Core/Threads/OperatingModes/CJC.cpp
+++ b/source/Core/Threads/OperatingModes/CJC.cpp
@@ -30,7 +30,7 @@ void performCJCC(void) {
}
setSettingValue(SettingsOptions::CalibrationOffset, setoffset);
OLED::clearScreen();
- warnUser(translatedString(Tr->CJCCalibrationDone), 3 * TICKS_SECOND);
+ warnUser(translatedString(Tr->CalibrationDone), 3 * TICKS_SECOND);
OLED::refresh();
// Preventing to repeat calibration at boot automatically (only one shot).
setSettingValue(SettingsOptions::CalibrateCJC, 0);
diff --git a/source/Makefile b/source/Makefile
index 49b86532..7ffa4b95 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -178,7 +178,6 @@ PD_DRIVER_DIR=./Core/Drivers/usb-pd
ALL_INCLUDES_EXCEPT:=-path $(BRIEFLZ_INC_DIR) \
-o -path $(PD_DRIVER_DIR) \
-o -path $(PINECILV2_SDK_DIR) \
- -o -path $(DRIVER_INC_DIR) \
-o -path $(MINIWARE_HAL_INC_DIR) \
-o -path $(S60_HAL_INC_DIR) \
-o -path $(MHP30_HAL_INC_DIR) \
@@ -193,7 +192,6 @@ ALL_INCLUDES_EXCEPT:=-path $(BRIEFLZ_INC_DIR) \
ALL_SOURCE_EXCEPT:=-path $(SOURCE_BRIEFLZ_DIR) \
-o -path $(PD_DRIVER_DIR) \
-o -path $(PINECILV2_SDK_DIR) \
- -o -path $(SOURCE_DRIVERS_DIR) \
-o -path $(MINIWARE_HAL_SRC_DIR) \
-o -path $(S60_HAL_SRC_DIR) \
-o -path $(MHP30_HAL_SRC_DIR) \
@@ -427,7 +425,9 @@ DEV_LDFLAGS=-nostartfiles \
-L $(PINECILV2_BLE_CRAPWARE_BLOB_DIR) \
-L $(PINECILV2_RF_CRAPWARE_BLOB_DIR) \
-l blecontroller_702_m0s1s \
- -l bl702_rf
+ -l bl702_rf \
+ -Wl,--wrap=printf \
+ -Wl,--defsym=__wrap_printf=bflb_platform_printf
DEV_AFLAGS=
DEV_GLOBAL_DEFS=-DCFG_FREERTOS \
@@ -763,15 +763,15 @@ Core/Gen/Translation_brieflz.%.cpp: $(OUTPUT_DIR)/Core/Gen/translation.files/%.o
@test -d $(@D) || mkdir -p $(@D)
@echo Generating BriefLZ compressed translation for $*
@OBJCOPY=$(OBJCOPY) $(HOST_PYTHON) ../Translations/make_translation.py \
- --macros $(PWD)/Core/Gen/macros.txt \
- -o $(PWD)/Core/Gen/Translation_brieflz.$*.cpp \
+ --macros $(CURDIR)/Core/Gen/macros.txt \
+ -o $(CURDIR)/Core/Gen/Translation_brieflz.$*.cpp \
--input-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/$*.pickle \
--strings-obj $(OUTPUT_DIR)/Core/Gen/translation.files/$*.o \
$*
Core/Gen/Translation_brieflz_font.%.cpp: $(OUTPUT_DIR)/Core/Gen/translation.files/%.pickle $(HOST_OUTPUT_DIR)/brieflz/libbrieflz.so Core/Gen/macros.txt
@test -d $(@D) || mkdir -p $(@D)
- @echo Generating BriefLZ compressed translation for $*
+ @echo Generating BriefLZ compressed translation font for $*
@$(HOST_PYTHON) ../Translations/make_translation.py \
--macros $(PWD)/Core/Gen/macros.txt \
-o $(PWD)/Core/Gen/Translation_brieflz_font.$*.cpp \
@@ -818,8 +818,8 @@ Core/Gen/Translation_multi.$(1).cpp: $(patsubst %,../Translations/translation_%.
@test -d $(OUTPUT_DIR)/Core/Gen/translation.files || mkdir -p $(OUTPUT_DIR)/Core/Gen/translation.files
@echo 'Generating translations for multi-language $(2)'
@$(HOST_PYTHON) ../Translations/make_translation.py \
- --macros $(PWD)/Core/Gen/macros.txt \
- -o $(PWD)/Core/Gen/Translation_multi.$(1).cpp \
+ --macros $(CURDIR)/Core/Gen/macros.txt \
+ -o $(CURDIR)/Core/Gen/Translation_multi.$(1).cpp \
--output-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle \
$(3)
@@ -829,8 +829,8 @@ Core/Gen/Translation_brieflz_multi.$(1).cpp: $(OUTPUT_DIR)/Core/Gen/translation.
@test -d $$(@D) || mkdir -p $$(@D)
@echo Generating BriefLZ compressed translation for multi-language $(2)
@OBJCOPY=$(OBJCOPY) $(HOST_PYTHON) ../Translations/make_translation.py \
- --macros $(PWD)/Core/Gen/macros.txt \
- -o $(PWD)/Core/Gen/Translation_brieflz_multi.$(1).cpp \
+ --macros $(CURDIR)/Core/Gen/macros.txt \
+ -o $(CURDIR)/Core/Gen/Translation_brieflz_multi.$(1).cpp \
--input-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle \
--strings-obj $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).o \
--compress-font \
@@ -873,9 +873,9 @@ style:
# * process STOP env variable
check-style:
@error=0; export LIST=$$LIST; for src in $(ALL_SOURCE) $(ALL_INCLUDES) ; do \
- ../scripts/deploy.sh check_style_file "$$src" ; \
- test "$${?}" -eq 1 && export error=1 ; \
- test "$${error}" -eq 1 && test -n "$${STOP}" && break; \
+ ../scripts/deploy.sh check_style_file "$$src" ; \
+ test "$${?}" -eq 1 && export error=1 ; \
+ test "$${error}" -eq 1 && test -n "$${STOP}" && break; \
done; \
if [ $$error -eq 0 ] ; then echo "" && echo "" && echo "Style check: PASS" && echo "" && echo "" && exit 0 ; \
else echo "" && echo "" && echo "Style check: FAIL! Please, check the log above for the details." && echo "If there is a false-negative trigger, please, report an issue attaching the log or link to the log!" && echo "" && echo "" && exit 1 ; \