1
0
forked from me/IronOS

Compare commits

..

9 Commits

Author SHA1 Message Date
discip
d0e0c8704d Merge branch 'dev' into epr-pinecil-og 2023-07-02 21:20:44 +02:00
discip
3d4fb386b5 Merge branch 'dev' into epr-pinecil-og 2023-06-29 21:58:29 +02:00
discip
c99d19a569 Merge branch 'dev' into epr-pinecil-og 2023-03-15 00:25:14 +01:00
discip
4db4aebed2 Merge branch 'dev' into epr-pinecil-og 2023-03-14 22:25:59 +01:00
discip
5e723ada61 Merge branch 'dev' into epr-pinecil-og 2023-03-13 23:28:23 +01:00
discip
8f648721e7 Merge branch 'dev' into epr-pinecil-og 2023-03-11 15:34:38 +01:00
Ben V. Brown
86454348f5 Merge branch 'dev' into epr-pinecil-og 2022-11-07 20:18:59 +11:00
Ben V. Brown
76db4033f3 Merge branch 'dev' into epr-pinecil-og 2022-10-23 23:00:00 +11:00
Ben V. Brown
4696f0f907 Enable EPR if vbus is not connected 2022-09-18 18:48:35 +10:00
151 changed files with 2562 additions and 4511 deletions

View File

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

View File

