1
0
forked from me/IronOS

Compare commits

..

100 Commits

Author SHA1 Message Date
Ben V. Brown
dc43bcc99c Merge pull request #1777 from Ralim/dev
Release 2.22
2023-11-06 09:13:34 +11:00
Ben V. Brown
c308fe8cc2 Pinecil v2 tune via PID (#1827)
* Start PWM after adc irq fully done

* Filter len 4

* Use comparitor 2 on timer for wrap around

* Update IRQ.cpp

* Tip measurements are uint16_t

Update BSP.cpp

Update BSP.cpp

* WiP PID

move pid tuning to config

Update PIDThread.cpp

* Handle PWM Timer gitchy comparitor

* Tuning

* Dampen with Kd

* Cleaning up

* Use TemperatureType_t for getTipTemp()

* Add small rolling average to user GUI temp to reduce flicker

* Trigger PID when adc is skipped (will use old values)
2023-10-21 08:21:08 +11:00
Marek Kraus
9c7ad43a76 Merge pull request #1822 from OndroNR/patch-4
Update Slovak translation
2023-09-28 21:58:58 +02:00
Ondrej Galbavy
8c582e6cb0 Update translation_SK.json 2023-09-28 20:08:55 +02:00
Ondrej Galbavy
4a8f483d30 Update translation_SK.json 2023-09-28 20:03:55 +02:00
discip
b489601883 Merge pull request #1818 from dogtopus/add-missing-chinese-translation
Add missing Chinese translation
2023-09-22 21:37:09 +02:00
dogtopus
e56060ab4a Add missing Chinese translation
I'm not very good at zh_TW so some of the terms might sound strange.
2023-09-22 00:47:46 -03:00
Ben V. Brown
c0a5e244b9 Temperature code updates (#1814)
* Create a typedef for temperatures

* Quick parse replace temp types

* Fixup for fast/slow PWM on PinecilV2

* Update PIDThread.cpp

* Pinecil small tips need less smoothing

* Remove incorrect comment

* Remove unused function

* Update PinecilV2 Tune as well
2023-09-22 10:19:50 +10:00
discip
f99aed5785 Merge pull request #1786 from Ralim/discip-patch-2
Update translation_DE.json
2023-09-06 00:41:07 +02:00
discip
64ccbd4334 Merge branch 'dev' into discip-patch-2 2023-09-05 21:37:49 +02:00
dependabot[bot]
0a5b84fea9 chore(deps): bump actions/checkout from 3 to 4 (#1811)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 08:32:55 +10:00
discip
c2229f096b Merge branch 'dev' into discip-patch-2 2023-08-21 21:01:58 +02:00
Ivan Zorin
53bb8355f8 docs/History.md: add info for 2.20 & 2.21 (#1804)
docs/changelog: update info for 2.20 & 2.21
2023-08-20 09:55:38 +10:00
discip
95160b7afd Merge branch 'dev' into discip-patch-2 2023-08-16 02:12:05 +02:00
Ivan Zorin
5754622fea Include History.md to online docs as Changelog (#1799)
docs/changelog: include History.md to read-the-docs site generating as Changelog, update titles formatting & unify style between sections
2023-08-16 10:06:55 +10:00
discip
2b0bd00603 Merge branch 'dev' into discip-patch-2 2023-08-15 01:02:31 +02:00
Ivan Zorin
20e085487e Add python packages required by mkdocs into docker container (#1796)
Add PIP python packages required by mkdocs into docker container
2023-08-14 11:13:34 +10:00
Ivan Zorin
4cb47cf1a2 Add detailed OLED replacement info to Troubleshooting document (#1797)
* Add OLED replacement info to HardwareIssues document

* Update formatting & text

* Move OLED replacement detailed info from HardwareIssues to Troubleshooting inside the related section
2023-08-14 11:12:52 +10:00
Ivan Zorin
33439aaa22 Include Bluetooth document to read-the-docs site generating (#1798) 2023-08-14 11:11:54 +10:00
Marek Kraus
6111b58e04 Merge pull request #1795 from gamelaster/patch/update-sk-lang
Update Slovak translation
2023-08-13 04:31:57 +02:00
Marek Kraus
d6286b9e2b Update translation_SK.json 2023-08-12 18:30:23 +02:00
Ben V. Brown
f69c37c4aa Revert "Remove 0.5 ohm increase to resistance" (#1794) 2023-08-12 15:31:02 +10:00
discip
230e42b614 Merge branch 'dev' into discip-patch-2 2023-08-12 01:30:24 +02:00
discip
caedce0300 Merge pull request #1793 from ia/translation_RU
Update & translate for Russian language
2023-08-12 01:29:05 +02:00
Ivan Zorin
748ab1c354 Merge branch 'translation_RU' of ssh.github.com:ia/IronOS-plus into translation_RU 2023-08-12 02:22:58 +03:00
Ivan Zorin
33a2958203 translation_RU: fix ResetOKMessage 2023-08-12 02:22:14 +03:00
discip
8430a114fa Merge branch 'dev' into translation_RU 2023-08-11 22:17:32 +02:00
discip
9cc0a56057 Merge pull request #1792 from ia/translation_BG
Update & translate for Bulgarian language
2023-08-11 22:17:17 +02:00
Ivan Zorin
db3d8a2de0 Update & translate for Russian language 2023-08-11 23:07:41 +03:00
Ivan Zorin
4460782dd4 Update & translate for Bulgarian language 2023-08-11 23:06:00 +03:00
discip
d1e03c34be Merge branch 'dev' into discip-patch-2 2023-08-11 21:54:42 +02:00
discip
b493f4d0e1 Merge pull request #1791 from davidrothb/cz_complete
Update translation_CS.json
2023-08-11 21:47:04 +02:00
discip
fb48ff8b91 Merge branch 'dev' into discip-patch-2 2023-08-11 21:46:10 +02:00
David Rothbauer
3f8f60f4c7 Update translation_CS.json
completed czech translation
2023-08-11 11:38:23 +02:00
Ivan Zorin
130e73c1fe Make make docker-clean to remove docker build cache (#1790)
Makefile: add docker-clean sub-targets to remove not only image but cache (eats lot of space sometimes) & update help output / add clean-up of docker cache to deploy.sh as well

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-08-09 05:38:45 +00:00
discip
26197f6ed7 Merge branch 'dev' into discip-patch-2 2023-08-09 01:42:35 +02:00
Ivan Zorin
d5035bb956 Update build.sh to pass shellcheck checks (#1789)
source/build.sh: update according to shellcheck recommendations
2023-08-09 08:47:25 +10:00
Ben V. Brown
c0f1c35ba5 Update logo flashing information (#1787)
* Update logo information

* Update Documentation/Logo.md

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2023-08-08 09:45:54 +10:00
discip
477fdc489c Update translation_DE.json 2023-08-07 21:38:10 +02:00
Federico Di Lorenzo
4f2fb2083d Update translation_IT.json (#1784) 2023-08-07 21:17:59 +10:00
Ivan Zorin
15ab87f3bc Update tagging for detached commit case & update docs (#1783)
make_translation.py: update tagging for detached commit case & update docs
2023-08-07 09:05:56 +10:00
Ivan Zorin
8b90666f30 metadata.py: update tagging considering github CI builds (#1782) 2023-08-07 09:05:04 +10:00
TheMoo96
c03e1842aa Swedish translation update to include new strings (#1779)
* update swedish translation

* Add linebreak char
2023-08-05 10:29:44 +00:00
Ben V. Brown
524d121fcb Merge branch 'master' into dev 2023-08-04 22:45:10 +10:00
Ivan Zorin
97c0fee358 Implement proper git SHA ID marking for builds during pull-requests (#1772)
* debug github CI git meta info

* fix push.yml format

* fix push.yml for shell

* try to fix push.yml

* try to fix push.yml run

* try to fix push.yml run for multi

* keep debugging

* try to do as less changes as possible

* Implement proper git tagging for builds during pull-requests

* Unify new-line separators between build steps

* Keep debugging

* make_translation.py: fix formatting

* push.yml: try to set ENV values

* push.yml: fix copy-paste error

* Remove extra env var

* Experimenting

* Testing upper()

* Re-testing upper()

* Revert tested values

* make_translation.py: add new lines between blocks to improve readability

* Reformulate docs & comments

* make_translation.py: remove debugging print

* make_translation.py: simplify check for SHA ID env var / code review

* make_translation.py: fix condition

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-08-04 21:54:29 +10:00
Ben V. Brown
17b39de903 Use 3 count filter for MHP30 acceleromter (#1762)
* Use 3 count filter for MHP30 acceleromter

Requires it to trip 3 times in a row to fire. So really only knocking the unit over trips it off.

* Reset shutdown timer forwards on shutdown timeout

Default shutdown mode off

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2023-08-04 21:38:41 +10:00
Ivan Zorin
3f880d9e26 Implement ci target for Makefile to reproduce github CI actions & artifacts (#1769)
* Implement CI target in Makefile to emulate github CI actions & artifacts

* Improve filter for metadata

* metadata.py: update usage output for wrong number of input arguments / code review

* metadata.py: remove excessive checks for the second input argument / code review

* metadata.py: remove hard-coded model for multi-lang builds in ModelName argument processing / code review

* metadata.py: remove hard-coded models for multi-lang builds in file name pattern processing / code review

* metadata.py: update usage output to remove ambiguity about json extension for output file

* metadata.py: unify new lines style formatting

* metadata.py: sort the list of processing files in alphanumeric order before looping through them to get the same lang order on every generation in every json output file
2023-08-04 21:32:17 +10:00
discip
4533c2f497 Merge pull request #1729 from alextrical/Short-Detection
Pinecil v2 short detection at boot
2023-08-04 13:31:07 +02:00
Ben V. Brown
c120af398a Merge branch 'dev' into Short-Detection 2023-08-02 15:52:49 +10:00
Ivan Zorin
2d7abc274a Remove exec bit from a translation json file (#1770)
Remove exec bit for json file
2023-08-02 09:03:34 +10:00
Ben V. Brown
80c4b58976 Abstract out showing bootlogo
To improve support on PinecilV2
2023-08-01 21:18:27 +10:00
Ben V. Brown
a7df1cc5be Fixup for logo addresses + Set DFU address for PinecilV2 2023-08-01 21:10:15 +10:00
Ben V. Brown
584b3826c3 Start docs on BLE (#1763)
* docs on BLE

* Tip shorted notes
2023-08-01 02:39:29 +02:00
discip
c4fd383694 Merge branch 'dev' into Short-Detection 2023-08-01 02:05:07 +02:00
discip
bd9c63f55d Merge pull request #1767 from eslng/uk-translation-1
Update translation_UK.json
2023-08-01 02:03:18 +02:00
discip
45f89f8f9c Merge branch 'dev' into Short-Detection 2023-08-01 02:03:17 +02:00
discip
f61376a404 Update translation_UK.json 2023-08-01 02:00:47 +02:00
yegor
703a32f68a Update translation_UK.json 2023-07-31 18:30:59 +03:00
Ivan Zorin
e0f373a88a Decomission of scripts/ci (#1760)
* Decomission of scripts/ci

* Code review

* Update .gitignore according to changes for code review
2023-07-31 10:06:57 +10:00
Ivan Zorin
05d0ef66ef push.yml: probable fix #1764 (#1765) 2023-07-29 11:18:50 +10:00
Ben V. Brown
6d18e860f8 Merge branch 'dev' into Short-Detection 2023-07-28 20:04:16 +10:00
Ben V. Brown
344068d480 Add isTipShorted() to warnings 2023-07-28 19:59:54 +10:00
Ben V. Brown
13e1c24152 Warn user tick type correction 2023-07-28 19:58:46 +10:00
Ben V. Brown
7254b78404 Add warning for Tip Shorted to translations 2023-07-28 19:58:27 +10:00
Ivan Zorin
55d36c98f1 Simplify commands for jobs in push.yml (#1761)
* Simplify commands for build steps

* Fixing multi-lang builds for Pinecil & PinecilV2

* Makefile: fix multi-thread building support

* source/Makefile: fix formatting

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-07-28 09:45:22 +00:00
Ivan Zorin
65ac2e25a6 Add Core/Drivers to the scope of style check by clang-format (#1754)
* clang-format: add ./Core/Drivers (except usb-pd) to the scope of style check

* Fix missed suggestion

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-07-28 09:39:01 +00:00
Ben V. Brown
ea1906e499 Enforce temp unit to C if F not in build
Closes #1741
2023-07-28 18:46:00 +10:00
Ben V. Brown
9a3fef92c3 Allow S60 fallback to head if PD times out after 3 seconds 2023-07-28 18:40:16 +10:00
discip
118fa09ce7 Enhanced V calibration (#1758) 2023-07-24 18:23:04 +10:00
Ben V. Brown
6ba2a5c259 BLE crash fixing (Part ?) (#1756)
* Remap printf

* Help to unify formatting

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
Co-authored-by: Ivan Zorin <ivan.a.zorin@gmail.com>
2023-07-24 09:07:38 +10:00
discip
0f6c1b686e Merge branch 'dev' into Short-Detection 2023-07-24 00:06:50 +02:00
Ivan Zorin
f83ebc8c81 Implement target in Makefile to run github CI-like checks locally (#1753)
* Makefile: implement tests target with subtargets to run github CI-like tests locally (in docker container)

* Dockerfile: update comment for PIP packages
2023-07-23 22:18:45 +10:00
Ben V. Brown
65dd3e879c Fixup for temp in F bug 2023-07-21 21:16:11 +10:00
Ivan Zorin
52dd27cc07 Fix github CI clang-format related check_c-cpp job (#1752)
* Fix github CI clang-format related check_c-cpp job

* shellcheck fix
2023-07-21 14:47:16 +10:00
discip
8ac43645b7 Merge branch 'dev' into Short-Detection 2023-07-20 20:22:37 +02:00
Ivan Zorin
1c9d3940ca Move related pieces of documentation from wiki to Documentation/ (#1746)
* Move TS100 info from wiki to Hardware.md

* Move TS80 info from wiki to Hardware.md

* Move TS80P info from wiki to Hardware.md

* Move Pinecil info from wiki to Hardware.md

* Move some info from Home.md wiki to Documentation/index.md

* Fix path inside docker since Dockerfile has been updated to be in the root project tree after starting container

* Move info from Home.md wiki to Documentation/Hardware.md

* mkdocs.yml: swtich config to forked repo for testing formatting online

* Fix formatting

* Fix formatting (md != rtd)

* Fix formatting for index.md

* Revert mkdocs config to original one after testing

* Documentation/: add power sources info

* Documentation/README.md: update with power sources

* tiny fixes with formatting

* Reformat links to stores

* Fix footnote on _default_ charger for TS80P

* Revert mkdocs config

* Fix footnote about wattage for QC, try fix table in index.md
2023-07-20 11:55:08 +10:00
Ivan Zorin
297a4dffa5 Replace /build/source by /build/ironos to eliminate ambiguity with /build/source/source (#1748)
* docker/buildAll.sh: replace /build/source by /build/ironos to eliminate ambiguity with /build/source/source

* scripts/ci/buildAll.sh: fix shellcheck and add additional comment
2023-07-20 11:52:22 +10:00
Ivan Zorin
93a18e5076 Move check-style core logic from makefile to shell script (#1745)
* Move check-style core logic from source/Makefile:check-style target to deploy.sh:check_style_file function

* deploy.sh: fix shellcheck warning

* source/Makefile: restore removed-by-accident style target
2023-07-20 11:02:56 +10:00
discip
bfbdf8c941 Merge pull request #1747 from federicodilo/patch-8
Update translation_IT.json
2023-07-20 01:16:35 +02:00
Federico Di Lorenzo
b00d26cb9c Update translation_IT.json
Little fix
2023-07-19 23:56:56 +02:00
discip
78a4cfecfe Merge branch 'dev' into Short-Detection 2023-07-18 20:21:33 +02:00
Ivan Zorin
c7574c4d0c Implement printSymbolDeg() helper function as method for OLED class (#1743)
* implement printSymbolDeg() helper function as method for OLED class

* Remove extra line added by mistake

* OLED::printSymbolDeg - add drawSymbol calls

* OLED: make comments more clear for implemented method

* OLED::printSymbolDeg(): attempt to improve read-ability replacing if/else by switch/case

* OLED::printSymbolDeg() - add comment for drawSymbol to clarify its underhood

* get tipTemp using ?/: instead of if/else

* Implement getTipTemp() helper

* Add missing header

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-07-18 20:38:14 +10:00
Ivan Zorin
1d820acbee Documentation/index.md: add Feedback section (Ralim#1552) as suggested (#1744) 2023-07-18 14:35:16 +10:00
Ivan Zorin
d95af7d1a0 clang-format implementation (#1740)
* Testing clang-format style check using github CI

* github/push: implement check-style for clang-format as a separate build step

* github/push: add missing packages for check-style/clang-format build step

* source/Makefile: check-style - reduce files of interest; update .clang-format to keep enums init

* source/Makefile: empty lines, spaces & tabs refactoring to unify style - part 1 out of N

* source/Makefile: fix formatting for multi-line variables

* source/Makefile: update formatting for multi-line variables

* source/Makefile: remove spaces on vars assignments to unify style

* source/Makefile: remove unused target style

* source/Makefile: implement exclude vars for clang-format related files

* source/Makefile: exclude configuration.h from clang-format check

* Dockerfile: add diffutils in a container to make check-style target using advanced version of diff to get more advanced output to parse & navigate log more easily

* source/Makefile: implement parser for clang-format inside check-style target to make output compatible with gcc-like error compilation format for compatibility with IDEs/editors for easy navigation over files to fix style errors

* source/Makefile: probably final touches on unifying style

* source/Makefile: implement check-style-list target to only list affected file names with wrong code style for debug purposes

* source/Makefile: fix missed spaces

* deploy.sh: add helper routine to deal with clang-format error output logging from makefile

* gitignore: add clang-format log explicitly

* Refactoring for clang-format compiance

* Dockerfile: add sed

* Dockerfile: false alarm - remove sed since busybox-sed seems fine

* source/Makefile: reduce calls of clang-format & make error log more clean, clear, and tidy

* deploy.sh:check_style() - add removal of DOS EOLs for generated log

* source/Makefile:check-style: add more empty lines between blocks with errors for readability when suggestion is too long & heavy

* source/Makefile: add STOP var to check-style for exit on first failed file

* source/Makefile: check-style: make log looks more like traditional diff/patch output

* source/Core/BSP/Pinecilv2/MemMang/heap_5.c: clang-format refactoring using reasonable advises ... and then disable it in Makefile from scanning by clang-format

* Return headers include order

* clang-format config: disable warnings about non-alphabetic include order

* clang-format refactoring

* clang-format refactoring, part 2

* clang-format refactoring, part 3

* settingsGUI.cpp: refactoring, part 1

* settingsGUI.cpp: refactoring, part 2

* settingsGUI.cpp: refactoring, part 3

* settingsGUI.cpp: refactoring, part 4

* clang-format should be happy now

* workflows/push: put readme check into separate build step & update style

* clang-format: giving SortIncludes option second chance by tweaking a couple of headers a bit

* source/Makefile: check-style: add homebrew parser to check for { } in conditional blocks

* homebrew-format: add { } for if/else, while, and for & unify some comments style; left two errors intentionally to debug & improve parser

* source/Makefile: homebrew-format: fix false negative trigger for multi-line condition in if-s

* Sleep.cpp: unify style & comments

* source/Makefile: remove unused debug target
2023-07-16 15:25:30 +10:00
Ivan Zorin
ca79638a74 Translations/: add missing exec bit for python scripts (#1742) 2023-07-15 23:49:22 +10:00
Ivan Zorin
4649df6914 Implement autogeneration of Documentation/README.md (#1738)
* mkdocs.yml: unify formatting style

* Docs/README.md: add auto-generated README.md file for Documentation/ directory

* Docs/README.md: fix refs

* Docs/README.md: fix locations

* Docs/README.md: trying workaround spaces in filenames for refs

* Documentation/README.md: update generated file trying to fix all formatting issues

* Documentation/README.md: reduce title size

* Documentation/README.md: add link for official online docs

* scripts/deploy.sh: implement docs_readme function

* deploy.sh: add overwrite warning in help output

* deploy.sh: try to fix shellcheck warnings

* deploy.sh:docs_readme() - show note message only if README should be updated

* deploy.sh:docs_readme() - fix shellcheck

* github/push: add Documentation/README.md check

* github/push: force usage of /bin/sh for deploy.sh script

* testing, testing, testing

* deploy.sh:docs_readme() - make error-related message more clear about what to donext

* Revert change used only to test failure on github CI
2023-07-11 09:36:05 +10:00
Ivan Zorin
cd7696b66f Suggestion to update BUILD_VERSION policy (#1733)
* version.h: update BUILD_VERSION policy / PoC

* Fix misplaced chars

* make_translation.py: implement get_version_suffix() function to extend BUILD_VERSION build type legend data

* version.h: update version policy info according to implementation of get_version_suffix() function in make_translation.py

* Version policy update: add double-check for release tag so if version doesn't match use another letter T

* make_translation.py: fix extra tabulation

* version.h: tiny tidy update for version format

* Documentation/DebugMenu.md: update info on version line & date

* Documentation/DebugMenu.md: fix formatting & mistypes

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2023-07-10 09:58:24 +10:00
Ben V. Brown
552b582bcb Fixup! broken #1672 reflow profile 2023-07-09 22:29:48 +10:00
Ivan Zorin
311dbeac6f Fix echo in top-level Makefile for some environments (#1737)
* Makefile: fix echo for some environments by replacing escape chars with explicit formatting by spaces and new lines

* Dockerfile: extend comments for documentation purpose & switch WORKDIR to IronOS source tree root dir for the seamless workflow
2023-07-09 22:01:44 +10:00
discip
6ff7bec4a4 Merge branch 'dev' into Short-Detection 2023-07-07 22:22:07 +02:00
Ben V. Brown
b80716e2a7 Update README for new models (#1705)
* Update README for new models

* Update README.md

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2023-07-07 10:06:34 +10:00
Ivan Zorin
7b57cc981f Refactoring check for docker to fix a bug to use Makefile inside docker (#1735)
* Makefile: refactoring check for docker to fix a bug so Makefile could be used inside of docker container

* Makefile: update .PHONY section
2023-07-07 08:39:20 +10:00
discip
f72bc969ac Merge branch 'dev' into Short-Detection 2023-07-06 18:23:09 +02:00
Ben V. Brown
0be83598f1 Try side-port of different linker and ram for PinecilV2 (#1730)
Try side-port of different linker and ram
2023-07-06 07:35:01 +10:00
discip
88f62941ec Merge branch 'dev' into Short-Detection 2023-07-05 22:26:35 +02:00
Ivan Zorin
cbde61edb4 Cosmetic code style refactoring: add enum for screen orientation & define for OLED state (#1732)
* saveSettings: add comment for #endif, update var name to reflect its purpose regardless its one-time & temporal

* Settings.h: add enum for orientation mode

* settingsGUI.cpp: add markings for #endifs, add/remove extra new lines to propose better code read-ability in my humble vision from the side, didnt touch any functionality only cosmetic syntax

* settingsGUI.cpp: remove added-by-accident new line in the end of the file

* OLED.hpp: unify ifdef section, add markings for #endifs, add readable macros for ON/OFF OLED state instead of magic numbers

* OLED.cpp: add markings for #endifs, add readable macros for ON/OFF OLED state instead of magic numbers, trying unify common style for the whole file for better read-ability

* Settings.cpp: unify code style

* settingsGUI.cpp: revert true/false for setDisplayRotation

* OLED.cpp: unify comments style
2023-07-05 12:41:16 +10:00
Ivan Zorin
8c17a085f1 .gitignore: refactor, unify & update (#1731) 2023-07-04 23:46:48 +10:00
discip
3a8eb3c511 Merge branch 'dev' into Short-Detection 2023-07-02 21:19:02 +02:00
alextrical
f81257562d Tip short detection at boot
If tip is shorted at boot, prevent the FW from running, with the intent to prevent the MOSFET from being damaged
2023-06-30 15:57:11 +01:00
Ben V. Brown
5d96470e45 Merge pull request #1653 from Ralim/dev
Release 2.21
2023-04-09 19:51:01 +10:00
151 changed files with 4502 additions and 2553 deletions

View File

@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4

View File

@@ -3,6 +3,8 @@ name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
container:
@@ -19,20 +21,21 @@ jobs:
- name: Install dependencies (python)
run: python3 -m pip install bdflib
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Git ownership exception
run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
- name: build ${{ matrix.model }}
- name: Git meta info
run: echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"
- name: Build ${{ matrix.model }}
run: cd source && ./build.sh -m ${{ matrix.model }}
- name: copy license text
run: |
cp LICENSE source/Hexfile/LICENSE
cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
- name: Copy license files
run: cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -47,7 +50,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
@@ -55,6 +58,7 @@ jobs:
name: metadata
path: source/Hexfile/${{ matrix.model }}.json
build_multi-lang:
runs-on: ubuntu-20.04
container:
@@ -70,20 +74,21 @@ jobs:
- name: Install dependencies (python)
run: python3 -m pip install bdflib
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Git ownership exception
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
- name: Git meta info
run: echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"
- name: copy license text
run: |
cp LICENSE source/Hexfile/LICENSE
cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
- name: Build ${{ matrix.model }}
run: make -C source/ -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 scripts/LICENSE_RELEASE.md source/Hexfile/
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -98,7 +103,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
@@ -106,51 +111,62 @@ jobs:
name: metadata
path: source/Hexfile/${{ matrix.model }}_multi-lang.json
tests:
runs-on: ubuntu-20.04
container:
image: alpine:3.16
steps:
- name: deps
- name: Install dependencies (apk)
run: apk add --no-cache python3 py3-pip make git bash findutils gcc musl-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: install black
- name: Install dependencies (python)
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_formatting:
check_c-cpp:
runs-on: ubuntu-20.04
container:
image: alpine:3.16
steps:
- name: deps
run: apk add --no-cache python3 py3-pip make git black
- name: Install dependencies (apk)
run: apk add --no-cache make git diffutils findutils clang-extra-tools bash
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: install black
run: python3 -m pip install bdflib flake8
- name: Check format style with clang-format
run: make clean check-style
- name: Check formatting with clang-format
run: cd source && make clean && make check-style
check_python:
runs-on: ubuntu-20.04
container:
image: alpine:3.16
steps:
- name: Install dependencies (apk)
run: apk add --no-cache python3 py3-pip make git black
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies (python)
run: python3 -m pip install bdflib flake8
- name: Check python formatting with black
run: black --check Translations
@@ -158,11 +174,12 @@ jobs:
- name: Check python with flake8
run: flake8 Translations
shellcheck:
name: runner / shellcheck
check_shell:
name: check_shell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
@@ -170,3 +187,20 @@ jobs:
reporter: github-pr-review # Change reporter.
exclude: "./.git/*" # Optional.
check_all_files_with_shebangs: "false" # Optional.
check_readme:
runs-on: ubuntu-20.04
container:
image: alpine:3.16
steps:
- name: Install dependencies (apk)
run: apk add --no-cache git
- uses: actions/checkout@v4
with:
submodules: true
- name: Check autogenerated Documentation/README.md
run: /bin/sh ./scripts/deploy.sh docs_readme

81
.gitignore vendored
View File

@@ -1,3 +1,5 @@
#### Generic ####
# Object files
*.o
*.ko
@@ -5,6 +7,7 @@
*.elf
*.d
*.DS_Store
# Precompiled Headers
*.gch
*.pch
@@ -31,33 +34,22 @@
# Debug files
*.dSYM/
*.su
source/.metadata/*
TS100/KiCad/TS100.bak
Logo GUI/TS100 Logo Editor/TS100 Logo Editor/obj/
Logo GUI/TS100 Logo Editor/TS100 Logo Editor/bin/
*.cache
Translation Editor/.vscode/
Translation Editor/__pycache__/
# Custom scripts & misc. files
*.pyc
*.lst
*.mk
*.list
source/Hexfile/
source/Objects/
ci/artefacts/
ci/secrets/unencrypted/
codeship.aes
.vscode/settings.json
# Auto generated files
source/Core/Inc/unit.h
source/Core/Gen/
*.cache
codeship.aes
CoreCompileInputs.cache
# IDE configs
.vs/*
.settings/*
..cproject.swp
.cproject.swp
# Visual Studios
.vscode/*
@@ -65,6 +57,7 @@ source/Core/Gen/
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.vscode/settings.json
# Eclipse
.metadata
@@ -120,11 +113,24 @@ local.properties
.scala_dependencies
.worksheet
# Jetbrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# source code tagging systems (GNU Global, ctags, cscope)
GPATH
GRTAGS
GTAGS
*tags
*tags/
.*tags
.*tags/
cscope.*
cscope/
.cscope/
#### Jetbrains: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm ####
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
@@ -174,7 +180,38 @@ fabric.properties
# Editor-based Rest Client
.idea/httpRequests
CoreCompileInputs.cache
.vscode/settings.json
#### IronOS project specific files ####
# Binaries
source/Hexfile/
source/Objects/
BUILDS/
# Autogenerated
source/Core/Gen/
source/Core/Inc/unit.h
# Deploy
scripts/ci/artefacts/
scripts/ci/secrets/unencrypted/
# Generated static local docs
site/
# Translations
Translations/__pycache__/
Translation Editor/__pycache__/
Translation Editor/.vscode/
# misc.
source/compile_commands.json
.idea/
source/.metadata/*
# TS100 related
TS100/KiCad/TS100.bak
Logo GUI/TS100 Logo Editor/TS100 Logo Editor/obj/
Logo GUI/TS100 Logo Editor/TS100 Logo Editor/bin/
# Tests/linters/sanitizers
source/check-style.log

View File

@@ -0,0 +1,99 @@
# Bluetooth Low Energy
The Pinecilv2 has hardware support for Bluetooth Low Energy (BLE). This protocol allows reading and writing of parameters to the Pinecil during runtime.
The BLE interface advertises three services, these provide access to live telemetry as well as the ability to read/write settings.
These are outlined in more detail below.
Pinecil devices advertise themselves on BLE as `Pinecil-XXXXXXX`.
They also include the UUID `9eae1000-9d0d-48c5-AA55-33e27f9bc533` in the advertisement packet to allow for filtering.
Unless otherwise noted, all data is sent and received as Little-Endian.
As of the time of writing this, notifications are not fully implemented so data will need to be polled. Notification/Indication support will come when there is time to implement it.
## Using the BLE Interface
It is advised to follow the below points when first implementing a BLE integration. Of course once the integration is working feel free to deviate from these. These are just _suggested_ ideas to help kickstart.
1. When filtering for devices, its preferable to filter by the UUID `9eae1000-9d0d-48c5-AA55-33e27f9bc533`, rather than by the device name if possible.
2. Upon first collection check if the three expected services exist; if they don't the user may have selected an incorrect device.
3. It's best to read the live bulk endpoint over the live service when its easy to do so (one read vs ~15).
1. However if you are just updating one or two line items it may be more efficient to just read these on the live service.
2. Feel free to test both and decide.
4. When reading settings from the device; the association of number <-> setting is fixed, but you may see settings you don't yet know about, make sure you can handle these.
5. You probably don't want to show unknown setting's to the user though.
6. Read the device firmware revision and ensure you can decode it. If BLE is revised it may be essential for handling versions cleanly.
7. It's advisable to keep an eye on the IronOS repository or at least setup the Github watch for release notifications.
1. Future releases may revise some BLE aspects or add new settings for example.
## Services
Below is a description of each service. Note that the exact settings are not listed for brevity; it's best to refer to [the uuid lists](https://github.com/Ralim/IronOS/blob/dev/source/Core/BSP/Pinecilv2/ble_characteristics.h) and the [handlers](https://github.com/Ralim/IronOS/blob/dev/source/Core/BSP/Pinecilv2/ble_handlers.cpp) alongside this.
### Live
`UUID: d85ef000-168e-4a71-AA55-33e27f9bc533`
The live services has one characteristic per reading. The readings (in order) are:
When implementing these; the ones that are not obvious are generally found in the debugging menu. Values are encoded as an unsigned 32 bit number for all results.
1. Live temperature (In C)
2. Live set point
3. DC input voltage
4. Handle temperature (In C)
5. Power level
6. Power source
7. Tip resistance
8. uptime
9. Time of last movement
10. Maximum temperature settable
11. Raw tip reading
12. Hall sensor
13. Operating mode
14. Estimated wattage
### Settings
`UUID: f6d80000-5a10-4eba-AA55-33e27f9bc533`
The settings service has two special entries; for saving and resetting settings.
Otherwise all settings are enumerated using UUID's of the format : `f6d7ZZZZ-5a10-4eba-AA55-33e27f9bc533))` where `ZZZZ` is the setting number as matched from [Settings.h](https://github.com/Ralim/IronOS/blob/dev/source/Core/Inc/Settings.h#L16).
All data is read and written in fixed unsigned 16 bit numbers.
#### Settings save
To save the settings write a `0x0001` to `f6d7FFFF-5a10-4eba-AA55-33e27f9bc533`.
Its advised to not save settings on each change but instead to give the user a save button _or_ save after a timeout. This is just to reduce write cycles on the internal flash.
#### Settings reset
To reset all settings to defaults; write a `0x0001` to `f6d7FFFE-5a10-4eba-AA55-33e27f9bc533`.
This will reset settings immediately.
### Bulk
`UUID: 9eae1000-9d0d-48c5-AA55-33e27f9bc533`
The bulk endpoint is where extra data is located with varying read sizes.
#### Live data
The bulk live data endpoint provides all of the data provided in the live endpoint, as one large single-read binary blob. This is designed for applications that are showing large amounts of data as this is more efficient for reading.
#### Accelerometer Name
_Not yet implemented_
#### Build ID
This encodes the current build ID to allow viewing and handling when the BLE format changes.
#### Device Serial Number
This is generally the device CPU serial number. For most devices this can be used as an ID. On PinecilV2 its the MAC address.
#### Device Unique ID
This is only relevant on the PinecilV2. This is a random ID that is burned in at the factory. This is used by the online authenticity checker tool.

View File

@@ -9,9 +9,43 @@ This menu is meant to be simple, so it has no fancy GUI animations.
## Menu items
Items are shown in the menu on a single line, so they use short codes and appear in this order:
Items are shown in the menu on a single line, so they use short codes.
### Version
There is a static line on top which is presented on every sub-screen and reflects exact version of firmware. Version line on top has the following format - `vX.YYN.[ZZZZZZZZ]`:
- X: major version
- Y: minor version
- N: build type:
- R - git-related **r**elease tag vXX.YY
- T - git-related release **t**ag but version is not vXX.YY !
- D - git-related **d**ev branch
- B - git-related custom **b**ranch
- E - git-related from d**e**tached commit
- G - neither above but **g**it-related
- C - build from github **C**I during _pull request_
- H - build outside of a git tree (i.e. release tarball or **h**omebrew customization without git)
- S - something **s**pecial[^ERR]
- V - something **v**ery special[^ERR]
[^ERR]: `S` and `V` are reserved letters for cases when source of firmware is having very unique origin & configuration
- Z: short commit ID hash with 8 digits generated automatically from git (for git-related build types only)
I.e.:
- `v2.22H` means firmware built locally from tarball with release version of `2.22`
- `v2.22D.1A2B3C4D` means firmware with development version of `2.22` from git `dev` branch & with commit ID `1A2B3C4D` (so it can be traced for debug purposes)
- `v2.22R.5E6F7G8H` means firmware with official release version of `2.22` and it's properly tagged with `v2.22` git tag & with commit ID `5E6F7G8H`'
---
**Additional scroll-able items appear in this order**:
### Date
- This is a date of firmware compilation and it has the following format: `DD-MM-YY` (i.e., `01-07-23` means it has been built in July, 1st, 2023)
### ID
- This is used by Irons that have an ID and serial number to help check if the iron is authentic. All Pinecil V1 show the same ID number as this is the number programmed into the MCU.
- The new Pinecil V2 released Aug. 2, 2022 now uses MCU BL706, which enables generating a unique ID/Serial number to every iron. This can be used to verify your [Pinecil authenticity here](https://pinecil.pine64.org/).
@@ -52,7 +86,6 @@ This is the handle temperature or more accurately the reading of the Cold Juncti
This is used for CJC of the tip temperature.
> If CHan is extremely high, this indicates the temperature sensor isn't reading correctly ([see Troubleshooting](https://ralim.github.io/IronOS/Troubleshooting/))
### Max C
This indicates the max temperature in °C that the system estimates it can measure the tip reliably to.
@@ -106,6 +139,7 @@ Pressing (`+`) cycles through elements, and (`-`) or unplugging will exit the me
The first page shows the PD negotiation stage number; which can be used for diagnosing if PD is not working. Once negotiation is complete; use (`+`) button to advance to other screens which show the different proposals advertised for voltage and current (State 12 means all is good with the PD charger).
#### Below is a method for user modification to convert some early models of Pinecil V1 to safely support 24V on the DC5525 barrel.
⚠️ Warning: do this at your own risk, read everything in this document, and go to the [Pine64 community chat](https://wiki.pine64.org/wiki/Pinecil#Community_links) if you desire advice. An incorrect cut of the trace could render the Pinecil non-working.
Background: a simple user modification to the PCB on _some models_ of original V1 allows it to safely use DC barrel 24V by cutting a trace line to the Vbus which held it back to 21V. You can check whether your Pinecil V1 needs the update or can benefit from it by using a hidden trick in the PD debug menu.

View File

@@ -133,7 +133,7 @@ On Windows follow the instructions on the official documentation to install 'Win
3. Build the firmware for Pinecil V2:
```sh
cd source/source
cd source/
./build.sh -l EN -m Pinecilv2
```

View File

@@ -1,8 +1,62 @@
## Notes on the various supported hardware
### TS100
TS100\* is a neat soldering iron:
- can run from 9-25V DC;
- provides a power range that is determined by the input voltage;
- voltages below 12V don't overly work well for any substantial mass;
- the default firmware can be found [here](https://www.minidso.com/forum.php?mod=viewthread&tid=892&extra=page%3D1).
![](https://brushlesswhoop.com/images/ts100-og.jpg)
### TS80
TS80\* is a successor to TS100:
- uses _Quick Charge 3.0_ / _QC3_ capable charger only (18W max);
- doesn't support PD as it is not designed on the hardware level;
- the default firmware can be found [here](https://www.minidso.com/forum.php?mod=viewthread&tid=3208&extra=page%3D1).
![](https://core-electronics.com.au/media/catalog/product/4/2/4244-01.jpg)
### TS80P
TS80P\* is a successor to TS80:
- supports _Quick Charge 3.0_ (_QC3_: 9V/3A, 18W max);
- supports _Power Delivery_ (_PD_: 9V/3A & 12V/3A, 30W max)\*\*;
- the default firmware can be found [here](https://www.minidso.com/forum.php?mod=viewthread&tid=4085&extra=page%3D1).
\*\*: use valid PD device that supports 12V/3A as power source to get full 30W potential, otherwise the iron will fall back to 9V/18W power mode.
![](https://static.eleshop.nl/mage/media/catalog/product/cache/10/image/800x/040ec09b1e35df139433887a97daa66f/s/-/s-l1600_5.jpg)
### MHP30
- Accelerometer is the MSA301, this is mounted roughly in the middle of the unit
- USB-PD is using the FUSB302
- The hardware I2C bus on PB6/7 is used for the MSA301 and FUSB302
- The OLED is the same SSD1306 as everything else, but its on a bit-banged bus
MHP30 is a **M**ini **H**ot **P**late:
- accelerometer is the MSA301, this is mounted roughly in the middle of the unit;
- USB-PD is using the FUSB302;
- the hardware I2C bus on PB6/7 is used for the MSA301 and FUSB302;
- the OLED is the same SSD1306 as everything else, but its on a bit-banged bus.
### Pinecil
Pincecil\*:
- first model of soldering iron from PINE64;
- the default firmware can be found [here](https://files.pine64.org/os/Pinecil/Pinecil_firmware_20201115.zip).
![](https://pine64.com/wp-content/uploads/2020/11/pinecil-bb2-04.jpg?v=0446c16e2e66)
\*: Please note: these soldering irons do *NOT* contain DC/DC converters. This means that your power at the tip is a function of the supplied voltage. Just because the iron "supports" running at a wide range of voltages, you should always use a voltage near the upper limit where possible. It is highly recommended to use a PD adapter where possible as this allows the iron to _know_ the limitations of your supply. The marked irons can only turn the tip on and off in software, this means that they can't control the maximum power drawn from the supply. This is why when using PD the iron may select a lower voltage than your power supplies maximum. This is to prevent your power supply failing from over current. For more information about power management underhood, please, [see the related documentation section](https://ralim.github.io/IronOS/Power/).

View File

@@ -1,6 +1,36 @@
# Version Changes
## V2.19
# V2.21
### Features & changes
- Bluetooth Low Energy support for PinecilV2
- Large cleanup of translation files; and refactor of how we handle fonts for translations
- Fixes for I2C corruption on PinecilV2
- Option for using adjustable profiles on USB-PD or not
- Cleanups and improvements to the generated [documents website](https://ralim.github.io/IronOS)
### PinecilV2 notes
For Pinecil V2 users blisp is currently my recommended CLI tool for updating the device. It is built for all main OS's automatically. This does not apply to V1 devices. If your iron came with a blue grip, its a V1 and update the same as always. If your device came with a green silicone grip its a V2 device.
Alternatively you can use Spagett1's PineFlash tool that should provide a GUI interface for PinecilV1 & PinecilV2.
For a small number of V2 Pinecil devices there appears to be an interference issue between the Bluetooth Low Energy and some devices; more information here. If this occurs to you, please let us know in the issue and rollback to 2.20 for now.
# V2.20
- First "full" release for PinecilV2
- Loots of documentation updates
- Documentation is [now nicely readable as a site](https://ralim.github.io/IronOS/GettingStarted)
- A fair collection of bugfixes for PinecilV2
- Cold Junction Calibration was reworked and now occurs _at next boot_ to make it easier to perform when the device is cold
# V2.19
- Bug-fix Infinite Boot Logo
- Shutdown settings for MHP30
- Accelerometer sensitivity for MHP30
@@ -9,7 +39,9 @@
- Updated translations
- Improved documents, added features table
## V2.18
# V2.18
- Support for animated bootup logo's
- Bootup logo's moved to their own IronOS-Meta repo
- New Vietnamese translation (limited due to screen size)
@@ -17,8 +49,11 @@
- Updated translations
- Better Instructions/documents
## V2.17
### Big changes
# V2.17
### Features & changes
- Indicate status of VBus for modding Pinecil (debug menu)
- Better hall effect sensor sensitivity adjustment (larger range with more steps)
- Temperature increment will "round" to nearest multiple of increase amount
@@ -32,7 +67,9 @@
- Fixed automatic orientation for newer TS80P's with the SC7 accelerometer
- User interface slight changes
- New `metadata.zip` file to allow the Pine Updater to automatically fetch information on releases
### Notes
- VBus mod detection may not play well with all PPS chargers. If your iron reboots when you view this in the debug menu its not a fault. ([#1226](https://github.com/Ralim/IronOS/issues/1226))
- `metadata.zip` is only designed for use by automatic software, ignore it for normal use
- More details on Pinecil VBus mod coming via other channels.
@@ -41,39 +78,38 @@
- -> Release has been updated to build `e065be3` after one bug with the BMA223 was found.
## V2.16
# V2.16
* Overhaul of the Timer+ADC setup with help from @sandmanRO
* Overhaul of the PID with help from @sandmanRO
* Settings _should_ now upgrade in place to future versions, with resets only happening to new/changed settings
* Shows error if tip runaway (failed temperature sensor) is detected
* USB-PD now has a timeout, to allow forcing QC3 negotiation to start faster
* QC3 Voltages are now adjustable to user desired setpoint
* Added a small tolerance to allow "overvoltage" on QC3 above unit specifications.
* * Please note: Doing this is entirely at your own risk!
* New Advanced view that is much nicer to use and a very good daily driver option from @Mel-kior
* OLED brightness and contrast thanks to @alvinhochun
* Scrollbar is fixed so it doesnt jump around when menus are shown/hidden
* Moved to `.dfu` files from `.bin` to make flashing commands easier
* Every language had translation updates I believe
* Romanian language added
- Overhaul of the Timer+ADC setup with help from @sandmanRO
- Overhaul of the PID with help from @sandmanRO
- Settings _should_ now upgrade in place to future versions, with resets only happening to new/changed settings
- Shows error if tip runaway (failed temperature sensor) is detected
- USB-PD now has a timeout, to allow forcing QC3 negotiation to start faster
- QC3 Voltages are now adjustable to user desired setpoint
- Added a small tolerance to allow "overvoltage" on QC3 above unit specifications.
- Please note: Doing this is entirely at your own risk!
- New Advanced view that is much nicer to use and a very good daily driver option from @Mel-kior
- OLED brightness and contrast thanks to @alvinhochun
- Scrollbar is fixed so it doesnt jump around when menus are shown/hidden
- Moved to `.dfu` files from `.bin` to make flashing commands easier
- Every language had translation updates I believe
- Romanian language added
## V2.15
# V2.15
### Features & changes
## Feature upgrades:
- MHP30 support
- Multi-lingual firmware combinations now exist for Pinecil
- More fine grained voltage controlled options
- USB-PD improvements (version one and two)
- More configuration options for power pulse
- All font / character encoding has been very reworked
- More translation updates than one can count
- More languages 😱
* MHP30 support
* Multi-lingual firmware combinations now exist for Pinecil
* More fine grained voltage controlled options
* USB-PD improvements (version one and two)
* More configuration options for power pulse
* All font / character encoding has been very reworked
* More translation updates than one can count
* More languages 😱
### MHP30
### MHP30 support
The MHP30 is a small reflow station from Miniware.
Thanks to a massive amount of help from @g3gg0 this firmware brings the beginnings of support for this unit.
@@ -84,7 +120,8 @@ Programs the same as any one Miniware unit using drag and drop.
The flood doors are now open for feature requests for this unit :)
## V2.14
# V2.14
- Fixing auto rotation bug in the LIS accelerometer in the TS80/TS80P
- Adds support for two new accelerometers
@@ -101,7 +138,8 @@ The flood doors are now open for feature requests for this unit :)
- Cleanup the folder name of the source code #800
- clang-format spec setup #801
## V2.13
# V2.13
- First _official_ Pinecil release
- All of the wire for Pinecil releases added
@@ -118,7 +156,8 @@ The flood doors are now open for feature requests for this unit :)
- Fixed bug with accelerometer model on Pinecil
- Rework of all of the temperature curves for better accuracy
## V2.12
# V2.12
- Only released as pre-release
- [TS80P] Improvements to the PD negotiation to handle a few more adapters cleanly
@@ -126,36 +165,42 @@ The flood doors are now open for feature requests for this unit :)
- Clean up the menu (removed both enables and settings, so that you can turn things off easier)
- Removing the very old single line menu style.
## V2.11
# V2.11
- First TS80P support
- Added in a USB-PD driver stack for the FUSB302
- Fixed some graphical glitches
## V2.10
# V2.10
- GUI polish (animations and scroll bars)
- Power pulse to keep power supplies alive
- Adjustable tip response gain
## V2.09
# V2.09
- Adjustable steps in temperature adjustment
- Git hash now in build string
- Adjustable language to set if US units are available or not
- Some minor QC3 improvements
## V2.08
# V2.08
- Fixes auto start in sleep mode
- Power limiters
## V2.07
# V2.07
- QC fixes
- Cosmetic fixes for leading 0's
## V2.06
# V2.06
- Warning on settings reset
- Temp temp re-write
@@ -163,27 +208,33 @@ The flood doors are now open for feature requests for this unit :)
- Hide some leading 0's
- Menu timeouts
## V2.05
# V2.05
- Language updates
## V2.04
# V2.04
- GUI updates
## V2.03
# V2.03
- Support for new accelerometers
## V2.02
# V2.02
- Adds small font
## V2.01
# V2.01
- Newer settings menu
## V2.00
# V2.00
- Complete re-write of the low layer system to use the STM32 HAL for easier development
- This allowed easier setup for the new ADC auto measuring system
@@ -193,80 +244,96 @@ The flood doors are now open for feature requests for this unit :)
- Added detailed screen views
- Added smaller font for said screen views
## V1.17
# V1.17
- Added blinking cooldown display
- Allowed smaller sleep timeout values
- New font!
- Automatic startup option
## V1.16
# V1.16
- Added automatic rotation support
- Added power display graph
## V1.15
# V1.15
- Added support for a custom bootup logo to be programmed via the DFU bootloader
## V1.14
# V1.14
- Changed input voltage cutoff to be based on cell count rather than voltage
## V1.13
# V1.13
- Swapped buttons for menu to prevent accidentally changing first menu item
- Added auto key repeat
## V1.12
# V1.12
- Increases sensitivity options to be 1\*9 with 0 off state
- Fixes issue where going from COOL \*> soldering can leave screen off
## V1.11
# V1.11
- Boost mode
- Change sensitivity options to be 1\*8
## V1.10
# V1.10
- Adds help text to settings
- Improves settings for the display update rate
## V1.09
# V1.09
- Adds display modes, for slowing down or simplifying the display
## V1.08
# V1.08
- Fix settings menu not showing flip display
## V1.07
# V1.07
- Adds shutdown time to automatically shutdown the iron after inactivity
## V1.06
# V1.06
- Changes H and C when the iron is heating to the minidso chevron like images
## V1.05
# V1.05
- Adds ability to calibrate the input voltage measurement
## V1.04
# V1.04
- Increased accuracy of the temperature control
- Improved PID response slightly
- Allows temperature offset calibration
- Nicer idle screen
## V1.03
# V1.03
- Improved Button handling
- Ability to set motion sensitivity
- DC voltmeter page shows input voltage
## V1.02
# V1.02
- Adds hold both buttons on IDLE to access the therometer mode
- Changes the exit soldering mode to be holding both buttons (Like original firmware)

View File

@@ -1,56 +1,79 @@
# Startup Logos
# Startup Logo / Animation
This firmware supports a user created bootup logo.
By default, there is _not_ one included in the firmware. This means that once flashed they generally stay. If you want no logo again, you would have to flash a blank image to the bootup logo.
When the device starts, you can have it optionally show either a static image or an animation. You can also set if these should stay on the screen or dismiss after some amount of time.
These can be an elegant way to personalise your device or just mark it as your one at a meetup where there may be multiple.
All devices supported by IronOS support this logo, and follow a similar process for setting one up. Please read the below general information as well as any model specific notes.
Bootup logos are stored at the end of the flash storage in the Iron; next to the user settings. By locating them at the end of storage they are not erased during the normal firmware upgrade process. Once a logo is set it should stay (unless we need to change things in the main firmware); so to erase your logo you will also find that we generate an erase file. Alternatively your method of flashing _may_ support doing a full erase flash which will also work for this.
## Generating the Logo files
There are community logo's already converted and ready to use in [IronOS-Meta/releases](https://github.com/Ralim/IronOS-Meta/releases).
Because logos are stored at a fixed location in the device's internal flash; we can use the same method to flash these as you would normal firmware.
This does also mean that we need to convert the image/animation file into the format that IronOS understands.
IronOS uses a pre-processed file format to dramatically reduce the amount of space required to store the image; allowing for animations and saving space.
In the [IronOS-Meta](https://github.com/Ralim/IronOS-Meta) repository is a `python` script to convert images into this pre-processed file format.
Additionally, memebers of the community have contributed back their logo images as well. We provide these pre-converted for all models and ready to use in [IronOS-Meta/releases](https://github.com/Ralim/IronOS-Meta/releases).
Download the zip for Pinecil or Miniware and then install using the instructions in the Flashing section below.
If you want to make custom art then it needs to be converted with a Python script. The script and other needed files are in [IronOS-Meta](https://github.com/Ralim/IronOS-Meta/). Go to that folder, then it is easiest to select the green Code button (upper right), then Download Zip. This way you get all the files you need and some extras. You only need what is inside Boot Logos. Put your custom image inside the Boot Logos folder with all python script files already there.
If you want to make custom art then it needs to be converted with the Python script.
You can checkout the repository or use the download-as-zip button in the Github web interface to download the code.
The Python script converts an image passed into it on the command line into both a `.hex` file and a `.dfu` to be uploaded to the iron in DFU mode. The image can be in color and any size, but it will be resized and converted to 1-bit color. However, it looks best if you create a 96x16 image (Png or Bmp) in any image editor and color the pixels black & white manually.
Inside the download code is a `Boot Logos` folder, inside here is the python script required for logo conversion.
It is easiest if you copy your logo file to be converted into this folder too, in order to keep commands shorter.
The converter requires at least Python3 and Pillow apps. Follow online instructions for installing Python and Pillow.
The image can be in color and any size, but it will be resized and converted to 1-bit color. However, it looks best if you create a 96x16 image (`png` or `bmp`) in any image editor and color the pixels black & white manually. The thresholding used for converting colour to B&W may not always work as well as one would hope.
For Windows, it is recommended to use Windows PowerShell instead of Command.
Open Powershell (run as administrator), type python to install it, it will open microsoft store where you can install it free.
Go back to Powershell and install Pillow. What works can vary, but this command may work:
The converter requires at least Python3 and Pillow apps. Follow online instructions for installing Python and Pillow on your machine. Any reasonably recent version should work well.
python -m pip install Pillow
or
python3 -m pip install pillow
When running the script on the Windows operating system; it is recommended to use `Powershell` rather than the old `Command Prompt`.
If the above does not work, see [this page](https://stackoverflow.com/a/20061019/6705343) on StackOverflow about installing Pillow.
Now that Python and Pillow are successfuly installed, you can convert an image.
For installing pillow; you can install it via your package manager (Debian and similar distros) or via pip. To install via pip the command should be `python -m pip install pillow`.
Go back to Powershell and type this command (change infile.png to the name of your image):
In your shell you can now execute `python img2logo.py input.png out -m ${model}` to convert the file `input.png` and create output files in the folder `out`.
The model should be replaced by one of the following options:
- `python img2logo.py infile.png out -m` for Miniware
- `python img2logo.py infile.png out -p` for Pinecil
- `miniware` for older Miniware Irons -> TS100, TS80, TS80P
- `pinecilv1` for the Pinecil V1
- `pinecilv2` for the Pinecil V2
- `ts101` for the Miniware TS101 [^1]
- `s60` for the Squire S60 [^1]
- `mhp30` for the Miniware MHP30
Run `python img2logo.py --help` to see available options. Replace the word python with python3 if you have multiple versions of python installed.
Different models are used for different flash locations for the image storage.
This means that files are **not** interchangeable between devices. If you are flashing multiple devices you will need to create a different file for different models.
After processing its expected to have a `.hex` and `.dfu` file created to be used. Which one to use will depend on your device.
Note: make sure your image file is in the same folder as script files (img2logo.py, output_dfu.py, output_hex.py).
[^1] Note that these devices have larger resolution screens that the logo system supports right now. Fixes are coming for this soon, roughly scheduled for 2.23.
## Flashing the Logo
### Miniware (TS100/TS80/TS80P)
### Upload via virtual disk (TS100,TS101,TS80,TS80P,S60,MHP30)
Upload the HEX file to the iron in DFU mode and, if the file's extension changes to .RDY, your custom splash screen should show up on startup.
You perform this the same way as if you were flashing a new firmware, and all the existing notes around this apply.
If you normally update your firmware by having your device show up as a flash drive this is the method for you.
This applies to all Miniware + S60 devices running the stock DFU bootloader.
If you have flashed the `IronOS-dfu` alternative bootloader, you should use the `.dfu` files instead
Place your device into update mode (usually by holding the B button when connecting your device to your pc via USB).
Upload the `.hex` file you created earlier as if it was a firmware update. Do any normal tricks required for firmware flashing if any are required.
Afterwards the firmware should indicate that it has worked (often by creating a `.rdy` file).
### Pinecil V1
At this point unplug your iron and re-connect it to power to start normally and the logo should welcome you.
For Pinecil V1, we require using dfu-util to flash the logo art (Pinecil does not use hex).
[Pine64 Updater](https://github.com/pine64/pine64_updater/releases) is the easiest way to load the Bootup logo onto Pinecil as it already includes the necessary DFU library. Connect Pinecil to a PC, and open the Updater the same as updating firmware.
Select Custom > Browse to the DFU image file you just made > Update to install.
### Upload via GUI flash tool (PinecilV1/V2)
The bootup logo is stored in a separate location than the IronOS firmware and you do not have to worry about it changing or breaking the IronOS.
If you normally upload your firmware using a helper application, they should accept the files from the bootlogo the same as the normal firmware.
Try the `.dfu` file first and then the `.hex`. If neither work then the application may not be updated to be able to handle boot logos. And you may need to use a different/newer tool.
You could also use dfu-util and use Command line to install it.
### Upload via dfu-util (PinecilV1/IronOS-DFU)
- `dfu-util -D logo_file.dfu`
For the PinecilV1 and for any devices that have been converted to use `IronOS-DFU` as the bootloader you can flash these via the `dfu-util` command line tool.
For these flash as per usual using the `.dfu` file. Afterwards power cycle and the logo should show up.
### Upload via blisp (PinecilV2)
For the PinecilV2 we suggest `blisp` as the command line tool to use if you are not using a GUI tool. `blsip` has been updated to accept `.dfu` files as well as the `.bin` files it historically used. As such you use the `.dfu` file for the logo and flash as per normal otherwise and it will work and reboot at the end. It should show you your new logo after flashing.

View File

@@ -20,6 +20,8 @@ The resistance of the tip is a fixed constant in ohms (Ω):
This means the power delivered to the soldering tip is proportional to the voltage squared.
Therefore the Pinecil and TS100 perform poorly when run off 12V power supplies and may issue a `Thermal Runaway` message (weak power supply).
#### Use an [Ohm calculator](https://www.rapidtables.com/calc/electric/power-calculator.html#dc) to quickly derive watts.
| Type | Volts| / | Tip Ω | = | Amps | * | Volts | = | Watts |
@@ -44,3 +46,8 @@ To measure the tip temperature in the iron, the iron has a small op-amp connecte
Once the output is turned off (via the FET), the system has a recovery time as the tip capacitance discharges and the op-amp exits saturation. After this delay period, the MCU's ADC (analog-to-digital converter) samples the output of the op-amp 8 times quickly and then sets a flag to turn the PWM output back on.
This enforces a small dead time in the output signal while this occurs, so there is a balance between sampling the temperature often to maintain a stable tip temperature control and sampling less often to increase the maximum power deliverable to the tip ([see Complexity of measurement](https://ralim.github.io/IronOS/Temperature/#complexity-of-measurement)).
## Power sources
Supported by IronOS hardware may use different power sources (chargers/powerbanks/battery packs) with different standards & protocols (QC/PD/etc). For more information collected by the community on that, please, [see the related documentation section](https://ralim.github.io/IronOS/PowerSources/).

View File

@@ -0,0 +1,80 @@
# Power sources
Supported by IronOS hardware may use different power sources (chargers/powerbanks/battery packs) with different standards & protocols (QC/PD/etc). This document contains information collected by the community with tested power sources.
This is not ads but first hands-on experience results from real users since some chargers/powerbanks regardless labels on the box may not fully support what's declared!
## QC(3)
### Compatible Devices (QuickCharge for TS80/P)
The following table is the list of compatible device and remarks when powering up the TS80 through it for both stock firmware from MiniDso and IronOS. The list of devices below are primarily taken from [#349](https://github.com/Ralim/ts100/issues/349#issuecomment-449559806)
| Device Name | Stock FW | IronOS FW |
|-------------|:--------:|:---------:|
| Anker PowerCore II Slim 10000 Powerbank | Not Working | Good |
| [Aukey 26.5/30 Ah Powerbank (PB-Y3)](https://www.aukey.com/products/30000mah-power-bank-with-quick-charge-3-0/) | OK\*\* (15sec t/o) | OK\*\* (15sec t/o) |
| Aukey QC3 Charger | Good | Only 5V |
| [Aukey QC3 Charging Station (PA-T11)](https://www.aukey.com/products/6-port-charging-station-with-quick-charge-3-0-pa-t11/) | Good | Good |
| Besiter 20000mah QC3 | Not Working | Only 5V |
| BlitzWolf BW-P5 | Not Working\* | Unknown |
| BlitzWolf BW-PF2 | OK\*\* (10sec t/o) | OK\*\* (10sec t/o) |
| BlitzWolf BW-PL3 | Low Voltage | OK |
| BlitzWolf BW-PL4 | Unknown | Not Working |
| BlitzWolf BW-S6 | Unknown | OK |
| Charmast 20800 mAh QC 3.0 | Low Voltage\* | Good |
| Clas Ohlson Powerbank USB-C 10050 mAh, Clas Ohlson | Unknown | OK\*\* |
| [Cygnett 20,000mAh USB-C](https://www.cygnett.com/products/20-000mah-usb-c-power-bank-in-black)| Not Working | Good |
| [HAME H13D](https://www.amazon.com/dp/B07GWMFW82) 10000mAh PD/QC3.0 Power Bank | OK\*\* (30sec t/o) | OK\*\* (30sec t/o?) |
| HIPER 10000 mAh 18W PD+QC3.0 (MPX10000) | Low Voltage | OK\*\* (30sec t/o) |
| [iMuto Portable Charger 30000mAh](https://www.amazon.com/gp/product/B01MXCMGB8/ref=ppx_yo_dt_b_asin_title_o05_s00) | Low Voltage | Good |
| ISDT BG-8S | Good | Good |
| [iVoler Quick Charge 3.0 USB C 30W 2-Port USB](https://www.amazon.de/dp/B077P8ZZB8/) | Good | Good |
| [imuto X6L Pro 30000 mah](https://www.amazon.com/dp/B01MXCMGB8) | Not Working | Bad |
| Interstep 10000 mAh 18W PD+QC3.0+FCP+AFC (MPX10000) | Good | OK\*\* (30sec t/o) |
| Jackery Black 420 | Low Voltage | Good |
| Kogan Premium 80W 5 Port USB Charger| Low Voltage | Good |
| Nokia AD-18WE | Unknown | OK |
| [Omars 2000mAh USB-C PD+QC3.0 (OMPB20KBUPLT / OMPB20KPLT)](https://www.amazon.com/dp/B07CMLVR6C) | OK\*\* (20sec t/o) | Unknown |
| Polaroid PS100 Powerbank (https://polaroid.com/products/ps100) | Good | Good |
| Xiaomi 10000mAh Mi Power Bank Pro (PLM03ZM) | Good | Unknown |
| Xiaomi 10000mAh Mi Power Bank 2i (PLM09ZM) | Good | Good |
| Xiaomi 20000mAh Mi Power Bank 3 (PLM07ZM) | Unknown | Good Type A, Bad Type C |
| [ZeroLemon ToughJuice](https://www.amazon.com/dp/B01CZR3LT2/) 30000mAh PD/QC2.0 Power Bank | OK\*\* (20sec t/o) | OK\*\* (20sec t/o?) |
| [URUAV XT-60 to USB module](https://www.banggood.com/URUAV-XT-60-to-USB-Charger-Converter-Support-3S-6S-LiPo-Battery-10_5V-32V-Input-3V-20V-Output-45W-Max-Fast-Charging-Adapter-For-RC-Racing-Drone-p-1475876.html) | Unknown | Good |
\* Need further tests on newer firmware
\*\* Most Power Banks shut down if current draw drops below 50mA, assuming that charging is complete and avoiding overcharging. Custom firmware is designed to avoid this until it enters Zzzz mode.
### DIY QC3.0
You may also build your own QC3.0 power source that requires this little [thing](https://www.tindie.com/products/soubitos/qualcomm-qc2-3-diy-8-32vin-36-12vout-3a-max/) and have at least 3S lithium packs or any input voltage from 8 to 32V.
You can also go for an [alternate module](https://www.banggood.com/DC-Buck-Module-12V24V-to-QC3_0-Single-USB-Mobile-Charging-Board-p-1310585.html) which has at least one good review of it.
**DISCLAIMER:** _**We do not hold any responsibility for accidents that happen when building your own QC3.0 power source!!!**_
## PD
The following additional table is the list of devices compatible with hardware which requires Power Delivery support (>= 30W). Devices from the list have been successfully tested & used with TS80P in PD mode. Please, keep in mind that:
- PD can be provided only through usb-c <-> usb-c cable;
- not only a charger but a cable itself should be capable to carry higher wattages.
### Compatible Devices (PowerDelivery for TS80P)
| Device Name | IronOS FW |
|-------------|:---------:|
| Traver Charger QC09 (45W max)\* | OK |
| Xiaomi AD65GEU Mi 65W Fast Charger with GaN Tech (AD65GEU, 65W max) | OK |
\* Comes as an _option_ for extra price in the package with TS80P from [official store](https://aliexpress.com/item/4000764937427.html) or from [NovelLife store separately](https://aliexpress.com/item/4001316262433.html) on AliExpress.
Please, DO NOT BUY cheap "fast chargers with QC/PD support" for a few dollars online (i.e., less than ~10$): if you check reviews, then you see that they are phonies - even if you get lucky, you probably get 5V/1A max from them.

32
Documentation/README.md Normal file
View File

@@ -0,0 +1,32 @@
<!-- THIS FILE IS AUTOGENERATED by "scripts/deploy.sh docs_readme" based on nav section in scripts/IronOS-mkdocs.yml config -->
<!-- THIS FILE IS NOT SUPPOSED TO BE EDITED MANUALLY -->
#### This is autogenerated README for brief navigation through github over official documentation for IronOS project
#### This documentation is also available [here online](https://ralim.github.io/IronOS)
- [Home](../Documentation/index.md)
- [Getting Started](../Documentation/GettingStarted.md)
- Flashing the firmware
- [MHP30](../Documentation/Flashing/MHP30.md)
- [Pinecil V1](../Documentation/Flashing/Pinecil%20V1.md)
- [Pinecil V2](../Documentation/Flashing/Pinecil%20V2.md)
- [TS80(P)](../Documentation/Flashing/TS80(P).md)
- [TS100](../Documentation/Flashing/TS100.md)
- Operation
- [Main Menu](../Documentation/Menu.md)
- [Settings](../Documentation/Settings.md)
- [Debug Menu](../Documentation/DebugMenu.md)
- [Power](../Documentation/Power.md)
- [Temperature](../Documentation/Temperature.md)
- [Startup Logo](../Documentation/Logo.md)
- Hardware
- [Hall Sensor (Pinecil)](../Documentation/HallSensor.md)
- [Bluetooth (Pinecil V2)](../Documentation/Bluetooth.md)
- [Hardware Notes](../Documentation/Hardware.md)
- [Troubleshooting](../Documentation/Troubleshooting.md)
- [Known Hardware Issues](../Documentation/HardwareIssues.md)
- [Power sources](../Documentation/PowerSources.md)
- [Translations](../Documentation/Translation.md)
- [Development](../Documentation/Development.md)
- [Changelog](../Documentation/History.md)

View File

@@ -14,6 +14,18 @@ But it is helpful to do some basic diagnostics first just in case the issue is e
The **VAST** majority of issues are poor soldering or cold solder joints.
If you can open up your iron, give it a good look at all the connection points, and use another iron to reflow any suspicious ones, this can fix most issues.
## Tip Shorted warning
If you are powering up a device that supports tip resistance detection (TS101 and Pinecilv2 as of present), the firmware checks the readings of the raw tip resistance and sorts these into three "bins". `8 ohm tips`, `6.2 ohm tips` and `tip-shorted`. The tip resistance is used when negotiating USB-PD and in thermal calculations.
The `tip-shorted` option is selected if your tip is measured to be abnormally small. This could indicate a failed driver mosfet or a failed tip.
When this warning is shown; heating will be disabled to protect from damage. As trying to heat a shorted tip can damage the iron itself.
It is best to take out your tip and manually measure and verify the tip's resistance. It should be 6-8 ohms (depending on tip type). When measuring resistances this small some multimeters can struggle. If you have access to a current limited bench power supply, you can try doing a 4 wire measurement by measuring the voltage drop on the tip while applying a known current. `(R=V/I)`.
If the tip measures correctly you may have a damaged driver mosfet; it would be ideal to open your iron and test the mosfet is operating correctly.
If after both of these checks everything looks as expected, feel free to open a discussion on IronOS to talk about the issue (Or for Pinecil the community chat can be a much faster response).
## High tip temp reading when the tip is cool
If you are finding the tip is reading high; the first fields to check in the Debug menu are `RTip` and `CHan`.
@@ -63,10 +75,23 @@ If the tip does not heat up, it is worth trying to reflash the firmware first in
The main failure mode of the OLED display module is usually poor soldering on the OLED display cable to the main PCB.
As this is soldered by hand generally, it's the most prone to failures.
If you have a poor connection or a floating pin, you can end up with a state where the screen works _sometimes_ and then freezes or only works on some power cycles. It might work on very old versions of IronOS but not the newest ones. You could try to reflow the pins for the OLED. On 96x16 screens, carefully peel it back from the adhesive and reflow the solder on the pins. If needed, replacement Oled screens are common and low cost.
If you have a poor connection or a floating pin, you can end up with a state where the screen works _sometimes_ and then freezes or only works on some power cycles. It might work on very old versions of IronOS but not the newest ones. You could try to reflow the pins for the OLED. On 96x16 screens, carefully peel it back from the adhesive and reflow the solder on the pins.
As the OLED runs on an I2C bus, there are pull up resistors on the SDA and SCL pins. It is worth checking these as well, while they don't often fail, issues with these can cause _weird_ display issues.
If after all of the checks OLED is still blank, or screen works but pixels are barely visible, although soldering iron itself is working (i.e., you can safely check that it's turning on, heating up & melting solder successfully), then it means that _most likely_ OLED is dead. But it can be relatively easily replaced. Models like `TS100`, `TS80`, and `TS80P` share the same OLED screen which can be bought online and used for replacement. To do so:
- find & buy at electronics shop [of your choice] display with the following spec line:
```OLED 0.69 inch / 14 pins / 96 x 16 pixels / **9616TSWC** / I2C IIC```
- disassemble your soldering iron;
- desolder old OLED and solder back new one;
- assemble your soldering iron back.
There are a few youtube videos how to do it like [this one for `TS100`](https://www.youtube.com/watch?v=HlWAY0oYPFI).
Unfortunately, this is a well-known issue of screens with OLED technology: sooner or later the brightness is starting to _"fade out"_ until complete off. Usually common recommendations to prolong its lifetime are: reduce brightness & reduce too often updates (i.e., disable animations). But your results may vary since there were reports when users couldn't see anything after turning on soldering irons which were just laying in a box for a few months after buying. And there are users with first `TS100` models not having any issues with display at all.
## Tip heats when not in heating mode
⚠️ DISCONNECT YOUR TIP ⚠️

View File

@@ -8,7 +8,7 @@ For soldering irons that are designed to be powered by batteries (TS100 & Pineci
Currently **31** languages are supported. When downloading the firmware for your soldering iron, take note of the language code in the file name.
This project is considered feature complete for use as a soldering iron, _so please suggest any feature improvements you would like!_
This project is considered stable & feature complete for everyday use with a supported device, _so please suggest any feature improvements you would like!_
_This firmware does **NOT** support the USB port while running for changing settings. This is done through the onscreen menu only. Logos are edited on a computer and flashed like firmware._
@@ -39,6 +39,12 @@ For notes on installation for your device, please refer to the flashing guide fo
- [TS80 / TS80P](https://ralim.github.io/IronOS/Flashing/TS80%28P%29/)
- [TS100](https://ralim.github.io/IronOS/Flashing/TS100)
But the _generic_ [TL;DR](https://www.merriam-webster.com/dictionary/TL%3BDR) is to:
- [download firmware from here](https://github.com/Ralim/IronOS/releases) for the correct model with suitable language support;
- put a device into DFU/bootloader mode (usually by keep holding A/+/front button while connecting a device to power source to power device on);
- flash the firmware by drag-n-drop the firmware file using a file manager of your OS **or** using a separate flashing tool.
## Key Features
- PID style iron temperature control
@@ -70,3 +76,25 @@ When on the main screen and having the tip plugged in, the unit shows a pair of
- Holding down the button near the USB end will show the _[debug menu](https://ralim.github.io/IronOS/DebugMenu/)._ In _soldering mode_ this ends the heating.
Operation details are over in the [Menu information.](https://ralim.github.io/IronOS/Menu/)
## Feedback
If you would like to:
- report any issue related to IronOS
- request a feature
- provide some suggestion
then you can [fill this form](https://github.com/Ralim/IronOS/issues/new/choose) using github account\*.
And if you would like to:
- ask more generic question about IronOS/supported hardware/something you're curious about/etc.
- reach out community to chat with
- share your soldering & DIY skills
- share some interesting finding
- share useful related hardware/software with others
or _anything_ like that, then you can use forum-like [Discussions here](https://github.com/Ralim/IronOS/discussions).
\*: You may need to create it first if you don't have one - it's free of charge.

View File

@@ -9,5 +9,4 @@ services:
dockerfile: scripts/IronOS.Dockerfile
command: /bin/sh
volumes:
- ./scripts/ci:/build/ci:Z
- ./:/build/source:Z
- ./:/build/ironos:Z

192
Makefile
View File

@@ -19,8 +19,6 @@ ifdef DOCKER_COMPOSE
DOCKER_BIN:=$(DOCKER_COMPOSE)
else ifdef DOCKER_TOOL
DOCKER_BIN:=$(DOCKER_TOOL) compose
else
$(error ERROR: Can't find docker-compose nor docker tool. Please, install docker and try again)
endif # DOCKER_* checks
endif # DOCKER_BIN
@@ -29,6 +27,14 @@ ifndef MKDOCS
MKDOCS:=mkdocs
endif
# build output related directories
ifdef OUT
OUT_DIR=$(OUT)
else
OUT_DIR=$(CURDIR)/BUILDS
endif
OUT_HEX=$(CURDIR)/source/Hexfile
### global static variables
@@ -45,64 +51,91 @@ DOCKER_CMD=$(DOCKER_BIN) -f $(DOCKER_YML) run --rm builder
# MkDocs config
MKDOCS_YML=$(CURDIR)/scripts/IronOS-mkdocs.yml
# supported models
MODELS=TS100 TS80 TS80P Pinecil MHP30 Pinecilv2 S60 TS101 # target names & dir names
MODELS_ML=Pinecil Pinecilv2 # target names
MODELS_MULTILANG=Pinecil_multi-lang Pinecilv2_multi-lang # dir names
# zip command (to pack artifacts)
ZIP=zip -q -j -r
### targets
# default target to show help
help:
@echo
@echo "Welcome!\nThis is $(INFO)"
@echo "Welcome!"
@echo "This is $(INFO)"
@echo "To read more about supported commands (aka \"targets\"), type \"make list\"."
@echo "But if you're impatient then just type \"make docker-build\" - it will:"
@echo "\t * download, configure & start docker container"
@echo "\t * compile builds of IronOS firmware for all supported models inside that container"
@echo "\t * export generated binaries to \"scripts/ci/artefacts/\" local directory"
@echo " * download, configure & start docker container"
@echo " * compile builds of IronOS firmware for all supported models inside that container"
@echo " * export generated binaries to \"scripts/ci/artefacts/\" local directory"
@echo "Patches are welcome. Happy Hacking!"
@echo
# target to list supported targets with additional info
list:
@echo ""
@echo
@echo "Supported top-level targets:"
@echo "\t * help - shows short basic help"
@echo "\t * list - this output"
@echo "\t * docker-shell - start docker container with shell inside to work on IronOS with all tools needed"
@echo "\t * docker-build - compile builds of IronOS for supported models inside docker container and place them to \"scripts/ci/artefacts/\""
@echo "\t * docker-clean - delete created docker container (but not pre-downloaded data for it)"
@echo "\t * docs - generate \"site\"/ directory with documentation in a form of static html files using ReadTheDocs framework and $(MKDOCS_YML) local config file"
@echo "\t * docs-deploy - generate & deploy docs online to gh-pages branch of current github repo"
@echo "\t * clean-full - delete files & directories generated by all the targets above "
@echo " * help - shows short basic help"
@echo " * list - this output"
@echo " * docker-shell - start docker container with shell inside to work on IronOS with all tools needed"
@echo " * docker-build - compile builds of IronOS for supported models inside docker container and place them to $(OUT_DIR) (set OUT env var to override: OUT=/path/to/dir make ...)"
@echo " * docker-clean - delete created docker image for IronOS & its build cache objects (to free a lot of space)"
@echo " * docker-clean-cache - delete build cache objects of IronOS docker image EXCEPT the image itself"
@echo " * docker-clean-image - delete docker image for IronOS EXCEPT its build cache objects"
@echo " * docs - generate \"site\"/ directory with documentation in a form of static html files using ReadTheDocs framework and $(MKDOCS_YML) local config file"
@echo " * docs-deploy - generate & deploy docs online to gh-pages branch of current github repo"
@echo " * tests - run set of checks, linters & tests (equivalent of github CI IronOS project settings for push trigger)"
@echo " * clean-build - delete generated files & dirs produced during builds EXCEPT docker image & its build cache"
@echo " * clean-full - delete generated files & dirs produced during builds INCLUDING docker image & its build cache"
@echo ""
@echo "NOTES on supported pass-trough targets:"
@echo "\t * main Makefile is located in source/ directory and used to build the firmware itself;"
@echo "\t * this top-level Makefile supports to call targets from source/Makefile;"
@echo "\t * if you set up development environment right on your host, then to build firmware locally, you can just type right from here:"
@echo " * main Makefile is located in source/ directory and used to build the firmware itself;"
@echo " * this top-level Makefile supports to call targets from source/Makefile;"
@echo " * if you set up development environment right on your host, then to build firmware locally, you can just type right from here:"
@echo
@echo "\t> make firmware-LANG_ID model=MODEL_ID"
@echo " $$ make firmware-LANG_ID model=MODEL_ID"
@echo
@echo "Full list of current supported IDs:"
@echo "\t * LANG_ID: BE BG CS DA DE EL EN ES FI FR HR HU IT JA_JP LT NB NL_BE NL PL PT RO RU SK SL SR_CYRL SR_LATN SV TR UK VI YUE_HK ZH_CN ZH_TW"
@echo "\t * MODEL_ID: TS100 TS101 TS80 TS80P MHP30 Pinecil Pinecilv2 S60"
@echo " * LANG_ID: $(shell echo "`ls Translations/ | grep -e "^translation_.*.json$$" | sed -e 's,^translation_,,g; s,\.json$$,,g; ' | tr '\n' ' '`")"
@echo " * MODEL_ID: $(MODELS)"
@echo
@echo "For example, to make a local build of IronOS firmware for TS100 with English language, just type:"
@echo "\n\t> make firmware-EN model=TS100"
@echo
@echo " $$ make firmware-EN model=TS100"
@echo
# bash one-liner to generate langs for "make list":
# echo "`ls Translations/ | grep -e "^translation_.*.json$" | sed -e 's,^translation_,,g; s,\.json$,,g; ' | tr '\n' ' '`"
# detect availability of docker
docker-check:
ifeq ($(DOCKER_BIN),)
@echo "ERROR: Can't find docker-compose nor docker tool. Please, install docker and try again"
@exit 1
else
@true
endif
# former start_dev.sh
docker-shell: $(DOCKER_DEPS)
docker-shell: docker-check $(DOCKER_DEPS)
$(DOCKER_CMD)
# former build.sh
docker-build: $(DOCKER_DEPS)
$(DOCKER_CMD) /bin/bash /build/ci/buildAll.sh
docker-build: docker-check $(DOCKER_DEPS)
$(DOCKER_CMD) make build-all
# delete container
docker-clean:
# delete docker image
docker-clean-image:
-docker rmi ironos-builder:latest
# delete docker build cache objects
docker-clean-cache:
-docker system prune --filter label=ironos-builder:latest --force
# delete docker image & cache related to IronOS container
docker-clean: docker-clean-image docker-clean-cache
# generate docs in site/ directory (DIR for -d is relative to mkdocs.yml file location, hence use default name/location site by setting up ../site)
docs: $(MKDOCS_YML) Documentation/* Documentation/Flashing/* Documentation/images/*
$(MKDOCS) build -f $(MKDOCS_YML) -d ../site
@@ -111,15 +144,102 @@ docs: $(MKDOCS_YML) Documentation/* Documentation/Flashing/* Documentation/im
docs-deploy: $(MKDOCS_YML) Documentation/* Documentation/Flashing/* Documentation/images/*
$(MKDOCS) gh-deploy -f $(MKDOCS_YML) -d ../site
# routine check for autogenerated Documentation/README.md
test-md:
@echo ""
@echo "---- Checking REAMDE.md... ----"
@echo ""
@/bin/sh ./scripts/deploy.sh docs_readme
# shell style & linter check (github CI version of shellcheck is more recent than alpine one so the latter may not catch some policies)
test-sh:
@echo ""
@echo "---- Checking shell scripts... ----"
@echo ""
@for f in `find ./scripts -type f -iname "*.sh" ! -name "flash_ts100_linux.sh"` ; do shellcheck "$${f}"; done;
# python-related tests & checks
test-py:
@echo ""
@echo "---- Checking python code... ----"
@echo ""
flake8 Translations
black --check Translations
@$(MAKE) -C source/ Objects/host/brieflz/libbrieflz.so
./Translations/brieflz_test.py
./Translations/make_translation_test.py
# clang-format check for C/C++ code style
test-ccpp:
@echo ""
@echo "---- Checking C/C++ code... ----"
@echo ""
$(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
@echo ""
@echo "All tests & checks have been completed successfully."
@echo ""
# former scripts/ci/buildAll.sh - all in one to build all firmware & place the produced binaries into one output directory
build-all:
@mkdir -p $(OUT_DIR)
@chmod 0777 $(OUT_DIR)
cd source && bash ./build.sh
@echo "All Firmware built"
@for model in $(MODELS); do \
mkdir -p $(OUT_DIR)/$${model} ; \
cp -r $(OUT_HEX)/$${model}_*.bin $(OUT_DIR)/$${model}/ ; \
cp -r $(OUT_HEX)/$${model}_*.hex $(OUT_DIR)/$${model}/ ; \
cp -r $(OUT_HEX)/$${model}_*.dfu $(OUT_DIR)/$${model}/ ; \
done;
@echo "Resulting output directory: $(OUT_DIR)"
# target to build multilang supported builds for Pinecil & PinecilV2
build-multilang:
@for modelml in $(MODELS_ML); do \
$(MAKE) -C source/ -j2 model=$${modelml} firmware-multi_compressed_European firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian firmware-multi_Chinese+Japanese ; \
mkdir -p $(OUT_DIR)/$${modelml}_multi-lang ; \
cp $(OUT_HEX)/$${modelml}_multi_*.bin $(OUT_DIR)/$${modelml}_multi-lang ; \
cp $(OUT_HEX)/$${modelml}_multi_*.hex $(OUT_DIR)/$${modelml}_multi-lang ; \
cp $(OUT_HEX)/$${modelml}_multi_*.dfu $(OUT_DIR)/$${modelml}_multi-lang ; \
done;
@echo "Resulting output directory: $(OUT_DIR)"
# target to reproduce zips according to github CI settings; artifacts will be in $(OUT_DIR)/CI/*.zip
ci: tests build-all build-multilang
@mkdir -p $(OUT_DIR)/metadata;
@for m in $(MODELS) $(MODELS_MULTILANG); do \
cp LICENSE scripts/LICENSE_RELEASE.md $(OUT_DIR)/$${m}/ ; \
$(ZIP) $(OUT_DIR)/$${m}.zip $(OUT_DIR)/$${m} ; \
./source/metadata.py $${m}.json $${m}; \
cp $(OUT_HEX)/$${m}.json $(OUT_DIR)/metadata; \
done;
@$(ZIP) $(OUT_DIR)/metadata.zip $(OUT_DIR)/metadata
@mkdir -p $(OUT_DIR)/CI
@mv $(OUT_DIR)/*.zip $(OUT_DIR)/CI
@chmod 0777 $(OUT_DIR)/CI
@chmod 0666 $(OUT_DIR)/CI/*.zip
@echo "Resulting artifacts directory: $(OUT_DIR)/CI"
# 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
rm -Rf site
rm -Rf $(OUT_DIR)
# global clean-up target
clean-full: docker-clean
make -C source/ clean-all
rm -Rf site
rm -Rf scripts/ci/artefacts
.PHONY: docker-shell docker-build docker-clean docs clean-full
clean-full: clean-build docker-clean
# phony targets
.PHONY: help list
.PHONY: docker-check docker-shell docker-build docker-clean-image docker-clean-cache docker-clean
.PHONY: docs docs-deploy
.PHONY: test-md test-sh test-py test-ccpp tests
.PHONY: build-all build-multilang ci
.PHONY: clean-build clean-full

View File

@@ -21,18 +21,28 @@ This project is considered feature complete for use as a soldering iron, _so ple
_This firmware does **NOT** support the USB port while running for changing settings. This is done through the onscreen menu only. Logos are edited on a computer and flashed like firmware._
| Device | DC | QC | PD | EPR | BLE | Battery | Recommended |
| :--------: | :-: | :-: | :-: | :-: | :-: | :-----: | :---------: |
| MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | | ✔️ |
| Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
| Pinecil V2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| TS80P | ❌ | ✔️ | ✔️ | ❌ | | ✔️ | ✔️ |
| TS100 | ✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ | ❌* |
| TS80 | | ✔️ | ❌ | ❌ | | ✔️ | ❌** |
| Device | DC | QC | PD | EPR | BLE | Tip Sense | Recommended Purchase | Notes |
| :------------: | :-: | :-: | :-: | :-: | :-: | :-----: | :------------------: | :-------------------------------------------:|
| Miniware MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | ✔️ | ✔️ | |
| Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ * | |
| Pinecil V2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
| Miniware TS101 | ✔️ | ❌ | ✔️ | ✔️ | ❌ | ✔️ | ✔️ | Full OLED resolution not yet supported. |
| Sequre S60 | ❌ | ❌ | ✔️ | ❌ | ❌ | | ✔️ | Full OLED resolution not yet supported. |
| Miniware TS80P | ❌ | ✔️ | ✔️ | ❌ | ❌ | N/A | ✔️ | |
| Miniware TS100 | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌** | |
| Miniware TS80 | ❌ | ✔️ | ❌ | ❌ | ❌ | N/A | ❌*** | |
\*Please note that Miniware started shipping TS100's using cloned STM32 Chips. While these do work with IronOS, their DFU bootloader works terribly, and it is hard to get it to successfully flash larger firmware images like IronOS without timing out. This is the main reason why the TS100 is **_no longer recommended_**.
_Tip Sense_ refers to the device being able to choose between the 'usual' TS100 or Hakko T12 style tips and Pine64's custom shorter tips which have lower resistance and allow for more power. This is N/A for TS80/TS80P as there is only one model of tip for them.
\**TS80 is replaced by TS80P. Production ramped down a long time ago and it's just existing stock clearing the system. It's marked not recommended being optimistic that people might pause and buy the far superior TS80P instead. This is the main reason why the TS80 is **_no longer recommended_**.
_Recommended Purchase_ is only referring to if you are buying a **new** device. Of course all the devices listed are supported and will work excellently for years to come.
The TS101 and S60 feature a higher resolution OLED than other devices. Work is ongoing to support this fully, for now a cropped view is usable.
\*PinecilV1 stopped being manufactured a long time ago now, all models for sale online are generally clones (or old stock). Vendors are trying to sell these for more than Pine64 sells the V2 for now. Thus the V1 is **_no longer recommended_**.
\**Please note that Miniware started shipping TS100's using cloned STM32 Chips. While these do work with IronOS, their DFU bootloader works terribly, and it is hard to get it to successfully flash larger firmware images like IronOS without timing out. This is the main reason why the TS100 is **_no longer recommended_**.
\**\*TS80 is replaced by TS80P. Production ramped down a long time ago and it's just existing stock clearing the system. It's marked not recommended being optimistic that people might pause and buy the far superior TS80P instead. This is the main reason why the TS80 is **_no longer recommended_**.
## Getting Started

0
Translations/brieflz.py Normal file → Executable file
View File

0
Translations/brieflz_test.py Normal file → Executable file
View File

View File

@@ -1263,6 +1263,63 @@ def get_translation_sanity_checks_text(defs: dict) -> str:
return sanity_checks_text
def get_version_suffix(ver) -> str:
# Check env var from push.yml first:
# - if it's pull request then use vX.YY + C.ID for version line as in *C*I with proper tag instead of merge tag for detached tree
if os.environ.get("GITHUB_CI_PR_SHA", "") != "":
return "C" + "." + os.environ["GITHUB_CI_PR_SHA"][:8].upper()
# - no github PR SHA ID, hence keep checking
suffix = str("")
try:
# Use commands _hoping_ they won't be too new for one environments nor deprecated for another ones:
## - get commit id; --short=8 - the shorted hash with 8 digits (increase/decrease if needed!)
sha_id = f"{subprocess.check_output(['git', 'rev-parse', '--short=8', 'HEAD']).strip().decode('ascii').upper()}"
## - if the exact commit relates to tag, then this command should return one-line tag name:
tag = f"{subprocess.check_output(['git', 'tag', '--points-at', '%s' % sha_id]).strip().decode('ascii')}"
if (
f"{subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '--short', 'HEAD']).strip().decode('ascii')}"
== "HEAD"
):
return "E" + "." + sha_id
else:
## - get short "traditional" branch name (as in `git branch` for that one with asterisk):
branch = f"{subprocess.check_output(['git', 'symbolic-ref', '--short', 'HEAD']).strip().decode('ascii')}"
if tag and "" != tag:
# _Speculate_ on tag that it's Release...
if ver == tag:
# ... but only if double-check for tag is matched
suffix = "R"
else:
# ... otherwise it's tagged but not a release version!
suffix = "T"
elif branch and "" != branch:
# _Hardcoded_ current main development branch...
if "dev" == branch:
suffix = "D"
# ... or some other branch
else:
suffix = "B"
else:
# Something else but from Git
suffix = "G"
# Attach SHA commit to ID a build since it's from git anyway
suffix += "." + sha_id
except subprocess.CalledProcessError:
# No git tree so _probably_ Homebrew build from source
suffix = "H"
except OSError:
# Something _special_?
suffix = "S"
if "" == suffix:
# Something _very_ special!
suffix = "V"
return suffix
def read_version() -> str:
with open(HERE.parent / "source" / "version.h") as version_file:
for line in version_file:
@@ -1270,11 +1327,7 @@ def read_version() -> str:
matches = re.findall(r"\"(.+?)\"", line)
if matches:
version = matches[0]
try:
version += f".{subprocess.check_output(['git', 'rev-parse', '--short=7', 'HEAD']).strip().decode('ascii').upper()}"
# --short=7: the shorted hash with 7 digits. Increase/decrease if needed!
except OSError:
version += " git"
version += get_version_suffix(version)
return version

0
Translations/objcopy.py Normal file → Executable file
View File

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Беларуская",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Каліброўка\nзроблена!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Некантралюемае\nразаграванне"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Пераканайцеся, што пры наступнай загрузцы наканечнік і ручка маюць пакаёвую тэмпературу!"
},
@@ -313,4 +316,4 @@
"description": ""
}
}
}
}

View File

@@ -3,8 +3,8 @@
"languageLocalName": "Български",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
"CalibrationDone": {
"message": "Калибрирането\nе завършено!"
},
"ResetOKMessage": {
"message": "Нулиране"
@@ -13,264 +13,267 @@
"message": "Настройките бяха\nнулирани!"
},
"NoAccelerometerMessage": {
"message": "No accelerometer\ndetected!"
"message": "Не е открит\nакселерометър!"
},
"NoPowerDeliveryMessage": {
"message": "No USB-PD IC\ndetected!"
"message": "Не е открито\nUSB-PD захранване!"
},
"LockingKeysString": {
"message": "LOCKED"
"message": "ЗАКЛЮЧ"
},
"UnlockingKeysString": {
"message": "UNLOCKED"
"message": "ОТКЛЮЧ"
},
"WarningKeysLockedString": {
"message": "!LOCKED!"
"message": "!ЗАКЛЮЧ!"
},
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
"message": "Неконтролируемо\nпрегряване"
},
"WarningTipShorted": {
"message": "!КС на човка!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
"message": "Преди рестартиране се уверете, че човка и дръжката са на стайна температурата!"
},
"CJCCalibrating": {
"message": "calibrating\n"
"message": "калибриране\n"
},
"SettingsResetWarning": {
"message": "Сигурни ли сте, че искате да върнете фабричните настройки?"
},
"UVLOWarningString": {
"message": "Ниско DC Напрежение"
"message": "НИС.НАПР."
},
"UndervoltageString": {
"message": "Ниско Напрежение\n"
"message": "Ниско напрежение\n"
},
"InputVoltageString": {
"message": "Входно V: \n"
},
"SleepingSimpleString": {
"message": "Сън"
"message": "Хъррр"
},
"SleepingAdvancedString": {
"message": "Хър Хър Хър...\n"
"message": "Сън...\n"
},
"SleepingTipAdvancedString": {
"message": "Връх: \n"
"message": "Човка:\n"
},
"OffString": {
"message": "Изкл."
},
"ProfilePreheatString": {
"message": "Preheat\n"
"message": "Загряване\n"
},
"ProfileCooldownString": {
"message": "Cooldown\n"
"message": "Охлаждане\n"
},
"DeviceFailedValidationWarning": {
"message": "Your device is most likely a counterfeit!"
"message": "Вероятно, устройство е фалшификат!"
},
"TooHotToStartProfileWarning": {
"message": "Too hot to\nstart profile"
"message": "Твърде горещо за\nстартиране на профила"
}
},
"characters": {
"SettingRightChar": "R",
"SettingLeftChar": "L",
"SettingAutoChar": "A",
"SettingOffChar": "O",
"SettingSlowChar": "S",
"SettingMediumChar": "M",
"SettingFastChar": "F",
"SettingRightChar": "Д",
"SettingLeftChar": "Л",
"SettingAutoChar": "А",
"SettingOffChar": "И",
"SettingSlowChar": "Н",
"SettingMediumChar": "С",
"SettingFastChar": "В",
"SettingStartNoneChar": "И",
"SettingStartSolderingChar": "Р",
"SettingStartSolderingChar": "З",
"SettingStartSleepChar": "С",
"SettingStartSleepOffChar": "П",
"SettingLockDisableChar": "D",
"SettingLockBoostChar": "B",
"SettingLockFullChar": "F"
"SettingLockDisableChar": "И",
"SettingLockBoostChar": "Т",
"SettingLockFullChar": "П"
},
"menuGroups": {
"PowerMenu": {
"displayText": "Power\nsettings",
"displayText": "Настройки на\nзахранването",
"description": ""
},
"SolderingMenu": {
"displayText": "Поялник\nНастройки",
"displayText": "Настройки на\nзапояване",
"description": ""
},
"PowerSavingMenu": {
"displayText": "Режими\nНастройки",
"displayText": "Авто\nизключване",
"description": ""
},
"UIMenu": {
"displayText": "Интерфейс\nНастройки",
"displayText": "Интерфейс\n",
"description": ""
},
"AdvancedMenu": {
"displayText": "Разширени\nНастройки",
"displayText": "Допълнителни\nнастройки",
"description": ""
}
},
"menuOptions": {
"DCInCutoff": {
"displayText": "Източник\nзахранване",
"description": "Източник на захранване. Минимално напрежение. (DC 10V) (S 3,3V за клетка)"
"displayText": "Гранично\nнапрежение",
"description": "Минимално напрежение, за да не се изтощи батерията (DC 10V) (S 3,3V за клетка)"
},
"MinVolCell": {
"displayText": "Minimum\nvoltage",
"description": "Minimum allowed voltage per battery cell (3S: 3 - 3,7V | 4-6S: 2,4 - 3,7V)"
"displayText": "Мин.\nнапрежение",
"description": "Минимално допустимо напрежение на акумулаторна клетка (3S: 3 - 3,7V | 4-6S: 2,4 - 3,7V)"
},
"QCMaxVoltage": {
"displayText": "Мощност на\nзахранване",
"description": "Мощност на избраното захранване"
"displayText": "Напреж.\nна QC",
"description": "Максимална напрежение с QC захранвания"
},
"PDNegTimeout": {
"displayText": "PD\ntimeout",
"description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers"
"displayText": "PD\nинтервал",
"description": "PD интервал за договаряне на захранването на стъпки от 100 мс за съвместимост с някои QC захранвания (0=Изкл.)"
},
"PDVpdo": {
"displayText": "PD\nVPDO",
"description": "Enables PPS & EPR modes"
"description": "Включи PPS & EPR"
},
"BoostTemperature": {
"displayText": "Турбо\nтемп.",
"description": "Температура за \"турбо\" режим"
"description": "Температурата за \"турбо\" режим"
},
"AutoStart": {
"displayText": "Автоматичен\nработен режим",
"description": "Режим на поялника при включване на захранването. (И=Изключен | Р=Работен | С=Сън | П=Сън температура помещение)"
"description": "Режим на поялника при включване на захранването (И=Изкл. | З=Запояване | С=Сън | П=Покой на стайна температурата)"
},
"TempChangeShortStep": {
"displayText": "Промяна T\nбързо?",
"description": "Промяна на температура при бързо натискане на бутон!"
"displayText": "Промяна T\nбързо",
"description": "Промяна на температурата при бързо натискане на бутон"
},
"TempChangeLongStep": {
"displayText": "Промяна Т\nзадържане?",
"description": "Промяна на температура при задържане на бутон!"
"displayText": "Промяна Т\nзадържане",
"description": "Промяна на температурата при задържане на бутон"
},
"LockingMode": {
"displayText": "Allow locking\nbuttons",
"description": "While soldering, hold down both buttons to toggle locking them (D=disable | B=boost mode only | F=full locking)"
"displayText": "Бутони за\nзаключване",
"description": "Докато запоявате, задръжте двата бутона, за да превключите заключването им (И=Изкл. | Т=Турбо режим | П=Пълно)"
},
"ProfilePhases": {
"displayText": "Profile\nPhases",
"description": "Number of phases in profile mode"
"displayText": "Брой\nетапи",
"description": "Броят на етапите в режим на термичен профил"
},
"ProfilePreheatTemp": {
"displayText": "Preheat\nTemp",
"description": "Preheat to this temperature at the start of profile mode"
"displayText": "Температурата\nна загряване",
"description": "Температурата на загряване в началото на режим на термичен профил"
},
"ProfilePreheatSpeed": {
"displayText": "Preheat\nSpeed",
"description": "Preheat at this rate (degrees per second)"
"displayText": "Скорост на\nзагряване",
"description": "Скорост на предварително загряване (градуси в секунда)"
},
"ProfilePhase1Temp": {
"displayText": "Phase 1\nTemp",
"description": "Target temperature for the end of this phase"
"displayText": "Етап 1\nТемпературата",
"description": "Температурата в края на този етап"
},
"ProfilePhase1Duration": {
"displayText": "Phase 1\nDuration",
"description": "Target duration of this phase (seconds)"
"displayText": "Етап 1\nПродължителност",
"description": "Продължителност на този етап (в секунди)"
},
"ProfilePhase2Temp": {
"displayText": "Phase 2\nTemp",
"displayText": "Етап 2\nТемпературата",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Phase 2\nDuration",
"displayText": "Етап 2\nПродължителност",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Phase 3\nTemp",
"displayText": "Етап 3\nТемпературата",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Phase 3\nDuration",
"displayText": "Етап 3\nПродължителност",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Phase 4\nTemp",
"displayText": "Етап 4\nТемпературата",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Phase 4\nDuration",
"displayText": "Етап 4\nПродължителност",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Phase 5\nTemp",
"displayText": "Етап 5\nТемпературата",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Phase 5\nDuration",
"displayText": "Етап 5\nПродължителност",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Cooldown\nSpeed",
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
"displayText": "Скорост на\nохлаждане",
"description": "Скорост на охлаждане в края на режим на термичен профил (градуси в секунда)"
},
"MotionSensitivity": {
"displayText": "Усещане\nза движение",
"description": "Усещане за движение (0=Изключено | 1=Слабо | ... | 9=Силно)"
"displayText": "Чувствител.\nна движение",
"description": "Чувствителност на движение на акселерометър (0=Изкл. | 1=Слабо | ... | 9=Силно)"
},
"SleepTemperature": {
"displayText": "Темп.\nсън",
"description": "Температура при режим \"сън\" (C)"
"description": "Температурата при режим \"сън\""
},
"SleepTimeout": {
"displayText": "Време\nсън",
"description": "Включване в режим \"сън\" след: (Минути | Секунди)"
"description": "Включване в режим \"сън\" (секунди | минути)"
},
"ShutdownTimeout": {
"displayText": "Време\nизкл.",
"description": "Изключване след (Минути)"
"description": "Изключване след (минути)"
},
"HallEffSensitivity": {
"displayText": "Hall sensor\nsensitivity",
"description": "Sensitivity to magnets (0=Изключено | 1=Слабо | ... | 9=Силно)"
"displayText": "Датчик\nна Хол",
"description": "Чувствителност на сензора към магнитно поле (0=Изкл. | 1=Слабо | ... | 9=Силно)"
},
"TemperatureUnit": {
"displayText": "Единици за\nтемпература",
"description": "Единици за температура (C=Целзии | F=Фаренхайт)"
"displayText": "Единици за\nтемпературата",
"description": "Единици за температурата (C=Целзии | F=Фаренхайт)"
},
"DisplayRotation": {
"displayText": "Ориентация\nна дисплея",
"description": "Ориентация на дисплея (R=Дясна Ръка | L=Лява Ръка | A=Автоматично)"
"description": "Ориентация на дисплея (Д=Дясна ръка | Л=Лява ръка | А=Авто)"
},
"CooldownBlink": {
"displayText": "Мигай при\nтопъл поялник",
"description": "След изключване от работен режим, индикатора за температура да мига докато човката на поялника все още е топла"
"description": "След изключване от работен режим, индикатора за температурата да мига докато човката на поялника все още е топла"
},
"ScrollingSpeed": {
"displayText": "Скорост\nна текста",
"description": "Скорост на движение на този текст"
"description": "Скорост на движение на този текст (Н=Ниска | B=Висока)"
},
"ReverseButtonTempChange": {
"displayText": "Размяна\nбутони +-?",
"description": "Обръщане на бутоните \"+\" и \"-\" за промяна на температурата на върха на поялника"
"displayText": "Размяна\nбутони +/-",
"description": "Обръщане на бутоните + и - за промяна на температурата на човка на поялника"
},
"AnimSpeed": {
"displayText": "Anim.\nspeed",
"description": "Pace of icon animations in menu (O=off | S=slow | M=medium | F=fast)"
"displayText": "Скорост на\nанимацията",
"description": "Скорост на анимация на иконата в главното меню (И=Изкл. | Н=Ниска | C=Средна | B=Висока)"
},
"AnimLoop": {
"displayText": "Anim.\nloop",
"description": "Loop icon animations in main menu"
"displayText": "Анимац.\nцикъл",
"description": "Зациклена анимация на иконите в главното меню"
},
"Brightness": {
"displayText": "Screen\nbrightness",
"description": "Adjust the OLED screen brightness"
"displayText": "Яркост\nна екрана",
"description": "Регулирайте яркостта на екрана"
},
"ColourInversion": {
"displayText": "Invert\nscreen",
"description": "Invert the OLED screen colors"
"displayText": "Инвертиране\nна екрана",
"description": "Инверсия на пикселите на екрана"
},
"LOGOTime": {
"displayText": "Boot logo\nduration",
"description": "Set boot logo duration (s=seconds)"
"displayText": "Продължит.\nлогото",
"description": "Продължителност на логото за стартиране (в секунди)"
},
"AdvancedIdle": {
"displayText": "Детайлен\nекран в покой",
"description": "Покажи детайлна информация със ситен шрифт на екрана в режим на покой."
"description": "Покажи детайлна информация със ситен шрифт на екрана в режим на покой"
},
"AdvancedSoldering": {
"displayText": "Детайлен\nработен екран",
@@ -278,34 +281,34 @@
},
"BluetoothLE": {
"displayText": "Bluetooth\n",
"description": "Enables BLE"
"description": "Включи BLE"
},
"PowerLimit": {
"displayText": "Лимит на\nмощност",
"description": "Максимална мощност на поялника (Watt)"
"description": "Максимална мощност на поялника (вати)"
},
"CalibrateCJC": {
"displayText": "Calibrate CJC\nat next boot",
"description": "At next boot tip Cold Junction Compensation will be calibrated (not required if Delta T is < 5 C)"
"displayText": "Калибриране\nна темп.",
"description": "Калибриране на температурата (CJC) при следващо включване (не се изисква, ако разликата е по-малка от 5 °С)"
},
"VoltageCalibration": {
"displayText": "Калибриране\nнапрежение?",
"description": "Калибриране на входното напрежение. Задръжте бутонa за изход"
"displayText": "Калибриране\nнапрежение",
"description": "Калибриране на входното напрежениеадръжте бутонa за изход)"
},
"PowerPulsePower": {
"displayText": "Захранващ\nимпулс",
"description": "Поддържане на интензивност на захранващия импулс"
"description": "Поддържане на интензивност на захранващия импулс (вати)"
},
"PowerPulseWait": {
"displayText": "Power pulse\ndelay",
"description": "Delay before keep-awake-pulse is triggered (x 2,5с)"
"displayText": "Закъснение\nна импулса",
"description": "Пауза между импулсите, които предпазват захранването от автоматично изключване (x 2,5 с)"
},
"PowerPulseDuration": {
"displayText": "Power pulse\nduration",
"description": "Keep-awake-pulse duration (x 250мс)"
"displayText": "Продължит.\nна импулса",
"description": "Дължината на импулса, който предпазва захранването от автоматично изключване (x 250 мс)"
},
"SettingsReset": {
"displayText": "Фабрични\nнастройки?",
"displayText": "Фабрични\nнастройки",
"description": "Връщане на фабрични настройки"
},
"LanguageSwitch": {

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Český",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Kalibrace\ndokončena!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Teplotní\nOchrana"
},
"WarningTipShorted": {
"message": "!Zkrat na hrotu!"
},
"SettingsCalibrationWarning": {
"message": "Před restartem se ujistěte, že hrot a držák mají pokojovou teplotu!"
},
@@ -61,16 +64,16 @@
"message": "Vyp"
},
"ProfilePreheatString": {
"message": "Preheat\n"
"message": "Předehřívání\n"
},
"ProfileCooldownString": {
"message": "Cooldown\n"
"message": "Zchlazování\n"
},
"DeviceFailedValidationWarning": {
"message": "Vaše zařízení je s nejvyšší pravděpodobností padělek!"
"message": "Vaše zařízení je pravěpodobně padělek!"
},
"TooHotToStartProfileWarning": {
"message": "Too hot to\nstart profile"
"message": "Teplota příliš vysoká pro start profilu"
}
},
"characters": {
@@ -153,60 +156,60 @@
"description": "Při pájení podržte obě tlačítka pro jejich zamčení (Z=zakázáno | B=pouze v režimu boost | U=úplné zamčení)"
},
"ProfilePhases": {
"displayText": "Profile\nPhases",
"description": "Number of phases in profile mode"
"displayText": "Profilové\nFáze",
"description": "Počet fází v profilovém režimu"
},
"ProfilePreheatTemp": {
"displayText": "Preheat\nTemp",
"description": "Preheat to this temperature at the start of profile mode"
"displayText": "Teplota\nPředehřátí",
"description": "Teplota na kterou předehřát na začátku profilového režimu"
},
"ProfilePreheatSpeed": {
"displayText": "Preheat\nSpeed",
"description": "Preheat at this rate (degrees per second)"
"displayText": "Rychlost\nPředehřívání",
"description": "Rychlost předehřívání (stupně za sekundu)"
},
"ProfilePhase1Temp": {
"displayText": "Phase 1\nTemp",
"description": "Target temperature for the end of this phase"
"displayText": "Teplota\nFáze 1",
"description": "Cílová teplota na konci této fáze"
},
"ProfilePhase1Duration": {
"displayText": "Phase 1\nDuration",
"description": "Target duration of this phase (seconds)"
"displayText": "Trvání\nFáze 1",
"description": "Doba trvání této fáze (sekundy)"
},
"ProfilePhase2Temp": {
"displayText": "Phase 2\nTemp",
"displayText": "Teplota\nFáze 2",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Phase 2\nDuration",
"displayText": "Trvání\nFáze 2",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Phase 3\nTemp",
"displayText": "Teplota\nFáze 3",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Phase 3\nDuration",
"displayText": "Trvání\nFáze 3",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Phase 4\nTemp",
"displayText": "Teplota\nFáze 4",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Phase 4\nDuration",
"displayText": "Trvání\nFáze 4",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Phase 5\nTemp",
"displayText": "Teplota\nFáze 5",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Phase 5\nDuration",
"displayText": "Trvání\nFáze 5",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Cooldown\nSpeed",
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
"displayText": "Rychlost\nochlazování",
"description": "Rychlost ochlazování na konci profilového režimu (stupně za sekundu)"
},
"MotionSensitivity": {
"displayText": "Citlivost\nna pohyb",

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Dansk",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Deutsch",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Erfolgreich\nkalibriert!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Lötspitze\nkurzgeschlossen!"
},
"SettingsCalibrationWarning": {
"message": "Vor dem Neustart bitte sicherstellen, dass Lötspitze & Gerät Raumtemperatur haben!"
},
@@ -58,7 +61,7 @@
"message": "Temp: \n"
},
"OffString": {
"message": "Aus"
"message": "aus"
},
"ProfilePreheatString": {
"message": "Vorwärmen\n"
@@ -142,15 +145,15 @@
},
"TempChangeShortStep": {
"displayText": "Temp-Schritt\nDruck kurz",
"description": "Schrittweite für Temperaturwechsel bei kurzem Tastendruck"
"description": "Schrittweite für Temperaturänderung bei kurzem Tastendruck"
},
"TempChangeLongStep": {
"displayText": "Temp-Schritt\nDruck lang",
"description": "Schrittweite für Temperaturwechsel bei langem Tastendruck"
"description": "Schrittweite für Temperaturänderung bei langem Tastendruck"
},
"LockingMode": {
"displayText": "Tasten-\nsperre",
"description": "Langes drücken beider Tasten im Lötmodus sperrt diese (A=aus | B=nur Boost | V=vollständig)"
"description": "Langes Drücken beider Tasten im Lötmodus sperrt diese (A=aus | B=nur Boost | V=vollständig)"
},
"ProfilePhases": {
"displayText": "Profile\nPhasen",
@@ -170,7 +173,7 @@
},
"ProfilePhase1Duration": {
"displayText": "Phase 1\nDauer",
"description": "Zieldauer dieser Phase (Sekunden)"
"description": "Dauer dieser Phase (Sekunden)"
},
"ProfilePhase2Temp": {
"displayText": "Phase 2\nTemperatur",
@@ -214,7 +217,7 @@
},
"SleepTemperature": {
"displayText": "Ruhe-\ntemperatur",
"description": "Ruhetemperatur der Spitze"
"description": "Ruhetemperatur der Lötspitze"
},
"SleepTimeout": {
"displayText": "Ruhever-\nzögerung",

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Greek",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Βαθμονόμηση\nολοκληρώθηκε!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Θερμική\nΦυγή"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Πριν την επανεκκίνηση, βεβαιωθείτε ότι η μύτη και η συσκ. είναι σε θερμ. δωματίου!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "English",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Castellano",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "¡Calibracion\nlista!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Térmico\nFuera de control"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "¡Antes de reiniciar, asegúrese de que la punta y el mango estén a temperatura ambiente!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Suomi",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Français",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Étalonnage\nterminé!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Emballement\nthermique"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Avant de redémarrer, assurez-vous que la panne et la poignée sont à température ambiante !"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Hrvatski",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Kalibracija\ndovršena!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Neispravan\ngrijač"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Prije restarta provjerite da su vrh i ručka na sobnoj temperaturi!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Magyar",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Kalibráció\nkész!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Kontrollálatlan\nhőmérséklet!"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Újraindítás előtt a hegy és az eszköz legyen szobahőmérsékletű!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Italiano",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibrazione\ncompletata!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Temperatura\nfuori controllo"
},
"WarningTipShorted": {
"message": "Punta in cortocircuito!"
},
"SettingsCalibrationWarning": {
"message": "Prima di riavviare assicurati che la punta e l'impugnatura siano a temperatura ambiente!"
},
@@ -162,7 +165,7 @@
},
"ProfilePreheatSpeed": {
"displayText": "Velocità\npreriscaldamento",
"description": "Imposta la velocità di preriscaldamento [gradi al secondo]"
"description": "Imposta la velocità di preriscaldamento [°C/s]"
},
"ProfilePhase1Temp": {
"displayText": "Temperatura\nfase 1",
@@ -206,7 +209,7 @@
},
"ProfileCooldownSpeed": {
"displayText": "Velocità\nraffreddamento",
"description": "Imposta la velocità di raffreddamento al termine del profilo di riscaldamento [gradi al secondo]"
"description": "Imposta la velocità di raffreddamento al termine del profilo di riscaldamento [°C/s]"
},
"MotionSensitivity": {
"displayText": "Sensibilità\nal movimento",

5
Translations/translation_JA_JP.json Executable file → Normal file
View File

@@ -3,7 +3,7 @@
"languageLocalName": "日本語",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "過熱"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Lietuvių",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Perkaitimo\npavojus"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Norsk bokmål",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Termisk\nrømling"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Nederlands",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Verwarming\nOncontroleerbaar"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Vlaams",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Polski",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Kalibracja\nwykonana!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Ucieczka\ntermiczna"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Upewnij się, że końcówka i uchwyt mają temperaturę pokojową podczas następnego rozruchu!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Português",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibração\nefetuada!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Antes de reiniciar certifique-se que o ferro está à temperatura ambiente!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Română",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Încălzire\nEşuată"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Înainte de repornire, asiguraţi-vă că vârful şi mânerul sunt la temperatura camerei!"
},

View File

@@ -3,20 +3,20 @@
"languageLocalName": "Русский",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Калибровка\nзавершена!"
},
"ResetOKMessage": {
"message": "Сброс OK"
"message": "Готово!"
},
"SettingsResetMessage": {
"message": "Настройки\nсброшены!"
},
"NoAccelerometerMessage": {
"message": "Не определен\nакселерометр!"
"message": "Акселерометр\nне обнаружен!"
},
"NoPowerDeliveryMessage": {
"message": "USB-PD питание\nне обнаружено"
"message": "Питание по USB-PD\nне обнаружено"
},
"LockingKeysString": {
"message": "ЗАБЛОК"
@@ -28,7 +28,10 @@
"message": "!ЗАБЛОК!"
},
"WarningThermalRunaway": {
"message": "Неуправляемый\nРазогрев"
"message": "Неуправляемый\nразогрев"
},
"WarningTipShorted": {
"message": "!КЗ на жале!"
},
"SettingsCalibrationWarning": {
"message": "Пожалуйста, убедитесь, что жало и корпус имеют комнатную температуру при следующей загрузке!"
@@ -40,25 +43,25 @@
"message": "Вы уверены, что хотите сбросить настройки к значениям по умолчанию?"
},
"UVLOWarningString": {
"message": "НАПРЯЖ--"
"message": "НИЗ.НАПР"
},
"UndervoltageString": {
"message": "Низ. напряжение\n"
},
"InputVoltageString": {
"message": "Питание В: \n"
"message": "Питание(В):\n"
},
"SleepingSimpleString": {
"message": "Zzzz"
"message": "Хххррп"
},
"SleepingAdvancedString": {
"message": "Ожидание...\n"
"message": "Сон...\n"
},
"SleepingTipAdvancedString": {
"message": "Жало: \n"
},
"OffString": {
"message": "Вык"
"message": "Выкл"
},
"ProfilePreheatString": {
"message": "Преднагрев\n"
@@ -67,7 +70,7 @@
"message": "Остывание\n"
},
"DeviceFailedValidationWarning": {
"message": "Вероятно, это устройство подделка!"
"message": "Вероятно, это поддельное устройство!"
},
"TooHotToStartProfileWarning": {
"message": "Слишком горячо для\nстарта профиля"
@@ -81,9 +84,9 @@
"SettingSlowChar": "М",
"SettingMediumChar": "С",
"SettingFastChar": "Б",
"SettingStartNoneChar": "В",
"SettingStartNoneChar": "О",
"SettingStartSolderingChar": "П",
"SettingStartSleepChar": "О",
"SettingStartSleepChar": "С",
"SettingStartSleepOffChar": "К",
"SettingLockDisableChar": "О",
"SettingLockBoostChar": "Т",
@@ -91,166 +94,166 @@
},
"menuGroups": {
"PowerMenu": {
"displayText": "Параметры\nпитания",
"displayText": "Настройки\nпитания",
"description": ""
},
"SolderingMenu": {
"displayText": "Параметры\nпайки",
"displayText": "Настройки\nпайки",
"description": ""
},
"PowerSavingMenu": {
"displayText": "Режимы\nсна",
"displayText": "Авто\nвыключение",
"description": ""
},
"UIMenu": {
"displayText": "Параметры\nинтерфейса",
"displayText": "Интерфейс\n",
"description": ""
},
"AdvancedMenu": {
"displayText": "Дополнител.\nнастройки",
"displayText": "Доп.\nнастройки",
"description": ""
}
},
"menuOptions": {
"DCInCutoff": {
"displayText": "Источник\nпитания",
"description": "Источник питания. Устанавливает напряжение отсечки. (DC 10В) (S 3,3В на ячейку, без лимита мощности)"
"displayText": "Предельное\nнапряжение",
"description": "Установка минимально предельного напряжения от аккумулятора для предотвращения глубокого разряда (DC 10В | S 3,3В на ячейку, без ограничения мощности)"
},
"MinVolCell": {
"displayText": "Мин.\nнапр.",
"description": "Минимальное разрешенное напряжение на ячейку (3S: 3 - 3,7V | 4S-6S: 2,4 - 3,7V)"
"displayText": "Мин.\nнапряжение",
"description": "Минимально разрешённое напряжение на ячейку (3S: 3 - 3,7В | 4S-6S: 2,4 - 3,7В)"
},
"QCMaxVoltage": {
"displayText": "Ограничение\nнапряжения QC",
"description": "Максимальное напряжение для согласования с QC источником питания"
"displayText": "Напр-е\nдля QC",
"description": "Максимальное напряжение для согласования с источником питания по QC"
},
"PDNegTimeout": {
"displayText": "PD\nтайм-аут",
"description": "Power Delivery тайм-аут согласования с шагом 100 мс для совместимости с некоторыми быстрыми зарядными QC (0: отключено)"
"displayText": "PD\nинтервал",
"description": "Интервал согласования питания по Power Delivery с шагом 100 мс для совместимости с некоторыми источниками питания по QC (0=Откл.)"
},
"PDVpdo": {
"displayText": "PD\nVPDO",
"description": "Включает режимы PPS & EPR."
"description": "Включить режимы PPS & EPR"
},
"BoostTemperature": {
"displayText": "t° турбо\nрежима",
"description": "Температура жала в турбо-режиме"
},
"AutoStart": {
"displayText": "Авто\nстарт",
"description": "Режим, в котором запускается паяльник при подаче питания (В=Выкл. | П=Пайка | О=Ожидание | К=Ожидание при комн. темп.)"
"displayText": "Режим при\nвключении",
"description": "Режим, в котором включается паяльник (О=Откл. | П=Пайка | С=Сон | К=Ожидание при комн. темп.)"
},
"TempChangeShortStep": {
"displayText": "Шаг темп.\nкор. наж.",
"displayText": "Шаг t° при\nкор.наж-ии",
"description": "Шаг изменения температуры при коротком нажатии кнопок"
},
"TempChangeLongStep": {
"displayText": "Шаг темп.\nдлин. наж.",
"description": "Шаг изменения температуры при длинном нажатии кнопок"
"displayText": "Шаг t° при\nдол.наж-ии",
"description": "Шаг изменения температуры при долгом нажатии кнопок"
},
"LockingMode": {
"displayText": "Разрешить\nблок. кнопок",
"description": "При работе длинное нажатие обеих кнопок блокирует их (О=Отключено | Т=Только турбо | П=Полная блокировка)"
"description": "Блокировать кнопки при их долгом нажатии в режиме пайки (О=Откл. | Т=Только турбо | П=Полная блокировка)"
},
"ProfilePhases": {
"displayText": "Профиль\nЭтапы",
"displayText": "Этапы\nпрофиля",
"description": "Количество этапов в режиме профиля"
},
"ProfilePreheatTemp": {
"displayText": "Преднагрев\nТемпература",
"description": "Разогреть до этой температуры в начале режима профиля"
"displayText": "Температура\nпреднагрева",
"description": "Температура предварительного нагрева в начале режима термопрофиля"
},
"ProfilePreheatSpeed": {
"displayText": "Преднагрев\nСкорость",
"description": "Предварительный нагрев с этой скоростью (градусов в секунду)"
"displayText": "Скорость\nпреднагрева",
"description": "Скорость предварительного нагрева в начале режима термопрофиля (в градусах в секунду)"
},
"ProfilePhase1Temp": {
"displayText": "Этап 1\nТемпература",
"description": "Целевая температура в конце этого эатпа"
"displayText": "Температура\n1-го этапа",
"description": "Необходимая температура в конце 1-го этапа"
},
"ProfilePhase1Duration": {
"displayText": "Этап 1\nДлительность",
"description": "Целевая длительность этого этапа (секунды)"
"displayText": "Длительность\n1-го этапа",
"description": "Необходимая длительность 1-го этапа (в секундах)"
},
"ProfilePhase2Temp": {
"displayText": "Этап 2\nТемпература",
"displayText": "Температура\n2-го этапа",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Этап 2\nДлительность",
"displayText": "Длительность\n2-го этапа",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Этап 3\nТемпература",
"displayText": "Температура\n3-го этапа",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Этап 3\nДлительность",
"displayText": "Длительность\n3-го этапа",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Этап 4\nТемпература",
"displayText": "Температура\n4-го этапа",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Этап 4\nДлительность",
"displayText": "Длительность\n4-го этапа",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Этап 5\nТемпература",
"displayText": "Температура\n5-го этапа",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Этап 5\nДлительность",
"displayText": "Длительность\n5-го этапа",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Остывание\nСкорость",
"description": "Остывать с такой скоростью в конце режима профиля (градусов в секунду)"
"displayText": "Скорость\nостывания",
"description": "Скорость остывания в конце режима термопрофиля (в градусах в секунду)"
},
"MotionSensitivity": {
"displayText": "Чувствительн.\nакселерометра",
"description": "Чувствительность акселерометра (0=Выкл. | 1=мин. | ... | 9=макс.)"
"description": "Чувствительность акселерометра (0=Откл. | 1=мин. | ... | 9=макс.)"
},
"SleepTemperature": {
"displayText": "Темп.\nожидания",
"description": "Температура жала в режиме ожидания"
"displayText": "t° при\nсне",
"description": "Температура жала в режиме сна"
},
"SleepTimeout": {
"displayText": "Таймаут\nожидания",
"description": "Время до перехода в режим ожидания (Минуты | Секунды)"
"displayText": "Интервал\nсна",
"description": "Время до перехода в режим сна (секунды | минуты)"
},
"ShutdownTimeout": {
"displayText": "Таймаут\nвыключения",
"description": "Время до выключения паяльника (минуты)"
"displayText": "Интервал\nотключ-я",
"description": "Время до выключения паяльника (в минутах)"
},
"HallEffSensitivity": {
"displayText": "Датчик\nХолла",
"description": "Чувствительность датчика Холла к переходу в спящий режим (0=Выкл. | 1=мин. | ... | 9=макс.)"
"description": "Чувствительность датчика Холла к магнитному полю (0=Откл. | 1=мин. | ... | 9=макс.)"
},
"TemperatureUnit": {
"displayText": "Единицы\nтемпературы",
"displayText": "Единицы\nизмерения",
"description": "Единицы измерения температуры (C=°Цельcия | F=°Фаренгейта)"
},
"DisplayRotation": {
"displayText": "Ориентация\nэкрана",
"description": "Ориентация экрана (П=Правая рука | Л=Левая рука | А=Авто)"
"displayText": "Поворот\nэкрана",
"description": "Поворот экрана (П=Правша | Л=Левша | А=Авто)"
},
"CooldownBlink": {
"displayText": "Мигание t°\nпри остывании",
"description": "Мигать температурой на экране охлаждения, пока жало еще горячее"
"description": "Мигать температурой на экране при остывании, пока жало ещё горячее"
},
"ScrollingSpeed": {
"displayText": "Скорость\nтекста",
"description": "Скорость прокрутки текста (М=Медленная | Б=Быстрая)"
},
"ReverseButtonTempChange": {
"displayText": "Поменять\nкнопки+-",
"displayText": "Поменять\nкнопки +/-",
"description": "Поменять кнопки изменения температуры"
},
"AnimSpeed": {
"displayText": "Скорость\nанимации",
"description": "Скорость анимации иконок в главном меню (О=Отключено | М=Медленная| С=Средняя | Б=Быстрая)"
"description": "Скорость анимации иконок в главном меню (О=Откл. | М=Медленная| С=Средняя | Б=Быстрая)"
},
"AnimLoop": {
"displayText": "Зацикленная\nанимация",
@@ -258,31 +261,31 @@
},
"Brightness": {
"displayText": "Яркость\nэкрана",
"description": "Настройки контраста/яркости OLED экрана"
"description": "Уровень яркости пикселей на экране"
},
"ColourInversion": {
"displayText": "Инверсия\nэкрана",
"description": "Инвертировать цвета на OLED экране"
"description": "Инвертировать пиксели на экране"
},
"LOGOTime": {
"displayText": "Длительность\nпоказа логотипа",
"displayText": "Длит-ть\nлоготипа",
"description": "Длительность отображения логотипа (в секундах)"
},
"AdvancedIdle": {
"displayText": "Подробный\nреж. ожидания",
"description": "Отображать детальную информацию уменьшенным шрифтом на экране ожидания"
"displayText": "Подробный\nэкран ожидания",
"description": "Показывать дополнительную информацию на экране ожидания уменьшенным шрифтом"
},
"AdvancedSoldering": {
"displayText": "Подробный\nэкран пайки",
"description": "Показывать детальную информацию на экране пайки"
"description": "Показывать дополнительную информацию на экране пайки уменьшенным шрифтом"
},
"BluetoothLE": {
"displayText": "Bluetooth\n",
"description": "Активирует BLE"
"description": "Включить BLE"
},
"PowerLimit": {
"displayText": "Предел\nмощности",
"description": "Максимальная мощность, которую может использовать паяльник (Ватт)"
"displayText": "Предел\nмощ-ти",
"description": "Максимальная мощность, которую может использовать паяльник (в ваттах)"
},
"CalibrateCJC": {
"displayText": "Калибровка\nтемпературы",
@@ -293,20 +296,20 @@
"description": "Калибровка входного напряжения (долгое нажатие для выхода)"
},
"PowerPulsePower": {
"displayText": "Сила имп.\nпитания Вт",
"description": "Сила импульса удерживающего от сна повербанк или другой источник питания"
"displayText": "Сила имп.\nпитания",
"description": "Сила импульса, удерживающего от автовыключения источник питания (в ваттах)"
},
"PowerPulseWait": {
"displayText": "Пауза имп.\nпитания с",
"description": "Пауза между импульсами удерживающими источник питания от сна (x 2,5с)"
"displayText": "Пауза имп.\nпитания (К)",
"description": "Коэффициент паузы между импульсами, удерживающими от автовыключения источник питания (К x 2,5 с)"
},
"PowerPulseDuration": {
"displayText": "Длина имп.\nпитания мс",
"description": "Длина импульса удерживающего от сна источник питания (x 250мс)"
"displayText": "Длина имп.\nпитания (К)",
"description": "Коэффициент длины импульса, удерживающего от автовыключения источник питания (К x 250 мс)"
},
"SettingsReset": {
"displayText": "Сброс\nНастроек",
"description": "Сброс настроек к значеням по умолчанию"
"displayText": "Сброс\nнастроек",
"description": "Сброс настроек к значениям по умолчанию"
},
"LanguageSwitch": {
"displayText": "Язык:\n RU Русский",

View File

@@ -3,8 +3,8 @@
"languageLocalName": "Slovenčina",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
"CalibrationDone": {
"message": "Kalibrácia\ndokončená!"
},
"ResetOKMessage": {
"message": "Reset OK"
@@ -30,11 +30,14 @@
"WarningThermalRunaway": {
"message": "Únik\nTepla"
},
"WarningTipShorted": {
"message": "!Skrat hrotu!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
"message": "Pred reštartovaním sa uistite, že hrot a rúčka sú v izbovej teplote!"
},
"CJCCalibrating": {
"message": "calibrating\n"
"message": "kalibrovanie\n"
},
"SettingsResetWarning": {
"message": "Naozaj chcete obnoviť továrenské nastavenia?"
@@ -61,16 +64,16 @@
"message": "Vyp"
},
"ProfilePreheatString": {
"message": "Preheat\n"
"message": "Predhrievanie\n"
},
"ProfileCooldownString": {
"message": "Cooldown\n"
"message": "Schladzovanie\n"
},
"DeviceFailedValidationWarning": {
"message": "Vaše zariadenie je pravdepodobne falzifikát!"
},
"TooHotToStartProfileWarning": {
"message": "Too hot to\nstart profile"
"message": "Teplota príliš vysoká pre štart profilu"
}
},
"characters": {
@@ -130,7 +133,7 @@
},
"PDVpdo": {
"displayText": "PD\nVPDO",
"description": "Enables PPS & EPR modes"
"description": "Zapína PPS & EPR režimy"
},
"BoostTemperature": {
"displayText": "Boost\nteplota",
@@ -153,60 +156,60 @@
"description": "Zamknutie tlačidiel - dlhé stlačenie oboch naraz počas spájkovania (Z=Zakázať | B=Okrem boost | P=Plné zamknutie)"
},
"ProfilePhases": {
"displayText": "Profile\nPhases",
"description": "Number of phases in profile mode"
"displayText": "Profilové\nFázy",
"description": "Počet fáz v profilovóm režime"
},
"ProfilePreheatTemp": {
"displayText": "Preheat\nTemp",
"description": "Preheat to this temperature at the start of profile mode"
"displayText": "Teplota\nPredhriatia",
"description": "Teplota na ktorú sa má predohriať na začiatku profilového režimu"
},
"ProfilePreheatSpeed": {
"displayText": "Preheat\nSpeed",
"description": "Preheat at this rate (degrees per second)"
"displayText": "Rýchlosť\nPredhriatia",
"description": "Rýchlosť predhrievania (stupňe za sekundu)"
},
"ProfilePhase1Temp": {
"displayText": "Phase 1\nTemp",
"description": "Target temperature for the end of this phase"
"displayText": "Teplota\nFáza 1",
"description": "Cieľová teplota na konci tejto fázy"
},
"ProfilePhase1Duration": {
"displayText": "Phase 1\nDuration",
"description": "Target duration of this phase (seconds)"
"displayText": "Trvanie\nFáza 1",
"description": "Doba trvania tejto fázy (sekundy)"
},
"ProfilePhase2Temp": {
"displayText": "Phase 2\nTemp",
"displayText": "Teplota\nFáza 2",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Phase 2\nDuration",
"displayText": "Trvanie\nFáza 2",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Phase 3\nTemp",
"displayText": "Teplota\nFáza 3",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Phase 3\nDuration",
"displayText": "Trvanie\nFáza 3",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Phase 4\nTemp",
"displayText": "Teplota\nFáza 4",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Phase 4\nDuration",
"displayText": "Trvanie\nFáza 4",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Phase 5\nTemp",
"displayText": "Teplota\nFáza 5",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Phase 5\nDuration",
"displayText": "Trvanie\nFáza 4",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Cooldown\nSpeed",
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
"displayText": "Rýchlosť\nochladzovania",
"description": "Rýchlosť ochladzovania na konci profilového režimu (stupne za sekundu)"
},
"MotionSensitivity": {
"displayText": "Citlivosť\npohybu",
@@ -278,15 +281,15 @@
},
"BluetoothLE": {
"displayText": "Bluetooth\n",
"description": "Enables BLE"
"description": "Zapne BLE"
},
"PowerLimit": {
"displayText": "Obmedzenie\nvýkonu",
"description": "Obmedzenie výkonu podľa použitého zdroja (watt)"
},
"CalibrateCJC": {
"displayText": "Calibrate CJC\nat next boot",
"description": "At next boot tip Cold Junction Compensation will be calibrated (not required if Delta T is < 5°C)"
"displayText": "Kalibrácia CJC\npri nasledujúcom štarte",
"description": "Pri nasledujúcom štarte bude kalibrovaná kompenzácia studeného spoja (nie je potrebné ak Delta T je < 5°C)"
},
"VoltageCalibration": {
"displayText": "Kalibrácia\nnap. napätia",

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Slovenščina",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Српски",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Srpski",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,11 +3,11 @@
"languageLocalName": "Svenska",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
"CalibrationDone": {
"message": "Kalibrering\nfärdig!"
},
"ResetOKMessage": {
"message": "Reset OK"
"message": "Återställning\nOK"
},
"SettingsResetMessage": {
"message": "Inställningar\nåterställda"
@@ -28,13 +28,16 @@
"message": "!LÅST!"
},
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
"message": "Termisk\nFlykt"
},
"WarningTipShorted": {
"message": "!Spets Kortsluten!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
"message": "Före omstart, säkerställ att spetsen och handtaget är i rumstemperatur!"
},
"CJCCalibrating": {
"message": "calibrating\n"
"message": "kalibrerar\n"
},
"SettingsResetWarning": {
"message": "Är du säker på att du vill återställa inställningarna?"
@@ -61,16 +64,16 @@
"message": "Av"
},
"ProfilePreheatString": {
"message": "Preheat\n"
"message": "Förvärmning\n"
},
"ProfileCooldownString": {
"message": "Cooldown\n"
"message": "Nedkyldning\n"
},
"DeviceFailedValidationWarning": {
"message": "Your device is most likely a counterfeit!"
"message": "Din enhet är sannerligen oäkta!"
},
"TooHotToStartProfileWarning": {
"message": "Too hot to\nstart profile"
"message": "För varm för att\nstarta profilen!"
}
},
"characters": {
@@ -125,12 +128,12 @@
"description": "Maximal QC-spänning enheten skall efterfråga"
},
"PDNegTimeout": {
"displayText": "PD\ntimeout",
"description": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers"
"displayText": "PD\npauser",
"description": "PD förhandlings pauser i 100ms steg för kompatibilitet med vissa PD laddare"
},
"PDVpdo": {
"displayText": "PD\nVPDO",
"description": "Enables PPS & EPR modes"
"description": "Slår på PPS & EPR lägen"
},
"BoostTemperature": {
"displayText": "Turbo-\ntemp",
@@ -153,60 +156,60 @@
"description": "Vid lödning, håll nere bägge knappar för att slå på lås (A=Av | T=Bara turbo | F=Fullt lås)"
},
"ProfilePhases": {
"displayText": "Profile\nPhases",
"description": "Number of phases in profile mode"
"displayText": "Profil-\nfaser",
"description": "Antal faser i profil läge"
},
"ProfilePreheatTemp": {
"displayText": "Preheat\nTemp",
"description": "Preheat to this temperature at the start of profile mode"
"displayText": "Förvärmnings-\ntemp",
"description": "Förvärm till denna temperatur i början av provil läget"
},
"ProfilePreheatSpeed": {
"displayText": "Preheat\nSpeed",
"description": "Preheat at this rate (degrees per second)"
"displayText": "Förvärmnings-\nhastighet",
"description": "Förvärm enligt denna hastighet (grader per sekund)"
},
"ProfilePhase1Temp": {
"displayText": "Phase 1\nTemp",
"description": "Target temperature for the end of this phase"
"displayText": "Fas 1\nTemp",
"description": "Måltemperatur i slutet av denna fas"
},
"ProfilePhase1Duration": {
"displayText": "Phase 1\nDuration",
"description": "Target duration of this phase (seconds)"
"displayText": "Fas 1\nTidslängd",
"description": "Mållängd av denna fasen (sekunder)"
},
"ProfilePhase2Temp": {
"displayText": "Phase 2\nTemp",
"displayText": "Fas 2\nTemp",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Phase 2\nDuration",
"displayText": "Fas 2\nTidslängd",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Phase 3\nTemp",
"displayText": "Fas 3\nTemp",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Phase 3\nDuration",
"displayText": "Fas 3\nTidslängd",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Phase 4\nTemp",
"displayText": "Fas 4\nTemp",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Phase 4\nDuration",
"displayText": "Fas 4\nTidslängd",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Phase 5\nTemp",
"displayText": "Fas 5\nTemp",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Phase 5\nDuration",
"displayText": "Fas 5\nTidslängd",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Cooldown\nSpeed",
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
"displayText": "Nedkylnings-\nhastighet",
"description": "Kyl ned i denna hastighet i slutet av profilen (grader per sekund)"
},
"MotionSensitivity": {
"displayText": "Rörelse-\nkänslighet",
@@ -257,16 +260,16 @@
"description": "Loopa animationer i huvudmeny"
},
"Brightness": {
"displayText": "Screen\nbrightness",
"description": "Adjust the OLED screen brightness"
"displayText": "Skärmens\nLjusstyrka",
"description": "Justera OLED skärmens ljusstyrka"
},
"ColourInversion": {
"displayText": "Invert\nscreen",
"description": "Invert the OLED screen colors"
"displayText": "Invertera\nskärm",
"description": "Invertera OLED skärmens färger"
},
"LOGOTime": {
"displayText": "Boot logo\nduration",
"description": "Set boot logo duration (s=seconds)"
"displayText": "Start logo\nTidslängd",
"description": "Sätt uppstartslogotypens tidslängd (s=sekunder)"
},
"AdvancedIdle": {
"displayText": "Detaljerad\nvid inaktiv",
@@ -278,31 +281,31 @@
},
"BluetoothLE": {
"displayText": "Bluetooth\n",
"description": "Enables BLE"
"description": "Tillåter BLE"
},
"PowerLimit": {
"displayText": "Max-\neffekt",
"description": "Maximal effekt som enheten kan använda (Watt)"
},
"CalibrateCJC": {
"displayText": "Calibrate CJC\nat next boot",
"description": "At next boot tip Cold Junction Compensation will be calibrated (not required if Delta T is < 5°C)"
"displayText": "Kalibrera CJC\nnästa uppstart",
"description": "Vid nästa uppstart kommer spets Cold Junction Compensation kalibreras (ej nödvändigt om Delta T är < 5°C)"
},
"VoltageCalibration": {
"displayText": "Kalibrera\ninspänning?",
"description": "Inspänningskalibrering. Knapparna justerar, håll inne för avslut"
},
"PowerPulsePower": {
"displayText": "Power\npulse",
"description": "Intensity of power of keep-awake-pulse (W=watt)"
"displayText": "Effekt\npuls",
"description": "Intensiteten av effekt för håll-vaken-puls (W=watt)"
},
"PowerPulseWait": {
"displayText": "Power pulse\ndelay",
"description": "Delay before keep-awake-pulse is triggered (x 2.5s)"
"displayText": "Effekt puls\nfördröjning",
"description": "Fördröjning innan håll-vaken-pulsen skickas (x 2.5s)"
},
"PowerPulseDuration": {
"displayText": "Power pulse\nduration",
"description": "Keep-awake-pulse duration (x 250ms)"
"displayText": "Effekt puls\ntidsmängd",
"description": "Håll-vaken-puls varaktighet (x 250ms)"
},
"SettingsReset": {
"displayText": "Fabriks-\ninställ?",

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Türkçe",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Українська",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "КХС\nвідкалібровано!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Некерований\nрозігрів"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Під час наступного завантаження переконайтеся, що жало і ручка мають кімнатну температуру!"
},
@@ -61,16 +64,16 @@
"message": "Вимк"
},
"ProfilePreheatString": {
"message": "Preheat\n"
"message": "Попередній\nрозігрів"
},
"ProfileCooldownString": {
"message": "Cooldown\n"
"message": "Охолодження\n"
},
"DeviceFailedValidationWarning": {
"message": "Вірогідно ваш пристрій підробний!"
},
"TooHotToStartProfileWarning": {
"message": "Too hot to\nstart profile"
"message": "Занадто гараче для\nзміни профілів"
}
},
"characters": {
@@ -153,60 +156,60 @@
"description": "Під час пайки тривале натискання обох кнопок заблокує їх (В=Вимк | Т=Тільки турбо | П=Повне)"
},
"ProfilePhases": {
"displayText": "Profile\nPhases",
"description": "Number of phases in profile mode"
"displayText": "Етапи\nпрофілів",
"description": "Кількість етапів в режимі профілів"
},
"ProfilePreheatTemp": {
"displayText": "Preheat\nTemp",
"description": "Preheat to this temperature at the start of profile mode"
"displayText": "Температура\nПоп.Розігріву",
"description": "Попередньо розігріти до цієї температури на початку режимку профілів"
},
"ProfilePreheatSpeed": {
"displayText": "Preheat\nSpeed",
"description": "Preheat at this rate (degrees per second)"
"displayText": "Швидкість\nПоп.Розігріву",
"description": "Розігрівати з такою швидкістю (градусів в секунду)"
},
"ProfilePhase1Temp": {
"displayText": "Phase 1\nTemp",
"description": "Target temperature for the end of this phase"
"displayText": "Етап 1\nТемпература",
"description": "Температура в кінці цього етапу"
},
"ProfilePhase1Duration": {
"displayText": "Phase 1\nDuration",
"description": "Target duration of this phase (seconds)"
"displayText": "Етап 1\nТривалість",
"description": "Тривалість цього етапу (секунд)"
},
"ProfilePhase2Temp": {
"displayText": "Phase 2\nTemp",
"displayText": "Етап 2\nТемпература",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Phase 2\nDuration",
"displayText": "Етап 2\nТривалість",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Phase 3\nTemp",
"displayText": "Етап 3\nТемпература",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Phase 3\nDuration",
"displayText": "Етап 3\nТривалість",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Phase 4\nTemp",
"displayText": "Етап 4\nТемпература",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Phase 4\nDuration",
"displayText": "Етап 4\nТривалість",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Phase 5\nTemp",
"displayText": "Етап 5\nТемпература",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Phase 5\nDuration",
"displayText": "Етап 5\nТривалість",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Cooldown\nSpeed",
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
"displayText": "Швидкість\nОхолодження",
"description": "Швидкість охолодження в кінці режиму профілів (градусів в секунду)"
},
"MotionSensitivity": {
"displayText": "Чутливість\nсенсору руху",
@@ -278,7 +281,7 @@
},
"BluetoothLE": {
"displayText": "Bluetooth\n",
"description": "Enables BLE"
"description": "Увімкнути BLE"
},
"PowerLimit": {
"displayText": "Макс.\nпотуж.",

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Tieng Viet",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "Nhiet\nTat gia nhiet"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,7 +3,7 @@
"languageLocalName": "廣東話 (香港)",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"CalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
@@ -30,6 +30,9 @@
"WarningThermalRunaway": {
"message": "加熱失控"
},
"WarningTipShorted": {
"message": "!Tip Shorted!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},

View File

@@ -3,8 +3,8 @@
"languageLocalName": "简体中文",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"message": "Calibration done!"
"CalibrationDone": {
"message": "校正完成!"
},
"ResetOKMessage": {
"message": "已重置!"
@@ -30,11 +30,14 @@
"WarningThermalRunaway": {
"message": "加热失控"
},
"WarningTipShorted": {
"message": "!烙铁头短路!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
"message": "在重启前请确认烙铁头及本体已完全冷却!"
},
"CJCCalibrating": {
"message": "calibrating"
"message": "校正中"
},
"SettingsResetWarning": {
"message": "你是否确定要将全部设定重置为默认值?"
@@ -130,7 +133,7 @@
},
"PDVpdo": {
"displayText": "PD VPDO",
"description": "Enables PPS & EPR modes"
"description": "启用PPS和EPR快充支持"
},
"BoostTemperature": {
"displayText": "增热温度",
@@ -277,8 +280,8 @@
"description": "焊接模式画面以英语小字体显示详请"
},
"BluetoothLE": {
"displayText": "Bluetooth",
"description": "Enables BLE"
"displayText": "蓝牙",
"description": "启用蓝牙支持"
},
"PowerLimit": {
"displayText": "功率限制",
@@ -286,7 +289,7 @@
},
"CalibrateCJC": {
"displayText": "校正CJC",
"description": "At next boot tip Cold Junction Compensation will be calibrated (not required if Delta T is < 5 C)"
"description": "在下次重启时校正烙铁头热电偶冷接点补偿值CJC温差小于5摄氏度时无需校正"
},
"VoltageCalibration": {
"displayText": "输入电压校正?",

View File

@@ -3,8 +3,8 @@
"languageLocalName": "正體中文",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CJCCalibrationDone": {
"message": "Calibration done!"
"CalibrationDone": {
"message": "校正完成!"
},
"ResetOKMessage": {
"message": "已重設!"
@@ -30,11 +30,14 @@
"WarningThermalRunaway": {
"message": "加熱失控"
},
"WarningTipShorted": {
"message": "!烙鐵頭短路!"
},
"SettingsCalibrationWarning": {
"message": "Before rebooting, make sure tip & handle are at room temperature!"
"message": "在重啟前請確認烙鐵頭及本體已完全冷卻!"
},
"CJCCalibrating": {
"message": "calibrating"
"message": "校正中"
},
"SettingsResetWarning": {
"message": "你是否確定要將全部設定重設到預設值?"
@@ -130,7 +133,7 @@
},
"PDVpdo": {
"displayText": "PD VPDO",
"description": "Enables PPS & EPR modes"
"description": "開啟PPS及EPR支援"
},
"BoostTemperature": {
"displayText": "增熱溫度",
@@ -277,8 +280,8 @@
"description": "於焊接模式畫面以英文小字型顯示詳細資料"
},
"BluetoothLE": {
"displayText": "Bluetooth",
"description": "Enables BLE"
"displayText": "藍牙",
"description": "開啟藍牙支援"
},
"PowerLimit": {
"displayText": "功率限制",
@@ -286,7 +289,7 @@
},
"CalibrateCJC": {
"displayText": "校正CJC",
"description": "At next boot tip Cold Junction Compensation will be calibrated (not required if Delta T is < 5 C)"
"description": "在下次重啟時校正烙鐵頭熱電偶冷接點補償值CJC溫差小於5攝氏度時無需校正"
},
"VoltageCalibration": {
"displayText": "輸入電壓校正?",

View File

@@ -1,7 +1,7 @@
{
"messagesWarn": [{
"id": "CJCCalibrationDone",
"description": "Confirmation message indicating CJC calibration is complete."
"id": "CalibrationDone",
"description": "Confirmation message indicating calibration is complete."
},
{
"id": "ResetOKMessage",
@@ -17,7 +17,9 @@
},
{
"id": "NoPowerDeliveryMessage",
"include": ["POW_PD"],
"include": [
"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."
},
{
@@ -35,7 +37,12 @@
{
"id": "WarningThermalRunaway",
"description": "Warning text shown when the software has disabled the heater as a safety precaution as the temperature reading didn't react as expected."
}, {
},
{
"id": "WarningTipShorted",
"description": "Warning text shown when the software has detected that the users tip is likely shorted."
},
{
"id": "SettingsCalibrationWarning",
"description": "Confirmation message shown before performing an offset calibration. Should warn the user to make sure tip and handle are at the same temperature."
},
@@ -50,50 +57,66 @@
{
"id": "UVLOWarningString",
"maxLen": 8,
"include": ["POW_DC"],
"include": [
"POW_DC"
],
"description": "Warning text shown when the unit turns off due to undervoltage in simple mode."
},
{
"id": "UndervoltageString",
"maxLen": 15,
"include": ["POW_DC"],
"include": [
"POW_DC"
],
"description": "Warning text shown when the unit turns off due to undervoltage in advanced mode."
},
{
"id": "InputVoltageString",
"maxLen": 11,
"note": "Preferably end with a space",
"include": ["POW_DC"],
"include": [
"POW_DC"
],
"description": "Prefix text for 'Input Voltage' shown before showing the input voltage reading."
},
{
"id": "ProfilePreheatString",
"maxLen": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Shown in profile mode while preheating"
},
{
"id": "ProfileCooldownString",
"maxLen": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Shown in profile mode while cooling down"
},
{
"id": "SleepingSimpleString",
"maxLen": 4,
"exclude": ["NO_SLEEP_MODE"],
"exclude": [
"NO_SLEEP_MODE"
],
"description": "The text shown to indicate the unit is in sleep mode when the advanced view is NOT on."
},
{
"id": "SleepingAdvancedString",
"maxLen": 15,
"exclude": ["NO_SLEEP_MODE"],
"exclude": [
"NO_SLEEP_MODE"
],
"description": "The text shown to indicate the unit is in sleep mode when the advanced view is turned on."
},
{
"id": "SleepingTipAdvancedString",
"maxLen": 6,
"exclude": ["NO_SLEEP_MODE"],
"exclude": [
"NO_SLEEP_MODE"
],
"description": "The prefix text shown before tip temperature when the unit is sleeping with advanced view on."
},
{
@@ -109,11 +132,14 @@
{
"id": "TooHotToStartProfileWarning",
"default": "Too hot to\nstart profile",
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Shown when profile mode is started while the device is too hot."
}
],
"characters": [{
"characters": [
{
"id": "SettingRightChar",
"len": 1,
"description": "Shown for fixed Right-handed display rotation."
@@ -187,11 +213,15 @@
"description": "Shown when the locking mode is set to lock all buttons."
}
],
"menuGroups": [{
"menuGroups": [
{
"id": "PowerMenu",
"maxLen": 5,
"maxLen2": 11,
"include": ["POW_DC", "POW_QC"],
"include": [
"POW_DC",
"POW_QC"
],
"description": "Menu for settings related to power. Main settings to do with the input voltage."
},
{
@@ -219,39 +249,50 @@
"description": "Advanced settings. Misc catchall for settings that don't fit anywhere else or settings that require some thought before use."
}
],
"menuOptions": [{
"menuOptions": [
{
"id": "DCInCutoff",
"maxLen": 5,
"maxLen2": 11,
"include": ["POW_DC"],
"include": [
"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."
},
{
"id": "MinVolCell",
"maxLen": 4,
"maxLen2": 9,
"include": ["POW_DC"],
"include": [
"POW_DC"
],
"description": "When powered by a battery, this adjusts the minimum voltage per cell before shutdown. (This is multiplied by the cell count.)"
},
{
"id": "QCMaxVoltage",
"maxLen": 8,
"maxLen2": 15,
"include": ["POW_QC"],
"include": [
"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."
},
{
"id": "PDNegTimeout",
"maxLen": 8,
"maxLen2": 15,
"include": ["POW_PD"],
"include": [
"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."
},
{
"id": "PDVpdo",
"maxLen": 7,
"maxLen2": 15,
"include": ["POW_PD"],
"include": [
"POW_PD"
],
"description": "Enabled PPS & EPR modes."
},
{
@@ -288,98 +329,126 @@
"id": "ProfilePhases",
"maxLen": 6,
"maxLen2": 13,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "set the number of phases for profile mode."
},
{
"id": "ProfilePreheatTemp",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Preheat to this temperature at the start of profile mode."
},
{
"id": "ProfilePreheatSpeed",
"maxLen": 5,
"maxLen2": 11,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "How fast the temperature is allowed to rise during the preheat phase at the start of profile mode."
},
{
"id": "ProfilePhase1Temp",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 1 of profile mode."
},
{
"id": "ProfilePhase1Duration",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"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."
},
{
"id": "ProfilePhase2Temp",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 2 of profile mode."
},
{
"id": "ProfilePhase2Duration",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"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."
},
{
"id": "ProfilePhase3Temp",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 3 of profile mode."
},
{
"id": "ProfilePhase3Duration",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"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."
},
{
"id": "ProfilePhase4Temp",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 5 of profile mode."
},
{
"id": "ProfilePhase4Duration",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"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."
},
{
"id": "ProfilePhase5Temp",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "Target temperature for the end of phase 5 of profile mode."
},
{
"id": "ProfilePhase5Duration",
"maxLen": 4,
"maxLen2": 9,
"include": ["PROFILE_SUPPORT"],
"include": [
"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."
},
{
"id": "ProfileCooldownSpeed",
"maxLen": 5,
"maxLen2": 11,
"include": ["PROFILE_SUPPORT"],
"include": [
"PROFILE_SUPPORT"
],
"description": "How fast the temperature is allowed to drop during the cooldown phase at the end of profile mode."
},
{
@@ -392,14 +461,18 @@
"id": "SleepTemperature",
"maxLen": 4,
"maxLen2": 9,
"exclude": ["NO_SLEEP_MODE"],
"exclude": [
"NO_SLEEP_MODE"
],
"description": "Temperature the device will drop down to while asleep. Typically around halfway between off and soldering temperature."
},
{
"id": "SleepTimeout",
"maxLen": 4,
"maxLen2": 9,
"exclude": ["NO_SLEEP_MODE"],
"exclude": [
"NO_SLEEP_MODE"
],
"description": "How long of a period without movement / button-pressing is required before the device drops down to the sleep temperature."
},
{
@@ -412,7 +485,9 @@
"id": "HallEffSensitivity",
"maxLen": 6,
"maxLen2": 13,
"include": ["HALL_SENSOR"],
"include": [
"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."
},
{
@@ -425,7 +500,9 @@
"id": "DisplayRotation",
"maxLen": 6,
"maxLen2": 13,
"exclude": ["NO_DISPLAY_ROTATE"],
"exclude": [
"NO_DISPLAY_ROTATE"
],
"description": "If the display should rotate automatically or if it should be fixed for left- or right-handed mode."
},
{
@@ -492,7 +569,9 @@
"id": "BluetoothLE",
"maxLen": 7,
"maxLen2": 15,
"include": ["BLE_ENABLED"],
"include": [
"BLE_ENABLED"
],
"description": "Should BLE be enabled at boot time."
},
{
@@ -544,4 +623,4 @@
"description": "Changes the device language on multi-lingual builds."
}
]
}
}

View File

@@ -3,19 +3,21 @@ site_name: IronOS
site_url: https://ralim.github.io/IronOS/
site_description: "IronOS Open Source Soldering Iron firmware for Miniware and Pinecil"
# repo config
# Repo config
repo_url: https://github.com/ralim/IronOS/
# Dir & location config
docs_dir: ../Documentation
edit_uri: edit/dev/Documentation/
# Theme and config
theme:
theme:
name: readthedocs
highlightsjs: true
hljs_languages:
- yaml
# Navigation structure
nav:
- Home: index.md
- Getting Started: GettingStarted.md
@@ -34,12 +36,15 @@ nav:
- Startup Logo: Logo.md
- Hardware:
- Hall Sensor (Pinecil): HallSensor.md
- Bluetooth (Pinecil V2): Bluetooth.md
- Hardware Notes: Hardware.md
- Troubleshooting: Troubleshooting.md
- Known Hardware Issues: HardwareIssues.md
- Power sources: PowerSources.md
- Translations: Translation.md
- Development: Development.md
- Changelog: History.md
# Plugins
plugins:
- search
@@ -47,7 +52,6 @@ plugins:
- awesome-pages
- git-revision-date
# Markdown Extensions
markdown_extensions:
- attr_list

View File

@@ -1,29 +1,35 @@
# Default Reference Distro for development env & deploy:
# * Alpine Linux, version 3.16 *
FROM alpine:3.16
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
WORKDIR /build
# Installing the two compilers, python3, python3 pip, clang format
# Compilders ->gcc-* newlib-*
# Python3 -> py*
# Misc -> findutils make git
# musl-dev is required for the multi lang firmwares
# clang is required for clang-format (for dev)
ARG APK_COMPS="gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf \
newlib-arm-none-eabi"
# Default current dir when container starts
WORKDIR /build/ironos
# Installing the two compilers (ARM & RISCV), python3 & pip, clang tools, etc.:
## - compilers: gcc-*, newlib-*
## - python3: py*, black (required to check Python code formatting)
## - misc: findutils, make, git, diffutils, zip
## - musl-dev (required for the multi lang firmwares)
## - clang (required for clang-format to check C++ code formatting)
## - shellcheck (to check sh scripts)
ARG APK_COMPS="gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi"
ARG APK_PYTHON="python3 py3-pip black"
ARG APK_MISC="findutils make git"
ARG APK_DEV="musl-dev clang bash clang-extra-tools"
ARG APK_MISC="findutils make git diffutils zip"
ARG APK_DEV="musl-dev clang bash clang-extra-tools shellcheck"
# PIP packages
ARG PIP_PKGS='bdflib'
# PIP packages to check & test Python code, and generate docs
ARG PIP_PKGS='bdflib flake8 pymdown-extensions mkdocs mkdocs-autolinks-plugin mkdocs-awesome-pages-plugin mkdocs-git-revision-date-plugin'
# Install system packages using alpine package manager
RUN apk add --no-cache ${APK_COMPS} ${APK_PYTHON} ${APK_MISC} ${APK_DEV}
# Install Python3 packages
# Install Python3 packages as modules using pip
RUN python3 -m pip install ${PIP_PKGS}
# Git trust
RUN git config --global --add safe.directory /build/source
COPY . /build/source
COPY ./scripts/ci /build/ci
# Git trust to avoid related warning
RUN git config --global --add safe.directory /build/ironos
# Copy the whole source tree working dir into container
COPY . /build/ironos

View File

@@ -1,13 +0,0 @@
#!/bin/sh
set -e
set -u
mkdir -p /build/ci/artefacts
# Build STM code
cd /build/source/source/
bash ./build.sh || exit 1
echo "All Firmware built"
# Copy out all the final resulting files we would like to store for the next op
cp -r /build/source/source/Hexfile/*.hex /build/ci/artefacts/
cp -r /build/source/source/Hexfile/*.bin /build/ci/artefacts/

View File

@@ -1 +0,0 @@
8312c4c91799885f222f663fc81f9a31 gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2

View File

@@ -1 +0,0 @@
add5b6a9b12987d0e72f55a4d2cd0f3b nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2

View File

@@ -3,24 +3,140 @@
# little helper for docker deployment to:
# - start development environment for IronOS ("shell" sub-command)
# - generate full set of builds ("build" sub-command)
# - probably doing some other routines (check source briefly before running undocumented commands!)
#set -x
#set -e
### helper functions
# brief help (some supported commands may be missing!)
usage()
{
echo -e "\nUsage: ${0} [CMD]\n"
echo "CMD:"
echo "CMD (docker related):"
echo -e "\tshell - start docker container with shell inside to work on IronOS with all tools needed"
echo -e "\tbuild - compile builds of IronOS inside docker container for supported hardware"
echo -e "\tclean - delete created docker container (but not pre-downloaded data for it)\n"
echo -e "\tclean - delete created docker image for IronOS & its build cache objects\n"
echo "CMD (helper routines):"
echo -e "\tdocs_readme - generate & OVERWRITE(!) README.md inside Documentation/ based on nav section from mkdocs.yml if it changed\n"
echo -e "\tcheck_style_file SRC - run code style checks based on clang-format & custom parsers for source code file SRC\n"
echo -e "\tcheck_style_log - run clang-format using source/Makefile and generate gcc-compatible error log in source/check-style.log\n"
echo -e "STORAGE NOTICE: for \"shell\" and \"build\" commands extra files will be downloaded so make sure that you have ~5GB of free space.\n"
}
# Documentation/README.md automagical generation routine
docs_readme()
{
# WARNING: ON RUN Documentaion/README.md MAY BE OVERWRITTEN WITHOUT ANY WARNINGS / CONFIRMATIONS !!!
# Returns:
## 0 to the environment & silence - if there are no any changes in README.md nor updates in mkdocs.yml
## 1 to the environment (as error) & note message - if the update of README.md in repo is required
yml="scripts/IronOS-mkdocs.yml"
md_old="Documentation/README.md"
md_new="Documentation/README"
# ^^^^ hardcoded paths relative to IronOS/ to make this func very trivial
# file overwritten section looks out of style but hoping to make shellcheck happy
cat << EOF > "${md_new}"
<!-- THIS FILE IS AUTOGENERATED by "scripts/deploy.sh docs_readme" based on nav section in ${yml} config -->
<!-- THIS FILE IS NOT SUPPOSED TO BE EDITED MANUALLY -->
#### This is autogenerated README for brief navigation through github over official documentation for IronOS project
#### This documentation is also available [here online](https://ralim.github.io/IronOS)
EOF
# it probably will become unexplainable in a few months but so far it works:
sed '1,/^nav/d; /^ *$/,$d; s,- ,- [,; s,: ,](../Documentation/,; s,.md,.md),; s,:$,],; s,/Pinecil ,/Pinecil%20,; /^ - \[.*\]$/ s,\[,,; s,]$,,' "${yml}" >> "${md_new}"
ret=0
if [ -z "$(diff -q "${md_old}" "${md_new}")" ]; then
rm "${md_new}"
ret=0
else
mv "${md_new}" "${md_old}"
echo ""
echo "${yml} seems to be updated..."
echo "... while ${md_old} is out-of-date!"
echo ""
echo "Please, update ${md_old} in your local working copy by command:"
echo ""
echo " $ ./scripts/deploy.sh docs_readme"
echo ""
echo "And then commit & push changes to update ${md_old} in the repo:"
echo ""
echo " $ git commit ${md_old} -m \"${md_old}: update autogenerated file\" && git push"
echo ""
ret=1
fi;
return "${ret}"
}
# Helper function to check code style using clang-format & grep/sed custom parsers:
# - basic logic moved from source/Makefile : `check-style` target for better maintainance since a lot of sh script involved;
# - output goes in gcc-like error compatible format for IDEs/editors.
check_style_file()
{
ret=0
src="${1}"
test ! -f "${src}" && echo "ERROR!!! Provided file ${src} is not available to check/read!!!" && exit 1
# count lines using diff between beauty-fied file & original file to detect format issue
var="$(clang-format "$src" | diff "$src" - | wc -l)"
if [ "${var}" -ne 0 ]; then
# show full log error or, if LIST=anything provided, then show only filename of interest (implemented for debug purposes mainly)
if [ -z "${LIST}" ]; then
# sed is here only for pretty logging
clang-format "${src}" | diff "${src}" - | sed 's/^---/-------------------------------------------------------------------------------/; s/^< /--- /; s/^> /+++ /; /^[0-9].*/ s/[acd,].*$/ERROR1/; /^[0-9].*/ s,^,\n\n\n\n'"${src}"':,; /ERROR1$/ s,ERROR1$,:1: error: clang-format code style mismatch:,; '
else
echo "${src}"
fi;
ret=1
fi;
# - clang-format has neat option for { } in condition blocks but it's available only since version 15:
# * https://clang.llvm.org/docs/ClangFormatStyleOptions.html#insertbraces
# - since reference env is alpine 3.16 with clang-format 13, implement custom parser to do the similar thing here with grep:
# it used to trace missing { and } for if/else/do/while/for BUT IT'S VERY SPECULATIVE, very-very hacky & dirty.
# - if file is problematic but filename only requested make final grep in pipe silent ... UPD: make code messy but shellcheck happy
if [ -z "${LIST}" ]; then
grep -H -n -e "^ .*if .*)$" -e "^ .*else$" -e "^ .* do$" -e "^ .*while .*)$" -e "^ .*for .*)$" "${src}" | grep -v -e "^.*//" -e "^.*:.*: .*if ((.*[^)])$" | sed 's,^,\n\n,; s,: ,:1: error: probably missing { or } for conditional or loop block:\n>>>,;' | grep -e "^.*$"
else
grep -H -n -e "^ .*if .*)$" -e "^ .*else$" -e "^ .* do$" -e "^ .*while .*)$" -e "^ .*for .*)$" "${src}" | grep -v -e "^.*//" -e "^.*:.*: .*if ((.*[^)])$" | sed 's,^,\n\n,; s,: ,:1: error: probably missing { or } for conditional or loop block:\n>>>,;' | grep -q -e "^.*$"
fi;
if [ "${?}" -ne 1 ]; then
# ... and only print the filename
test -z "${LIST}" || echo "${src}"
ret=1;
fi;
return "${ret}"
}
# check_style routine for those who too lazy to do it everytime manually
check_style_log()
{
log="source/check-style.log"
make -C source check-style 2>&1 | tee "${log}"
chmod 0666 "${log}"
sed -i -e 's,\r,,g' "${log}"
return 0
}
### main
docker_conf="Env.yml"
# get absolute location of project root dir to make docker happy with config(s)
# (successfully tested on relatively POSIX-compliant Dash shell)
# this script
script_file="/deploy.sh"
# IronOS/scripts/deploy.sh
script_path="${PWD}"/"${0}"
# IronOS/scripts/
script_dir=${script_path%"${script_file}"}
# IronOS/
root_dir="${script_dir}/.."
# IronOS/Env.yml
docker_file="-f ${root_dir}/${docker_conf}"
# allow providing custom path to docker tool using DOCKER_BIN external env. var.
# (compose sub-command must be included, i.e. DOCKER_BIN="/usr/local/bin/docker compose" ./deploy.sh)
@@ -42,6 +158,29 @@ if [ -n "${docker_tool}" ] && [ -z "${docker_bin}" ]; then
docker_bin="${docker_tool} compose"
fi;
# give function argument a name
cmd="${1}"
# if only README.md for Documentation update is required then run it & exit
if [ "docs_readme" = "${cmd}" ]; then
docs_readme
exit "${?}"
fi;
if [ "check_style_file" = "${cmd}" ]; then
check_style_file "${2}"
exit "${?}"
fi;
if [ "check_style_log" = "${cmd}" ]; then
check_style_log
exit "${?}"
fi;
# if docker is not presented in any way show warning & exit
if [ -z "${docker_bin}" ]; then
echo "ERROR: Can't find docker-compose nor docker tool. Please, install docker and try again."
exit 1
@@ -49,33 +188,19 @@ fi;
# construct command to run
cmd="${1}"
if [ -z "${cmd}" ] || [ "${cmd}" = "shell" ]; then
docker_cmd="run --rm builder"
elif [ "${cmd}" = "build" ]; then
docker_cmd="run --rm builder /bin/bash /build/ci/buildAll.sh"
docker_cmd="run --rm builder make build-all OUT=${OUT}"
elif [ "${cmd}" = "clean" ]; then
docker rmi ironos-builder:latest
docker system prune --filter label=ironos-builder:latest --force
exit "${?}"
else
usage
exit 1
fi;
# get absolute location of project root dir to make docker happy with config(s)
# (successfully tested on relatively POSIX-compliant Dash shell)
# this script
script_file="/deploy.sh"
# IronOS/scripts/deploy.sh
script_path="${PWD}"/"${0}"
# IronOS/scripts/
script_dir=${script_path%"${script_file}"}
# IronOS/
root_dir="${script_dir}/.."
# IronOS/Env.yml
docker_file="-f ${root_dir}/${docker_conf}"
# change dir to project root dir & run constructed command
cd "${root_dir}" || exit 1
@@ -87,4 +212,3 @@ echo -e "\t* type \"${0} clean\" to delete created container (but not cached dat
echo -e "\n====>>>> ${docker_bin} ${docker_file} ${docker_cmd}\n"
eval "${docker_bin} ${docker_file} ${docker_cmd}"
exit "${?}"

View File

@@ -19,6 +19,7 @@ AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortEnumsOnASingleLine: false ### <<< Keeps enums as is
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false

View File

@@ -3,9 +3,11 @@
#include "BSP_Power.h"
#include "BSP_QC.h"
#include "Defines.h"
#include "Types.h"
#include "configuration.h"
#include <stdbool.h>
#include <stdint.h>
/*
* BSP.h -- Board Support
*
@@ -101,6 +103,11 @@ void setBuzzer(bool on);
// For example, on the MHP30 this is used to figure out the resistance of the hotplate
uint8_t preStartChecks();
uint8_t preStartChecksDone();
// Check if the tip or output mosfet is shorted (if possible)
bool isTipShorted();
// Show the boot logo
void showBootLogo(void);
#ifdef __cplusplus
}
#endif

View File

@@ -19,9 +19,8 @@ void power_check();
// Returns the tip resistance in x10 ohms, so 7.5 = 75; 14=140 etc
uint8_t getTipResistanceX10();
uint8_t getTipThermalMass();
uint8_t getTipInertia();
uint16_t getTipThermalMass();
uint16_t getTipInertia();
#ifdef __cplusplus
}

View File

@@ -1,6 +1,7 @@
// BSP mapping functions
#include "BSP.h"
#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "Pins.h"
#include "Setup.h"
@@ -471,5 +472,7 @@ uint64_t getDeviceID() {
uint8_t preStartChecksDone() { return 1; }
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
uint16_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint16_t getTipInertia() { return TIP_THERMAL_MASS; }
void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }

View File

@@ -18,4 +18,5 @@ void power_check() {
bool getIsPoweredByDCIN() { return false; }
uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
bool isTipShorted() { return false; }

View File

@@ -47,9 +47,9 @@ void Setup_HAL() {
MX_IWDG_Init();
HAL_ADC_Start(&hadc2);
HAL_ADCEx_MultiModeStart_DMA(&hadc1, ADCReadings,
(ADC_SAMPLES * ADC_CHANNELS)); // start DMA of normal readings
// HAL_ADCEx_InjectedStart(&hadc1); // enable injected readings
// HAL_ADCEx_InjectedStart(&hadc2); // enable injected readings
(ADC_SAMPLES * ADC_CHANNELS)); // start DMA of normal readings
// HAL_ADCEx_InjectedStart(&hadc1); // enable injected readings
// HAL_ADCEx_InjectedStart(&hadc2); // enable injected readings
}
// channel 0 -> temperature sensor, 1-> VIN, 2-> tip
@@ -154,8 +154,9 @@ static void MX_ADC1_Init(void) {
SET_BIT(hadc1.Instance->CR1, (ADC_CR1_EOSIE)); // Enable end of Normal
// Run ADC internal calibration
while (HAL_ADCEx_Calibration_Start(&hadc1) != HAL_OK)
while (HAL_ADCEx_Calibration_Start(&hadc1) != HAL_OK) {
;
}
}
/* ADC2 init function */
@@ -191,8 +192,9 @@ static void MX_ADC2_Init(void) {
HAL_ADC_ConfigChannel(&hadc2, &sConfig);
// Run ADC internal calibration
while (HAL_ADCEx_Calibration_Start(&hadc2) != HAL_OK)
while (HAL_ADCEx_Calibration_Start(&hadc2) != HAL_OK) {
;
}
}
/* I2C1 init function */
static void MX_I2C1_Init(void) {

View File

@@ -6,10 +6,12 @@
*/
#include "Setup.h"
#include "TipThermoModel.h"
#include "Types.h"
#include "Utils.h"
#include "configuration.h"
extern uint16_t tipSenseResistancex10Ohms;
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) {
extern uint16_t tipSenseResistancex10Ohms;
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) {
// For the MHP30, we are mimicing the original code and using the resistor fitted to the base of the heater head,
// this is measured at boot in pid task and in the disconnected tip check if tip is removed
if (tipSenseResistancex10Ohms > 900 && tipSenseResistancex10Ohms <= 1100) {

View File

@@ -29,8 +29,8 @@
* How many seconds/minutes we wait until going to sleep/shutdown.
* Values -> SLEEP_TIME * 10; i.e. 5*10 = 50 Seconds!
*/
#define SLEEP_TIME 5 // x10 Seconds
#define SHUTDOWN_TIME 10 // Minutes
#define SLEEP_TIME 5 // x10 Seconds
#define SHUTDOWN_TIME 0 // Minutes -- Default shutdown to being off
/**
* Auto start off for safety.
@@ -164,13 +164,13 @@
#define HARDWARE_MAX_WATTAGE_X10 650
#define TIP_THERMAL_MASS 65 // TODO, needs refinement
#define TIP_RESISTANCE 60 // x10 ohms, ~6 typical
#endif /* MHP30 */
#endif /* MHP30 */
#ifdef ACCEL_EXITS_ON_MOVEMENT
#define NO_SLEEP_MODE
#endif
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
#endif /* CONFIGURATION_H_ */

View File

@@ -30,9 +30,9 @@ void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
HAL_FLASH_Unlock();
for (uint16_t i = 0; i < (length / 2); i++) {
resetWatchdog();
HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, SETTINGS_START_PAGE+ (i*sizeof(uint16_t)), data[i]);
HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, SETTINGS_START_PAGE + (i * sizeof(uint16_t)), data[i]);
}
HAL_FLASH_Lock();
}
void flash_read_buffer(uint8_t *buffer, const uint16_t length) { memcpy(buffer, (uint8_t*)SETTINGS_START_PAGE, length); }
void flash_read_buffer(uint8_t *buffer, const uint16_t length) { memcpy(buffer, (uint8_t *)SETTINGS_START_PAGE, length); }

View File

@@ -1,6 +1,7 @@
// BSP mapping functions
#include "BSP.h"
#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "Pins.h"
#include "Setup.h"
@@ -284,6 +285,7 @@ void performTipResistanceSampleReading() {
tipResistanceReadingSlot++;
}
bool tipShorted = false;
void FinishMeasureTipResistance() {
// Otherwise we now have the 4 samples;
@@ -303,6 +305,8 @@ void FinishMeasureTipResistance() {
// return; // Change nothing as probably disconnected tip
tipResistanceReadingSlot = lastTipResistance = 0;
return;
} else if (reading < 200) {
tipShorted = true;
} else if (reading < 800) {
newRes = 62;
} else {
@@ -372,7 +376,7 @@ uint64_t getDeviceID() {
uint8_t preStartChecksDone() {
#ifdef TIP_RESISTANCE_SENSE_Pin
return (lastTipResistance == 0 || tipResistanceReadingSlot < numTipResistanceReadings || tipMeasurementOccuring) ? 0 : 1;
return (lastTipResistance == 0 || tipResistanceReadingSlot < numTipResistanceReadings || tipMeasurementOccuring || tipShorted) ? 0 : 1;
#else
return 1;
#endif
@@ -387,8 +391,12 @@ uint8_t getTipResistanceX10() {
return TIP_RESISTANCE;
#endif
}
uint8_t getTipThermalMass() {
#ifdef TIP_RESISTANCE_SENSE_Pin
bool isTipShorted() { return tipShorted; }
#else
bool isTipShorted() { return false; }
#endif
uint16_t getTipThermalMass() {
#ifdef TIP_RESISTANCE_SENSE_Pin
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
@@ -398,7 +406,7 @@ uint8_t getTipThermalMass() {
return TIP_THERMAL_MASS;
#endif
}
uint8_t getTipInertia() {
uint16_t getTipInertia() {
#ifdef TIP_RESISTANCE_SENSE_Pin
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
@@ -407,4 +415,6 @@ uint8_t getTipInertia() {
#else
return TIP_THERMAL_MASS;
#endif
}
}
void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }

View File

@@ -229,8 +229,9 @@ static void MX_ADC1_Init(void) {
HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected);
SET_BIT(hadc1.Instance->CR1, (ADC_CR1_JEOCIE)); // Enable end of injected conv irq
// Run ADC internal calibration
while (HAL_ADCEx_Calibration_Start(&hadc1) != HAL_OK)
while (HAL_ADCEx_Calibration_Start(&hadc1) != HAL_OK) {
;
}
}
/* ADC2 init function */
@@ -272,8 +273,9 @@ static void MX_ADC2_Init(void) {
HAL_ADCEx_InjectedConfigChannel(&hadc2, &sConfigInjected);
// Run ADC internal calibration
while (HAL_ADCEx_Calibration_Start(&hadc2) != HAL_OK)
while (HAL_ADCEx_Calibration_Start(&hadc2) != HAL_OK) {
;
}
}
/* I2C1 init function */
static void MX_I2C1_Init(void) {

View File

@@ -127,4 +127,4 @@ const int32_t uVtoDegC[] = {
#endif
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uVtoDegC[0]));
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }

View File

@@ -10,7 +10,6 @@
#include "stm32f1xx_hal.h"
#include "string.h"
void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
FLASH_EraseInitTypeDef pEraseInit;
pEraseInit.TypeErase = FLASH_TYPEERASE_PAGES;

View File

@@ -208,9 +208,7 @@ static void prvTaskExitError(void) {
// therefore not output an 'unreachable code' warning for code that appears
// after it. */
// }
for(;;){
}
for (;;) {}
}
/*-----------------------------------------------------------*/

View File

@@ -13,7 +13,6 @@
#include "configuration.h"
#include <I2C_Wrapper.hpp>
void preRToSInit() {
/* Reset of all peripherals, Initializes the Flash interface and the Systick.
*/

View File

@@ -1,6 +1,7 @@
// BSP mapping functions
#include "BSP.h"
#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "IRQ.h"
#include "Pins.h"
@@ -93,8 +94,10 @@ uint8_t preStartChecks() { return 1; }
uint64_t getDeviceID() { return dbg_id_get(); }
uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
bool isTipShorted() { return false; }
uint8_t preStartChecksDone() { return 1; }
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint8_t getTipInertia() { return TIP_THERMAL_MASS; }
uint16_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint16_t getTipInertia() { return TIP_THERMAL_MASS; }
void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }

View File

@@ -23,13 +23,13 @@ void log_system_state(int32_t PWMWattsx10) {
// Tip_Temp_C,Handle_Temp_C,Output_Power_Wattx10,PWM,Tip_Raw\r\n
// 3+1+3+1+3+1+3+1+5+2 = 23, so sizing at 32 for now
outputLength = snprintf(uartOutputBuffer, uartOutputBufferLength, "%lu,%u,%li,%u,%lu\r\n", //
TipThermoModel::getTipInC(false), // Tip temp in C
getHandleTemperature(0), // Handle temp in C X10
PWMWattsx10, // Output Wattage
pendingPWM, // PWM
TipThermoModel::convertTipRawADCTouV(getTipRawTemp(0), true) // Tip temp in uV
);
outputLength = snprintf(uartOutputBuffer, uartOutputBufferLength, "%lu,%u,%li,%u,%lu\r\n",
TipThermoModel::getTipInC(false), // Tip temp in C
getHandleTemperature(0), // Handle temp in C X10
PWMWattsx10, // Output Wattage
pendingPWM, // PWM
TipThermoModel::convertTipRawADCTouV(getTipRawTemp(0), true) // Tip temp in uV
);
// Now print this out the uart via IRQ (DMA cant be used as oled has it)
currentOutputPos = 0;

View File

@@ -40,18 +40,19 @@ enum class i2c_step {
Wait_stop, // Wait for stop to send and we are done
Done, // Finished
Error_occured, // Error occured on the bus
};
struct i2c_state {
i2c_step currentStep;
bool isMemoryWrite;
bool wakePart;
uint8_t deviceAddress;
uint8_t memoryAddress;
uint8_t * buffer;
uint8_t *buffer;
uint16_t numberOfBytes;
dma_parameter_struct dma_init_struct;
};
i2c_state currentState;
void perform_i2c_step() {

View File

@@ -69,4 +69,4 @@ const int32_t uVtoDegC[] = {
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(uVtoDegC[0]));
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }

View File

@@ -136,8 +136,7 @@
#define POWER_LIMIT_STEPS 5 //
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_PINECIL // Uses TS100 resistors
#define TEMP_uV_LOOKUP_HAKKO // Use Hakko lookup table
#define USB_PD_VMAX 24 // Maximum voltage for PD to negotiate
#define POW_EPR 1 // EPR mode is tentatively enabled
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
#define PID_TIM_HZ (8) // Tick rate of the PID loop
#define MAX_TEMP_C 450 // Max soldering temp selectable °C
#define MAX_TEMP_F 850 // Max soldering temp selectable °F

View File

@@ -1,6 +1,7 @@
// BSP mapping functions
#include "BSP.h"
#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "IRQ.h"
#include "Pins.h"
@@ -10,13 +11,14 @@
#include "Utils.h"
#include "configuration.h"
#include "crc32.h"
#include "hal_flash.h"
#include "history.hpp"
#include "main.hpp"
// These control the period's of time used for the PWM
const uint16_t powerPWM = 255;
const uint8_t holdoffTicks = 25; // This is the tick delay before temp measure starts (i.e. time for op-amp recovery)
const uint8_t tempMeasureTicks = 25;
uint8_t holdoffTicks = 25; // This is the tick delay before temp measure starts (i.e. time for op-amp recovery)
uint8_t tempMeasureTicks = 25;
uint16_t totalPWM = 255; // Total length of the cycle's ticks
@@ -158,18 +160,8 @@ uint8_t getTipResistanceX10() {
return lastTipResistance;
}
uint8_t getTipThermalMass() {
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
}
return 45;
}
uint8_t getTipInertia() {
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
}
return 10;
}
uint16_t getTipThermalMass() { return 120; }
uint16_t getTipInertia() { return 750; }
// We want to calculate lastTipResistance
// If tip is connected, and the tip is cold and the tip is not being heated
// We can use the GPIO to inject a small current into the tip and measure this
@@ -178,7 +170,7 @@ uint8_t getTipInertia() {
// Which is around 0.54mA this will induce:
// 6 ohm tip -> 3.24mV (Real world ~= 3320)
// 8 ohm tip -> 4.32mV (Real world ~= 4500)
// Which is definitely measureable
// Which is definitely measurable
// Taking shortcuts here as we know we only really have to pick apart 6 and 8 ohm tips
// These are reported as 60 and 75 respectively
void performTipResistanceSampleReading() {
@@ -187,7 +179,7 @@ void performTipResistanceSampleReading() {
gpio_write(TIP_RESISTANCE_SENSE, tipResistanceReadingSlot == 0);
tipResistanceReadingSlot++;
}
bool tipShorted = false;
void FinishMeasureTipResistance() {
// Otherwise we now have the 4 samples;
@@ -206,6 +198,8 @@ void FinishMeasureTipResistance() {
uint8_t newRes = 0;
if (reading > 8000) {
// return; // Change nothing as probably disconnected tip
} else if (reading < 500) {
tipShorted = true;
} else if (reading < 4000) {
newRes = 62;
} else {
@@ -215,8 +209,8 @@ void FinishMeasureTipResistance() {
}
volatile bool tipMeasurementOccuring = true;
volatile TickType_t nextTipMeasurement = 100;
void performTipMeasurementStep() {
bool isTipShorted() { return tipShorted; }
void performTipMeasurementStep() {
// Wait 100ms for settle time
if (xTaskGetTickCount() < (nextTipMeasurement)) {
@@ -238,7 +232,8 @@ uint8_t preStartChecks() {
performTipMeasurementStep();
return preStartChecksDone();
}
uint8_t preStartChecksDone() { return (lastTipResistance == 0 || tipResistanceReadingSlot < numTipResistanceReadings || tipMeasurementOccuring) ? 0 : 1; }
// If we are still measuring the tip; or tip is shorted; prevent heating
uint8_t preStartChecksDone() { return (lastTipResistance == 0 || tipResistanceReadingSlot < numTipResistanceReadings || tipMeasurementOccuring || tipShorted) ? 0 : 1; }
// Return hardware unique ID if possible
uint64_t getDeviceID() {
@@ -278,4 +273,11 @@ uint8_t getDeviceValidationStatus() {
uint32_t programmedHash = EF_Ctrl_Get_Key_Slot_w1();
uint32_t computedHash = gethash();
return programmedHash == computedHash ? 0 : 1;
}
}
void showBootLogo(void) {
uint8_t scratch[1024];
flash_read(FLASH_LOGOADDR - 0x23000000, scratch, 1024);
BootLogo::handleShowingLogo(scratch);
}

View File

@@ -40,8 +40,9 @@ bool FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t read_address, uint8_t *p_b
i2cCfg.data = p_buffer;
i2cCfg.subAddrSize = 1; // one byte address
taskENTER_CRITICAL();
err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg);
taskENTER_CRITICAL();
/* --------------- */
err = I2C_MasterReceiveBlocking(I2C0_ID, &i2cCfg);
taskEXIT_CRITICAL();
bool res = err == SUCCESS;
if (!res) {
@@ -63,8 +64,10 @@ bool FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress, uint8_t *p_bu
i2cCfg.dataSize = number_of_byte;
i2cCfg.data = p_buffer;
i2cCfg.subAddrSize = 1; // one byte address
taskENTER_CRITICAL();
err = I2C_MasterSendBlocking(I2C0_ID, &i2cCfg);
taskENTER_CRITICAL();
/* --------------- */
err = I2C_MasterSendBlocking(I2C0_ID, &i2cCfg);
taskEXIT_CRITICAL();
bool res = err == SUCCESS;
if (!res) {

View File

@@ -19,17 +19,17 @@ extern "C" {
}
void start_PWM_output(void);
#define ADC_Filter_Smooth 4
#define ADC_Filter_Smooth 4 /* This basically smooths over one PWM cycle / set of readings */
history<uint16_t, ADC_Filter_Smooth> ADC_Vin;
history<uint16_t, ADC_Filter_Smooth> ADC_Temp;
history<uint16_t, ADC_Filter_Smooth> ADC_Tip;
volatile uint8_t ADCBurstCounter = 0;
void adc_fifo_irq(void) {
// IRQ is called at the end of the 8 set readings, pop these from the FIFO and send to filters
void adc_fifo_irq(void) {
if (ADC_GetIntStatus(ADC_INT_FIFO_READY) == SET) {
// Read out all entries in the fifo
while (ADC_Get_FIFO_Count()) {
ADCBurstCounter++;
volatile uint32_t reading = ADC_Read_FIFO();
uint32_t reading = ADC_Read_FIFO();
// As per manual, 26 bit reading; lowest 16 are the ADC
uint16_t sample = reading & 0xFFFF;
uint8_t source = (reading >> 21) & 0b11111;
@@ -43,23 +43,16 @@ void adc_fifo_irq(void) {
case VIN_ADC_CHANNEL:
ADC_Vin.update(sample);
break;
default:
break;
}
}
if (ADCBurstCounter >= 8) {
ADCBurstCounter = 0;
start_PWM_output();
// unblock the PID controller thread
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if (pidTaskNotification) {
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
// unblock the PID controller thread
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if (pidTaskNotification) {
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
}
@@ -67,19 +60,21 @@ void adc_fifo_irq(void) {
ADC_IntClr(ADC_INT_ALL);
}
static bool fastPWM = false;
static void switchToFastPWM(void);
volatile bool inFastPWMMode = false;
volatile uint16_t PWMSafetyTimer = 0;
volatile uint8_t pendingPWM = 0;
volatile bool lastPeriodWasFast = false;
static void switchToFastPWM(void);
static void switchToSlowPWM(void);
volatile uint16_t PWMSafetyTimer = 0;
volatile uint8_t pendingPWM = 0;
volatile bool pendingNextPeriodIsFast = false;
void start_PWM_output(void) {
if (PWMSafetyTimer) {
PWMSafetyTimer--;
if (lastPeriodWasFast != fastPWM) {
if (fastPWM) {
if (pendingNextPeriodIsFast != inFastPWMMode) {
if (pendingNextPeriodIsFast) {
switchToFastPWM();
} else {
switchToSlowPWM();
@@ -96,55 +91,87 @@ void start_PWM_output(void) {
}
} else {
PWM_Channel_Disable(PWM_Channel);
switchToFastPWM();
}
TIMER_Enable(TIMER_CH0);
}
// Timer 0 is used to co-ordinate the ADC and the output PWM
void timer0_comp0_callback(void) {
TIMER_Disable(TIMER_CH0);
ADC_Start();
if (PWM_Channel_Is_Enabled(PWM_Channel)) {
// So there appears to be a bug _somewhere_ where sometimes the comparator doesn't fire
// Its not re-occurring with specific values, so suspect its a weird bug
// For now, we just skip the cycle and throw away the ADC readings. Its a waste but
// It stops stupid glitches in readings, i'd take slight instability from the time jump
// Over the readings we get that are borked as the header is left on
// <Ralim 2023/10/14>
PWM_Channel_Disable(PWM_Channel);
// MSG("ALERT PWM Glitch\r\n");
// Triger the PID now instead
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if (pidTaskNotification) {
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
} else {
ADC_Start();
}
TIMER_ClearIntStatus(TIMER_CH0, TIMER_COMP_ID_0);
}
void timer0_comp1_callback(void) {
// Trigged at end of output cycle; turn off the tip PWM
PWM_Channel_Disable(PWM_Channel);
TIMER_ClearIntStatus(TIMER_CH0, TIMER_COMP_ID_1);
}
void timer0_comp1_callback(void) { PWM_Channel_Disable(PWM_Channel); } // Trigged at end of output cycle; turn off the tip PWM
void timer0_comp2_callback(void) {
// Triggered at end of timer cycle; re-start the tip driver
start_PWM_output();
TIMER_ClearIntStatus(TIMER_CH0, TIMER_COMP_ID_2);
}
void switchToFastPWM(void) {
fastPWM = true;
totalPWM = powerPWM + tempMeasureTicks + holdoffTicks;
inFastPWMMode = true;
holdoffTicks = 10;
tempMeasureTicks = 10;
totalPWM = powerPWM + tempMeasureTicks + holdoffTicks;
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_2, totalPWM);
// ~10Hz
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_0, powerPWM + holdoffTicks);
// Set divider to 11
// Set divider to 10 ~= 10.5Hz
uint32_t tmpVal = BL_RD_REG(TIMER_BASE, TIMER_TCDR);
tmpVal = BL_SET_REG_BITS_VAL(tmpVal, TIMER_TCDR2, 11);
tmpVal = BL_SET_REG_BITS_VAL(tmpVal, TIMER_TCDR2, 10);
BL_WR_REG(TIMER_BASE, TIMER_TCDR, tmpVal);
}
void switchToSlowPWM(void) {
// 5Hz
fastPWM = false;
totalPWM = powerPWM + tempMeasureTicks / 2 + holdoffTicks / 2;
inFastPWMMode = false;
holdoffTicks = 5;
tempMeasureTicks = 5;
totalPWM = powerPWM + tempMeasureTicks + holdoffTicks;
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_2, totalPWM);
// Adjust ADC
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_0, powerPWM + (holdoffTicks / 2));
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_0, powerPWM + holdoffTicks);
// Set divider to 22
// Set divider for ~ 5Hz
uint32_t tmpVal = BL_RD_REG(TIMER_BASE, TIMER_TCDR);
tmpVal = BL_SET_REG_BITS_VAL(tmpVal, TIMER_TCDR2, 22);
tmpVal = BL_SET_REG_BITS_VAL(tmpVal, TIMER_TCDR2, 20);
BL_WR_REG(TIMER_BASE, TIMER_TCDR, tmpVal);
}
void setTipPWM(const uint8_t pulse, const bool shouldUseFastModePWM) {
PWMSafetyTimer = 10; // This is decremented in the handler for PWM so that the tip pwm is
// disabled if the PID task is not scheduled often enough.
pendingPWM = pulse;
fastPWM = shouldUseFastModePWM;
pendingPWM = pulse;
pendingNextPeriodIsFast = shouldUseFastModePWM;
}
extern osThreadId POWTaskHandle;
@@ -186,5 +213,6 @@ uint16_t getADCHandleTemp(uint8_t sample) { return ADC_Temp.average(); }
uint16_t getADCVin(uint8_t sample) { return ADC_Vin.average(); }
// Returns either average or instant value. When sample is set the samples from the injected ADC are copied to the filter and then the raw reading is returned
// Returns the current raw tip reading after any cleanup filtering
// For Pinecil V2 we dont do any rolling filtering other than just averaging all 4 readings in the adc snapshot
uint16_t getTipRawTemp(uint8_t sample) { return ADC_Tip.average() >> 1; }

View File

@@ -21,7 +21,6 @@ void timer0_comp1_callback(void);
void timer0_comp2_callback(void);
void adc_fifo_irq(void);
void GPIO_IRQHandler(void);
void switchToSlowPWM(void);
#ifdef __cplusplus
}
#endif

View File

@@ -80,21 +80,20 @@
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 0 )
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
#endif
/* Block sizes must not get too small. */
#define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( xHeapStructSize << 1 ) )
#define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( xHeapStructSize << 1 ) )
/* Assumes 8bit bytes! */
#define heapBITS_PER_BYTE ( ( size_t ) 8 )
#define heapBITS_PER_BYTE ( ( size_t ) 8 )
/* Define the linked list structure. This is used to link free blocks in order
* of their memory address. */
typedef struct A_BLOCK_LINK
{
struct A_BLOCK_LINK * pxNextFreeBlock; /*<< The next free block in the list. */
size_t xBlockSize; /*<< The size of the free block. */
typedef struct A_BLOCK_LINK {
struct A_BLOCK_LINK *pxNextFreeBlock; /*<< The next free block in the list. */
size_t xBlockSize; /*<< The size of the free block. */
} BlockLink_t;
/*-----------------------------------------------------------*/
@@ -105,7 +104,7 @@ typedef struct A_BLOCK_LINK
* the block in front it and/or the block behind it if the memory blocks are
* adjacent to each other.
*/
static void prvInsertBlockIntoFreeList( BlockLink_t * pxBlockToInsert );
static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert );
/*-----------------------------------------------------------*/
@@ -114,14 +113,14 @@ static void prvInsertBlockIntoFreeList( BlockLink_t * pxBlockToInsert );
static const size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
/* Create a couple of list links to mark the start and end of the list. */
static BlockLink_t xStart, * pxEnd = NULL;
static BlockLink_t xStart, *pxEnd = NULL;
/* Keeps track of the number of calls to allocate and free memory as well as the
* number of free bytes remaining, but says nothing about fragmentation. */
static size_t xFreeBytesRemaining = 0U;
static size_t xFreeBytesRemaining = 0U;
static size_t xMinimumEverFreeBytesRemaining = 0U;
static size_t xNumberOfSuccessfulAllocations = 0;
static size_t xNumberOfSuccessfulFrees = 0;
static size_t xNumberOfSuccessfulFrees = 0;
/* Gets set to the top bit of an size_t type. When this bit in the xBlockSize
* member of an BlockLink_t structure is set then the block belongs to the
@@ -131,420 +130,354 @@ static size_t xBlockAllocatedBit = 0;
/*-----------------------------------------------------------*/
void * pvPortMalloc( size_t xWantedSize )
{
BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;
void * pvReturn = NULL;
void *pvPortMalloc( size_t xWantedSize ) {
BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
void *pvReturn = NULL;
/* The heap must be initialised before the first call to
* prvPortMalloc(). */
configASSERT( pxEnd );
/* The heap must be initialised before the first call to
* prvPortMalloc(). */
configASSERT( pxEnd );
vTaskSuspendAll();
{
/* Check the requested block size is not so large that the top bit is
* set. The top bit of the block size member of the BlockLink_t structure
* is used to determine who owns the block - the application or the
* kernel, so it must be free. */
if( ( xWantedSize & xBlockAllocatedBit ) == 0 )
{
/* The wanted size is increased so it can contain a BlockLink_t
* structure in addition to the requested amount of bytes. */
if( xWantedSize > 0 )
{
xWantedSize += xHeapStructSize;
vTaskSuspendAll();
{
/* Check the requested block size is not so large that the top bit is
* set. The top bit of the block size member of the BlockLink_t structure
* is used to determine who owns the block - the application or the
* kernel, so it must be free. */
if ( ( xWantedSize & xBlockAllocatedBit ) == 0 ) {
/* The wanted size is increased so it can contain a BlockLink_t
* structure in addition to the requested amount of bytes. */
if ( xWantedSize > 0 ) {
xWantedSize += xHeapStructSize;
/* Ensure that blocks are always aligned to the required number
* of bytes. */
if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
{
/* Byte alignment required. */
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else
{
mtCOVERAGE_TEST_MARKER();
}
if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )
{
/* Traverse the list from the start (lowest address) block until
* one of adequate size is found. */
pxPreviousBlock = &xStart;
pxBlock = xStart.pxNextFreeBlock;
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
{
pxPreviousBlock = pxBlock;
pxBlock = pxBlock->pxNextFreeBlock;
}
/* If the end marker was reached then a block of adequate size
* was not found. */
if( pxBlock != pxEnd )
{
/* Return the memory space pointed to - jumping over the
* BlockLink_t structure at its start. */
pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
/* This block is being returned for use so must be taken out
* of the list of free blocks. */
pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
/* If the block is larger than required it can be split into
* two. */
if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
{
/* This block is to be split into two. Create a new
* block following the number of bytes requested. The void
* cast is used to prevent byte alignment warnings from the
* compiler. */
pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
/* Calculate the sizes of two blocks split from the
* single block. */
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
pxBlock->xBlockSize = xWantedSize;
/* Insert the new block into the list of free blocks. */
prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
}
else
{
mtCOVERAGE_TEST_MARKER();
}
xFreeBytesRemaining -= pxBlock->xBlockSize;
if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining )
{
xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
/* The block is being returned - it is allocated and owned
* by the application and has no "next" block. */
pxBlock->xBlockSize |= xBlockAllocatedBit;
pxBlock->pxNextFreeBlock = NULL;
xNumberOfSuccessfulAllocations++;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else
{
mtCOVERAGE_TEST_MARKER();
}
/* Ensure that blocks are always aligned to the required number
* of bytes. */
if ( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) {
/* Byte alignment required. */
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
} else {
mtCOVERAGE_TEST_MARKER();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
traceMALLOC( pvReturn, xWantedSize );
}
( void ) xTaskResumeAll();
#if ( configUSE_MALLOC_FAILED_HOOK == 1 )
{
if( pvReturn == NULL )
{
extern void vApplicationMallocFailedHook( void );
vApplicationMallocFailedHook();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* if ( configUSE_MALLOC_FAILED_HOOK == 1 ) */
return pvReturn;
}
/*-----------------------------------------------------------*/
void vPortFree( void * pv )
{
uint8_t * puc = ( uint8_t * ) pv;
BlockLink_t * pxLink;
if( pv != NULL )
{
/* The memory being freed will have an BlockLink_t structure immediately
* before it. */
puc -= xHeapStructSize;
/* This casting is to keep the compiler from issuing warnings. */
pxLink = ( void * ) puc;
/* Check the block is actually allocated. */
configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
configASSERT( pxLink->pxNextFreeBlock == NULL );
if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 )
{
if( pxLink->pxNextFreeBlock == NULL )
{
/* The block is being returned to the heap - it is no longer
* allocated. */
pxLink->xBlockSize &= ~xBlockAllocatedBit;
vTaskSuspendAll();
{
/* Add this block to the list of free blocks. */
xFreeBytesRemaining += pxLink->xBlockSize;
traceFREE( pv, pxLink->xBlockSize );
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
xNumberOfSuccessfulFrees++;
}
( void ) xTaskResumeAll();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
}
/*-----------------------------------------------------------*/
size_t xPortGetFreeHeapSize( void )
{
return xFreeBytesRemaining;
}
/*-----------------------------------------------------------*/
size_t xPortGetMinimumEverFreeHeapSize( void )
{
return xMinimumEverFreeBytesRemaining;
}
/*-----------------------------------------------------------*/
static void prvInsertBlockIntoFreeList( BlockLink_t * pxBlockToInsert )
{
BlockLink_t * pxIterator;
uint8_t * puc;
/* Iterate through the list until a block is found that has a higher address
* than the block being inserted. */
for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock )
{
/* Nothing to do here, just iterate to the right position. */
}
/* Do the block being inserted, and the block it is being inserted after
* make a contiguous block of memory? */
puc = ( uint8_t * ) pxIterator;
if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert )
{
pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
pxBlockToInsert = pxIterator;
}
else
{
} else {
mtCOVERAGE_TEST_MARKER();
}
}
/* Do the block being inserted, and the block it is being inserted before
* make a contiguous block of memory? */
puc = ( uint8_t * ) pxBlockToInsert;
if ( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) {
/* Traverse the list from the start (lowest address) block until
* one of adequate size is found. */
pxPreviousBlock = &xStart;
pxBlock = xStart.pxNextFreeBlock;
if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock )
{
if( pxIterator->pxNextFreeBlock != pxEnd )
{
/* Form one big block from the two blocks. */
pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
while ( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) {
pxPreviousBlock = pxBlock;
pxBlock = pxBlock->pxNextFreeBlock;
}
else
{
pxBlockToInsert->pxNextFreeBlock = pxEnd;
}
}
else
{
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
}
/* If the block being inserted plugged a gab, so was merged with the block
* before and the block after, then it's pxNextFreeBlock pointer will have
* already been set, and should not be set here as that would make it point
* to itself. */
if( pxIterator != pxBlockToInsert )
{
pxIterator->pxNextFreeBlock = pxBlockToInsert;
}
else
{
/* If the end marker was reached then a block of adequate size
* was not found. */
if ( pxBlock != pxEnd ) {
/* Return the memory space pointed to - jumping over the
* BlockLink_t structure at its start. */
pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
/* This block is being returned for use so must be taken out
* of the list of free blocks. */
pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
/* If the block is larger than required it can be split into
* two. */
if ( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) {
/* This block is to be split into two. Create a new
* block following the number of bytes requested. The void
* cast is used to prevent byte alignment warnings from the
* compiler. */
pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
/* Calculate the sizes of two blocks split from the
* single block. */
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
pxBlock->xBlockSize = xWantedSize;
/* Insert the new block into the list of free blocks. */
prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
} else {
mtCOVERAGE_TEST_MARKER();
}
xFreeBytesRemaining -= pxBlock->xBlockSize;
if ( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) {
xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
} else {
mtCOVERAGE_TEST_MARKER();
}
/* The block is being returned - it is allocated and owned
* by the application and has no "next" block. */
pxBlock->xBlockSize |= xBlockAllocatedBit;
pxBlock->pxNextFreeBlock = NULL;
xNumberOfSuccessfulAllocations++;
} else {
mtCOVERAGE_TEST_MARKER();
}
} else {
mtCOVERAGE_TEST_MARKER();
}
} else {
mtCOVERAGE_TEST_MARKER();
}
traceMALLOC( pvReturn, xWantedSize );
}
( void ) xTaskResumeAll();
#if ( configUSE_MALLOC_FAILED_HOOK == 1 )
{
if ( pvReturn == NULL ) {
extern void vApplicationMallocFailedHook( void );
vApplicationMallocFailedHook();
} else {
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* if ( configUSE_MALLOC_FAILED_HOOK == 1 ) */
return pvReturn;
}
/*-----------------------------------------------------------*/
void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions )
{
BlockLink_t * pxFirstFreeBlockInRegion = NULL, * pxPreviousFreeBlock;
size_t xAlignedHeap;
size_t xTotalRegionSize, xTotalHeapSize = 0;
BaseType_t xDefinedRegions = 0;
size_t xAddress;
const HeapRegion_t * pxHeapRegion;
void vPortFree( void *pv ) {
uint8_t *puc = ( uint8_t * ) pv;
BlockLink_t *pxLink;
/* Can only call once! */
configASSERT( pxEnd == NULL );
if ( pv != NULL ) {
/* The memory being freed will have an BlockLink_t structure immediately
* before it. */
puc -= xHeapStructSize;
/* This casting is to keep the compiler from issuing warnings. */
pxLink = ( void * ) puc;
/* Check the block is actually allocated. */
configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
configASSERT( pxLink->pxNextFreeBlock == NULL );
if ( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ) {
if ( pxLink->pxNextFreeBlock == NULL ) {
/* The block is being returned to the heap - it is no longer
* allocated. */
pxLink->xBlockSize &= ~xBlockAllocatedBit;
vTaskSuspendAll();
{
/* Add this block to the list of free blocks. */
xFreeBytesRemaining += pxLink->xBlockSize;
traceFREE( pv, pxLink->xBlockSize );
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
xNumberOfSuccessfulFrees++;
}
( void ) xTaskResumeAll();
} else {
mtCOVERAGE_TEST_MARKER();
}
} else {
mtCOVERAGE_TEST_MARKER();
}
}
}
/*-----------------------------------------------------------*/
size_t xPortGetFreeHeapSize( void ) { return xFreeBytesRemaining; }
/*-----------------------------------------------------------*/
size_t xPortGetMinimumEverFreeHeapSize( void ) { return xMinimumEverFreeBytesRemaining; }
/*-----------------------------------------------------------*/
static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) {
BlockLink_t *pxIterator;
uint8_t *puc;
/* Iterate through the list until a block is found that has a higher address
* than the block being inserted. */
for ( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock ) {
/* Nothing to do here, just iterate to the right position. */
}
/* Do the block being inserted, and the block it is being inserted after
* make a contiguous block of memory? */
puc = ( uint8_t * ) pxIterator;
if ( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) {
pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
pxBlockToInsert = pxIterator;
} else {
mtCOVERAGE_TEST_MARKER();
}
/* Do the block being inserted, and the block it is being inserted before
* make a contiguous block of memory? */
puc = ( uint8_t * ) pxBlockToInsert;
if ( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) {
if ( pxIterator->pxNextFreeBlock != pxEnd ) {
/* Form one big block from the two blocks. */
pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
} else {
pxBlockToInsert->pxNextFreeBlock = pxEnd;
}
} else {
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
}
/* If the block being inserted plugged a gab, so was merged with the block
* before and the block after, then it's pxNextFreeBlock pointer will have
* already been set, and should not be set here as that would make it point
* to itself. */
if ( pxIterator != pxBlockToInsert ) {
pxIterator->pxNextFreeBlock = pxBlockToInsert;
} else {
mtCOVERAGE_TEST_MARKER();
}
}
/*-----------------------------------------------------------*/
void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) {
BlockLink_t *pxFirstFreeBlockInRegion = NULL, *pxPreviousFreeBlock;
size_t xAlignedHeap;
size_t xTotalRegionSize, xTotalHeapSize = 0;
BaseType_t xDefinedRegions = 0;
size_t xAddress;
const HeapRegion_t *pxHeapRegion;
/* Can only call once! */
configASSERT( pxEnd == NULL );
pxHeapRegion = &( pxHeapRegions[ xDefinedRegions ] );
while ( pxHeapRegion->xSizeInBytes > 0 ) {
xTotalRegionSize = pxHeapRegion->xSizeInBytes;
/* Ensure the heap region starts on a correctly aligned boundary. */
xAddress = ( size_t ) pxHeapRegion->pucStartAddress;
if ( ( xAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) {
xAddress += ( portBYTE_ALIGNMENT - 1 );
xAddress &= ~portBYTE_ALIGNMENT_MASK;
/* Adjust the size for the bytes lost to alignment. */
xTotalRegionSize -= xAddress - ( size_t ) pxHeapRegion->pucStartAddress;
}
xAlignedHeap = xAddress;
/* Set xStart if it has not already been set. */
if ( xDefinedRegions == 0 ) {
/* xStart is used to hold a pointer to the first item in the list of
* free blocks. The void cast is used to prevent compiler warnings. */
xStart.pxNextFreeBlock = ( BlockLink_t * ) xAlignedHeap;
xStart.xBlockSize = ( size_t ) 0;
} else {
/* Should only get here if one region has already been added to the
* heap. */
configASSERT( pxEnd != NULL );
/* Check blocks are passed in with increasing start addresses. */
configASSERT( xAddress > ( size_t ) pxEnd );
}
/* Remember the location of the end marker in the previous region, if
* any. */
pxPreviousFreeBlock = pxEnd;
/* pxEnd is used to mark the end of the list of free blocks and is
* inserted at the end of the region space. */
xAddress = xAlignedHeap + xTotalRegionSize;
xAddress -= xHeapStructSize;
xAddress &= ~portBYTE_ALIGNMENT_MASK;
pxEnd = ( BlockLink_t * ) xAddress;
pxEnd->xBlockSize = 0;
pxEnd->pxNextFreeBlock = NULL;
/* To start with there is a single free block in this region that is
* sized to take up the entire heap region minus the space taken by the
* free block structure. */
pxFirstFreeBlockInRegion = ( BlockLink_t * ) xAlignedHeap;
pxFirstFreeBlockInRegion->xBlockSize = xAddress - ( size_t ) pxFirstFreeBlockInRegion;
pxFirstFreeBlockInRegion->pxNextFreeBlock = pxEnd;
/* If this is not the first region that makes up the entire heap space
* then link the previous region to this region. */
if ( pxPreviousFreeBlock != NULL ) {
pxPreviousFreeBlock->pxNextFreeBlock = pxFirstFreeBlockInRegion;
}
xTotalHeapSize += pxFirstFreeBlockInRegion->xBlockSize;
/* Move onto the next HeapRegion_t structure. */
xDefinedRegions++;
pxHeapRegion = &( pxHeapRegions[ xDefinedRegions ] );
}
while( pxHeapRegion->xSizeInBytes > 0 )
{
xTotalRegionSize = pxHeapRegion->xSizeInBytes;
xMinimumEverFreeBytesRemaining = xTotalHeapSize;
xFreeBytesRemaining = xTotalHeapSize;
/* Ensure the heap region starts on a correctly aligned boundary. */
xAddress = ( size_t ) pxHeapRegion->pucStartAddress;
/* Check something was actually defined before it is accessed. */
configASSERT( xTotalHeapSize );
if( ( xAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
{
xAddress += ( portBYTE_ALIGNMENT - 1 );
xAddress &= ~portBYTE_ALIGNMENT_MASK;
/* Adjust the size for the bytes lost to alignment. */
xTotalRegionSize -= xAddress - ( size_t ) pxHeapRegion->pucStartAddress;
}
xAlignedHeap = xAddress;
/* Set xStart if it has not already been set. */
if( xDefinedRegions == 0 )
{
/* xStart is used to hold a pointer to the first item in the list of
* free blocks. The void cast is used to prevent compiler warnings. */
xStart.pxNextFreeBlock = ( BlockLink_t * ) xAlignedHeap;
xStart.xBlockSize = ( size_t ) 0;
}
else
{
/* Should only get here if one region has already been added to the
* heap. */
configASSERT( pxEnd != NULL );
/* Check blocks are passed in with increasing start addresses. */
configASSERT( xAddress > ( size_t ) pxEnd );
}
/* Remember the location of the end marker in the previous region, if
* any. */
pxPreviousFreeBlock = pxEnd;
/* pxEnd is used to mark the end of the list of free blocks and is
* inserted at the end of the region space. */
xAddress = xAlignedHeap + xTotalRegionSize;
xAddress -= xHeapStructSize;
xAddress &= ~portBYTE_ALIGNMENT_MASK;
pxEnd = ( BlockLink_t * ) xAddress;
pxEnd->xBlockSize = 0;
pxEnd->pxNextFreeBlock = NULL;
/* To start with there is a single free block in this region that is
* sized to take up the entire heap region minus the space taken by the
* free block structure. */
pxFirstFreeBlockInRegion = ( BlockLink_t * ) xAlignedHeap;
pxFirstFreeBlockInRegion->xBlockSize = xAddress - ( size_t ) pxFirstFreeBlockInRegion;
pxFirstFreeBlockInRegion->pxNextFreeBlock = pxEnd;
/* If this is not the first region that makes up the entire heap space
* then link the previous region to this region. */
if( pxPreviousFreeBlock != NULL )
{
pxPreviousFreeBlock->pxNextFreeBlock = pxFirstFreeBlockInRegion;
}
xTotalHeapSize += pxFirstFreeBlockInRegion->xBlockSize;
/* Move onto the next HeapRegion_t structure. */
xDefinedRegions++;
pxHeapRegion = &( pxHeapRegions[ xDefinedRegions ] );
}
xMinimumEverFreeBytesRemaining = xTotalHeapSize;
xFreeBytesRemaining = xTotalHeapSize;
/* Check something was actually defined before it is accessed. */
configASSERT( xTotalHeapSize );
/* Work out the position of the top bit in a size_t variable. */
xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 );
/* Work out the position of the top bit in a size_t variable. */
xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 );
}
/*-----------------------------------------------------------*/
void vPortGetHeapStats( HeapStats_t * pxHeapStats )
{
BlockLink_t * pxBlock;
size_t xBlocks = 0, xMaxSize = 0, xMinSize = portMAX_DELAY; /* portMAX_DELAY used as a portable way of getting the maximum value. */
void vPortGetHeapStats( HeapStats_t *pxHeapStats ) {
BlockLink_t *pxBlock;
size_t xBlocks = 0, xMaxSize = 0, xMinSize = portMAX_DELAY; /* portMAX_DELAY used as a portable way of getting the maximum value. */
vTaskSuspendAll();
{
pxBlock = xStart.pxNextFreeBlock;
vTaskSuspendAll();
{
pxBlock = xStart.pxNextFreeBlock;
/* pxBlock will be NULL if the heap has not been initialised. The heap
* is initialised automatically when the first allocation is made. */
if( pxBlock != NULL )
{
do
{
/* Increment the number of blocks and record the largest block seen
* so far. */
xBlocks++;
/* pxBlock will be NULL if the heap has not been initialised. The heap
* is initialised automatically when the first allocation is made. */
if ( pxBlock != NULL ) {
do {
/* Increment the number of blocks and record the largest block seen
* so far. */
xBlocks++;
if( pxBlock->xBlockSize > xMaxSize )
{
xMaxSize = pxBlock->xBlockSize;
}
/* Heap five will have a zero sized block at the end of each
* each region - the block is only used to link to the next
* heap region so it not a real block. */
if( pxBlock->xBlockSize != 0 )
{
if( pxBlock->xBlockSize < xMinSize )
{
xMinSize = pxBlock->xBlockSize;
}
}
/* Move to the next block in the chain until the last block is
* reached. */
pxBlock = pxBlock->pxNextFreeBlock;
} while( pxBlock != pxEnd );
if ( pxBlock->xBlockSize > xMaxSize ) {
xMaxSize = pxBlock->xBlockSize;
}
}
( void ) xTaskResumeAll();
pxHeapStats->xSizeOfLargestFreeBlockInBytes = xMaxSize;
pxHeapStats->xSizeOfSmallestFreeBlockInBytes = xMinSize;
pxHeapStats->xNumberOfFreeBlocks = xBlocks;
/* Heap five will have a zero sized block at the end of each
* each region - the block is only used to link to the next
* heap region so it not a real block. */
if ( pxBlock->xBlockSize != 0 ) {
if ( pxBlock->xBlockSize < xMinSize ) {
xMinSize = pxBlock->xBlockSize;
}
}
taskENTER_CRITICAL();
{
pxHeapStats->xAvailableHeapSpaceInBytes = xFreeBytesRemaining;
pxHeapStats->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations;
pxHeapStats->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees;
pxHeapStats->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining;
/* Move to the next block in the chain until the last block is
* reached. */
pxBlock = pxBlock->pxNextFreeBlock;
} while ( pxBlock != pxEnd );
}
taskEXIT_CRITICAL();
}
( void ) xTaskResumeAll();
pxHeapStats->xSizeOfLargestFreeBlockInBytes = xMaxSize;
pxHeapStats->xSizeOfSmallestFreeBlockInBytes = xMinSize;
pxHeapStats->xNumberOfFreeBlocks = xBlocks;
taskENTER_CRITICAL();
{
pxHeapStats->xAvailableHeapSpaceInBytes = xFreeBytesRemaining;
pxHeapStats->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations;
pxHeapStats->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees;
pxHeapStats->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining;
}
taskEXIT_CRITICAL();
}

View File

@@ -19,15 +19,13 @@ uint16_t ADCReadings[ADC_NORM_SAMPLES]; // room for 32 lots of the pair of readi
// Heap
extern uint8_t __HeapBase;
extern uint8_t __HeapLimit; // @suppress("Type cannot be resolved")
const uint32_t _heap_size = ((&__HeapLimit) - (&__HeapBase));
extern uint8_t _heap_start;
extern uint8_t _heap_size; // @suppress("Type cannot be resolved")
static HeapRegion_t xHeapRegions[] = {
{&__HeapBase, (unsigned int)_heap_size},
{&_heap_start, (unsigned int)&_heap_size},
{NULL, 0}, /* Terminates the array. */
{NULL, 0} /* Terminates the array. */
};
// Functions
void setup_timer_scheduler(void);
@@ -104,7 +102,7 @@ void setup_adc(void) {
adc_cfg.clkDiv = ADC_CLK_DIV_4;
adc_cfg.vref = ADC_VREF_3P2V;
adc_cfg.resWidth = ADC_DATA_WIDTH_14_WITH_64_AVERAGE;
adc_cfg.resWidth = ADC_DATA_WIDTH_14_WITH_16_AVERAGE;
adc_cfg.inputMode = ADC_INPUT_SINGLE_END;
adc_cfg.v18Sel = ADC_V18_SEL_1P72V;
adc_cfg.v11Sel = ADC_V11_SEL_1P1V;
@@ -113,7 +111,7 @@ void setup_adc(void) {
adc_cfg.chopMode = ADC_CHOP_MOD_AZ_ON;
adc_cfg.biasSel = ADC_BIAS_SEL_MAIN_BANDGAP;
adc_cfg.vcm = ADC_PGA_VCM_1P6V;
adc_cfg.offsetCalibEn = ENABLE;
adc_cfg.offsetCalibEn = DISABLE;
adc_cfg.offsetCalibVal = 0;
ADC_Disable();
@@ -122,7 +120,7 @@ void setup_adc(void) {
ADC_Init(&adc_cfg);
adc_fifo_cfg.dmaEn = DISABLE;
adc_fifo_cfg.fifoThreshold = ADC_FIFO_THRESHOLD_8;
adc_fifo_cfg.fifoThreshold = ADC_FIFO_THRESHOLD_8; // Triger FIFO when all 8 measurements are done
ADC_FIFO_Cfg(&adc_fifo_cfg);
ADC_MIC_Bias_Disable();
ADC_Tsen_Disable();
@@ -140,26 +138,29 @@ void setup_timer_scheduler() {
TIMER_Disable(TIMER_CH0);
TIMER_CFG_Type cfg = {
TIMER_CH0, // Channel
TIMER_CLKSRC_32K, // Clock source
TIMER_PRELOAD_TRIG_COMP0, // Trigger; reset after trigger 0
TIMER_COUNT_PRELOAD, // Counter mode
22, // Clock div
(uint16_t)(powerPWM + holdoffTicks), // CH0 compare (adc)
0, // CH1 compare (pwm out)
0, // CH2 compare not used
0, // Preload
TIMER_CH0, // Channel
TIMER_CLKSRC_32K, // Clock source
TIMER_PRELOAD_TRIG_COMP2, // Trigger; reset after trigger 0
TIMER_COUNT_PRELOAD, // Counter mode
22, // Clock div
(uint16_t)(powerPWM + holdoffTicks), // CH0 compare (adc)
(uint16_t)(powerPWM), // CH1 compare (pwm out)
(uint16_t)(powerPWM + holdoffTicks + tempMeasureTicks), // CH2 compare end of cycle
0, // Preload
};
TIMER_Init(&cfg);
Timer_Int_Callback_Install(TIMER_CH0, TIMER_INT_COMP_0, timer0_comp0_callback);
Timer_Int_Callback_Install(TIMER_CH0, TIMER_INT_COMP_1, timer0_comp1_callback);
Timer_Int_Callback_Install(TIMER_CH0, TIMER_INT_COMP_2, timer0_comp2_callback);
TIMER_ClearIntStatus(TIMER_CH0, TIMER_COMP_ID_0);
TIMER_ClearIntStatus(TIMER_CH0, TIMER_COMP_ID_1);
TIMER_ClearIntStatus(TIMER_CH0, TIMER_COMP_ID_2);
TIMER_IntMask(TIMER_CH0, TIMER_INT_COMP_0, UNMASK);
TIMER_IntMask(TIMER_CH0, TIMER_INT_COMP_1, UNMASK);
TIMER_IntMask(TIMER_CH0, TIMER_INT_COMP_2, UNMASK);
CPU_Interrupt_Enable(TIMER_CH0_IRQn);
TIMER_Enable(TIMER_CH0);
}

View File

@@ -29,7 +29,7 @@ uint16_t getADCVin(uint8_t sample);
#ifdef __cplusplus
}
#endif
void setupFUSBIRQ();
extern const uint8_t holdoffTicks;
extern const uint8_t tempMeasureTicks;
void setupFUSBIRQ();
extern uint8_t holdoffTicks;
extern uint8_t tempMeasureTicks;
#endif /* PINE_SETUP_H_ */

View File

@@ -69,4 +69,4 @@ const int32_t uVtoDegC[] = {
const int uVtoDegCItems = sizeof(uVtoDegC) / (2 * sizeof(int32_t));
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }

View File

@@ -21,6 +21,7 @@
*
*/
#include "bflb_platform.h"
#include "drv_mmheap.h"
#include "hal_common.h"
#include "hal_flash.h"
#include "hal_mtimer.h"
@@ -32,8 +33,11 @@ extern uint32_t __HeapLimit;
static uint8_t uart_dbg_disable = 0;
// struct heap_info mmheap_root;
struct heap_info mmheap_root;
static struct heap_region system_mmheap[] = {
{NULL, 0}, {NULL, 0}, /* Terminates the array. */
};
__WEAK__ void board_init(void) {}
__WEAK__ enum uart_index_type board_get_debug_uart_index(void) { return 0; }
@@ -88,14 +92,14 @@ void bflb_platform_init(uint32_t baudrate) {
}
static bool initialized = false;
if (!initialized) {
// system_mmheap[0].addr = (uint8_t *)&__HeapBase;
// system_mmheap[0].mem_size = ((size_t)&__HeapLimit - (size_t)&__HeapBase);
system_mmheap[0].addr = (uint8_t *)&__HeapBase;
system_mmheap[0].mem_size = ((size_t)&__HeapLimit - (size_t)&__HeapBase);
// if (system_mmheap[0].mem_size > 0) {
// mmheap_init(&mmheap_root, system_mmheap);
// }
if (system_mmheap[0].mem_size > 0) {
mmheap_init(&mmheap_root, system_mmheap);
}
// MSG("dynamic memory init success,heap size = %d Kbyte \r\n", system_mmheap[0].mem_size / 1024);
MSG("dynamic memory init success,heap size = %d Kbyte \r\n", system_mmheap[0].mem_size / 1024);
initialized = 1;
if (ret != SUCCESS) {
MSG("flash init fail!!!\r\n");

View File

@@ -17,17 +17,18 @@ OUTPUT_ARCH( "riscv" )
/* configure the entry point */
ENTRY(_enter)
StackSize = 0x800; /* 2KB */
__EM_SIZE = DEFINED(ble_controller_init) ? 8K : 0K;
StackSize = 0x1000; /* 4KB */
__EM_SIZE =8K;
MEMORY
{
xip_memory (rx) : ORIGIN = 0x23000000, LENGTH = 1022K
xip_memory (rx) : ORIGIN = 0x23000000, LENGTH = 1008K /*1024 - 8K header - 4K*2 for settings and logo*/
itcm_memory (rx) : ORIGIN = 0x22014000, LENGTH = 12K
dtcm_memory (rx) : ORIGIN = 0x42017000, LENGTH = 4K
ram_memory (!rx) : ORIGIN = 0x42018000, LENGTH = 96K
hbn_memory (rx) : ORIGIN = 0x40010000, LENGTH = 0xE00 /* hbn ram 4K used 3.5K*/
dtcm_memory (rx) : ORIGIN = 0x42014000, LENGTH = 8K
ram_memory (!rx) : ORIGIN = 0x42016000, LENGTH = 72K
rsvd_memory (!rx) : ORIGIN = 0x42028000, LENGTH = 1K
ram2_memory (!rx) : ORIGIN = 0x42028400, LENGTH = (31K - __EM_SIZE)
hbn_memory (rx) : ORIGIN = 0x40010000, LENGTH = 0xE00 /* hbn ram 4K used 3.5K*/
}
SECTIONS
@@ -91,13 +92,12 @@ SECTIONS
. = ALIGN(4);
__text_code_end__ = .;
} > xip_memory
.preinit_array :
.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
} >xip_memory AT>xip_memory
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
@@ -105,7 +105,6 @@ SECTIONS
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
PROVIDE_HIDDEN (__init_array_end = .);
} >xip_memory AT>xip_memory
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
@@ -113,7 +112,6 @@ SECTIONS
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
PROVIDE_HIDDEN (__fini_array_end = .);
} >xip_memory AT>xip_memory
.ctors :
{
/* gcc uses crtbegin.o to find the start of
@@ -137,7 +135,6 @@ SECTIONS
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
} >xip_memory AT>xip_memory
.dtors :
{
KEEP (*crtbegin.o(.dtors))
@@ -146,13 +143,11 @@ SECTIONS
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
} >xip_memory AT>xip_memory
.lalign :
{
. = ALIGN(4);
PROVIDE( _data_lma = . );
} >xip_memory AT>xip_memory
. = ALIGN(4);
__itcm_load_addr = .;
@@ -182,7 +177,7 @@ SECTIONS
__tcm_code_end__ = .;
} > itcm_memory
__hbn_load_addr = __itcm_load_addr + SIZEOF(.itcm_region);
__hbn_load_addr = __itcm_load_addr + SIZEOF(.itcm_region);
.hbn_ram_region : AT (__hbn_load_addr)
{
@@ -208,8 +203,6 @@ SECTIONS
. = ALIGN(4);
__tcm_data_end__ = .;
} > dtcm_memory
/*************************************************************************/
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
@@ -226,7 +219,6 @@ SECTIONS
__StackTop = ORIGIN(dtcm_memory) + LENGTH(dtcm_memory);
PROVIDE( __freertos_irq_stack_top = __StackTop);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __tcm_data_end__, "region RAM overflowed with stack")
/*************************************************************************/
@@ -326,5 +318,7 @@ SECTIONS
ASSERT((__HeapLimit - __HeapBase ) >= __heap_min_size, "heap size is too short.")
PROVIDE( _heap_start = ORIGIN(ram2_memory) );
PROVIDE( _heap_size = LENGTH(ram2_memory) );
}

View File

@@ -0,0 +1,421 @@
/**
* @file drv_mmheap.c
* @brief
*
* Copyright (c) 2021 Bouffalolab team
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
#include "drv_mmheap.h"
#define MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT 8
#define MEM_MANAGE_BITS_PER_BYTE 8
#define MEM_MANAGE_MEM_STRUCT_SIZE mmheap_align_up(sizeof(struct heap_node), MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT)
#define MEM_MANAGE_MINUM_MEM_SIZE (MEM_MANAGE_MEM_STRUCT_SIZE << 1)
#define MEM_MANAGE_ALLOCA_LABAL ((size_t)((size_t)1 << (sizeof(size_t) * MEM_MANAGE_BITS_PER_BYTE - 1)))
static inline size_t mmheap_align_down(size_t data, size_t align_byte)
{
return data & ~(align_byte - 1);
}
static inline size_t mmheap_align_up(size_t data, size_t align_byte)
{
return (data + align_byte - 1) & ~(align_byte - 1);
}
static inline struct heap_node *mmheap_addr_sub(const void *addr)
{
return (struct heap_node *)((const uint8_t *)addr - MEM_MANAGE_MEM_STRUCT_SIZE);
}
static inline void *mmheap_addr_add(const struct heap_node *mem_node)
{
return (void *)((const uint8_t *)mem_node + MEM_MANAGE_MEM_STRUCT_SIZE);
}
/**
* @brief mmheap_insert_node_to_freelist
*
* @param pRoot
* @param pNode
*/
static inline void mmheap_insert_node_to_freelist(struct heap_info *pRoot, struct heap_node *pNode)
{
struct heap_node *pPriv_Node;
struct heap_node *pNext_Node;
/*Find the node with an address similar to pNode*/
for (pPriv_Node = pRoot->pStart; pPriv_Node->next_node < pNode; pPriv_Node = pPriv_Node->next_node) {
}
pNext_Node = pPriv_Node->next_node;
/*Try to merge the pNode with the previous block*/
if ((uint8_t *)mmheap_addr_add(pPriv_Node) + pPriv_Node->mem_size == (uint8_t *)pNode) {
if (pPriv_Node != pRoot->pStart) { /*can merge if not start block*/
pPriv_Node->mem_size += MEM_MANAGE_MEM_STRUCT_SIZE + pNode->mem_size;
pNode = pPriv_Node;
} else {
/*The latter is not merged if it is a Start block to avoid wasting memory*/
pRoot->pStart->next_node = pNode;
}
} else {
/*Insert directly into the free single-chain table when merging is not possible*/
pPriv_Node->next_node = pNode;
}
/*Try to merge the pNode with the next block*/
if ((uint8_t *)mmheap_addr_add(pNode) + pNode->mem_size == (uint8_t *)pNext_Node) {
if (pNext_Node != pRoot->pEnd) {
pNode->mem_size += MEM_MANAGE_MEM_STRUCT_SIZE + pNext_Node->mem_size;
pNode->next_node = pNext_Node->next_node;
} else {
pNode->next_node = pRoot->pEnd;
}
} else {
/*Insert directly into the free single-chain table when merging is not possible*/
pNode->next_node = pNext_Node;
}
}
/**
* @brief mmheap_get_state
*
* @param pRoot
* @param pState
*/
void mmheap_get_state(struct heap_info *pRoot, struct heap_state *pState)
{
MMHEAP_ASSERT(pRoot->pStart != NULL);
MMHEAP_ASSERT(pRoot->pEnd != NULL);
pState->max_node_size = pRoot->pStart->next_node->mem_size;
pState->min_node_size = pRoot->pStart->next_node->mem_size;
pState->remain_size = 0;
pState->free_node_num = 0;
MMHEAP_LOCK();
for (struct heap_node *pNode = pRoot->pStart->next_node; pNode->next_node != NULL; pNode = pNode->next_node) {
pState->remain_size += pNode->mem_size;
pState->free_node_num++;
if (pNode->mem_size > pState->max_node_size)
pState->max_node_size = pNode->mem_size;
if (pNode->mem_size < pState->min_node_size)
pState->min_node_size = pNode->mem_size;
}
MMHEAP_UNLOCK();
}
/**
* @brief mmheap_align_alloc
*
* @param pRoot
* @param align_size
* @param want_size
* @return void*
*/
void *mmheap_align_alloc(struct heap_info *pRoot, size_t align_size, size_t want_size)
{
void *pReturn = NULL;
struct heap_node *pPriv_Node, *pNow_Node;
MMHEAP_ASSERT(pRoot->pStart != NULL);
MMHEAP_ASSERT(pRoot->pEnd != NULL);
if (want_size == 0) {
return NULL;
}
if ((want_size & MEM_MANAGE_ALLOCA_LABAL) != 0) {
MMHEAP_MALLOC_FAIL();
return NULL;
}
if (align_size & (align_size - 1)) {
MMHEAP_MALLOC_FAIL();
return NULL;
}
MMHEAP_LOCK();
if (want_size < MEM_MANAGE_MINUM_MEM_SIZE)
want_size = MEM_MANAGE_MINUM_MEM_SIZE;
if (align_size < MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT)
align_size = MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT;
want_size = mmheap_align_up(want_size, MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT);
pPriv_Node = pRoot->pStart;
pNow_Node = pRoot->pStart->next_node;
while (pNow_Node->next_node != NULL) {
if (pNow_Node->mem_size >= want_size + MEM_MANAGE_MEM_STRUCT_SIZE) {
size_t use_align_size;
size_t new_size;
pReturn = (void *)mmheap_align_up((size_t)mmheap_addr_add(pNow_Node), align_size); /*Calculate the aligned address*/
use_align_size = (uint8_t *)pReturn - (uint8_t *)mmheap_addr_add(pNow_Node); /*Calculate the memory consumed by the alignment*/
if (use_align_size != 0) { /*if Memory misalignment*/
if (use_align_size < MEM_MANAGE_MINUM_MEM_SIZE + MEM_MANAGE_MEM_STRUCT_SIZE) { /*The unaligned value is too small*/
pReturn = (void *)mmheap_align_up(
(size_t)mmheap_addr_add(pNow_Node) + MEM_MANAGE_MINUM_MEM_SIZE + MEM_MANAGE_MEM_STRUCT_SIZE, align_size);
use_align_size = (uint8_t *)pReturn - (uint8_t *)mmheap_addr_add(pNow_Node);
}
if (use_align_size <= pNow_Node->mem_size) {
new_size = pNow_Node->mem_size - use_align_size; /*Calculate the remaining memory size by removing the memory consumed by alignment*/
if (new_size >= want_size) { /*Meet the conditions for distribution*/
struct heap_node *pNew_Node = mmheap_addr_sub(pReturn);
pNow_Node->mem_size -= new_size + MEM_MANAGE_MEM_STRUCT_SIZE; /*Split Node*/
pNew_Node->mem_size = new_size; /*The new node is also not in the free chain and does not need to be discharged from the free chain*/
pNew_Node->next_node = NULL;
pNow_Node = pNew_Node;
break;
}
}
} else { /*Memory is directly aligned*/
pPriv_Node->next_node = pNow_Node->next_node;
pNow_Node->next_node = NULL;
break;
}
}
pPriv_Node = pNow_Node;
pNow_Node = pNow_Node->next_node;
}
if (pNow_Node == pRoot->pEnd) {
MMHEAP_UNLOCK();
MMHEAP_MALLOC_FAIL();
return NULL;
}
if (pNow_Node->mem_size >= MEM_MANAGE_MINUM_MEM_SIZE + MEM_MANAGE_MEM_STRUCT_SIZE + want_size) { /*Node memory is still available*/
struct heap_node *pNew_Node = (struct heap_node *)((uint8_t *)mmheap_addr_add(pNow_Node) + want_size); /*Calculate the address of the node that will be moved into the free chain table*/
pNew_Node->mem_size = pNow_Node->mem_size - want_size - MEM_MANAGE_MEM_STRUCT_SIZE;
pNew_Node->next_node = NULL;
pNow_Node->mem_size = want_size;
mmheap_insert_node_to_freelist(pRoot, pNew_Node);
}
pNow_Node->mem_size |= MEM_MANAGE_ALLOCA_LABAL;
MMHEAP_UNLOCK();
return pReturn;
}
/**
* @brief mmheap_alloc
*
* @param pRoot
* @param want_size
* @return void*
*/
void *mmheap_alloc(struct heap_info *pRoot, size_t want_size)
{
return mmheap_align_alloc(pRoot, MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT, want_size);
}
/**
* @brief mmheap_realloc
*
* @param pRoot
* @param src_addr
* @param want_size
* @return void*
*/
void *mmheap_realloc(struct heap_info *pRoot, void *src_addr, size_t want_size)
{
void *pReturn = NULL;
struct heap_node *pNext_Node, *pPriv_Node;
struct heap_node *pSrc_Node;
MMHEAP_ASSERT(pRoot->pStart != NULL);
MMHEAP_ASSERT(pRoot->pEnd != NULL);
if (src_addr == NULL) {
return mmheap_align_alloc(pRoot, MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT, want_size);
}
if (want_size == 0) {
mmheap_free(pRoot, src_addr);
return NULL;
}
MMHEAP_LOCK();
if ((want_size & MEM_MANAGE_ALLOCA_LABAL) != 0) {
MMHEAP_UNLOCK();
MMHEAP_MALLOC_FAIL();
return NULL;
}
pSrc_Node = mmheap_addr_sub(src_addr);
if ((pSrc_Node->mem_size & MEM_MANAGE_ALLOCA_LABAL) == 0) {
MMHEAP_UNLOCK();
MMHEAP_ASSERT((pSrc_Node->mem_size & MEM_MANAGE_ALLOCA_LABAL) != 0);
MMHEAP_MALLOC_FAIL();
return NULL;
}
pSrc_Node->mem_size &= ~MEM_MANAGE_ALLOCA_LABAL;
if (pSrc_Node->mem_size >= want_size) {
pSrc_Node->mem_size |= MEM_MANAGE_ALLOCA_LABAL;
pReturn = src_addr;
MMHEAP_UNLOCK();
return pReturn;
}
/*Start looking in the free list for blocks similar to this block*/
for (pPriv_Node = pRoot->pStart; pPriv_Node->next_node < pSrc_Node; pPriv_Node = pPriv_Node->next_node) {
}
pNext_Node = pPriv_Node->next_node;
if (pNext_Node != pRoot->pEnd &&
((uint8_t *)src_addr + pSrc_Node->mem_size == (uint8_t *)pNext_Node) &&
(pSrc_Node->mem_size + pNext_Node->mem_size + MEM_MANAGE_MEM_STRUCT_SIZE >= want_size)) {
/*Meet next node non-end, memory contiguous, enough memory left*/
pReturn = src_addr;
pPriv_Node->next_node = pNext_Node->next_node;
pSrc_Node->mem_size += MEM_MANAGE_MEM_STRUCT_SIZE + pNext_Node->mem_size;
want_size = mmheap_align_up(want_size, MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT);
if (pSrc_Node->mem_size >= MEM_MANAGE_MINUM_MEM_SIZE + MEM_MANAGE_MEM_STRUCT_SIZE + want_size) { /*Removing the remaining space allocated is enough to open new blocks*/
struct heap_node *pNew_Node = (struct heap_node *)((uint8_t *)mmheap_addr_add(pSrc_Node) + want_size);
pNew_Node->next_node = NULL;
pNew_Node->mem_size = pSrc_Node->mem_size - want_size - MEM_MANAGE_MEM_STRUCT_SIZE;
pSrc_Node->mem_size = want_size;
mmheap_insert_node_to_freelist(pRoot, pNew_Node);
}
pSrc_Node->mem_size |= MEM_MANAGE_ALLOCA_LABAL;
MMHEAP_UNLOCK();
} else {
MMHEAP_UNLOCK();
pReturn = mmheap_align_alloc(pRoot, MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT, want_size);
if (pReturn == NULL) {
pSrc_Node->mem_size |= MEM_MANAGE_ALLOCA_LABAL;
MMHEAP_MALLOC_FAIL();
return NULL;
}
MMHEAP_LOCK();
memcpy(pReturn, src_addr, pSrc_Node->mem_size);
pSrc_Node->mem_size |= MEM_MANAGE_ALLOCA_LABAL;
MMHEAP_UNLOCK();
mmheap_free(pRoot, src_addr);
}
return pReturn;
}
/**
* @brief
*
* @param pRoot
* @param num
* @param size
* @return void*
*/
void *mmheap_calloc(struct heap_info *pRoot, size_t num, size_t size)
{
void *pReturn = NULL;
pReturn = (void *)mmheap_alloc(pRoot, size * num);
if (pReturn) {
memset(pReturn, 0, num * size);
}
return pReturn;
}
/**
* @brief mmheap_free
*
* @param pRoot
* @param addr
*/
void mmheap_free(struct heap_info *pRoot, void *addr)
{
struct heap_node *pFree_Node;
MMHEAP_ASSERT(pRoot->pStart != NULL);
MMHEAP_ASSERT(pRoot->pEnd != NULL);
MMHEAP_LOCK();
if (addr == NULL) {
MMHEAP_UNLOCK();
return;
}
pFree_Node = mmheap_addr_sub(addr);
if ((pFree_Node->mem_size & MEM_MANAGE_ALLOCA_LABAL) == 0) {
MMHEAP_UNLOCK();
MMHEAP_ASSERT((pFree_Node->mem_size & MEM_MANAGE_ALLOCA_LABAL) != 0);
return;
}
if (pFree_Node->next_node != NULL) {
MMHEAP_UNLOCK();
MMHEAP_ASSERT(pFree_Node->next_node == NULL);
return;
}
pFree_Node->mem_size &= ~MEM_MANAGE_ALLOCA_LABAL;
mmheap_insert_node_to_freelist(pRoot, pFree_Node);
MMHEAP_UNLOCK();
}
/**
* @brief mmheap_init
*
* @param pRoot
* @param pRegion
*/
void mmheap_init(struct heap_info *pRoot, const struct heap_region *pRegion)
{
struct heap_node *align_addr;
size_t align_size;
struct heap_node *pPriv_node = NULL;
pRoot->total_size = 0;
pRoot->pEnd = NULL;
pRoot->pStart = NULL;
for (; pRegion->addr != NULL; pRegion++) {
align_addr = (struct heap_node *)mmheap_align_up((size_t)pRegion->addr, MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT); /*Calculate the aligned address*/
if ((uint8_t *)align_addr > pRegion->mem_size + (uint8_t *)pRegion->addr) /*Alignment consumes more memory than the memory area*/
continue;
align_size = pRegion->mem_size - ((uint8_t *)align_addr - (uint8_t *)pRegion->addr); /*Calculate the size of memory left after alignment*/
if (align_size < MEM_MANAGE_MINUM_MEM_SIZE + MEM_MANAGE_MEM_STRUCT_SIZE) /*if Aligning the remaining memory is too small*/
continue;
align_size -= MEM_MANAGE_MEM_STRUCT_SIZE; /*Find the size of the memory block after removing the table header*/
align_addr->mem_size = align_size;
align_addr->next_node = NULL;
if (pRoot->pStart == NULL) {
pRoot->pStart = align_addr; /*set current addr for start*/
if (align_size >= MEM_MANAGE_MINUM_MEM_SIZE + MEM_MANAGE_MEM_STRUCT_SIZE) { /*If the remaining blocks are large enough*/
align_size -= MEM_MANAGE_MEM_STRUCT_SIZE; /*Remove the next block of table headers remaining memory size*/
align_addr = (struct heap_node *)((uint8_t *)pRoot->pStart + MEM_MANAGE_MEM_STRUCT_SIZE); //the next block addr
align_addr->mem_size = align_size;
align_addr->next_node = NULL;
pRoot->pStart->mem_size = 0;
pRoot->pStart->next_node = align_addr;
pRoot->total_size = align_addr->mem_size;
} else { /*The memory is too small, and the address of the current memory block is recorded as start*/
pRoot->total_size = 0;
pRoot->pStart->mem_size = 0;
}
} else {
pPriv_node->next_node = align_addr;
pRoot->total_size += align_size;
}
pPriv_node = align_addr;
}
//At this point, pPriv_node is the last block, then place the end of the table at the end of the block, find the address to place the end block, end block is only convenient for traversal, so as small as possible, assigned to MEM_MANAGE_MEM_STRUCT_SIZE
align_addr = (struct heap_node *)mmheap_align_down(
(size_t)mmheap_addr_add(pPriv_node) + pPriv_node->mem_size - MEM_MANAGE_MEM_STRUCT_SIZE, MEM_MANAGE_ALIGNMENT_BYTE_DEFAULT);
align_size = (uint8_t *)align_addr - (uint8_t *)mmheap_addr_add(pPriv_node); /*Find the remaining size of the previous block after the end block is allocated*/
if (align_size >= MEM_MANAGE_MINUM_MEM_SIZE) {
pRoot->total_size -= pPriv_node->mem_size - align_size; /*Removing memory consumed by allocating end blocks*/
pRoot->pEnd = align_addr; /*Update the address at the end of the list*/
pPriv_node->next_node = align_addr;
pPriv_node->mem_size = align_size;
align_addr->next_node = NULL;
align_addr->mem_size = 0; /*The end block is not involved in memory allocation, so a direct 0 is sufficient*/
} else { /*The last block is too small, directly as the end block*/
pRoot->pEnd = pPriv_node;
pRoot->total_size -= pPriv_node->mem_size;
}
MMHEAP_ASSERT(pRoot->pStart != NULL);
MMHEAP_ASSERT(pRoot->pEnd != NULL);
}

View File

@@ -0,0 +1,159 @@
/**
* @file drv_mmheap.h
* @brief
*
* Copyright (c) 2021 Bouffalolab team
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
#ifndef __DRV_MMHEAP_H
#define __DRV_MMHEAP_H
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#ifndef MMHEAP_LOCK
#define MMHEAP_LOCK()
#endif
#ifndef MMHEAP_UNLOCK
#define MMHEAP_UNLOCK()
#endif
#ifndef MMHEAP_ASSERT
#define MMHEAP_ASSERT(A) \
if (!(A)) \
printf("mmheap malloc error:drv_mmheap,%d\r\n", __LINE__)
#endif
#ifndef MMHEAP_MALLOC_FAIL
#define MMHEAP_MALLOC_FAIL() printf("mmheap malloc fail:drv_mmheap,%d\r\n", __LINE__)
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct heap_region {
void *addr;
size_t mem_size;
};
struct heap_node {
struct heap_node *next_node;
size_t mem_size;
};
struct heap_info {
struct heap_node *pStart;
struct heap_node *pEnd;
size_t total_size;
};
struct heap_state {
size_t remain_size;
size_t free_node_num;
size_t max_node_size;
size_t min_node_size;
};
void mmheap_init(struct heap_info *pRoot, const struct heap_region *pRigon);
/**
* @brief Alloc start address aligned memory from the heap.
* Alloc aligned address and specified size memory from the heap.
*
* @attention
*
* @param[in] pRoot heap info.
* @param[in] align_size address align mask of the memory.
* @param[in] want_size size of the memory.
*
* @return the pointer to the allocated memory.
*/
void *mmheap_align_alloc(struct heap_info *pRoot, size_t align_size, size_t want_size);
/**
* @brief Alloc memory.
* Allocate size bytes and returns a pointer to the allocated memory.
*
* @attention size should no bigger than MMHEAP_BLK_SIZE_MAX.
*
* @param[in] pRoot heap info.
* @param[in] want_size size of the memory.
*
* @return the pointer to the allocated memory.
*/
void *mmheap_alloc(struct heap_info *pRoot, size_t want_size);
/**
* @brief Realloc memory from the heap.
* Change the size of the memory block pointed to by ptr to size bytes.
*
* @attention
* <ul>
* <li> if ptr is NULL, then the call is equivalent to mmheap_alloc(size), for all values of size.
* <li> if ptr is if size is equal to zero, and ptr is not NULL, then the call is equivalent to mmheap_free(ptr).
* </ul>
*
* @param[in] pRoot heap info.
* @param[in] src_addr old pointer to the memory space.
* @param[in] want_size new size of the memory space.
*
* @return the new pointer to the allocated memory.
*/
void *mmheap_realloc(struct heap_info *pRoot, void *src_addr, size_t want_size);
/**
* @brief Cealloc memory from the heap.
* Change the size of the memory block pointed to by ptr to size bytes.
*
* @attention
* <ul>
* <li> if ptr is NULL, then the call is equivalent to mmheap_alloc(size), for all values of size.
* <li> if ptr is if size is equal to zero, and ptr is not NULL, then the call is equivalent to mmheap_free(ptr).
* </ul>
*
* @param[in] pRoot heap info.
* @param[in] num size number.
* @param[in] size new size of the memory space.
*
* @return the new pointer to the allocated memory.
*/
void *mmheap_calloc(struct heap_info *pRoot, size_t num, size_t size);
/**
* @brief Free the memory.
* Free the memory space pointed to by ptr, which must have been returned by a previous call to mmheap_alloc(), mmheap_aligned_alloc(), or mmheap_realloc().
*
* @attention
*
* @param[in] pRoot heap info.
* @param[in] addr pointer to the memory.
*
* @return None.
*/
void mmheap_free(struct heap_info *pRoot, void *addr);
/**
* @brief get mmheap state
*
* @param pRoot heap info.
* @param pState heap state
*/
void mmheap_get_state(struct heap_info *pRoot, struct heap_state *pState);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,43 +1,44 @@
/**
******************************************************************************
* @file bl702_pwm.h
* @version V1.0
* @date
* @brief This file is the standard driver header file
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2020 Bouffalo Lab</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Bouffalo Lab nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
******************************************************************************
* @file bl702_pwm.h
* @version V1.0
* @date
* @brief This file is the standard driver header file
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2020 Bouffalo Lab</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of Bouffalo Lab nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
#ifndef __BL702_PWM_H__
#define __BL702_PWM_H__
#include "pwm_reg.h"
#include "bl702_common.h"
#include "pwm_reg.h"
/** @addtogroup BL702_Peripheral_Driver
* @{
@@ -55,61 +56,60 @@
* @brief PWM No. type definition
*/
typedef enum {
PWM_CH0 = 0, /*!< PWM Channel 0 define */
PWM_CH1, /*!< PWM Channel 1 define */
PWM_CH2, /*!< PWM Channel 2 define */
PWM_CH3, /*!< PWM Channel 3 define */
PWM_CH4, /*!< PWM Channel 4 define */
PWM_CH_MAX, /*!< */
PWM_CH0 = 0, /*!< PWM Channel 0 define */
PWM_CH1, /*!< PWM Channel 1 define */
PWM_CH2, /*!< PWM Channel 2 define */
PWM_CH3, /*!< PWM Channel 3 define */
PWM_CH4, /*!< PWM Channel 4 define */
PWM_CH_MAX, /*!< */
} PWM_CH_ID_Type;
/**
* @brief PWM Clock definition
*/
typedef enum {
PWM_CLK_XCLK = 0, /*!< PWM Clock source :XTAL CLK */
PWM_CLK_BCLK, /*!< PWM Clock source :Bus CLK */
PWM_CLK_32K, /*!< PWM Clock source :32K CLK */
PWM_CLK_XCLK = 0, /*!< PWM Clock source :XTAL CLK */
PWM_CLK_BCLK, /*!< PWM Clock source :Bus CLK */
PWM_CLK_32K, /*!< PWM Clock source :32K CLK */
} PWM_Clk_Type;
/**
* @brief PWM Stop Mode definition
*/
typedef enum {
PWM_STOP_ABRUPT = 0, /*!< PWM stop abrupt select define */
PWM_STOP_GRACEFUL, /*!< PWM stop graceful select define */
PWM_STOP_ABRUPT = 0, /*!< PWM stop abrupt select define */
PWM_STOP_GRACEFUL, /*!< PWM stop graceful select define */
} PWM_Stop_Mode_Type;
/**
* @brief PWM mode type def
*/
typedef enum {
PWM_POL_NORMAL = 0, /*!< PWM normal polarity mode define */
PWM_POL_INVERT, /*!< PWM invert polarity mode define */
PWM_POL_NORMAL = 0, /*!< PWM normal polarity mode define */
PWM_POL_INVERT, /*!< PWM invert polarity mode define */
} PWM_Polarity_Type;
/**
* @brief PWM interrupt type def
*/
typedef enum {
PWM_INT_PULSE_CNT = 0, /*!< PWM Pulse count interrupt define */
PWM_INT_ALL, /*!< */
PWM_INT_PULSE_CNT = 0, /*!< PWM Pulse count interrupt define */
PWM_INT_ALL, /*!< */
} PWM_INT_Type;
/**
* @brief PWM configuration structure type definition
*/
typedef struct
{
PWM_CH_ID_Type ch; /*!< PWM channel */
PWM_Clk_Type clk; /*!< PWM Clock */
PWM_Stop_Mode_Type stopMode; /*!< PWM Stop Mode */
PWM_Polarity_Type pol; /*!< PWM mode type */
uint16_t clkDiv; /*!< PWM clkDiv num */
uint16_t period; /*!< PWM period set */
uint16_t threshold1; /*!< PWM threshold1 num */
uint16_t threshold2; /*!< PWM threshold2 num */
uint16_t intPulseCnt; /*!< PWM interrupt pulse count */
typedef struct {
PWM_CH_ID_Type ch; /*!< PWM channel */
PWM_Clk_Type clk; /*!< PWM Clock */
PWM_Stop_Mode_Type stopMode; /*!< PWM Stop Mode */
PWM_Polarity_Type pol; /*!< PWM mode type */
uint16_t clkDiv; /*!< PWM clkDiv num */
uint16_t period; /*!< PWM period set */
uint16_t threshold1; /*!< PWM threshold1 num */
uint16_t threshold2; /*!< PWM threshold2 num */
uint16_t intPulseCnt; /*!< PWM interrupt pulse count */
} PWM_CH_CFG_Type;
/*@} end of group PWM_Public_Types */
@@ -121,37 +121,27 @@ typedef struct
/** @defgroup PWM_CH_ID_TYPE
* @{
*/
#define IS_PWM_CH_ID_TYPE(type) (((type) == PWM_CH0) || \
((type) == PWM_CH1) || \
((type) == PWM_CH2) || \
((type) == PWM_CH3) || \
((type) == PWM_CH4) || \
((type) == PWM_CH_MAX))
#define IS_PWM_CH_ID_TYPE(type) (((type) == PWM_CH0) || ((type) == PWM_CH1) || ((type) == PWM_CH2) || ((type) == PWM_CH3) || ((type) == PWM_CH4) || ((type) == PWM_CH_MAX))
/** @defgroup PWM_CLK_TYPE
* @{
*/
#define IS_PWM_CLK_TYPE(type) (((type) == PWM_CLK_XCLK) || \
((type) == PWM_CLK_BCLK) || \
((type) == PWM_CLK_32K))
#define IS_PWM_CLK_TYPE(type) (((type) == PWM_CLK_XCLK) || ((type) == PWM_CLK_BCLK) || ((type) == PWM_CLK_32K))
/** @defgroup PWM_STOP_MODE_TYPE
* @{
*/
#define IS_PWM_STOP_MODE_TYPE(type) (((type) == PWM_STOP_ABRUPT) || \
((type) == PWM_STOP_GRACEFUL))
#define IS_PWM_STOP_MODE_TYPE(type) (((type) == PWM_STOP_ABRUPT) || ((type) == PWM_STOP_GRACEFUL))
/** @defgroup PWM_POLARITY_TYPE
* @{
*/
#define IS_PWM_POLARITY_TYPE(type) (((type) == PWM_POL_NORMAL) || \
((type) == PWM_POL_INVERT))
#define IS_PWM_POLARITY_TYPE(type) (((type) == PWM_POL_NORMAL) || ((type) == PWM_POL_INVERT))
/** @defgroup PWM_INT_TYPE
* @{
*/
#define IS_PWM_INT_TYPE(type) (((type) == PWM_INT_PULSE_CNT) || \
((type) == PWM_INT_ALL))
#define IS_PWM_INT_TYPE(type) (((type) == PWM_INT_PULSE_CNT) || ((type) == PWM_INT_ALL))
/*@} end of group PWM_Public_Constants */
@@ -173,21 +163,21 @@ typedef struct
void PWM_IRQHandler(void);
#endif
BL_Err_Type PWM_Channel_Init(PWM_CH_CFG_Type *chCfg);
void PWM_Channel_Update(PWM_CH_ID_Type ch, uint16_t period, uint16_t threshold1, uint16_t threshold2);
void PWM_Channel_Set_Div(PWM_CH_ID_Type ch, uint16_t div);
void PWM_Channel_Set_Threshold1(PWM_CH_ID_Type ch, uint16_t threshold1);
void PWM_Channel_Set_Threshold2(PWM_CH_ID_Type ch, uint16_t threshold2);
void PWM_Channel_Set_Period(PWM_CH_ID_Type ch, uint16_t period);
void PWM_Channel_Get(PWM_CH_ID_Type ch, uint16_t *period, uint16_t *threshold1, uint16_t *threshold2);
void PWM_IntMask(PWM_CH_ID_Type ch, PWM_INT_Type intType, BL_Mask_Type intMask);
void PWM_Channel_Enable(PWM_CH_ID_Type ch);
void PWM_Channel_Disable(PWM_CH_ID_Type ch);
void PWM_SW_Mode(PWM_CH_ID_Type ch, BL_Fun_Type enable);
void PWM_SW_Force_Value(PWM_CH_ID_Type ch, uint8_t value);
void PWM_Int_Callback_Install(PWM_CH_ID_Type ch, uint32_t intType, intCallback_Type *cbFun);
void PWM_Channel_Update(PWM_CH_ID_Type ch, uint16_t period, uint16_t threshold1, uint16_t threshold2);
void PWM_Channel_Set_Div(PWM_CH_ID_Type ch, uint16_t div);
void PWM_Channel_Set_Threshold1(PWM_CH_ID_Type ch, uint16_t threshold1);
void PWM_Channel_Set_Threshold2(PWM_CH_ID_Type ch, uint16_t threshold2);
void PWM_Channel_Set_Period(PWM_CH_ID_Type ch, uint16_t period);
void PWM_Channel_Get(PWM_CH_ID_Type ch, uint16_t *period, uint16_t *threshold1, uint16_t *threshold2);
void PWM_IntMask(PWM_CH_ID_Type ch, PWM_INT_Type intType, BL_Mask_Type intMask);
void PWM_Channel_Enable(PWM_CH_ID_Type ch);
uint8_t PWM_Channel_Is_Enabled(PWM_CH_ID_Type ch);
void PWM_Channel_Disable(PWM_CH_ID_Type ch);
void PWM_SW_Mode(PWM_CH_ID_Type ch, BL_Fun_Type enable);
void PWM_SW_Force_Value(PWM_CH_ID_Type ch, uint8_t value);
void PWM_Int_Callback_Install(PWM_CH_ID_Type ch, uint32_t intType, intCallback_Type *cbFun);
BL_Err_Type PWM_Smart_Configure(PWM_CH_ID_Type ch, uint32_t frequency, uint8_t dutyCycle);
/*@} end of group PWM_Public_Functions */
/*@} end of group PWM */

View File

@@ -354,7 +354,18 @@ void PWM_Channel_Enable(PWM_CH_ID_Type ch) {
tmpVal = BL_RD_REG(PWMx, PWM_CONFIG);
BL_WR_REG(PWMx, PWM_CONFIG, BL_CLR_REG_BIT(tmpVal, PWM_STOP_EN));
}
uint8_t PWM_Channel_Is_Enabled(PWM_CH_ID_Type ch) {
uint32_t tmpVal;
/* Get channel register */
uint32_t PWMx = PWM_Get_Channel_Reg(ch);
/* Check the parameters */
CHECK_PARAM(IS_PWM_CH_ID_TYPE(ch));
/* Config pwm clock to enable pwm */
tmpVal = BL_RD_REG(PWMx, PWM_CONFIG);
return BL_GET_REG_BITS_VAL(tmpVal, PWM_STOP_EN) == 0;
}
/****************************************************************************
* @brief PWM disable
*

View File

@@ -1,70 +1,61 @@
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <FreeRTOS.h>
#include "bflb_platform.h"
#include <task.h>
#include "ble.h"
#include "BSP.h"
#include "bflb_platform.h"
#include "bl702_glb.h"
#include "ble_characteristics.h"
#include "ble_peripheral.h"
#include "bluetooth.h"
#include "conn.h"
#include "gatt.h"
#include "hci_core.h"
#include "uuid.h"
#include "ble_peripheral.h"
#include "log.h"
#include "bl702_glb.h"
#include "ble_characteristics.h"
#include "hal_clock.h"
#include "ble.h"
#include "hci_core.h"
#include "log.h"
#include "uuid.h"
#include <FreeRTOS.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <task.h>
void ble_stack_start(void) {
MSG("BLE Starting\n");
GLB_Set_EM_Sel(GLB_EM_8KB);
ble_controller_init(configMAX_PRIORITIES - 1);
// Initialize BLE Host stack
hci_driver_init();
void ble_stack_start(void)
{
MSG("BLE Starting\n");
GLB_Set_EM_Sel(GLB_EM_8KB);
ble_controller_init(configMAX_PRIORITIES - 1);
// // Initialize BLE Host stack
hci_driver_init();
bt_enable(bt_enable_cb);
MSG("BLE Starting...Done\n");
bt_enable(bt_enable_cb);
MSG("BLE Starting...Done\n");
}
/* configSUPPORT_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the
application must provide an implementation of vApplicationGetTimerTaskMemory()
to provide the memory that is used by the Timer service task. */
void vApplicationGetTimerTaskMemory(StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize)
{
/* If the buffers to be provided to the Timer task are declared inside this
function then they must be declared static - otherwise they will be allocated on
the stack and so not exists after this function exits. */
static StaticTask_t xTimerTaskTCB;
static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH];
void vApplicationGetTimerTaskMemory(StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize) {
/* If the buffers to be provided to the Timer task are declared inside this
function then they must be declared static - otherwise they will be allocated on
the stack and so not exists after this function exits. */
static StaticTask_t xTimerTaskTCB;
static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH];
/* Pass out a pointer to the StaticTask_t structure in which the Timer
task's state will be stored. */
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
/* Pass out a pointer to the StaticTask_t structure in which the Timer
task's state will be stored. */
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
/* Pass out the array that will be used as the Timer task's stack. */
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
/* Pass out the array that will be used as the Timer task's stack. */
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
/* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.
Note that, as the array is necessarily of type StackType_t,
configTIMER_TASK_STACK_DEPTH is specified in words, not bytes. */
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
/* Pass out the size of the array pointed to by *ppxTimerTaskStackBuffer.
Note that, as the array is necessarily of type StackType_t,
configTIMER_TASK_STACK_DEPTH is specified in words, not bytes. */
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
}
void vApplicationMallocFailedHook(void) {
MSG("vApplicationMallocFailedHook\r\n");
void vApplicationMallocFailedHook(void)
{
MSG("vApplicationMallocFailedHook\r\n");
while (1)
;
}
while (1) {
;
}
}

View File

@@ -113,8 +113,9 @@ int ble_char_read_status_callback(struct bt_conn *conn, const struct bt_gatt_att
// hall sensor
{
int16_t hallEffectStrength = getRawHallEffect();
if (hallEffectStrength < 0)
if (hallEffectStrength < 0) {
hallEffectStrength = -hallEffectStrength;
}
temp = hallEffectStrength;
memcpy(buf, &temp, sizeof(temp));
return sizeof(temp);

View File

@@ -258,7 +258,9 @@ static struct bt_gatt_attr ble_attrs_declaration[] = {
NAME
get_attr
*/
struct bt_gatt_attr *get_attr(u8_t index) { return &ble_attrs_declaration[index]; }
struct bt_gatt_attr *get_attr(u8_t index) {
return &ble_attrs_declaration[index];
}
static struct bt_gatt_service ble_tp_server = BT_GATT_SERVICE(ble_attrs_declaration);

View File

@@ -10,6 +10,7 @@ NOTES
#ifndef _BLE_TP_SVC_H_
#define _BLE_TP_SVC_H_
#include "types.h"
#include "ble_config.h"
// read value handle offset 2

View File

@@ -63,10 +63,10 @@
* OLED Brightness
*
*/
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
#define BRIGHTNESS_STEP 25 // OLED brightness increment
#define DEFAULT_BRIGHTNESS 26 // default OLED brightness
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
#define BRIGHTNESS_STEP 25 // OLED brightness increment
#define DEFAULT_BRIGHTNESS 26 // default OLED brightness
/**
* Temp change settings
@@ -87,7 +87,7 @@
#define POWER_PULSE_DEFAULT 0
#else
#define POWER_PULSE_DEFAULT 5
#endif /* Pinecil */
#endif /* Pinecil */
#define POWER_PULSE_WAIT_DEFAULT 4 // Default rate of the power pulse: 4*2500 = 10000 ms = 10 s
#define POWER_PULSE_DURATION_DEFAULT 1 // Default duration of the power pulse: 1*250 = 250 ms
@@ -160,15 +160,22 @@
#define HALL_SI7210
#define DEBUG_UART_OUTPUT
#define HAS_POWER_DEBUG_MENU
#define HARDWARE_MAX_WATTAGE_X10 750
#define TIP_THERMAL_MASS 65 // X10 watts to raise 1 deg C in 1 second
#define BLE_ENABLED
#define NEEDS_VBUS_PROBE 0
#define CANT_DIRECT_READ_SETTINGS
#define HARDWARE_MAX_WATTAGE_X10 750
#define BLE_ENABLED // We have a BLE stack
#define NEEDS_VBUS_PROBE 0 // No vbus probe, its not connected in pcb
#define CANT_DIRECT_READ_SETTINGS // We cant memcpy settings due to flash cache
#define TIP_CONTROL_PID // We use PID rather than integrator
#define TIP_PID_KP 45 // Reasonable compromise for most tips so far
#define TIP_PID_KI 9 // About as high for stability across tips
#define TIP_PID_KD 200 // Helps dampen smaller tips; ~= nothing for larger tips
#define FILTER_DISPLAYED_TIP_TEMP 8 // Filtering for GUI display
#endif /* Pinecilv2 */
#define FLASH_LOGOADDR (0x23000000 + (1022 * 1024))
#define FLASH_PAGE_SIZE (1024)
#define FLASH_PAGE_SIZE (1024) // Read pages
// Erase is 4 or 8 k size, so we pad these apart for now
// If we ever get low on flash, will need better solution
#define FLASH_LOGOADDR (0x23000000 + (1016 * FLASH_PAGE_SIZE))
#define SETTINGS_START_PAGE (1023 * FLASH_PAGE_SIZE) // Hal auto offsets base addr
#endif /* CONFIGURATION_H_ */

Some files were not shown because too many files have changed in this diff Show More