@@ -3,8 +3,6 @@ name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
container:
@@ -21,21 +19,20 @@ jobs:
- name: Install dependencies (python)
run: python3 -m pip install bdflib
- uses: actions/checkout@v4
- uses: actions/checkout@v3
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: Git meta info
run: echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"
- name: Build ${{ matrix.model }}
- name: build ${{ matrix.model }}
run: cd source && ./build.sh -m ${{ matrix.model }}
- name: Copy license files
run: cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
- name: copy license text
run: |
cp LICENSE source/Hexfile/LICENSE
cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -50,7 +47,7 @@ jobs:
if-no-files-found: error
- name: Generate json index file
run: ./source/metadata.py ${{ matrix.model }}.json
run: cd source && python3 metadata.py ${{ matrix.model }}.json
- name: Archive ${{ matrix.model }} index file
uses: actions/upload-artifact@v3
@@ -58,7 +55,6 @@ jobs:
name: metadata
path: source/Hexfile/${{ matrix.model }}.json
build_multi-lang:
runs-on: ubuntu-20.04
container:
@@ -74,21 +70,20 @@ jobs:
- name: Install dependencies (python)
run: python3 -m pip install bdflib
- uses: actions/checkout@v4
- uses: actions/checkout@v3
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: Git meta info
run: echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"
- 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: 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: copy license text
run: |
cp LICENSE source/Hexfile/LICENSE
cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -103,7 +98,7 @@ jobs:
if-no-files-found: error
- name: Generate json index file
run: ./source/metadata.py ${{ matrix.model }}_multi-lang.json
run: cd source && python3 metadata.py ${{ matrix.model }}_multi-lang.json
- name: Archive ${{ matrix.model }} index file
uses: actions/upload-artifact@v3
@@ -111,75 +106,63 @@ jobs:
name: metadata
path: source/Hexfile/${{ matrix.model }}_multi-lang.json
tests:
runs-on: ubuntu-20.04
container:
image: alpine:3.16
steps:
- name: Install dependencies (apk)
- name: deps
run: apk add --no-cache python3 py3-pip make git bash findutils gcc musl-dev
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies (python)
- name: install black
run: python3 -m pip install bdflib
- name: Run python tests
run: ./Translations/make_translation_test.py
run: cd Translations && chmod +x make_translation_test.py && ./make_translation_test.py
- name: Run BriefLZ tests
run: make -C source/ Objects/host/brieflz/libbrieflz.so && ./Translations/brieflz_test.py
run: |
cd source
make Objects/host/brieflz/libbrieflz.so
cd ../Translations
chmod +x brieflz_test.py
./brieflz_test.py
check_c-cpp:
check_formatting:
runs-on: ubuntu-20.04
container:
image: alpine:3.16
steps:
- name: Install dependencies (apk)
run: apk add --no-cache make git diffutils findutils clang-extra-tools bash
- uses: actions/checkout@v4
with:
submodules: true
- name: Check format style with clang-format
run: make clean check-style
check_python:
runs-on: ubuntu-20.04
container:
image: alpine:3.16
steps:
- name: Install dependencies (apk)
- name: deps
run: apk add --no-cache python3 py3-pip make git black
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies (python)
- name: install black
run: python3 -m pip install bdflib flake8
- name: Check formatting with clang-format
run: cd source && make clean && make check-style
- name: Check python formatting with black
run: black --check Translations
- name: Check python with flake8
run: flake8 Translations
check_shell:
name: check_shell
shellcheck:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
@@ -187,20 +170,3 @@ 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,5 +1,3 @@
#### Generic ####
# Object files
*.o
*.ko
@@ -7,7 +5,6 @@
*.elf
*.d
*.DS_Store
# Precompiled Headers
*.gch
*.pch
@@ -34,22 +31,33 @@
# Debug files
*.dSYM/
*.su
source/.metadata/*
# Custom scripts & misc. files
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__/
*.pyc
*.lst
*.mk
*.list
source/Hexfile/
source/Objects/
ci/artefacts/
ci/secrets/unencrypted/
codeship.aes
.vscode/settings.json
# Auto generated files
*.cache
codeship.aes
CoreCompileInputs.cache
source/Core/Inc/unit.h
source/Core/Gen/
# IDE configs
.vs/*
.settings/*
.cproject.swp
..cproject.swp
# Visual Studios
.vscode/*
@@ -57,7 +65,6 @@ CoreCompileInputs.cache
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.vscode/settings.json
# Eclipse
.metadata
@@ -113,24 +120,11 @@ local.properties
.scala_dependencies
.worksheet
# 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 ####
# Jetbrains
# Covers JetBrains IDEs: 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
@@ -180,38 +174,7 @@ fabric.properties
# Editor-based Rest Client
.idea/httpRequests
#### 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.
CoreCompileInputs.cache
.vscode/settings.json
source/compile_commands.json
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
.idea/

View File

@@ -1,99 +0,0 @@
# 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,43 +9,9 @@ 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.
### 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)
Items are shown in the menu on a single line, so they use short codes and appear in this order:
### 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/).
@@ -86,6 +52,7 @@ 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.
@@ -139,7 +106,6 @@ 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/
cd source/source
./build.sh -l EN -m Pinecilv2
```

View File

@@ -1,62 +1,8 @@
## 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
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/).
- 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

View File

@@ -1,36 +1,6 @@
# Version Changes
# 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
## V2.19
- Bug-fix Infinite Boot Logo
- Shutdown settings for MHP30
- Accelerometer sensitivity for MHP30
@@ -39,9 +9,7 @@ For a small number of V2 Pinecil devices there appears to be an interference iss
- 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)
@@ -49,11 +17,8 @@ For a small number of V2 Pinecil devices there appears to be an interference iss
- Updated translations
- Better Instructions/documents
# V2.17
### Features & changes
## V2.17
### Big 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
@@ -67,9 +32,7 @@ For a small number of V2 Pinecil devices there appears to be an interference iss
- 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.
@@ -78,38 +41,39 @@ For a small number of V2 Pinecil devices there appears to be an interference iss
- -> 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
- 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 😱
## Feature upgrades:
### MHP30 support
* 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
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.
@@ -120,8 +84,7 @@ 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
@@ -138,8 +101,7 @@ 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
@@ -156,8 +118,7 @@ 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
@@ -165,42 +126,36 @@ 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
@@ -208,33 +163,27 @@ 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
@@ -244,96 +193,80 @@ 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,79 +1,56 @@
# Startup Logo / Animation
# Startup Logos
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.
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.
## Generating the Logo files
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).
There are community logo's already converted 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 the Python script.
You can checkout the repository or use the download-as-zip button in the Github web interface to download the code.
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.
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 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.
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.
The converter requires at least Python3 and Pillow apps. Follow online instructions for installing Python and Pillow.
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.
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:
When running the script on the Windows operating system; it is recommended to use `Powershell` rather than the old `Command Prompt`.
python -m pip install Pillow
or
python3 -m pip install pillow
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`.
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.
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:
Go back to Powershell and type this command (change infile.png to the name of your image):
- `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
- `python img2logo.py infile.png out -m` for Miniware
- `python img2logo.py infile.png out -p` for Pinecil
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.
Run `python img2logo.py --help` to see available options. Replace the word python with python3 if you have multiple versions of python installed.
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
### Upload via virtual disk (TS100,TS101,TS80,TS80P,S60,MHP30)
### Miniware (TS100/TS80/TS80P)
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.
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.
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).
If you have flashed the `IronOS-dfu` alternative bootloader, you should use the `.dfu` files instead
At this point unplug your iron and re-connect it to power to start normally and the logo should welcome you.
### Pinecil V1
### Upload via GUI flash tool (PinecilV1/V2)
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.
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.
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.
### Upload via dfu-util (PinecilV1/IronOS-DFU)
You could also use dfu-util and use Command line to install it.
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.
- `dfu-util -D logo_file.dfu`

View File

@@ -20,8 +20,6 @@ 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 |
@@ -46,8 +44,3 @@ 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

@@ -1,80 +0,0 @@
# 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.

View File

@@ -1,32 +0,0 @@
<!-- 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,18 +14,6 @@ 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`.
@@ -75,23 +63,10 @@ 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 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.
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 stable & feature complete for everyday use with a supported device, _so please suggest any feature improvements you would like!_
This project is considered feature complete for use as a soldering iron, _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,12 +39,6 @@ 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
@@ -76,25 +70,3 @@ 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,4 +9,5 @@ services:
dockerfile: scripts/IronOS.Dockerfile
command: /bin/sh
volumes:
- ./:/build/ironos:Z
- ./scripts/ci:/build/ci:Z
- ./:/build/source:Z

192
Makefile
View File

@@ -19,6 +19,8 @@ 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
@@ -27,14 +29,6 @@ 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
@@ -51,91 +45,64 @@ 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!"
@echo "This is $(INFO)"
@echo "Welcome!\nThis 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 " * 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 "\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 "Patches are welcome. Happy Hacking!"
@echo
# target to list supported targets with additional info
list:
@echo
@echo ""
@echo "Supported top-level targets:"
@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 "\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 ""
@echo "NOTES on supported pass-trough targets:"
@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 "\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
@echo " $$ make firmware-LANG_ID model=MODEL_ID"
@echo "\t> make firmware-LANG_ID model=MODEL_ID"
@echo
@echo "Full list of current supported IDs:"
@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 "\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
@echo "For example, to make a local build of IronOS firmware for TS100 with English language, just type:"
@echo
@echo " $$ make firmware-EN model=TS100"
@echo "\n\t> make firmware-EN model=TS100"
@echo
# 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
# 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' ' '`"
# former start_dev.sh
docker-shell: docker-check $(DOCKER_DEPS)
docker-shell: $(DOCKER_DEPS)
$(DOCKER_CMD)
# former build.sh
docker-build: docker-check $(DOCKER_DEPS)
$(DOCKER_CMD) make build-all
docker-build: $(DOCKER_DEPS)
$(DOCKER_CMD) /bin/bash /build/ci/buildAll.sh
# delete docker image
docker-clean-image:
# delete container
docker-clean:
-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
@@ -144,102 +111,15 @@ 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/ $@
# global clean-up target for produced/generated files inside tree
clean-build:
$(MAKE) -C source/ clean-all
rm -Rf site
rm -Rf $(OUT_DIR)
make -C source/ $@
# global clean-up target
clean-full: clean-build docker-clean
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
# 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,28 +21,18 @@ 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 | 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 | ❌*** | |
| Device | DC | QC | PD | EPR | BLE | Battery | Recommended |
| :--------: | :-: | :-: | :-: | :-: | :-: | :-----: | :---------: |
| MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | | ✔️ |
| Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
| Pinecil V2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| TS80P | ❌ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
| TS100 | ✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ | ❌* |
| TS80 | | ✔️ | ❌ | ❌ | ❌ | ✔️ | ❌** |
_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.
\*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_**.
_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_**.
\**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 Executable file → Normal file
View File

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

View File

@@ -1263,63 +1263,6 @@ 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:
@@ -1327,7 +1270,11 @@ def read_version() -> str:
matches = re.findall(r"\"(.+?)\"", line)
if matches:
version = matches[0]
version += get_version_suffix(version)
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"
return version

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

View File

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

View File

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

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Český",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Kalibrace\ndokončena!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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!"
},
@@ -64,16 +61,16 @@
"message": "Vyp"
},
"ProfilePreheatString": {
"message": "Předehřívání\n"
"message": "Preheat\n"
},
"ProfileCooldownString": {
"message": "Zchlazování\n"
"message": "Cooldown\n"
},
"DeviceFailedValidationWarning": {
"message": "Vaše zařízení je pravěpodobně padělek!"
"message": "Vaše zařízení je s nejvyšší pravděpodobností padělek!"
},
"TooHotToStartProfileWarning": {
"message": "Teplota příliš vysoká pro start profilu"
"message": "Too hot to\nstart profile"
}
},
"characters": {
@@ -156,60 +153,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": "Profilové\nFáze",
"description": "Počet fází v profilovém režimu"
"displayText": "Profile\nPhases",
"description": "Number of phases in profile mode"
},
"ProfilePreheatTemp": {
"displayText": "Teplota\nPředehřátí",
"description": "Teplota na kterou předehřát na začátku profilového režimu"
"displayText": "Preheat\nTemp",
"description": "Preheat to this temperature at the start of profile mode"
},
"ProfilePreheatSpeed": {
"displayText": "Rychlost\nPředehřívání",
"description": "Rychlost předehřívání (stupně za sekundu)"
"displayText": "Preheat\nSpeed",
"description": "Preheat at this rate (degrees per second)"
},
"ProfilePhase1Temp": {
"displayText": "Teplota\nFáze 1",
"description": "Cílová teplota na konci této fáze"
"displayText": "Phase 1\nTemp",
"description": "Target temperature for the end of this phase"
},
"ProfilePhase1Duration": {
"displayText": "Trvání\nFáze 1",
"description": "Doba trvání této fáze (sekundy)"
"displayText": "Phase 1\nDuration",
"description": "Target duration of this phase (seconds)"
},
"ProfilePhase2Temp": {
"displayText": "Teplota\nFáze 2",
"displayText": "Phase 2\nTemp",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Trvání\nFáze 2",
"displayText": "Phase 2\nDuration",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Teplota\nFáze 3",
"displayText": "Phase 3\nTemp",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Trvání\nFáze 3",
"displayText": "Phase 3\nDuration",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Teplota\nFáze 4",
"displayText": "Phase 4\nTemp",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Trvání\nFáze 4",
"displayText": "Phase 4\nDuration",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Teplota\nFáze 5",
"displayText": "Phase 5\nTemp",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Trvání\nFáze 5",
"displayText": "Phase 5\nDuration",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Rychlost\nochlazování",
"description": "Rychlost ochlazování na konci profilového režimu (stupně za sekundu)"
"displayText": "Cooldown\nSpeed",
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
},
"MotionSensitivity": {
"displayText": "Citlivost\nna pohyb",

View File

@@ -3,7 +3,7 @@
"languageLocalName": "Dansk",
"tempUnitFahrenheit": false,
"messagesWarn": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Erfolgreich\nkalibriert!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"WarningThermalRunaway": {
"message": "Thermal\nRunaway"
},
"WarningTipShorted": {
"message": "!Lötspitze\nkurzgeschlossen!"
},
"SettingsCalibrationWarning": {
"message": "Vor dem Neustart bitte sicherstellen, dass Lötspitze & Gerät Raumtemperatur haben!"
},
@@ -61,7 +58,7 @@
"message": "Temp: \n"
},
"OffString": {
"message": "aus"
"message": "Aus"
},
"ProfilePreheatString": {
"message": "Vorwärmen\n"
@@ -145,15 +142,15 @@
},
"TempChangeShortStep": {
"displayText": "Temp-Schritt\nDruck kurz",
"description": "Schrittweite für Temperaturänderung bei kurzem Tastendruck"
"description": "Schrittweite für Temperaturwechsel bei kurzem Tastendruck"
},
"TempChangeLongStep": {
"displayText": "Temp-Schritt\nDruck lang",
"description": "Schrittweite für Temperaturänderung bei langem Tastendruck"
"description": "Schrittweite für Temperaturwechsel 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",
@@ -173,7 +170,7 @@
},
"ProfilePhase1Duration": {
"displayText": "Phase 1\nDauer",
"description": "Dauer dieser Phase (Sekunden)"
"description": "Zieldauer dieser Phase (Sekunden)"
},
"ProfilePhase2Temp": {
"displayText": "Phase 2\nTemperatur",
@@ -217,7 +214,7 @@
},
"SleepTemperature": {
"displayText": "Ruhe-\ntemperatur",
"description": "Ruhetemperatur der Lötspitze"
"description": "Ruhetemperatur der Spitze"
},
"SleepTimeout": {
"displayText": "Ruhever-\nzögerung",

View File

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

View File

@@ -3,7 +3,7 @@
"languageLocalName": "English",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "¡Calibracion\nlista!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Étalonnage\nterminé!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Kalibracija\ndovršena!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Kalibráció\nkész!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibrazione\ncompletata!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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!"
},
@@ -165,7 +162,7 @@
},
"ProfilePreheatSpeed": {
"displayText": "Velocità\npreriscaldamento",
"description": "Imposta la velocità di preriscaldamento [°C/s]"
"description": "Imposta la velocità di preriscaldamento [gradi al secondo]"
},
"ProfilePhase1Temp": {
"displayText": "Temperatura\nfase 1",
@@ -209,7 +206,7 @@
},
"ProfileCooldownSpeed": {
"displayText": "Velocità\nraffreddamento",
"description": "Imposta la velocità di raffreddamento al termine del profilo di riscaldamento [°C/s]"
"description": "Imposta la velocità di raffreddamento al termine del profilo di riscaldamento [gradi al secondo]"
},
"MotionSensitivity": {
"displayText": "Sensibilità\nal movimento",

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

@@ -3,7 +3,7 @@
"languageLocalName": "日本語",
"tempUnitFahrenheit": true,
"messagesWarn": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration done!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Kalibracja\nwykonana!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibração\nefetuada!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
@@ -30,9 +30,6 @@
"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": {
"CalibrationDone": {
"CJCCalibrationDone": {
"message": "Калибровка\nзавершена!"
},
"ResetOKMessage": {
"message": "Готово!"
"message": "Сброс OK"
},
"SettingsResetMessage": {
"message": "Настройки\nсброшены!"
},
"NoAccelerometerMessage": {
"message": "Акселерометр\nне обнаружен!"
"message": "Не определен\nакселерометр!"
},
"NoPowerDeliveryMessage": {
"message": "Питание по USB-PD\nне обнаружено"
"message": "USB-PD питание\nне обнаружено"
},
"LockingKeysString": {
"message": "ЗАБЛОК"
@@ -28,10 +28,7 @@
"message": "!ЗАБЛОК!"
},
"WarningThermalRunaway": {
"message": "Неуправляемый\nразогрев"
},
"WarningTipShorted": {
"message": "!КЗ на жале!"
"message": "Неуправляемый\nРазогрев"
},
"SettingsCalibrationWarning": {
"message": "Пожалуйста, убедитесь, что жало и корпус имеют комнатную температуру при следующей загрузке!"
@@ -43,25 +40,25 @@
"message": "Вы уверены, что хотите сбросить настройки к значениям по умолчанию?"
},
"UVLOWarningString": {
"message": "НИЗ.НАПР"
"message": "НАПРЯЖ--"
},
"UndervoltageString": {
"message": "Низ. напряжение\n"
},
"InputVoltageString": {
"message": "Питание(В):\n"
"message": "Питание В: \n"
},
"SleepingSimpleString": {
"message": "Хххррп"
"message": "Zzzz"
},
"SleepingAdvancedString": {
"message": "Сон...\n"
"message": "Ожидание...\n"
},
"SleepingTipAdvancedString": {
"message": "Жало: \n"
},
"OffString": {
"message": "Выкл"
"message": "Вык"
},
"ProfilePreheatString": {
"message": "Преднагрев\n"
@@ -70,7 +67,7 @@
"message": "Остывание\n"
},
"DeviceFailedValidationWarning": {
"message": "Вероятно, это поддельное устройство!"
"message": "Вероятно, это устройство подделка!"
},
"TooHotToStartProfileWarning": {
"message": "Слишком горячо для\nстарта профиля"
@@ -84,9 +81,9 @@
"SettingSlowChar": "М",
"SettingMediumChar": "С",
"SettingFastChar": "Б",
"SettingStartNoneChar": "О",
"SettingStartNoneChar": "В",
"SettingStartSolderingChar": "П",
"SettingStartSleepChar": "С",
"SettingStartSleepChar": "О",
"SettingStartSleepOffChar": "К",
"SettingLockDisableChar": "О",
"SettingLockBoostChar": "Т",
@@ -94,166 +91,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,7В | 4S-6S: 2,4 - 3,7В)"
"displayText": "Мин.\nнапр.",
"description": "Минимальное разрешенное напряжение на ячейку (3S: 3 - 3,7V | 4S-6S: 2,4 - 3,7V)"
},
"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": "Шаг t° при\nкор.наж-ии",
"displayText": "Шаг темп.\nкор. наж.",
"description": "Шаг изменения температуры при коротком нажатии кнопок"
},
"TempChangeLongStep": {
"displayText": "Шаг t° при\nдол.наж-ии",
"description": "Шаг изменения температуры при долгом нажатии кнопок"
"displayText": "Шаг темп.\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": "Температура\n1-го этапа",
"description": "Необходимая температура в конце 1-го этапа"
"displayText": "Этап 1\nТемпература",
"description": "Целевая температура в конце этого эатпа"
},
"ProfilePhase1Duration": {
"displayText": "Длительность\n1-го этапа",
"description": "Необходимая длительность 1-го этапа (в секундах)"
"displayText": "Этап 1\nДлительность",
"description": "Целевая длительность этого этапа (секунды)"
},
"ProfilePhase2Temp": {
"displayText": "Температура\n2-го этапа",
"displayText": "Этап 2\nТемпература",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Длительность\n2-го этапа",
"displayText": "Этап 2\nДлительность",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Температура\n3-го этапа",
"displayText": "Этап 3\nТемпература",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Длительность\n3-го этапа",
"displayText": "Этап 3\nДлительность",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Температура\n4-го этапа",
"displayText": "Этап 4\nТемпература",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Длительность\n4-го этапа",
"displayText": "Этап 4\nДлительность",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Температура\n5-го этапа",
"displayText": "Этап 5\nТемпература",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Длительность\n5-го этапа",
"displayText": "Этап 5\nДлительность",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Скорость\nостывания",
"description": "Скорость остывания в конце режима термопрофиля (в градусах в секунду)"
"displayText": "Остывание\nСкорость",
"description": "Остывать с такой скоростью в конце режима профиля (градусов в секунду)"
},
"MotionSensitivity": {
"displayText": "Чувствительн.\nакселерометра",
"description": "Чувствительность акселерометра (0=Откл. | 1=мин. | ... | 9=макс.)"
"description": "Чувствительность акселерометра (0=Выкл. | 1=мин. | ... | 9=макс.)"
},
"SleepTemperature": {
"displayText": "t° при\nсне",
"description": "Температура жала в режиме сна"
"displayText": "Темп.\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анимация",
@@ -261,31 +258,31 @@
},
"Brightness": {
"displayText": "Яркость\nэкрана",
"description": "Уровень яркости пикселей на экране"
"description": "Настройки контраста/яркости OLED экрана"
},
"ColourInversion": {
"displayText": "Инверсия\nэкрана",
"description": "Инвертировать пиксели на экране"
"description": "Инвертировать цвета на OLED экране"
},
"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температуры",
@@ -296,20 +293,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": {
"CalibrationDone": {
"message": "Kalibrácia\ndokončená!"
"CJCCalibrationDone": {
"message": "Calibration\ndone!"
},
"ResetOKMessage": {
"message": "Reset OK"
@@ -30,14 +30,11 @@
"WarningThermalRunaway": {
"message": "Únik\nTepla"
},
"WarningTipShorted": {
"message": "!Skrat hrotu!"
},
"SettingsCalibrationWarning": {
"message": "Pred reštartovaním sa uistite, že hrot a rúčka sú v izbovej teplote!"
"message": "Before rebooting, make sure tip & handle are at room temperature!"
},
"CJCCalibrating": {
"message": "kalibrovanie\n"
"message": "calibrating\n"
},
"SettingsResetWarning": {
"message": "Naozaj chcete obnoviť továrenské nastavenia?"
@@ -64,16 +61,16 @@
"message": "Vyp"
},
"ProfilePreheatString": {
"message": "Predhrievanie\n"
"message": "Preheat\n"
},
"ProfileCooldownString": {
"message": "Schladzovanie\n"
"message": "Cooldown\n"
},
"DeviceFailedValidationWarning": {
"message": "Vaše zariadenie je pravdepodobne falzifikát!"
},
"TooHotToStartProfileWarning": {
"message": "Teplota príliš vysoká pre štart profilu"
"message": "Too hot to\nstart profile"
}
},
"characters": {
@@ -133,7 +130,7 @@
},
"PDVpdo": {
"displayText": "PD\nVPDO",
"description": "Zapína PPS & EPR režimy"
"description": "Enables PPS & EPR modes"
},
"BoostTemperature": {
"displayText": "Boost\nteplota",
@@ -156,60 +153,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": "Profilové\nFázy",
"description": "Počet fáz v profilovóm režime"
"displayText": "Profile\nPhases",
"description": "Number of phases in profile mode"
},
"ProfilePreheatTemp": {
"displayText": "Teplota\nPredhriatia",
"description": "Teplota na ktorú sa má predohriať na začiatku profilového režimu"
"displayText": "Preheat\nTemp",
"description": "Preheat to this temperature at the start of profile mode"
},
"ProfilePreheatSpeed": {
"displayText": "Rýchlosť\nPredhriatia",
"description": "Rýchlosť predhrievania (stupňe za sekundu)"
"displayText": "Preheat\nSpeed",
"description": "Preheat at this rate (degrees per second)"
},
"ProfilePhase1Temp": {
"displayText": "Teplota\nFáza 1",
"description": "Cieľová teplota na konci tejto fázy"
"displayText": "Phase 1\nTemp",
"description": "Target temperature for the end of this phase"
},
"ProfilePhase1Duration": {
"displayText": "Trvanie\nFáza 1",
"description": "Doba trvania tejto fázy (sekundy)"
"displayText": "Phase 1\nDuration",
"description": "Target duration of this phase (seconds)"
},
"ProfilePhase2Temp": {
"displayText": "Teplota\nFáza 2",
"displayText": "Phase 2\nTemp",
"description": ""
},
"ProfilePhase2Duration": {
"displayText": "Trvanie\nFáza 2",
"displayText": "Phase 2\nDuration",
"description": ""
},
"ProfilePhase3Temp": {
"displayText": "Teplota\nFáza 3",
"displayText": "Phase 3\nTemp",
"description": ""
},
"ProfilePhase3Duration": {
"displayText": "Trvanie\nFáza 3",
"displayText": "Phase 3\nDuration",
"description": ""
},
"ProfilePhase4Temp": {
"displayText": "Teplota\nFáza 4",
"displayText": "Phase 4\nTemp",
"description": ""
},
"ProfilePhase4Duration": {
"displayText": "Trvanie\nFáza 4",
"displayText": "Phase 4\nDuration",
"description": ""
},
"ProfilePhase5Temp": {
"displayText": "Teplota\nFáza 5",
"displayText": "Phase 5\nTemp",
"description": ""
},
"ProfilePhase5Duration": {
"displayText": "Trvanie\nFáza 4",
"displayText": "Phase 5\nDuration",
"description": ""
},
"ProfileCooldownSpeed": {
"displayText": "Rýchlosť\nochladzovania",
"description": "Rýchlosť ochladzovania na konci profilového režimu (stupne za sekundu)"
"displayText": "Cooldown\nSpeed",
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
},
"MotionSensitivity": {
"displayText": "Citlivosť\npohybu",
@@ -281,15 +278,15 @@
},
"BluetoothLE": {
"displayText": "Bluetooth\n",
"description": "Zapne BLE"
"description": "Enables BLE"
},
"PowerLimit": {
"displayText": "Obmedzenie\nvýkonu",
"description": "Obmedzenie výkonu podľa použitého zdroja (watt)"
},
"CalibrateCJC": {
"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)"
"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)"
},
"VoltageCalibration": {
"displayText": "Kalibrácia\nnap. napätia",

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
{
"messagesWarn": [{
"id": "CalibrationDone",
"description": "Confirmation message indicating calibration is complete."
"id": "CJCCalibrationDone",
"description": "Confirmation message indicating CJC calibration is complete."
},
{
"id": "ResetOKMessage",
@@ -17,9 +17,7 @@
},
{
"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."
},
{
@@ -37,12 +35,7 @@
{
"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."
},
@@ -57,66 +50,50 @@
{
"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."
},
{
@@ -132,14 +109,11 @@
{
"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."
@@ -213,15 +187,11 @@
"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."
},
{
@@ -249,50 +219,39 @@
"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."
},
{
@@ -329,126 +288,98 @@
"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."
},
{
@@ -461,18 +392,14 @@
"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."
},
{
@@ -485,9 +412,7 @@
"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."
},
{
@@ -500,9 +425,7 @@
"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."
},
{
@@ -569,9 +492,7 @@
"id": "BluetoothLE",
"maxLen": 7,
"maxLen2": 15,
"include": [
"BLE_ENABLED"
],
"include": ["BLE_ENABLED"],
"description": "Should BLE be enabled at boot time."
},
{
@@ -623,4 +544,4 @@
"description": "Changes the device language on multi-lingual builds."
}
]
}
}

View File

@@ -3,21 +3,19 @@ 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
@@ -36,15 +34,12 @@ 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
@@ -52,6 +47,7 @@ plugins:
- awesome-pages
- git-revision-date
# Markdown Extensions
markdown_extensions:
- attr_list

View File

@@ -1,35 +1,29 @@
# Default Reference Distro for development env & deploy:
# * Alpine Linux, version 3.16 *
FROM alpine:3.16
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
# 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"
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"
ARG APK_PYTHON="python3 py3-pip black"
ARG APK_MISC="findutils make git diffutils zip"
ARG APK_DEV="musl-dev clang bash clang-extra-tools shellcheck"
ARG APK_MISC="findutils make git"
ARG APK_DEV="musl-dev clang bash clang-extra-tools"
# 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'
# PIP packages
ARG PIP_PKGS='bdflib'
# Install system packages using alpine package manager
RUN apk add --no-cache ${APK_COMPS} ${APK_PYTHON} ${APK_MISC} ${APK_DEV}
# Install Python3 packages as modules using pip
# Install Python3 packages
RUN python3 -m pip install ${PIP_PKGS}
# Git trust
RUN git config --global --add safe.directory /build/source
# 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
COPY . /build/source
COPY ./scripts/ci /build/ci

13
scripts/ci/buildAll.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/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

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

View File

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

View File

@@ -3,140 +3,24 @@
# 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 (docker related):"
echo "CMD:"
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 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 "\tclean - delete created docker container (but not pre-downloaded data for it)\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)
@@ -158,29 +42,6 @@ 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
@@ -188,19 +49,33 @@ 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 make build-all OUT=${OUT}"
docker_cmd="run --rm builder /bin/bash /build/ci/buildAll.sh"
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
@@ -212,3 +87,4 @@ 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,7 +19,6 @@ AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortEnumsOnASingleLine: false ### <<< Keeps enums as is
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false

View File

@@ -3,11 +3,9 @@
#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
*
@@ -103,11 +101,6 @@ 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,8 +19,9 @@ void power_check();
// Returns the tip resistance in x10 ohms, so 7.5 = 75; 14=140 etc
uint8_t getTipResistanceX10();
uint16_t getTipThermalMass();
uint16_t getTipInertia();
uint8_t getTipThermalMass();
uint8_t getTipInertia();
#ifdef __cplusplus
}

View File

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

View File

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

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,9 +154,8 @@ 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 */
@@ -192,9 +191,8 @@ 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,12 +6,10 @@
*/
#include "Setup.h"
#include "TipThermoModel.h"
#include "Types.h"
#include "Utils.h"
#include "configuration.h"
extern uint16_t tipSenseResistancex10Ohms;
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) {
extern uint16_t tipSenseResistancex10Ohms;
uint32_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 0 // Minutes -- Default shutdown to being off
#define SLEEP_TIME 5 // x10 Seconds
#define SHUTDOWN_TIME 10 // Minutes
/**
* 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 + (126 * 1024))
#define FLASH_LOGOADDR (0x08000000 + (62 * 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,7 +1,6 @@
// BSP mapping functions
#include "BSP.h"
#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "Pins.h"
#include "Setup.h"
@@ -285,7 +284,6 @@ void performTipResistanceSampleReading() {
tipResistanceReadingSlot++;
}
bool tipShorted = false;
void FinishMeasureTipResistance() {
// Otherwise we now have the 4 samples;
@@ -305,8 +303,6 @@ 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 {
@@ -376,7 +372,7 @@ uint64_t getDeviceID() {
uint8_t preStartChecksDone() {
#ifdef TIP_RESISTANCE_SENSE_Pin
return (lastTipResistance == 0 || tipResistanceReadingSlot < numTipResistanceReadings || tipMeasurementOccuring || tipShorted) ? 0 : 1;
return (lastTipResistance == 0 || tipResistanceReadingSlot < numTipResistanceReadings || tipMeasurementOccuring) ? 0 : 1;
#else
return 1;
#endif
@@ -391,12 +387,8 @@ uint8_t getTipResistanceX10() {
return TIP_RESISTANCE;
#endif
}
#ifdef TIP_RESISTANCE_SENSE_Pin
bool isTipShorted() { return tipShorted; }
#else
bool isTipShorted() { return false; }
#endif
uint16_t getTipThermalMass() {
uint8_t getTipThermalMass() {
#ifdef TIP_RESISTANCE_SENSE_Pin
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
@@ -406,7 +398,7 @@ uint16_t getTipThermalMass() {
return TIP_THERMAL_MASS;
#endif
}
uint16_t getTipInertia() {
uint8_t getTipInertia() {
#ifdef TIP_RESISTANCE_SENSE_Pin
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
@@ -415,6 +407,4 @@ uint16_t getTipInertia() {
#else
return TIP_THERMAL_MASS;
#endif
}
void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }
}

View File

@@ -229,9 +229,8 @@ 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 */
@@ -273,9 +272,8 @@ 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]));
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }

View File

@@ -10,6 +10,7 @@
#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,7 +208,9 @@ static void prvTaskExitError(void) {
// therefore not output an 'unreachable code' warning for code that appears
// after it. */
// }
for (;;) {}
for(;;){
}
}
/*-----------------------------------------------------------*/

View File

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

View File

@@ -1,7 +1,6 @@
// BSP mapping functions
#include "BSP.h"
#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "IRQ.h"
#include "Pins.h"
@@ -94,10 +93,8 @@ 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; }
uint16_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint16_t getTipInertia() { return TIP_THERMAL_MASS; }
void showBootLogo(void) { BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); }
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint8_t getTipInertia() { return TIP_THERMAL_MASS; }

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,19 +40,18 @@ 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]));
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }

View File

@@ -136,7 +136,8 @@
#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 20 // Maximum voltage for PD to negotiate
#define USB_PD_VMAX 24 // Maximum voltage for PD to negotiate
#define POW_EPR 1 // EPR mode is tentatively enabled
#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,7 +1,6 @@
// BSP mapping functions
#include "BSP.h"
#include "BootLogo.h"
#include "I2C_Wrapper.hpp"
#include "IRQ.h"
#include "Pins.h"
@@ -11,14 +10,13 @@
#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;
uint8_t holdoffTicks = 25; // This is the tick delay before temp measure starts (i.e. time for op-amp recovery)
uint8_t tempMeasureTicks = 25;
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;
uint16_t totalPWM = 255; // Total length of the cycle's ticks
@@ -160,8 +158,18 @@ uint8_t getTipResistanceX10() {
return lastTipResistance;
}
uint16_t getTipThermalMass() { return 120; }
uint16_t getTipInertia() { return 750; }
uint8_t getTipThermalMass() {
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
}
return 45;
}
uint8_t getTipInertia() {
if (lastTipResistance >= 80) {
return TIP_THERMAL_MASS;
}
return 10;
}
// 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
@@ -170,7 +178,7 @@ uint16_t getTipInertia() { return 750; }
// 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 measurable
// Which is definitely measureable
// 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() {
@@ -179,7 +187,7 @@ void performTipResistanceSampleReading() {
gpio_write(TIP_RESISTANCE_SENSE, tipResistanceReadingSlot == 0);
tipResistanceReadingSlot++;
}
bool tipShorted = false;
void FinishMeasureTipResistance() {
// Otherwise we now have the 4 samples;
@@ -198,8 +206,6 @@ 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 {
@@ -209,8 +215,8 @@ void FinishMeasureTipResistance() {
}
volatile bool tipMeasurementOccuring = true;
volatile TickType_t nextTipMeasurement = 100;
bool isTipShorted() { return tipShorted; }
void performTipMeasurementStep() {
void performTipMeasurementStep() {
// Wait 100ms for settle time
if (xTaskGetTickCount() < (nextTipMeasurement)) {
@@ -232,8 +238,7 @@ uint8_t preStartChecks() {
performTipMeasurementStep();
return preStartChecksDone();
}
// 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; }
uint8_t preStartChecksDone() { return (lastTipResistance == 0 || tipResistanceReadingSlot < numTipResistanceReadings || tipMeasurementOccuring) ? 0 : 1; }
// Return hardware unique ID if possible
uint64_t getDeviceID() {
@@ -273,11 +278,4 @@ 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,9 +40,8 @@ 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) {
@@ -64,10 +63,8 @@ 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 /* This basically smooths over one PWM cycle / set of readings */
#define ADC_Filter_Smooth 4
history<uint16_t, ADC_Filter_Smooth> ADC_Vin;
history<uint16_t, ADC_Filter_Smooth> ADC_Temp;
history<uint16_t, ADC_Filter_Smooth> ADC_Tip;
// 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) {
volatile uint8_t ADCBurstCounter = 0;
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()) {
uint32_t reading = ADC_Read_FIFO();
ADCBurstCounter++;
volatile 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,16 +43,23 @@ void adc_fifo_irq(void) {
case VIN_ADC_CHANNEL:
ADC_Vin.update(sample);
break;
default:
break;
}
}
// unblock the PID controller thread
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if (pidTaskNotification) {
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
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);
}
}
}
}
@@ -60,21 +67,19 @@ void adc_fifo_irq(void) {
ADC_IntClr(ADC_INT_ALL);
}
volatile bool inFastPWMMode = false;
static bool fastPWM = false;
static void switchToFastPWM(void);
static void switchToSlowPWM(void);
volatile uint16_t PWMSafetyTimer = 0;
volatile uint8_t pendingPWM = 0;
volatile bool pendingNextPeriodIsFast = false;
volatile uint16_t PWMSafetyTimer = 0;
volatile uint8_t pendingPWM = 0;
volatile bool lastPeriodWasFast = false;
void start_PWM_output(void) {
if (PWMSafetyTimer) {
PWMSafetyTimer--;
if (pendingNextPeriodIsFast != inFastPWMMode) {
if (pendingNextPeriodIsFast) {
if (lastPeriodWasFast != fastPWM) {
if (fastPWM) {
switchToFastPWM();
} else {
switchToSlowPWM();
@@ -91,87 +96,55 @@ 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) {
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);
TIMER_Disable(TIMER_CH0);
ADC_Start();
}
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) {
inFastPWMMode = true;
holdoffTicks = 10;
tempMeasureTicks = 10;
totalPWM = powerPWM + tempMeasureTicks + holdoffTicks;
fastPWM = true;
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, 10);
tmpVal = BL_SET_REG_BITS_VAL(tmpVal, TIMER_TCDR2, 11);
BL_WR_REG(TIMER_BASE, TIMER_TCDR, tmpVal);
}
void switchToSlowPWM(void) {
// 5Hz
inFastPWMMode = false;
holdoffTicks = 5;
tempMeasureTicks = 5;
totalPWM = powerPWM + tempMeasureTicks + holdoffTicks;
fastPWM = false;
totalPWM = powerPWM + tempMeasureTicks / 2 + holdoffTicks / 2;
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_2, totalPWM);
// Adjust ADC
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_0, powerPWM + holdoffTicks);
TIMER_SetCompValue(TIMER_CH0, TIMER_COMP_ID_0, powerPWM + (holdoffTicks / 2));
// Set divider for ~ 5Hz
// Set divider to 22
uint32_t tmpVal = BL_RD_REG(TIMER_BASE, TIMER_TCDR);
tmpVal = BL_SET_REG_BITS_VAL(tmpVal, TIMER_TCDR2, 20);
tmpVal = BL_SET_REG_BITS_VAL(tmpVal, TIMER_TCDR2, 22);
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;
pendingNextPeriodIsFast = shouldUseFastModePWM;
pendingPWM = pulse;
fastPWM = shouldUseFastModePWM;
}
extern osThreadId POWTaskHandle;
@@ -213,6 +186,5 @@ uint16_t getADCHandleTemp(uint8_t sample) { return ADC_Temp.average(); }
uint16_t getADCVin(uint8_t sample) { return ADC_Vin.average(); }
// 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
// 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
uint16_t getTipRawTemp(uint8_t sample) { return ADC_Tip.average() >> 1; }

View File

@@ -21,6 +21,7 @@ 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,20 +80,21 @@
#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;
/*-----------------------------------------------------------*/
@@ -104,7 +105,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 );
/*-----------------------------------------------------------*/
@@ -113,14 +114,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
@@ -130,354 +131,420 @@ 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;
/* 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();
}
} 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();
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 )
{
/* Add this block to the list of free blocks. */
xFreeBytesRemaining += pxLink->xBlockSize;
traceFREE( pv, pxLink->xBlockSize );
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
xNumberOfSuccessfulFrees++;
/* 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();
}
}
( void ) xTaskResumeAll();
} else {
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
{
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();
}
} else {
mtCOVERAGE_TEST_MARKER();
}
}
}
/*-----------------------------------------------------------*/
size_t xPortGetFreeHeapSize( void ) { return xFreeBytesRemaining; }
/*-----------------------------------------------------------*/
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;
size_t xPortGetMinimumEverFreeHeapSize( void ) { return xMinimumEverFreeBytesRemaining; }
/*-----------------------------------------------------------*/
/* Can only call once! */
configASSERT( pxEnd == NULL );
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 ] );
}
xMinimumEverFreeBytesRemaining = xTotalHeapSize;
xFreeBytesRemaining = xTotalHeapSize;
while( pxHeapRegion->xSizeInBytes > 0 )
{
xTotalRegionSize = pxHeapRegion->xSizeInBytes;
/* Check something was actually defined before it is accessed. */
configASSERT( xTotalHeapSize );
/* Ensure the heap region starts on a correctly aligned boundary. */
xAddress = ( size_t ) pxHeapRegion->pucStartAddress;
/* Work out the position of the top bit in a size_t variable. */
xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 );
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 );
}
/*-----------------------------------------------------------*/
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;
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 );
}
/* 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 );
}
}
( void ) xTaskResumeAll();
( void ) xTaskResumeAll();
pxHeapStats->xSizeOfLargestFreeBlockInBytes = xMaxSize;
pxHeapStats->xSizeOfSmallestFreeBlockInBytes = xMinSize;
pxHeapStats->xNumberOfFreeBlocks = xBlocks;
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();
taskENTER_CRITICAL();
{
pxHeapStats->xAvailableHeapSpaceInBytes = xFreeBytesRemaining;
pxHeapStats->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations;
pxHeapStats->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees;
pxHeapStats->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining;
}
taskEXIT_CRITICAL();
}

View File

@@ -19,13 +19,15 @@ uint16_t ADCReadings[ADC_NORM_SAMPLES]; // room for 32 lots of the pair of readi
// Heap
extern uint8_t _heap_start;
extern uint8_t _heap_size; // @suppress("Type cannot be resolved")
extern uint8_t __HeapBase;
extern uint8_t __HeapLimit; // @suppress("Type cannot be resolved")
const uint32_t _heap_size = ((&__HeapLimit) - (&__HeapBase));
static HeapRegion_t xHeapRegions[] = {
{&_heap_start, (unsigned int)&_heap_size},
{&__HeapBase, (unsigned int)_heap_size},
{NULL, 0}, /* Terminates the array. */
{NULL, 0} /* Terminates the array. */
};
// Functions
void setup_timer_scheduler(void);
@@ -102,7 +104,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_16_AVERAGE;
adc_cfg.resWidth = ADC_DATA_WIDTH_14_WITH_64_AVERAGE;
adc_cfg.inputMode = ADC_INPUT_SINGLE_END;
adc_cfg.v18Sel = ADC_V18_SEL_1P72V;
adc_cfg.v11Sel = ADC_V11_SEL_1P1V;
@@ -111,7 +113,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 = DISABLE;
adc_cfg.offsetCalibEn = ENABLE;
adc_cfg.offsetCalibVal = 0;
ADC_Disable();
@@ -120,7 +122,7 @@ void setup_adc(void) {
ADC_Init(&adc_cfg);
adc_fifo_cfg.dmaEn = DISABLE;
adc_fifo_cfg.fifoThreshold = ADC_FIFO_THRESHOLD_8; // Triger FIFO when all 8 measurements are done
adc_fifo_cfg.fifoThreshold = ADC_FIFO_THRESHOLD_8;
ADC_FIFO_Cfg(&adc_fifo_cfg);
ADC_MIC_Bias_Disable();
ADC_Tsen_Disable();
@@ -138,29 +140,26 @@ void setup_timer_scheduler() {
TIMER_Disable(TIMER_CH0);
TIMER_CFG_Type cfg = {
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_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_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 uint8_t holdoffTicks;
extern uint8_t tempMeasureTicks;
void setupFUSBIRQ();
extern const uint8_t holdoffTicks;
extern const 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));
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }
uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return Utils::InterpolateLookupTable(uVtoDegC, uVtoDegCItems, tipuVDelta); }

View File

@@ -21,7 +21,6 @@
*
*/
#include "bflb_platform.h"
#include "drv_mmheap.h"
#include "hal_common.h"
#include "hal_flash.h"
#include "hal_mtimer.h"
@@ -33,11 +32,8 @@ 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; }
@@ -92,14 +88,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,18 +17,17 @@ OUTPUT_ARCH( "riscv" )
/* configure the entry point */
ENTRY(_enter)
StackSize = 0x1000; /* 4KB */
__EM_SIZE =8K;
StackSize = 0x800; /* 2KB */
__EM_SIZE = DEFINED(ble_controller_init) ? 8K : 0K;
MEMORY
{
xip_memory (rx) : ORIGIN = 0x23000000, LENGTH = 1008K /*1024 - 8K header - 4K*2 for settings and logo*/
xip_memory (rx) : ORIGIN = 0x23000000, LENGTH = 1022K
itcm_memory (rx) : ORIGIN = 0x22014000, LENGTH = 12K
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*/
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*/
}
SECTIONS
@@ -92,12 +91,13 @@ 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,6 +105,7 @@ 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 = .);
@@ -112,6 +113,7 @@ 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
@@ -135,6 +137,7 @@ SECTIONS
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
} >xip_memory AT>xip_memory
.dtors :
{
KEEP (*crtbegin.o(.dtors))
@@ -143,11 +146,13 @@ 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 = .;
@@ -177,7 +182,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)
{
@@ -203,6 +208,8 @@ 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
@@ -219,6 +226,7 @@ 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")
/*************************************************************************/
@@ -318,7 +326,5 @@ 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

@@ -1,421 +0,0 @@
/**
* @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

@@ -1,159 +0,0 @@
/**
* @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,44 +1,43 @@
/**
******************************************************************************
* @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 "bl702_common.h"
#include "pwm_reg.h"
#include "bl702_common.h"
/** @addtogroup BL702_Peripheral_Driver
* @{
@@ -56,60 +55,61 @@
* @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,27 +121,37 @@ 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 */
@@ -163,21 +173,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);
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);
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);
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,18 +354,7 @@ 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,61 +1,70 @@
#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 "hal_clock.h"
#include "hci_core.h"
#include "log.h"
#include "uuid.h"
#include <FreeRTOS.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <FreeRTOS.h>
#include "bflb_platform.h"
#include <task.h>
#include "BSP.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"
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");
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");
}
/* 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");
while (1) {
;
}
}
void vApplicationMallocFailedHook(void)
{
MSG("vApplicationMallocFailedHook\r\n");
while (1)
;
}

View File

@@ -113,9 +113,8 @@ 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,9 +258,7 @@ 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,7 +10,6 @@ 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,22 +160,15 @@
#define HALL_SI7210
#define DEBUG_UART_OUTPUT
#define HAS_POWER_DEBUG_MENU
#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
#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
#endif /* Pinecilv2 */
#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 FLASH_LOGOADDR (0x23000000 + (1022 * 1024))
#define FLASH_PAGE_SIZE (1024)
#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