mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Compare commits
87 Commits
v2.23-rc1
...
b82beee7eb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b82beee7eb | ||
|
|
05158321ba | ||
|
|
f810921b0c | ||
|
|
2b8568ce37 | ||
|
|
d122a9fb52 | ||
|
|
57c8a35041 | ||
|
|
3ed86d2acf | ||
|
|
7c6ce812f6 | ||
|
|
c92bf89296 | ||
|
|
8a392b5364 | ||
|
|
68aac2847b | ||
|
|
dc2b91c879 | ||
|
|
ebdff59293 | ||
|
|
08ff68cd4f | ||
|
|
4ce63fab47 | ||
|
|
02bc98e41e | ||
|
|
f01ab47647 | ||
|
|
c7b029482e | ||
|
|
e2c4ea4589 | ||
|
|
5797d5a68b | ||
|
|
ab1fa24863 | ||
|
|
22d0676a5c | ||
|
|
aa0784d34c | ||
|
|
f67cc25acc | ||
|
|
dfddd5916a | ||
|
|
a5560ae4ea | ||
|
|
fd91cf9f35 | ||
|
|
b401dc8264 | ||
|
|
a3082c389e | ||
|
|
42fb9e1105 | ||
|
|
169d9e6956 | ||
|
|
000eba7b8c | ||
|
|
5cf9d5bfff | ||
|
|
5347385b28 | ||
|
|
1e285a6a5c | ||
|
|
989a2cf2d5 | ||
|
|
ee6aff54b3 | ||
|
|
6cf9916a6e | ||
|
|
5f38e1812c | ||
|
|
0a63b6b5df | ||
|
|
71a1e2a367 | ||
|
|
37efde3d15 | ||
|
|
d899dc7433 | ||
|
|
a9e899c1ec | ||
|
|
1d9b16e963 | ||
|
|
867f1fcb0d | ||
|
|
02580dab2e | ||
|
|
17f15bca98 | ||
|
|
35fd2f545f | ||
|
|
b036da9dcc | ||
|
|
2679a791d9 | ||
|
|
4b340c52bc | ||
|
|
e667189f45 | ||
|
|
a132d37dc6 | ||
|
|
fcb1b3785f | ||
|
|
a2734eed9e | ||
|
|
e79687e1e8 | ||
|
|
ae21be2913 | ||
|
|
fa3d4d49d5 | ||
|
|
693c1a3f2f | ||
|
|
f21630eb79 | ||
|
|
4634fa8ba7 | ||
|
|
6ad0b65bff | ||
|
|
69493ba212 | ||
|
|
e6a3f380e1 | ||
|
|
56b91ac13c | ||
|
|
0d74f773b2 | ||
|
|
51e08f3992 | ||
|
|
e9117269ef | ||
|
|
c776390ac3 | ||
|
|
a626d5a9c1 | ||
|
|
c8c36d29bf | ||
|
|
b772e1dc26 | ||
|
|
8514edfdea | ||
|
|
f5d6d8b1af | ||
|
|
da28492f00 | ||
|
|
6ef1fbd46a | ||
|
|
6e53d85b32 | ||
|
|
31ff398150 | ||
|
|
a2615a57b8 | ||
|
|
e327be5bd8 | ||
|
|
a306de5c37 | ||
|
|
2c5d2a08ed | ||
|
|
5ea42a8bbf | ||
|
|
a3b7abbf0e | ||
|
|
1521b5ea31 | ||
|
|
653a0803e2 |
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -24,6 +24,8 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12.3'
|
||||
|
||||
- run: |
|
||||
pip install --upgrade pip &&
|
||||
|
||||
5
.github/workflows/push.yml
vendored
5
.github/workflows/push.yml
vendored
@@ -26,6 +26,7 @@ jobs:
|
||||
"S60",
|
||||
"S60P",
|
||||
"T55",
|
||||
"S99",
|
||||
"TS101",
|
||||
]
|
||||
fail-fast: true
|
||||
@@ -215,7 +216,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Install dependencies (apk)
|
||||
run: apk add --no-cache git
|
||||
run: apk add --no-cache git bash grep
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -227,4 +228,4 @@ jobs:
|
||||
run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Check and verify documentation
|
||||
run: /bin/sh ./scripts/deploy.sh docs
|
||||
run: ./scripts/deploy.sh docs
|
||||
|
||||
@@ -40,9 +40,9 @@ I.e.:
|
||||
|
||||
**Additional scroll-able items appear in this order**:
|
||||
|
||||
### Date
|
||||
### Timestamp
|
||||
|
||||
- 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)
|
||||
- This is a timestamp of firmware compilation and it has the following format: `YYYYMMDD HHMMSS` (i.e., `20230701 213456` means it has been built in July, 1st, 2023 at 9:34:56 pm)
|
||||
|
||||
### ID
|
||||
|
||||
@@ -104,7 +104,7 @@ This can be used for checking performance of the movement detection code.
|
||||
|
||||
This indicates the tip resistance that the device is currently using. For devices with multiple possible values to choose from (Pinecil V2), the appropriate value is automatically detected at every boot-up. Tip should be installed before boot-up or reading can not be done.
|
||||
|
||||
### Tip R
|
||||
### Tip uV
|
||||
|
||||
This is the raw tip reading in μV. Tip must be installed or reading will be high/inaccurate. At cool, the range of 700-1000 is normal for larger tips and ~1500 for smaller tips (TS80). This is used to evaluate the calibration routines.
|
||||
|
||||
|
||||
@@ -14,6 +14,42 @@ You will need to update the build settings for include paths and point to the ne
|
||||
In the `source` folder there is a `Makefile` that can be used to build the repository using command line tools.
|
||||
When running the `make` command, specify which model of the device and the language(s) you would like to use.
|
||||
|
||||
### Windows (MSYS2 environment)
|
||||
|
||||
1. Download `msys2` install package from the [official website](https://msys2.org) and install it according to the instruction there;
|
||||
2. Install requried packages (here and for the future commands use **`mingw64.exe`** terminal):
|
||||
```
|
||||
$ pacman -S mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-libwinpthread-git python3 python3-pip make unzip git
|
||||
```
|
||||
3. Download _3rd party RISC-V toolchain_ `xpack-riscv-none-elf-gcc-...-win32-x64.zip` from [this repository](https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases);
|
||||
4. Move downloaded `xpack-riscv-none-elf-gcc-...-win32-x64.zip` to `msys64` _Windows_ directory (e.g., `C:\msys64\`);
|
||||
5. Extract files from `xpack-riscv-none-elf-gcc-...-win32-x64.zip` and go back to _home_ directory:
|
||||
```
|
||||
$ cd /
|
||||
$ unzip xpack-riscv-none-elf-gcc-...-win32-x64.zip
|
||||
$ cd ~
|
||||
```
|
||||
6. Permanently set `PATH` environment variable, so all required toolchains could be available for `make` and for other build scripts:
|
||||
```
|
||||
$ echo 'export PATH=/xpack-riscv-none-elf-gcc-.../bin:${PATH}' >> ~/.bashrc
|
||||
$ source ~/.bashrc
|
||||
```
|
||||
7. Additionally, `OpenOCD` and/or `ST-Link` can be installed as well to help with flashing:
|
||||
```
|
||||
$ pacman -S mingw-w64-x86_64-openocd
|
||||
$ pacman -S mingw-w64-x86_64-stlink
|
||||
```
|
||||
8. Clone _IronOS_ repo:
|
||||
```
|
||||
$ git clone --recursive https://github.com/Ralim/IronOS.git
|
||||
$ cd IronOS
|
||||
```
|
||||
9. Follow steps _4-8_ from [macOS section](#macos);
|
||||
10. `pip` can be updated inside `venv` only:
|
||||
```
|
||||
$ python3 -m pip install --upgrade pip
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
||||
Use the following steps to set up a build environment for IronOS on the command line (in Terminal).
|
||||
|
||||
@@ -39,7 +39,7 @@ The model should be replaced by one of the following options:
|
||||
- `pinecilv1` for the Pinecil V1
|
||||
- `pinecilv2` for the Pinecil V2
|
||||
- `ts101` for the Miniware TS101 [^1] [^2]
|
||||
- `s60` for the Squire S60 [^1]
|
||||
- `s60` for the Sequre S60 [^1]
|
||||
- `mhp30` for the Miniware MHP30
|
||||
|
||||
Different models are used for different flash locations for the image storage.
|
||||
|
||||
4
Makefile
4
Makefile
@@ -52,7 +52,7 @@ DOCKER_CMD=$(DOCKER_BIN) -f $(DOCKER_YML) run --rm builder
|
||||
MKDOCS_YML=$(CURDIR)/scripts/IronOS-mkdocs.yml
|
||||
|
||||
# supported models
|
||||
MODELS=TS100 TS80 TS80P Pinecil MHP30 Pinecilv2 S60 TS101 S60P T55 # target names & dir names
|
||||
MODELS=TS100 TS80 TS80P Pinecil MHP30 Pinecilv2 S60 TS101 S60P T55 S99 # target names & dir names
|
||||
MODELS_ML=Pinecil Pinecilv2 # target names
|
||||
MODELS_MULTILANG=Pinecil_multi-lang Pinecilv2_multi-lang # dir names
|
||||
|
||||
@@ -149,7 +149,7 @@ test-md:
|
||||
@echo ""
|
||||
@echo "---- Checking documentation... ----"
|
||||
@echo ""
|
||||
@/bin/sh ./scripts/deploy.sh docs
|
||||
@./scripts/deploy.sh docs
|
||||
|
||||
# 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:
|
||||
|
||||
26
README.md
26
README.md
@@ -23,14 +23,15 @@ _This firmware does **NOT** support the USB port while running for changing sett
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
| Device | DC | QC | PD | EPR | BLE | Tip Sense | Recommended Purchase | Notes |
|
||||
| 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. |
|
||||
| Sequre S60P | ❌ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | Full OLED resolution not yet supported. |
|
||||
| Sequre S60P | ✔️ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | Full OLED resolution not yet supported. |
|
||||
| Sequre S99 | ✔️ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | Full OLED resolution not yet supported. |
|
||||
| Sequre T55 | ❌ | ❌ | ✔️ | ❌ | ❌ | N/A | ✔️ | Full OLED resolution not yet supported. |
|
||||
| Miniware TS80P | ❌ | ✔️ | ✔️ | ❌ | ❌ | N/A | ✔️ | |
|
||||
| Miniware TS100 | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌\*\* | |
|
||||
@@ -48,6 +49,9 @@ The _TS101_ & _S60(P)_ irons and _MHP30_ & _T55_ plates feature a higher resolut
|
||||
|
||||
\*\*\* _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_**.
|
||||
|
||||
\*\*\*\* **EPR/PPS with 28V support** is _**disabled by default**_ due to [safety concerns](https://github.com/Ralim/IronOS/pull/2073), but to turn it back on set
|
||||
_PD Mode_ option in _Power settings_ submenu to _Safe_ or _Default_.
|
||||
|
||||
## Getting Started
|
||||
|
||||
To get started with _IronOS firmware_, please jump to [Getting Started Guide](https://ralim.github.io/IronOS/GettingStarted/).
|
||||
@@ -139,6 +143,22 @@ After powering on the device for the first time with _IronOS_ installed and havi
|
||||
|
||||
Additional details are described in the [menu information](https://ralim.github.io/IronOS/Menu/).
|
||||
|
||||
## Remote Control
|
||||
|
||||
### Pinecil V2 only
|
||||
|
||||
Pinecil V2 has [_Bluetooth Low Energy_ module](https://ralim.github.io/IronOS/Bluetooth), which is supported by _IronOS_ since `2.21` release to control some of the settings using additional tools like [PineSAM](https://github.com/builder555/PineSAM) or [PineTool](https://github.com/lachlanbell/PineTool). In `2.21` and `2.22` releases the module was _on_ by default. However, **_Bluetooth_ is turned off in the settings by default in current `dev` builds and for the next releases** [due to security concerns](#1856).[^ble]
|
||||
|
||||
To enable _Bluetooth_ back:
|
||||
- go to _Settings_ menu;
|
||||
- press `-/B` button four times to scroll the menu for `Advanced settings`;
|
||||
- press `+/A` button to open submenu;
|
||||
- press `+/A` button to toggle/enable _Bluetooth_ feature;
|
||||
- press `-/B` **and hold it** for just more than five seconds to exit from the _Settings_ menu.
|
||||
|
||||
[^ble]:
|
||||
This is related only to situations when a user restores default settings using menu, or when _IronOS_ update is taking place on a new device or on a device with a previous firmware version.
|
||||
|
||||
## Translations
|
||||
|
||||
Is your preferred language missing localisation of some of the text?
|
||||
@@ -175,6 +195,6 @@ Other components such as _FreeRTOS_ and _USB-PD_ have their own licenses.
|
||||
|
||||
## Commercial Use
|
||||
|
||||
This software is provided "AS IS", so I cannot provide any commercial support for the firmware.
|
||||
This software is provided _**"AS IS"**_, so I cannot provide any commercial support for the firmware.
|
||||
However, you are more than welcome to distribute links to the firmware or provide hardware with this firmware.
|
||||
**Please do not re-host the files, but rather link to this page, so that there are no old versions of the firmware scattered around**.
|
||||
|
||||
@@ -152,7 +152,7 @@ def get_constants() -> List[Tuple[str, str]]:
|
||||
|
||||
def get_debug_menu() -> List[str]:
|
||||
return [
|
||||
datetime.today().strftime("%Y-%m-%d"),
|
||||
datetime.today().strftime("%Y%m%d %H%M%S"),
|
||||
"ID ",
|
||||
"ACC ",
|
||||
"PWR ",
|
||||
@@ -163,7 +163,7 @@ def get_debug_menu() -> List[str]:
|
||||
"UpTime ",
|
||||
"Move ",
|
||||
"Tip Res",
|
||||
"Tip R ",
|
||||
"Tip uV ",
|
||||
"Tip O ",
|
||||
"HW G ",
|
||||
"HW M ",
|
||||
|
||||
@@ -340,8 +340,8 @@
|
||||
"description": ""
|
||||
},
|
||||
"SolderingTipType": {
|
||||
"displayText": "Soldering\nTip Type",
|
||||
"description": "Select the tip type fitted"
|
||||
"displayText": "Löt-\nspitzentyp",
|
||||
"description": "Wählen Sie den Typ der eingesetzten Spitze"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,11 +152,11 @@
|
||||
"description": "Imposta il tempo di negoziazione del protocollo USB Power Delivery con alimentatori compatibili [0: disattiva; multipli di 100 ms]"
|
||||
},
|
||||
"USBPDMode": {
|
||||
"displayText": "PD\nMode",
|
||||
"displayText": "Modalità\nUSB PD",
|
||||
"description": "Abilita le modalità Power Delivery PPS ed EPR"
|
||||
},
|
||||
"BoostTemperature": {
|
||||
"displayText": "Temp\nTurbo",
|
||||
"displayText": "Temp\nturbo",
|
||||
"description": "Imposta la temperatura della funzione turbo [°C/°F]"
|
||||
},
|
||||
"AutoStart": {
|
||||
@@ -252,7 +252,7 @@
|
||||
"description": "Regola la sensibilità del sensore ad effetto Hall per entrare in modalità riposo [1: minima; 9: massima]"
|
||||
},
|
||||
"HallEffSleepTimeout": {
|
||||
"displayText": "Timer\nriposoHall",
|
||||
"displayText": "Timer\nHall",
|
||||
"description": "Imposta un timer per entrare in modalità riposo quando il sensore ad effetto Hall è al di sopra della soglia di attivazione [secondi]"
|
||||
},
|
||||
"TemperatureUnit": {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"tempUnitFahrenheit": false,
|
||||
"messagesWarn": {
|
||||
"CalibrationDone": {
|
||||
"message": "Kalibracja\nwykonana!"
|
||||
"message": "Skalibrowano!"
|
||||
},
|
||||
"ResetOKMessage": {
|
||||
"message": "Reset OK"
|
||||
@@ -19,7 +19,7 @@
|
||||
"message": "Nie rozpoznano\nkont. USB-PD IC!"
|
||||
},
|
||||
"LockingKeysString": {
|
||||
"message": " ZABLOK."
|
||||
"message": "ZABLOK."
|
||||
},
|
||||
"UnlockingKeysString": {
|
||||
"message": "ODBLOK."
|
||||
@@ -31,7 +31,7 @@
|
||||
"message": "Ucieczka\ntermiczna"
|
||||
},
|
||||
"WarningTipShorted": {
|
||||
"message": "!Tip Shorted!"
|
||||
"message": "!Zwarty grot!"
|
||||
},
|
||||
"SettingsCalibrationWarning": {
|
||||
"message": "Upewnij się, że końcówka i uchwyt mają temperaturę pokojową podczas następnego rozruchu!"
|
||||
@@ -58,16 +58,16 @@
|
||||
"message": "Grot: \n"
|
||||
},
|
||||
"ProfilePreheatString": {
|
||||
"message": "Preheat\n"
|
||||
"message": "Rozgrzewanie\n"
|
||||
},
|
||||
"ProfileCooldownString": {
|
||||
"message": "Cooldown\n"
|
||||
"message": "Schładzanie\n"
|
||||
},
|
||||
"DeviceFailedValidationWarning": {
|
||||
"message": "Twoje urządzenie jest najprawdopodobniej podróbką!"
|
||||
},
|
||||
"TooHotToStartProfileWarning": {
|
||||
"message": "Too hot to\nstart profile"
|
||||
"message": "Zbyt gorące, aby\nuruchomić profil"
|
||||
}
|
||||
},
|
||||
"characters": {
|
||||
@@ -107,22 +107,22 @@
|
||||
},
|
||||
"menuValues": {
|
||||
"USBPDModeDefault": {
|
||||
"displayText": "Default\nMode"
|
||||
"displayText": "Tryb\ndomyślny"
|
||||
},
|
||||
"USBPDModeNoDynamic": {
|
||||
"displayText": "No\nDynamic"
|
||||
"displayText": "Nie\ndynamiczny"
|
||||
},
|
||||
"USBPDModeSafe": {
|
||||
"displayText": "Safe\nMode"
|
||||
"displayText": "Tryb\nbezpieczny"
|
||||
},
|
||||
"TipTypeAuto": {
|
||||
"displayText": "Auto\nSense"
|
||||
"displayText": "Auto\nwykrycie"
|
||||
},
|
||||
"TipTypeT12Long": {
|
||||
"displayText": "TS100\nLong"
|
||||
"displayText": "Długi\nTS100"
|
||||
},
|
||||
"TipTypeT12Short": {
|
||||
"displayText": "Pine\nShort"
|
||||
"displayText": "Krótki\nPine"
|
||||
},
|
||||
"TipTypeT12PTS": {
|
||||
"displayText": "PTS\n200"
|
||||
@@ -137,27 +137,27 @@
|
||||
"menuOptions": {
|
||||
"DCInCutoff": {
|
||||
"displayText": "Źródło\nzasilania",
|
||||
"description": "Źródło zasilania. Ustaw napięcie odcięcia. (DC 10V) (S 3.3V dla ogniw Li, wyłącz limit mocy)"
|
||||
"description": "Źródło zasilania. Ustaw napięcie odcięcia. (DC 10V) (S=3.3V dla ogniw Li, wyłącz limit mocy)"
|
||||
},
|
||||
"MinVolCell": {
|
||||
"displayText": "Minimalne\nnapięcie",
|
||||
"description": "Minimalne dozwolone napięcie na komórkę (3S: 3 - 3,7V | 4-6S: 2,4 - 3,7V)"
|
||||
},
|
||||
"QCMaxVoltage": {
|
||||
"displayText": "QC\nnapięcie",
|
||||
"displayText": "Napięcie QC",
|
||||
"description": "Maksymalne napięcie, które lutownica będzie próbowała wynegocjować z ładowarką Quick Charge (V)"
|
||||
},
|
||||
"PDNegTimeout": {
|
||||
"displayText": "Limit czasu\nPD",
|
||||
"description": "Limit czasu negocjacji PD w krokach co 100 ms dla zgodności z niektórymi ładowarkami QC (0: wyłączone)"
|
||||
"description": "Limit czasu negocjacji PD w krokach co 100ms dla zgodności z niektórymi ładowarkami QC (0: wyłączone)"
|
||||
},
|
||||
"USBPDMode": {
|
||||
"displayText": "PD\nMode",
|
||||
"displayText": "Tryb PD",
|
||||
"description": "Włącza tryby PPS & EPR."
|
||||
},
|
||||
"BoostTemperature": {
|
||||
"displayText": "Temp.\nboost",
|
||||
"description": "Temperatura w trybie \"boost\" "
|
||||
"description": "Temp. w trybie \"boost\" "
|
||||
},
|
||||
"AutoStart": {
|
||||
"displayText": "Aut. uruch.\ntr. lutowania",
|
||||
@@ -176,60 +176,60 @@
|
||||
"description": "W trybie lutowania, wciśnij oba przyciski aby je zablokować (B=tylko Boost | P=pełna blokada)"
|
||||
},
|
||||
"ProfilePhases": {
|
||||
"displayText": "Profile\nPhases",
|
||||
"description": "Number of phases in profile mode"
|
||||
"displayText": "Fazy\nprofilu",
|
||||
"description": "Liczba faz w trybie profilu"
|
||||
},
|
||||
"ProfilePreheatTemp": {
|
||||
"displayText": "Preheat\nTemp",
|
||||
"description": "Preheat to this temperature at the start of profile mode"
|
||||
"displayText": "Temp.\nrozgrzewania",
|
||||
"description": "Rozgrzanie do tej temp. na początku trybu profilu"
|
||||
},
|
||||
"ProfilePreheatSpeed": {
|
||||
"displayText": "Preheat\nSpeed",
|
||||
"description": "Preheat at this rate (degrees per second)"
|
||||
"displayText": "Prędk.\nrozgrzewania",
|
||||
"description": "Tempo rozgrzewania (stopnie na sekundę)"
|
||||
},
|
||||
"ProfilePhase1Temp": {
|
||||
"displayText": "Phase 1\nTemp",
|
||||
"description": "Target temperature for the end of this phase"
|
||||
"displayText": "Temp.\nfazy 1",
|
||||
"description": "Docelowa temp. na koniec tej fazy"
|
||||
},
|
||||
"ProfilePhase1Duration": {
|
||||
"displayText": "Phase 1\nDuration",
|
||||
"description": "Target duration of this phase (seconds)"
|
||||
"displayText": "Dług.\nfazy 1",
|
||||
"description": "Docelowy czas trwania tej fazy (sekundy)"
|
||||
},
|
||||
"ProfilePhase2Temp": {
|
||||
"displayText": "Phase 2\nTemp",
|
||||
"displayText": "Temp.\nfazy 2",
|
||||
"description": ""
|
||||
},
|
||||
"ProfilePhase2Duration": {
|
||||
"displayText": "Phase 2\nDuration",
|
||||
"displayText": "Dług.\nfazy 2",
|
||||
"description": ""
|
||||
},
|
||||
"ProfilePhase3Temp": {
|
||||
"displayText": "Phase 3\nTemp",
|
||||
"displayText": "Temp.\nfazy 3",
|
||||
"description": ""
|
||||
},
|
||||
"ProfilePhase3Duration": {
|
||||
"displayText": "Phase 3\nDuration",
|
||||
"displayText": "Dług.\nfazy 3",
|
||||
"description": ""
|
||||
},
|
||||
"ProfilePhase4Temp": {
|
||||
"displayText": "Phase 4\nTemp",
|
||||
"displayText": "Temp.\nfazy 4",
|
||||
"description": ""
|
||||
},
|
||||
"ProfilePhase4Duration": {
|
||||
"displayText": "Phase 4\nDuration",
|
||||
"displayText": "Dług.\nfazy 4",
|
||||
"description": ""
|
||||
},
|
||||
"ProfilePhase5Temp": {
|
||||
"displayText": "Phase 5\nTemp",
|
||||
"displayText": "Temp.\nfazy 5",
|
||||
"description": ""
|
||||
},
|
||||
"ProfilePhase5Duration": {
|
||||
"displayText": "Phase 5\nDuration",
|
||||
"displayText": "Dług.\nfazy 5",
|
||||
"description": ""
|
||||
},
|
||||
"ProfileCooldownSpeed": {
|
||||
"displayText": "Cooldown\nSpeed",
|
||||
"description": "Cooldown at this rate at the end of profile mode (degrees per second)"
|
||||
"displayText": "Prędk.\nschładzania",
|
||||
"description": "Tempo schładzania na koniec trybu profilu (stopnie na sekundę)"
|
||||
},
|
||||
"MotionSensitivity": {
|
||||
"displayText": "Czułość\nwykr. ruchu",
|
||||
@@ -264,8 +264,8 @@
|
||||
"description": "Obrót ekranu (P: dla praworęcznych | L: dla leworęcznych | A: automatycznie)"
|
||||
},
|
||||
"CooldownBlink": {
|
||||
"displayText": "Mig. podczas\nwychładzania",
|
||||
"description": "Temperatura miga podczas wychładzania, gdy grot jest wciąż gorący"
|
||||
"displayText": "Mig. podczas\nschładzania",
|
||||
"description": "Temperatura miga podczas schładzania, gdy grot jest wciąż gorący"
|
||||
},
|
||||
"ScrollingSpeed": {
|
||||
"displayText": "Sz. przew.\ntekstu",
|
||||
@@ -296,7 +296,7 @@
|
||||
"description": "Ustawia czas wyświetlania loga podczas uruchamiania (s=sekund)"
|
||||
},
|
||||
"AdvancedIdle": {
|
||||
"displayText": "Szeczegółowy\nekran bezczy.",
|
||||
"displayText": "Szczegółowy\nekran bezczyn.",
|
||||
"description": "Wyświetla szczegółowe informacje za pomocą mniejszej czcionki na ekranie bezczynności"
|
||||
},
|
||||
"AdvancedSoldering": {
|
||||
@@ -305,7 +305,7 @@
|
||||
},
|
||||
"BluetoothLE": {
|
||||
"displayText": "Bluetooth\n",
|
||||
"description": "Enables BLE"
|
||||
"description": "Włącza Bluetooth Low Energy"
|
||||
},
|
||||
"PowerLimit": {
|
||||
"displayText": "Ogr.\nmocy",
|
||||
@@ -340,8 +340,8 @@
|
||||
"description": ""
|
||||
},
|
||||
"SolderingTipType": {
|
||||
"displayText": "Soldering\nTip Type",
|
||||
"description": "Select the tip type fitted"
|
||||
"displayText": "Typ grotu",
|
||||
"description": "Wybierz typ zamontowanego grotu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"message": "Жив.(B): \n"
|
||||
},
|
||||
"SleepingAdvancedString": {
|
||||
"message": "Очікування...\n"
|
||||
"message": "Сон...\n"
|
||||
},
|
||||
"SleepingTipAdvancedString": {
|
||||
"message": "Жало: \n"
|
||||
@@ -78,7 +78,7 @@
|
||||
"SettingMediumChar": "С",
|
||||
"SettingFastChar": "М",
|
||||
"SettingStartSolderingChar": "П",
|
||||
"SettingStartSleepChar": "О",
|
||||
"SettingStartSleepChar": "С",
|
||||
"SettingStartSleepOffChar": "К",
|
||||
"SettingLockBoostChar": "Т",
|
||||
"SettingLockFullChar": "П"
|
||||
@@ -93,7 +93,7 @@
|
||||
"description": ""
|
||||
},
|
||||
"PowerSavingMenu": {
|
||||
"displayText": "Режим\nсну",
|
||||
"displayText": "Режим сну\n",
|
||||
"description": ""
|
||||
},
|
||||
"UIMenu": {
|
||||
@@ -116,13 +116,13 @@
|
||||
"displayText": "Безпечний\nРежим"
|
||||
},
|
||||
"TipTypeAuto": {
|
||||
"displayText": "Auto\nSense"
|
||||
"displayText": "Авто\nВизначення"
|
||||
},
|
||||
"TipTypeT12Long": {
|
||||
"displayText": "TS100\nLong"
|
||||
"displayText": "TS100\nДовге"
|
||||
},
|
||||
"TipTypeT12Short": {
|
||||
"displayText": "Pine\nShort"
|
||||
"displayText": "Pine\nКоротке"
|
||||
},
|
||||
"TipTypeT12PTS": {
|
||||
"displayText": "PTS\n200"
|
||||
@@ -145,31 +145,31 @@
|
||||
},
|
||||
"QCMaxVoltage": {
|
||||
"displayText": "Потужність\nдж. живлення",
|
||||
"description": "Потужність джерела живлення в Ватах"
|
||||
"description": "Потужність ДЖ в Ватах"
|
||||
},
|
||||
"PDNegTimeout": {
|
||||
"displayText": "PD\nзатримка",
|
||||
"description": "Затримка у 100мс інкрементах для PD для сумісності з деякими QC зарядними пристроями (0: вимкнено)"
|
||||
"displayText": "PD\nЗатримка",
|
||||
"description": "Затримка у 100мс інкрементах для PD для сумісності з деякими версіями QC (0: вимкнена)"
|
||||
},
|
||||
"USBPDMode": {
|
||||
"displayText": "PD\nMode",
|
||||
"displayText": "PD\nРежим",
|
||||
"description": "Вмикає режими PPS & EPR."
|
||||
},
|
||||
"BoostTemperature": {
|
||||
"displayText": "Темпер.\nТурбо",
|
||||
"description": "Температура в \"Турбо\" режимі"
|
||||
"description": "Температура \"Турбо\" режиму"
|
||||
},
|
||||
"AutoStart": {
|
||||
"displayText": "Гарячий\nстарт",
|
||||
"description": "Режим в якому запускається паяльник при ввімкненні (П=Пайка | О=Очікування | К=Очікування при кімн. темп.)"
|
||||
"description": "Режим запуску паяльника (П=Пайка | С=Сон | К=Сон при кімн. темп.)"
|
||||
},
|
||||
"TempChangeShortStep": {
|
||||
"displayText": "Зміна темп.\nкоротко?",
|
||||
"description": "Змінювати температуру при короткому натисканні!"
|
||||
"displayText": "Зміна темп.\nкоротким",
|
||||
"description": "Зміна температуру при короткому натисканні!"
|
||||
},
|
||||
"TempChangeLongStep": {
|
||||
"displayText": "Зміна темп.\nдовго?",
|
||||
"description": "Змінювати температуру при довгому натисканні!"
|
||||
"displayText": "Зміна темп.\nдовгим",
|
||||
"description": "Зміна температуру при довгому натисканні!"
|
||||
},
|
||||
"LockingMode": {
|
||||
"displayText": "Дозволити\nблок. кнопок",
|
||||
@@ -185,15 +185,15 @@
|
||||
},
|
||||
"ProfilePreheatSpeed": {
|
||||
"displayText": "Швидкість\nПоп.Розігріву",
|
||||
"description": "Розігрівати з такою швидкістю (градусів в секунду)"
|
||||
"description": "Розігрівати з швидкістю (t° у сек)"
|
||||
},
|
||||
"ProfilePhase1Temp": {
|
||||
"displayText": "Етап 1\nТемпература",
|
||||
"description": "Температура в кінці цього етапу"
|
||||
"description": "Температура на кінці цього етапу"
|
||||
},
|
||||
"ProfilePhase1Duration": {
|
||||
"displayText": "Етап 1\nТривалість",
|
||||
"description": "Тривалість цього етапу (секунд)"
|
||||
"description": "Тривалість цього етапу (сек)"
|
||||
},
|
||||
"ProfilePhase2Temp": {
|
||||
"displayText": "Етап 2\nТемпература",
|
||||
@@ -229,43 +229,43 @@
|
||||
},
|
||||
"ProfileCooldownSpeed": {
|
||||
"displayText": "Швидкість\nОхолодження",
|
||||
"description": "Швидкість охолодження в кінці режиму профілів (градусів в секунду)"
|
||||
"description": "Швидкість охолодження на кінці режиму профілів (t° у сек)"
|
||||
},
|
||||
"MotionSensitivity": {
|
||||
"displayText": "Чутливість\nсенсору руху",
|
||||
"description": "Акселерометр (1=мін. чутливості | ... | 9=макс. чутливості)"
|
||||
"displayText": "Чутливість\nдатчику руху",
|
||||
"description": "Акселерометр (1=мін. чутливості | ... | 9=макс. чутливість)"
|
||||
},
|
||||
"SleepTemperature": {
|
||||
"displayText": "Темпер.\nсну",
|
||||
"description": "Температура режиму очікування (C° | F°)"
|
||||
"description": "Температура режиму сну (C° | F°)"
|
||||
},
|
||||
"SleepTimeout": {
|
||||
"displayText": "Тайм-аут\nсну",
|
||||
"description": "Час до переходу в режим очікування (Хвилини | Секунди)"
|
||||
"description": "Час до переходу до сну (Хв | Сек)"
|
||||
},
|
||||
"ShutdownTimeout": {
|
||||
"displayText": "Часу до\nвимкнення",
|
||||
"description": "Час до вимкнення (Хвилини)"
|
||||
"description": "Час до вимкнення (Хв)"
|
||||
},
|
||||
"HallEffSensitivity": {
|
||||
"displayText": "Чутливість\nЕфекту Холла",
|
||||
"description": "Чутливість датчика ефекту Холла при виявленні сну (1=мін. чутливості | ... | 9=макс. чутливості)"
|
||||
"displayText": "Чутливість\nДатчику Холла",
|
||||
"description": "Чутливість датчика Холла при виявленні сну (1=мін. чутливість | ... | 9=макс. чутливість)"
|
||||
},
|
||||
"HallEffSleepTimeout": {
|
||||
"displayText": "Сенсор Холла\nЧас очікування",
|
||||
"description": "Проміжок часу до \"часу очікування\" за умови спрацювання датчику ефекту Холла"
|
||||
"displayText": "Датчик Холла\nЧас сну",
|
||||
"description": "Проміжок часу до \"часу сну\" за умови спрацювання датчику Холла"
|
||||
},
|
||||
"TemperatureUnit": {
|
||||
"displayText": "Формат темпе-\nратури(C°/F°)",
|
||||
"description": "Одиниця виміру температури (C=Цельсій | F=Фаренгейт)"
|
||||
},
|
||||
"DisplayRotation": {
|
||||
"displayText": "Автоповорот\nекрану",
|
||||
"description": "Орієнтація дисплея (П=Правша | Л=Лівша | A=Автоповорот)"
|
||||
"displayText": "Обертання\nекрану",
|
||||
"description": "Орієнтація екрану (П=Правша | Л=Лівша | A=Автооберт.)"
|
||||
},
|
||||
"CooldownBlink": {
|
||||
"displayText": "Показ t° при\nохолодженні",
|
||||
"description": "Показувати температуру на екрані охолодження, поки жало залишається гарячим, при цьому екран моргає"
|
||||
"description": "Показувати температуру на екрані охолодження, поки жало залишається гарячим, при цьому екран мерехтить"
|
||||
},
|
||||
"ScrollingSpeed": {
|
||||
"displayText": "Швидкість\nтексту",
|
||||
@@ -277,11 +277,11 @@
|
||||
},
|
||||
"AnimSpeed": {
|
||||
"displayText": "Швидкість\nанімації",
|
||||
"description": "Швидкість анімації іконок у головному меню (Н=Низькa | С=Середня | М=Максимальна)"
|
||||
"description": "Швидкість анімації іконок у меню (Н=Низькa | С=Середня | М=Максимальна)"
|
||||
},
|
||||
"AnimLoop": {
|
||||
"displayText": "Циклічна\nанімація",
|
||||
"description": "Циклічна анімація іконок в головному меню"
|
||||
"description": "Циклічна анімація іконок у меню"
|
||||
},
|
||||
"Brightness": {
|
||||
"displayText": "Яскравість\nекрану",
|
||||
@@ -292,8 +292,8 @@
|
||||
"description": "Інвертувати кольори на OLED екрані"
|
||||
},
|
||||
"LOGOTime": {
|
||||
"displayText": "Тривалість\nлоготипу завантаження",
|
||||
"description": "Встановити тривалість показу лого при завантаженні (с=секунд)"
|
||||
"displayText": "Тривалість\nлоготипу при запуску",
|
||||
"description": "Поточна тривалість показу лого при запуску (сек)"
|
||||
},
|
||||
"AdvancedIdle": {
|
||||
"displayText": "Детальний ре-\nжим очікуван.",
|
||||
@@ -309,11 +309,11 @@
|
||||
},
|
||||
"PowerLimit": {
|
||||
"displayText": "Макс.\nпотуж.",
|
||||
"description": "Макс. потужність, яку може використовувати паяльник (Ват)"
|
||||
"description": "Макс. потужність, яку може використовувати паяльник (Ватт)"
|
||||
},
|
||||
"CalibrateCJC": {
|
||||
"displayText": "Калібрувати КХС\nпри наступному завантаженні",
|
||||
"description": "При наступному завантаження буде відкалібровано Компенсацію Холодного Спаю жала (непотрібне при різниці температур < 5°C)"
|
||||
"displayText": "Калібрувати КХС\nпри наступному запуску",
|
||||
"description": "При наступному запуску буде відкалібровано Компенсацію Холодного Спаю жала (непотрібне при різниці температур < 5°C)"
|
||||
},
|
||||
"VoltageCalibration": {
|
||||
"displayText": "Калібрування\nнапруги",
|
||||
@@ -340,8 +340,8 @@
|
||||
"description": ""
|
||||
},
|
||||
"SolderingTipType": {
|
||||
"displayText": "Soldering\nTip Type",
|
||||
"description": "Select the tip type fitted"
|
||||
"displayText": "Тип Жала",
|
||||
"description": "Оберіть відповідний тип жала"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
"menuOptions": {
|
||||
"DCInCutoff": {
|
||||
"displayText": "Quvvat\nmanbai",
|
||||
"description": "Batareya haddan tashqari zaryadsizlanishini oldini olish uchun kuchlanish chegarasini o'rnatish (DC 10V) (S=3.3V har bir yacheyka uchun, quvvat PWR chegarasini o'chirish)"
|
||||
"description": "Batareya haddan tashqari zaryadsizlanishini oldini olish uchun kuchlanish chegarasini o'rnatish (DC 10V) (S=3.3V har bir yacheyka uchun, quvvat PWR chegarasini o'chirish)"
|
||||
},
|
||||
"MinVolCell": {
|
||||
"displayText": "Minimal\nkuchlanish",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
{
|
||||
"id": "NoPowerDeliveryMessage",
|
||||
"include": ["POW_PD"],
|
||||
"include": ["POW_PD", "POW_PD_EXT"],
|
||||
"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."
|
||||
},
|
||||
{
|
||||
@@ -264,14 +264,14 @@
|
||||
"id": "PDNegTimeout",
|
||||
"maxLen": 8,
|
||||
"maxLen2": 15,
|
||||
"include": ["POW_PD"],
|
||||
"include": ["POW_PD", "POW_PD_EXT"],
|
||||
"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": "USBPDMode",
|
||||
"maxLen": 7,
|
||||
"maxLen2": 15,
|
||||
"include": ["POW_PD"],
|
||||
"include": ["POW_PD", "POW_PD_EXT"],
|
||||
"description": "No Dynamic disables EPR & PPS, Safe mode does not use padding resistance"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -95,9 +95,10 @@ docs_links()
|
||||
{
|
||||
ver_git="$(git tag -l | sort | grep -e "^v" | grep -v "rc" | tail -1)"
|
||||
md="README.md"
|
||||
test -f "${md}" || (echo "deploy.sh: docs_links: ERROR with the project directory structure!" && exit 1)
|
||||
ver_md="$(grep -c "${ver_git}" "${md}")"
|
||||
ret=0
|
||||
if [ "${ver_md}" -ne 0 ]; then
|
||||
if [ "${ver_md}" -eq 0 ]; then
|
||||
ret=1
|
||||
echo "Please, update mention & links in ${md} inside Builds section for release builds with version ${ver_git}."
|
||||
fi;
|
||||
@@ -108,16 +109,38 @@ docs_links()
|
||||
build_langs()
|
||||
{
|
||||
mk="../source/Makefile"
|
||||
cd Translations/ || exit 1
|
||||
cd Translations/ || (echo "deploy.sh: build_langs: ERROR with the project directory structure!" && exit 1)
|
||||
langs="$(echo "$(find ./*.json | sed -ne 's,^\./translation_,,; s,\.json$,,; /[A-Z]/p' ; sed -ne 's/^ALL_LANGUAGES=//p;' "${mk}")" | sed 's, ,\n,g; s,\r,,g' | sort | uniq -u)"
|
||||
ret=0
|
||||
if [ -n "${langs}" ]; then
|
||||
ret=1
|
||||
echo "It seems there is mismatch between supported languages and enabled builds."
|
||||
echo "Please, check files in Translations/ and ALL_LANGUAGES variable in source/Makefile for:"
|
||||
echo "${langs}"
|
||||
return 1
|
||||
fi;
|
||||
return "${ret}"
|
||||
cd ..
|
||||
|
||||
echo -ne "\n"
|
||||
grep -nH $'\11' Translations/translation*.json
|
||||
ret="${?}"
|
||||
if [ "${ret}" -eq 0 ]; then
|
||||
echo -ne "\t^^^^\t^^^^\n"
|
||||
echo "Please, remove any tabs as indention from json file(s) in Translations/ directory (see the exact files & lines in the list above)."
|
||||
echo "Use spaces only to indent in the future, please."
|
||||
echo -ne "\n"
|
||||
return 1
|
||||
fi;
|
||||
|
||||
grep -nEH -e "^( {1}| {3}| {5}| {7}| {9}| {11})[^ ]" Translations/translation*.json
|
||||
ret="${?}"
|
||||
if [ "${ret}" -eq 0 ]; then
|
||||
echo -ne "\t^^^^\t^^^^\n"
|
||||
echo "Please, remove any odd amount of extra spaces as indention from json file(s) in Translations/ directory (see the exact files & lines in the list above)."
|
||||
echo "Use even amount of spaces to indent in the future, please (two actual spaces per one indent, not tab)."
|
||||
echo -ne "\n"
|
||||
return 1
|
||||
fi;
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Helper function to check code style using clang-format & grep/sed custom parsers:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "Pins.h"
|
||||
#include "Setup.h"
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "WS2812.h"
|
||||
#include "configuration.h"
|
||||
#include "history.hpp"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "Setup.h"
|
||||
#include "TipThermoModel.h"
|
||||
#include "Types.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
extern uint16_t tipSenseResistancex10Ohms;
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
#define PROFILE_SUPPORT
|
||||
#define OLED_96x16 1
|
||||
#define POW_PD 1
|
||||
#define USB_PD_TIMEOUT 20 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
#define POW_PD_EXT 0
|
||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
||||
#define TEMP_NTC
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_HAKKO
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
#define ADC_VDD_MV 3300 // ADC max reading millivolts
|
||||
|
||||
#define POW_PD_EXT 0
|
||||
#define USB_PD_TIMEOUT 20 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
|
||||
// Deriving the Voltage div:
|
||||
// Vin_max = (3.3*(r1+r2))/(r2)
|
||||
@@ -218,6 +219,7 @@
|
||||
#define TEMP_NTC 1
|
||||
#define ACCEL_I2CBB1 1
|
||||
#define POW_EPR 1
|
||||
#define TIP_TYPE_SUPPORT 1 // Support for tips of different types, i.e. resistance
|
||||
#define AUTO_TIP_SELECTION 1 // Can auto-select the tip
|
||||
#define TIPTYPE_T12 1 // Can manually pick a T12 tip
|
||||
#define HAS_POWER_DEBUG_MENU
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_HAKKO
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
#define POW_PD 1
|
||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR (Yet?) */
|
||||
#define POW_PD_EXT 0
|
||||
#define USB_PD_TIMEOUT 20 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
#define POW_QC 1
|
||||
#define POW_DC 1
|
||||
#define POW_QC_20V 1
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
#include "Setup.h"
|
||||
#include "TipThermoModel.h"
|
||||
#include "USBPD.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "bflb_platform.h"
|
||||
#include "bl702_adc.h"
|
||||
#include "configuration.h"
|
||||
#include "crc32.h"
|
||||
@@ -282,16 +283,3 @@ void showBootLogo(void) {
|
||||
|
||||
BootLogo::handleShowingLogo(scratch);
|
||||
}
|
||||
|
||||
TemperatureType_t getCustomTipMaxInC() {
|
||||
// have to lookup the max temp while being aware of the coe scaling value
|
||||
float max_reading = ADC_MAX_READING - 1.0;
|
||||
|
||||
if (adcGainCoeffCal.adcGainCoeffEnable) {
|
||||
max_reading /= adcGainCoeffCal.coe;
|
||||
}
|
||||
|
||||
TemperatureType_t maximumTipTemp = TipThermoModel::convertTipRawADCToDegC(max_reading);
|
||||
maximumTipTemp += getHandleTemperature(0) / 10; // Add handle offset
|
||||
return maximumTipTemp - 1;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_HAKKO
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "types.h"
|
||||
#include <zephyr/types.h>
|
||||
#include "bl_port.h"
|
||||
|
||||
#define BT_UINT_MAX 0xffffffff
|
||||
|
||||
@@ -10,7 +10,7 @@ NOTES
|
||||
#ifndef _BLE_TP_SVC_H_
|
||||
#define _BLE_TP_SVC_H_
|
||||
|
||||
#include "types.h"
|
||||
#include <zephyr/types.h>
|
||||
#include "ble_config.h"
|
||||
|
||||
// read value handle offset 2
|
||||
|
||||
@@ -148,19 +148,20 @@
|
||||
#define POW_PD 1 // Supported features
|
||||
#define USB_PD_EPR_WATTAGE 140 // USB PD EPR Wattage
|
||||
#define POW_PD_EXT 0 // Future-proof macro for other models with other PD modes
|
||||
#define USB_PD_TIMEOUT 20 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
#define POW_QC 1 // Supported features
|
||||
#define POW_DC 1 // Supported features
|
||||
#define POW_QC_20V 1 // Supported features
|
||||
#define POW_EPR 1
|
||||
#define ENABLE_QC2 1
|
||||
#define MAG_SLEEP_SUPPORT 1
|
||||
#define TIP_TYPE_SUPPORT 1 // Support for tips of different types, i.e. resistance
|
||||
#define AUTO_TIP_SELECTION 1 // Can auto-select the tip
|
||||
#define TIPTYPE_T12 1 // Can manually pick a T12 tip
|
||||
#define DEVICE_HAS_VALIDATION_SUPPORT
|
||||
#define OLED_96x16 1
|
||||
#define TEMP_NTC
|
||||
#define ACCEL_BMA
|
||||
#define CUSTOM_MAX_TEMP_C 1 // Uses custom max temp lookup
|
||||
#define ACCEL_SC7
|
||||
#define HALL_SENSOR
|
||||
#define HALL_SI7210
|
||||
|
||||
@@ -126,77 +126,7 @@ void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) {
|
||||
}
|
||||
}
|
||||
|
||||
void unstick_I2C() {
|
||||
#ifdef SCL_Pin
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
int timeout = 100;
|
||||
int timeout_cnt = 0;
|
||||
|
||||
// 1. Clear PE bit.
|
||||
hi2c1.Instance->CR1 &= ~(0x0001);
|
||||
/**I2C1 GPIO Configuration
|
||||
PB6 ------> I2C1_SCL
|
||||
PB7 ------> I2C1_SDA
|
||||
*/
|
||||
// 2. Configure the SCL and SDA I/Os as General Purpose Output Open-Drain, High level (Write 1 to GPIOx_ODR).
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
|
||||
GPIO_InitStruct.Pin = SCL_Pin;
|
||||
HAL_GPIO_Init(SCL_GPIO_Port, &GPIO_InitStruct);
|
||||
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_SET);
|
||||
|
||||
GPIO_InitStruct.Pin = SDA_Pin;
|
||||
HAL_GPIO_Init(SDA_GPIO_Port, &GPIO_InitStruct);
|
||||
HAL_GPIO_WritePin(SDA_GPIO_Port, SDA_Pin, GPIO_PIN_SET);
|
||||
|
||||
while (GPIO_PIN_SET != HAL_GPIO_ReadPin(SDA_GPIO_Port, SDA_Pin)) {
|
||||
// Move clock to release I2C
|
||||
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_RESET);
|
||||
asm("nop");
|
||||
asm("nop");
|
||||
asm("nop");
|
||||
asm("nop");
|
||||
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_SET);
|
||||
|
||||
timeout_cnt++;
|
||||
if (timeout_cnt > timeout) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 12. Configure the SCL and SDA I/Os as Alternate function Open-Drain.
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
|
||||
GPIO_InitStruct.Pin = SCL_Pin;
|
||||
HAL_GPIO_Init(SCL_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = SDA_Pin;
|
||||
HAL_GPIO_Init(SDA_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(SDA_GPIO_Port, SDA_Pin, GPIO_PIN_SET);
|
||||
|
||||
// 13. Set SWRST bit in I2Cx_CR1 register.
|
||||
hi2c1.Instance->CR1 |= 0x8000;
|
||||
|
||||
asm("nop");
|
||||
|
||||
// 14. Clear SWRST bit in I2Cx_CR1 register.
|
||||
hi2c1.Instance->CR1 &= ~0x8000;
|
||||
|
||||
asm("nop");
|
||||
|
||||
// 15. Enable the I2C peripheral by setting the PE bit in I2Cx_CR1 register
|
||||
hi2c1.Instance->CR1 |= 0x0001;
|
||||
|
||||
// Call initialization function.
|
||||
HAL_I2C_Init(&hi2c1);
|
||||
#endif
|
||||
}
|
||||
void unstick_I2C() {}
|
||||
|
||||
uint8_t getButtonA() { return HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET ? 1 : 0; }
|
||||
uint8_t getButtonB() { return HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ? 1 : 0; }
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#ifndef BSP_MINIWARE_PINS_H_
|
||||
#define BSP_MINIWARE_PINS_H_
|
||||
#ifndef BSP_SEQURE_PINS_H_
|
||||
#define BSP_SEQURE_PINS_H_
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef MODEL_S60
|
||||
@@ -65,6 +65,45 @@
|
||||
#define SCL2_GPIO_Port GPIOB
|
||||
#define SDA2_Pin GPIO_PIN_7
|
||||
#define SDA2_GPIO_Port GPIOB
|
||||
#define SCL_Pin GPIO_PIN_11
|
||||
#define SCL_GPIO_Port GPIOB
|
||||
#define SDA_Pin GPIO_PIN_10
|
||||
#define SDA_GPIO_Port GPIOB
|
||||
// Pin gets pulled high on movement
|
||||
#define MOVEMENT_Pin GPIO_PIN_3
|
||||
#define MOVEMENT_GPIO_Port GPIOA
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MODEL_S99
|
||||
|
||||
#define KEY_B_Pin GPIO_PIN_1
|
||||
#define KEY_B_GPIO_Port GPIOB
|
||||
#define TMP36_INPUT_Pin GPIO_PIN_5
|
||||
#define TMP36_INPUT_GPIO_Port GPIOA
|
||||
#define TMP36_ADC1_CHANNEL ADC_CHANNEL_5
|
||||
#define TMP36_ADC2_CHANNEL ADC_CHANNEL_5
|
||||
#define TIP_TEMP_Pin GPIO_PIN_0
|
||||
#define TIP_TEMP_GPIO_Port GPIOA
|
||||
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_0
|
||||
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_0
|
||||
#define VIN_Pin GPIO_PIN_4
|
||||
#define VIN_GPIO_Port GPIOA
|
||||
#define VIN_ADC1_CHANNEL ADC_CHANNEL_4
|
||||
#define VIN_ADC2_CHANNEL ADC_CHANNEL_4
|
||||
#define KEY_A_Pin GPIO_PIN_0
|
||||
#define KEY_A_GPIO_Port GPIOB
|
||||
#define PWM_Out_Pin GPIO_PIN_8
|
||||
#define PWM_Out_GPIO_Port GPIOB
|
||||
#define PWM_Out_CHANNEL TIM_CHANNEL_3 // Timer 4; channel 3
|
||||
#define SCL2_Pin GPIO_PIN_6
|
||||
#define SCL2_GPIO_Port GPIOB
|
||||
#define SDA2_Pin GPIO_PIN_7
|
||||
#define SDA2_GPIO_Port GPIOB
|
||||
#define SCL_Pin GPIO_PIN_11
|
||||
#define SCL_GPIO_Port GPIOB
|
||||
#define SDA_Pin GPIO_PIN_10
|
||||
#define SDA_GPIO_Port GPIOB
|
||||
// Pin gets pulled high on movement
|
||||
#define MOVEMENT_Pin GPIO_PIN_3
|
||||
#define MOVEMENT_GPIO_Port GPIOA
|
||||
@@ -98,4 +137,4 @@
|
||||
|
||||
#endif // MODEL_T55
|
||||
|
||||
#endif /* BSP_MINIWARE_PINS_H_ */
|
||||
#endif /* BSP_SEQURE_PINS_H_ */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "BSP.h"
|
||||
#include "BSP_Power.h"
|
||||
#include "FS2711.hpp"
|
||||
#include "Pins.h"
|
||||
#include "QC3.h"
|
||||
#include "Settings.h"
|
||||
@@ -16,9 +17,26 @@ void power_check() {
|
||||
return; // We are using PD
|
||||
}
|
||||
#endif
|
||||
#if POW_PD_EXT == 2
|
||||
if (FS2711::has_run_selection()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef POW_QC
|
||||
QC_resync();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool getIsPoweredByDCIN() { return false; }
|
||||
bool getIsPoweredByDCIN() {
|
||||
#if POW_PD_EXT == 2 && defined(POW_DC)
|
||||
if (!FS2711::has_run_selection()) {
|
||||
return true;
|
||||
} else if (FS2711::debug_get_state().source_voltage > 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# BSP section for STM32F103 based Miniware products
|
||||
# BSP section for STM32F103 based Sequre products
|
||||
|
||||
This folder contains the hardware abstractions required for the TS100, TS80 and probably TS80P soldering irons.
|
||||
This folder contains the hardware abstractions required for the S60, S60P and S99 soldering irons.
|
||||
|
||||
## Main abstractions
|
||||
|
||||
|
||||
@@ -5,19 +5,32 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#ifndef BSP_MINIWARE_SOFTWARE_I2C_H_
|
||||
#define BSP_MINIWARE_SOFTWARE_I2C_H_
|
||||
#ifndef BSP_SEQURE_SOFTWARE_I2C_H_
|
||||
#define BSP_SEQURE_SOFTWARE_I2C_H_
|
||||
#include "BSP.h"
|
||||
#include "configuration.h"
|
||||
#include "stm32f1xx_hal.h"
|
||||
#ifdef I2C_SOFT_BUS_2
|
||||
|
||||
#ifdef I2C_SOFT_BUS_1
|
||||
#define SOFT_SCL1_HIGH() HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_SET)
|
||||
#define SOFT_SCL1_LOW() HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_RESET)
|
||||
#define SOFT_SDA1_HIGH() HAL_GPIO_WritePin(SDA_GPIO_Port, SDA_Pin, GPIO_PIN_SET)
|
||||
#define SOFT_SDA1_LOW() HAL_GPIO_WritePin(SDA_GPIO_Port, SDA_Pin, GPIO_PIN_RESET)
|
||||
#define SOFT_SDA1_READ() (HAL_GPIO_ReadPin(SDA_GPIO_Port, SDA_Pin) == GPIO_PIN_SET ? 1 : 0)
|
||||
#define SOFT_SCL1_READ() (HAL_GPIO_ReadPin(SCL_GPIO_Port, SCL_Pin) == GPIO_PIN_SET ? 1 : 0)
|
||||
|
||||
#endif /* I2C_SOFT_BUS_1 */
|
||||
|
||||
#ifdef I2C_SOFT_BUS_2
|
||||
#define SOFT_SCL2_HIGH() HAL_GPIO_WritePin(SCL2_GPIO_Port, SCL2_Pin, GPIO_PIN_SET)
|
||||
#define SOFT_SCL2_LOW() HAL_GPIO_WritePin(SCL2_GPIO_Port, SCL2_Pin, GPIO_PIN_RESET)
|
||||
#define SOFT_SDA2_HIGH() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_SET)
|
||||
#define SOFT_SDA2_LOW() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_RESET)
|
||||
#define SOFT_SDA2_READ() (HAL_GPIO_ReadPin(SDA2_GPIO_Port, SDA2_Pin) == GPIO_PIN_SET ? 1 : 0)
|
||||
#define SOFT_SCL2_READ() (HAL_GPIO_ReadPin(SCL2_GPIO_Port, SCL2_Pin) == GPIO_PIN_SET ? 1 : 0)
|
||||
|
||||
#endif /* I2C_SOFT_BUS_2 */
|
||||
|
||||
// clang-format off
|
||||
#define SOFT_I2C_DELAY() \
|
||||
{ \
|
||||
@@ -27,7 +40,6 @@
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
#endif
|
||||
// 40 ~= 100kHz; 15 gives around 250kHz or so which is fast _and_ stable
|
||||
|
||||
#endif /* BSP_MINIWARE_SOFTWARE_I2C_H_ */
|
||||
#endif /* BSP_SEQURE_SOFTWARE_I2C_H_ */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_PT1000
|
||||
@@ -83,3 +83,10 @@ TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) {
|
||||
#ifdef TEMP_uV_LOOKUP_S60
|
||||
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return (tipuVDelta * 50) / 485; }
|
||||
#endif // TEMP_uV_LOOKUP_S60
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_S99
|
||||
// 42.85 uV / K -> 1/42.85 K/uV = 20/857
|
||||
// TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return (tipuVDelta * 20) / 857; }
|
||||
// Measurement is probably with heating element in series, thats why the reading differs from the approx 42.85 uV/K
|
||||
TemperatureType_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { return (tipuVDelta * 1) / 30; }
|
||||
#endif // TEMP_uV_LOOKUP_S99
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
// Vin_max = (3.3*(r1+r2))/(r2)
|
||||
// vdiv = (32768*4)/(vin_max*10)
|
||||
|
||||
#if defined(MODEL_S60) + defined(MODEL_S60P) + defined(MODEL_T55) == 0
|
||||
#if defined(MODEL_S60) + defined(MODEL_S60P) + defined(MODEL_T55) + defined(MODEL_S99) == 0
|
||||
#error "No model defined!"
|
||||
#endif
|
||||
|
||||
@@ -131,9 +131,10 @@
|
||||
#define POWER_LIMIT_STEPS 5
|
||||
#define OP_AMP_GAIN_STAGE 536
|
||||
#define TEMP_uV_LOOKUP_S60
|
||||
#define USB_PD_VMAX 12 // Maximum voltage for PD to negotiate
|
||||
#define USB_PD_VMAX 12 // Maximum voltage for PD to negotiate
|
||||
#define THERMAL_RUNAWAY_TIME_SEC 20
|
||||
#define THERMAL_RUNAWAY_TEMP_C 3
|
||||
#define USB_PD_TIMEOUT 1 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
|
||||
#define HARDWARE_MAX_WATTAGE_X10 600
|
||||
|
||||
@@ -165,9 +166,10 @@
|
||||
#define POWER_LIMIT_STEPS 5
|
||||
#define OP_AMP_GAIN_STAGE 536
|
||||
#define TEMP_uV_LOOKUP_S60
|
||||
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
||||
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
||||
#define THERMAL_RUNAWAY_TIME_SEC 20
|
||||
#define THERMAL_RUNAWAY_TEMP_C 3
|
||||
#define USB_PD_TIMEOUT 1 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
|
||||
#define HARDWARE_MAX_WATTAGE_X10 600
|
||||
|
||||
@@ -180,10 +182,13 @@
|
||||
#define GPIO_VIBRATION
|
||||
#define POW_PD_EXT 2
|
||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
||||
#define POW_DC
|
||||
#define DEBUG_POWER_MENU_BUTTON_B 1
|
||||
#define HAS_POWER_DEBUG_MENU
|
||||
#define TEMP_NTC
|
||||
#define I2C_SOFT_BUS_2 // For now we are doing software I2C to get around hardware chip issues
|
||||
#define I2C_PROBE_POW_PD // For now we are doing software I2C to get around hardware chip issues
|
||||
#define I2C_SOFT_BUS_1 // For now we are doing software I2C to get around hardware chip issues
|
||||
#define OLED_I2CBB2
|
||||
#define FILTER_DISPLAYED_TIP_TEMP 4 // Filtering for GUI display
|
||||
|
||||
@@ -206,6 +211,8 @@
|
||||
#define OP_AMP_GAIN_STAGE 1
|
||||
#define TEMP_uV_LOOKUP_PT1000
|
||||
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
||||
#define USB_PD_TIMEOUT 1 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
|
||||
#define NO_DISPLAY_ROTATE // Disable OLED rotation by accel
|
||||
#define MAX_TEMP_C 350 // Max soldering temp selectable °C
|
||||
#define MAX_TEMP_F 660 // Max soldering temp selectable °F
|
||||
@@ -239,6 +246,44 @@
|
||||
#define MODEL_HAS_DCDC // We dont have DC/DC but have reallly fast PWM that gets us roughly the same place
|
||||
#endif /* T55 */
|
||||
|
||||
#ifdef MODEL_S99
|
||||
#define VOLTAGE_DIV 460 // Default divider scaler
|
||||
#define CALIBRATION_OFFSET 200 // Default adc offset in uV
|
||||
#define PID_POWER_LIMIT 70 // Sets the max pwm power limit
|
||||
#define POWER_LIMIT 0 // 0 watts default limit
|
||||
#define MAX_POWER_LIMIT 70
|
||||
#define POWER_LIMIT_STEPS 5
|
||||
#define OP_AMP_GAIN_STAGE 237 // Two sequential op-amps 1st: 1+(9k29/997R)=10.31 2nd: 1+(22k/1k)=23 -> 10.31*23=237
|
||||
#define TEMP_uV_LOOKUP_S99
|
||||
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
||||
#define USB_PD_TIMEOUT 1 // Default Timeout for USB-PD Protocol negotiation in x100ms
|
||||
|
||||
#define HARDWARE_MAX_WATTAGE_X10 1300
|
||||
|
||||
#define TIP_THERMAL_MASS 8 // X10 watts to raise 1 deg C in 1 second
|
||||
#define TIP_THERMAL_INERTIA 128 // We use a large inertia value to smooth out the drive to the tip since its stupidly sensitive
|
||||
#define THERMAL_RUNAWAY_TIME_SEC 20
|
||||
#define THERMAL_RUNAWAY_TEMP_C 10
|
||||
|
||||
#define TIP_RESISTANCE 20 //(actually 2.5 ish but we need to be more conservative on pwm'ing watt limit) x10 ohms
|
||||
|
||||
#define OLED_128x32
|
||||
#define GPIO_VIBRATION
|
||||
#define POW_PD_EXT 2
|
||||
#define USB_PD_EPR_WATTAGE 0 /*No EPR*/
|
||||
#define POW_DC
|
||||
#define DEBUG_POWER_MENU_BUTTON_B 1
|
||||
#define HAS_POWER_DEBUG_MENU
|
||||
#define TEMP_NTC
|
||||
#define I2C_SOFT_BUS_2 // For now we are doing software I2C to get around hardware chip issues
|
||||
#define I2C_PROBE_POW_PD // For now we are doing software I2C to get around hardware chip issues
|
||||
#define I2C_SOFT_BUS_1 // For now we are doing software I2C to get around hardware chip issues
|
||||
#define OLED_I2CBB2
|
||||
#define FILTER_DISPLAYED_TIP_TEMP 4 // Filtering for GUI display
|
||||
|
||||
#define MODEL_HAS_DCDC // We dont have DC/DC but have reallly fast PWM that gets us roughly the same place
|
||||
#endif /* S99 */
|
||||
|
||||
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))
|
||||
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
*/
|
||||
|
||||
#include "BSP.h"
|
||||
#include "I2CBB1.hpp"
|
||||
#include "I2CBB2.hpp"
|
||||
#include "Pins.h"
|
||||
#include "Setup.h"
|
||||
#include <I2C_Wrapper.hpp>
|
||||
#if defined(I2C_PROBE_POW_PD) && POW_PD_EXT == 2
|
||||
#include "FS2711.hpp"
|
||||
#endif
|
||||
|
||||
void preRToSInit() {
|
||||
/* Reset of all peripherals, Initializes the Flash interface and the Systick.
|
||||
@@ -17,7 +21,14 @@ void preRToSInit() {
|
||||
HAL_Init();
|
||||
Setup_HAL(); // Setup all the HAL objects
|
||||
BSPInit();
|
||||
#ifdef I2C_SOFT_BUS_1
|
||||
I2CBB1::init();
|
||||
#endif /* I2C_SOFT_BUS_1 */
|
||||
#ifdef I2C_SOFT_BUS_2
|
||||
I2CBB2::init();
|
||||
#endif
|
||||
#endif /* I2C_SOFT_BUS_2 */
|
||||
#if defined(I2C_PROBE_POW_PD) && POW_PD_EXT == 2
|
||||
// Detect and set FS2711 I2C bus num
|
||||
FS2711::detect_i2c_bus_num();
|
||||
#endif /* defined(I2C_PROBE_POW_PD) && POW_PD_EXT == 2 */
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
#include "BSP.h"
|
||||
#include "FS2711.hpp"
|
||||
#include "FS2711_defines.h"
|
||||
#include "I2CBB1.hpp"
|
||||
#include "I2CBB2.hpp"
|
||||
#include "Settings.h"
|
||||
#include "Utils.h"
|
||||
#include "cmsis_os.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@@ -15,31 +17,61 @@
|
||||
#error Max PD Voltage must be defined
|
||||
#endif
|
||||
|
||||
#define PROTOCOL_TIMEOUT 100 // ms
|
||||
|
||||
extern int32_t powerSupplyWattageLimit;
|
||||
|
||||
uint8_t I2C_PORT = 2;
|
||||
|
||||
fs2711_state_t FS2711::state;
|
||||
|
||||
inline void i2c_write(uint8_t addr, uint8_t data) { I2CBB2::Mem_Write(FS2711_ADDR, addr, &data, 1); }
|
||||
void i2c_write(uint8_t addr, uint8_t data) {
|
||||
if (I2C_PORT == 2) {
|
||||
I2CBB2::Mem_Write(FS2711_ADDR, addr, &data, 1);
|
||||
} else if (I2C_PORT == 1) {
|
||||
I2CBB1::Mem_Write(FS2711_ADDR, addr, &data, 1);
|
||||
}
|
||||
}
|
||||
|
||||
inline uint8_t i2c_read(uint8_t addr) {
|
||||
uint8_t i2c_read(uint8_t addr) {
|
||||
uint8_t data = 0;
|
||||
I2CBB2::Mem_Read(FS2711_ADDR, addr, &data, 1);
|
||||
if (I2C_PORT == 2) {
|
||||
I2CBB2::Mem_Read(FS2711_ADDR, addr, &data, 1);
|
||||
} else if (I2C_PORT == 1) {
|
||||
I2CBB1::Mem_Read(FS2711_ADDR, addr, &data, 1);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
inline bool i2c_probe(uint8_t addr) { return I2CBB2::probe(addr); }
|
||||
bool i2c_probe(uint8_t addr) {
|
||||
bool probing_state = false;
|
||||
if (I2C_PORT == 2) {
|
||||
probing_state = I2CBB2::probe(addr);
|
||||
} else if (I2C_PORT == 1) {
|
||||
probing_state = I2CBB1::probe(addr);
|
||||
}
|
||||
return probing_state;
|
||||
}
|
||||
|
||||
uint8_t FS2711::detect_i2c_bus_num() {
|
||||
I2CBB2::probe(88);
|
||||
I2CBB2::probe(89);
|
||||
if (I2CBB2::probe(FS2711_ADDR)) {
|
||||
I2C_PORT = 2;
|
||||
} else {
|
||||
I2C_PORT = 1;
|
||||
}
|
||||
return I2C_PORT;
|
||||
}
|
||||
|
||||
void FS2711::start() {
|
||||
memset(&state, 0, sizeof(fs2711_state_t));
|
||||
state.req_pdo_num = 0xFF;
|
||||
|
||||
enable_protocol(false);
|
||||
osDelay(PROTOCOL_TIMEOUT);
|
||||
// PDNegTimeout is in 100ms, so x100 for ms
|
||||
osDelay(getSettingValue(SettingsOptions::PDNegTimeout) * 100);
|
||||
select_protocol(FS2711_PROTOCOL_PD);
|
||||
enable_protocol(true);
|
||||
osDelay(PROTOCOL_TIMEOUT);
|
||||
osDelay(getSettingValue(SettingsOptions::PDNegTimeout) * 100);
|
||||
}
|
||||
|
||||
uint8_t FS2711::selected_protocol() { return i2c_read(FS2711_REG_SELECT_PROTOCOL); }
|
||||
@@ -163,6 +195,11 @@ void FS2711::negotiate() {
|
||||
if (getSettingValue(SettingsOptions::USBPDMode) == usbpdMode_t::DEFAULT) {
|
||||
tip_resistance += 5;
|
||||
}
|
||||
#ifdef MODEL_HAS_DCDC
|
||||
// If this device has step down DC/DC inductor to smooth out current spikes
|
||||
// We can instead ignore resistance and go for max voltage we can accept; and rely on the DC/DC regulation to keep under current limit
|
||||
tip_resistance = 255; // (Push to 25.5 ohms to effectively disable this check)
|
||||
#endif
|
||||
|
||||
uint16_t pdo_min_mv = 0, pdo_max_mv = 0, pdo_max_curr = 0, pdo_type = 0;
|
||||
|
||||
@@ -228,7 +265,7 @@ bool FS2711::has_run_selection() { return state.req_pdo_num != 0xFF; }
|
||||
|
||||
uint16_t FS2711::source_voltage() { return state.source_voltage / 1000; }
|
||||
|
||||
// FS2711 does current in mV so it needs to be converted to x100 intead of x1000
|
||||
// FS2711 does current in mA so it needs to be converted to x100 intead of x1000
|
||||
uint16_t FS2711::source_currentx100() { return state.source_current / 10; }
|
||||
|
||||
uint16_t FS2711::debug_pdo_max_voltage(uint8_t pdoid) { return state.pdo_max_volt[pdoid]; }
|
||||
|
||||
@@ -19,6 +19,8 @@ typedef struct {
|
||||
|
||||
class FS2711 {
|
||||
public:
|
||||
static uint8_t detect_i2c_bus_num();
|
||||
|
||||
static bool probe();
|
||||
|
||||
static void start();
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x30, 0x0C, 0x02, 0xF1, 0xF1, 0xF1, 0x02, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xC0, 0xB0, 0x8C, 0x83, 0x80, 0x80, 0x80, 0x80, 0xB3, 0xB3, 0xB3, 0x80, 0x80, 0x80, 0x80, 0x83, 0x8C, 0xB0, 0xC0, 0x00, 0x00};
|
||||
|
||||
#if defined(MODEL_S60) || defined(MODEL_S60P) || defined(MODEL_TS101) || defined(MODEL_T55)
|
||||
#if defined(MODEL_S60) || defined(MODEL_S60P)
|
||||
#if defined(MODEL_S60) || defined(MODEL_S60P) || defined(MODEL_TS101) || defined(MODEL_T55) || defined(MODEL_S99)
|
||||
#if defined(MODEL_S60) || defined(MODEL_S60P) || defined(MODEL_S99)
|
||||
const uint8_t buttonA[] = {
|
||||
// width = 56
|
||||
// height = 32
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "HUB238.hpp"
|
||||
#include "I2CBB2.hpp"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#if POW_PD_EXT == 1
|
||||
|
||||
@@ -14,6 +14,7 @@ void I2CBB2::init() {
|
||||
// Set GPIO's to output open drain
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
|
||||
GPIO_InitStruct.Pin = SDA2_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "cmsis_os.h"
|
||||
#include "configuration.h"
|
||||
#include <OLED.hpp>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -209,21 +210,18 @@ void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle, const ui
|
||||
* of the indicator in pixels (0..<16).
|
||||
*/
|
||||
void OLED::drawScrollIndicator(uint8_t y, uint8_t height) {
|
||||
union u_type {
|
||||
uint32_t whole;
|
||||
uint8_t strips[4];
|
||||
} column;
|
||||
|
||||
column.whole = (1 << height) - 1; // preload a set of set bits of height
|
||||
column.whole <<= y; // Shift down by the y value
|
||||
|
||||
const uint32_t whole = ((1 << height) - 1) << y; // preload a set of set bits of height
|
||||
// Shift down by the y value
|
||||
const uint8_t strips[4] = {static_cast<uint8_t>(whole & 0xff), static_cast<uint8_t>((whole & 0xff00) >> 8 * 1), static_cast<uint8_t>((whole & 0xff0000) >> 8 * 2),
|
||||
static_cast<uint8_t>((whole & 0xff000000) >> 8 * 3)};
|
||||
// Draw a one pixel wide bar to the left with a single pixel as
|
||||
// the scroll indicator.
|
||||
fillArea(OLED_WIDTH - 1, 0, 1, 8, column.strips[0]);
|
||||
fillArea(OLED_WIDTH - 1, 8, 1, 8, column.strips[1]);
|
||||
fillArea(OLED_WIDTH - 1, 0, 1, 8, strips[0]);
|
||||
fillArea(OLED_WIDTH - 1, 8, 1, 8, strips[1]);
|
||||
#if OLED_HEIGHT == 32
|
||||
fillArea(OLED_WIDTH - 1, 16, 1, 8, column.strips[2]);
|
||||
fillArea(OLED_WIDTH - 1, 24, 1, 8, column.strips[3]);
|
||||
fillArea(OLED_WIDTH - 1, 16, 1, 8, strips[2]);
|
||||
fillArea(OLED_WIDTH - 1, 24, 1, 8, strips[3]);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "BSP.h"
|
||||
#include "Settings.h"
|
||||
#include "Types.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
#include "main.hpp"
|
||||
#include "power.hpp"
|
||||
|
||||
@@ -337,68 +337,51 @@ bool pdbs_dpm_evaluate_capability(const pd_msg *capabilities, pd_msg *request) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void add_v_record(pd_msg *cap, uint16_t voltage_mv, int numobj) {
|
||||
|
||||
uint16_t current = (voltage_mv) / getTipResistanceX10(); // In centi-amps
|
||||
|
||||
/* Add a PDO for the desired power. */
|
||||
cap->obj[numobj] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(voltage_mv)) | PD_PDO_SNK_FIXED_CURRENT_SET(current);
|
||||
}
|
||||
void pdbs_dpm_get_sink_capability(pd_msg *cap, const bool isPD3) {
|
||||
/* Keep track of how many PDOs we've added */
|
||||
// int numobj = 0;
|
||||
int numobj = 0;
|
||||
|
||||
// /* If we have no configuration or want something other than 5 V, add a PDO
|
||||
// * for vSafe5V */
|
||||
// /* Minimum current, 5 V, and higher capability. */
|
||||
// cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(5000)) | PD_PDO_SNK_FIXED_CURRENT_SET(DPM_MIN_CURRENT);
|
||||
/* If we have no configuration or want something other than 5 V, add a PDO
|
||||
* for vSafe5V */
|
||||
/* Minimum current, 5 V, and higher capability. */
|
||||
cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(5000)) | PD_PDO_SNK_FIXED_CURRENT_SET(DPM_MIN_CURRENT);
|
||||
// Voltages must be in order of lowest -> highest
|
||||
#if USB_PD_VMAX >= 20
|
||||
add_v_record(cap, 9000, numobj);
|
||||
numobj++;
|
||||
add_v_record(cap, 15000, numobj);
|
||||
numobj++;
|
||||
add_v_record(cap, 20000, numobj);
|
||||
numobj++;
|
||||
#elif USB_PD_VMAX >= 15
|
||||
add_v_record(cap, 9000, numobj);
|
||||
numobj++;
|
||||
add_v_record(cap, 12000, numobj);
|
||||
numobj++;
|
||||
add_v_record(cap, 15000, numobj);
|
||||
numobj++;
|
||||
#elif USB_PD_VMAX >= 12
|
||||
add_v_record(cap, 9000, numobj);
|
||||
numobj++;
|
||||
add_v_record(cap, 12000, numobj);
|
||||
numobj++;
|
||||
#elif USB_PD_VMAX >= 9
|
||||
add_v_record(cap, 9000, numobj);
|
||||
numobj++;
|
||||
#endif
|
||||
|
||||
// /* Get the current we want */
|
||||
// uint16_t voltage = USB_PD_VMAX * 1000; // in mv
|
||||
// if (requested_voltage_mv != 5000) {
|
||||
// voltage = requested_voltage_mv;
|
||||
// }
|
||||
// uint16_t current = (voltage) / getTipResistanceX10(); // In centi-amps
|
||||
/* Set the USB communications capable flag. */
|
||||
cap->obj[0] |= PD_PDO_SNK_FIXED_USB_COMMS;
|
||||
|
||||
// /* Add a PDO for the desired power. */
|
||||
// cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_MV2PDV(voltage)) | PD_PDO_SNK_FIXED_CURRENT_SET(current);
|
||||
|
||||
// /* Get the PDO from the voltage range */
|
||||
// int8_t i = dpm_get_range_fixed_pdo_index(cap);
|
||||
|
||||
// /* If it's vSafe5V, set our vSafe5V's current to what we want */
|
||||
// if (i == 0) {
|
||||
// cap->obj[0] &= ~PD_PDO_SNK_FIXED_CURRENT;
|
||||
// cap->obj[0] |= PD_PDO_SNK_FIXED_CURRENT_SET(current);
|
||||
// } else {
|
||||
// /* If we want more than 5 V, set the Higher Capability flag */
|
||||
// if (PD_MV2PDV(voltage) != PD_MV2PDV(5000)) {
|
||||
// cap->obj[0] |= PD_PDO_SNK_FIXED_HIGHER_CAP;
|
||||
// }
|
||||
|
||||
// /* If the range PDO is a different voltage than the preferred
|
||||
// * voltage, add it to the array. */
|
||||
// if (i > 0 && PD_PDO_SRC_FIXED_VOLTAGE_GET(cap->obj[i]) != PD_MV2PDV(voltage)) {
|
||||
// cap->obj[numobj++] = PD_PDO_TYPE_FIXED | PD_PDO_SNK_FIXED_VOLTAGE_SET(PD_PDO_SRC_FIXED_VOLTAGE_GET(cap->obj[i])) | PD_PDO_SNK_FIXED_CURRENT_SET(PD_PDO_SRC_FIXED_CURRENT_GET(cap->obj[i]));
|
||||
// }
|
||||
|
||||
// /* If we have three PDOs at this point, make sure the last two are
|
||||
// * sorted by voltage. */
|
||||
// if (numobj == 3 && (cap->obj[1] & PD_PDO_SNK_FIXED_VOLTAGE) > (cap->obj[2] & PD_PDO_SNK_FIXED_VOLTAGE)) {
|
||||
// cap->obj[1] ^= cap->obj[2];
|
||||
// cap->obj[2] ^= cap->obj[1];
|
||||
// cap->obj[1] ^= cap->obj[2];
|
||||
// }
|
||||
// /* If we're using PD 3.0, add a PPS APDO for our desired voltage */
|
||||
// if ((hdr_template & PD_HDR_SPECREV) >= PD_SPECREV_3_0) {
|
||||
// cap->obj[numobj++]
|
||||
// = PD_PDO_TYPE_AUGMENTED | PD_APDO_TYPE_PPS | PD_APDO_PPS_MAX_VOLTAGE_SET(PD_MV2PAV(voltage)) | PD_APDO_PPS_MIN_VOLTAGE_SET(PD_MV2PAV(voltage)) |
|
||||
// PD_APDO_PPS_CURRENT_SET(PD_CA2PAI(current));
|
||||
// }
|
||||
// }
|
||||
|
||||
// /* Set the unconstrained power flag. */
|
||||
// if (_unconstrained_power) {
|
||||
// cap->obj[0] |= PD_PDO_SNK_FIXED_UNCONSTRAINED;
|
||||
// }
|
||||
// /* Set the USB communications capable flag. */
|
||||
// cap->obj[0] |= PD_PDO_SNK_FIXED_USB_COMMS;
|
||||
|
||||
// /* Set the Sink_Capabilities message header */
|
||||
// cap->hdr = hdr_template | PD_MSGTYPE_SINK_CAPABILITIES | PD_NUMOBJ(numobj);
|
||||
/* Set the Sink_Capabilities message header */
|
||||
cap->hdr = PD_DATAROLE_UFP | PD_SPECREV_3_0 | PD_POWERROLE_SINK | PD_MSGTYPE_SINK_CAPABILITIES | PD_NUMOBJ(numobj);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "BSP_Power.h"
|
||||
#include "Settings.h"
|
||||
#include "configuration.h"
|
||||
#include <Utils.h>
|
||||
#include <Utils.hpp>
|
||||
|
||||
int32_t Utils::InterpolateLookupTable(const int32_t *lookupTable, const int noItems, const int32_t value) {
|
||||
for (int i = 1; i < (noItems - 1); i++) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Utils.h
|
||||
* Utils.hpp
|
||||
*
|
||||
* Created on: 28 Apr 2021
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#ifndef CORE_DRIVERS_UTILS_H_
|
||||
#define CORE_DRIVERS_UTILS_H_
|
||||
#ifndef CORE_DRIVERS_UTILS_HPP_
|
||||
#define CORE_DRIVERS_UTILS_HPP_
|
||||
#include <stdint.h>
|
||||
class Utils {
|
||||
public:
|
||||
@@ -18,4 +18,4 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif /* CORE_DRIVERS_UTILS_H_ */
|
||||
#endif /* CORE_DRIVERS_UTILS_HPP_ */
|
||||
@@ -123,6 +123,7 @@ typedef enum {
|
||||
* Some devices allow multiple types of tips to be fitted, this allows selecting them or overriding the logic
|
||||
* The first type will be the default (gets value of 0)
|
||||
*/
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
typedef enum {
|
||||
#ifdef AUTO_TIP_SELECTION
|
||||
TIP_TYPE_AUTO, // If the hardware supports automatic detection
|
||||
@@ -142,7 +143,15 @@ typedef enum {
|
||||
// #endif
|
||||
TIP_TYPE_MAX, // Max value marker
|
||||
} tipType_t;
|
||||
uint8_t getUserSelectedTipResistance(); // returns the resistance matching the selected tip type or 0 for auto
|
||||
#else
|
||||
typedef enum {
|
||||
TIP_TYPE_AUTO = 0, // value for the default case
|
||||
TIP_TYPE_MAX = 0, // marker for settings when not supported
|
||||
} tipType_t;
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
// returns the resistance matching the selected tip type or 0 for auto and when not supported
|
||||
uint8_t getUserSelectedTipResistance();
|
||||
|
||||
// Settings wide operations
|
||||
void saveSettings();
|
||||
@@ -162,5 +171,7 @@ void setSettingValue(const enum SettingsOptions option, const uint16_t newValue)
|
||||
// Special access helpers, to reduce logic duplication
|
||||
uint8_t lookupVoltageLevel();
|
||||
uint16_t lookupHallEffectThreshold();
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
const char *lookupTipName(); // Get the name string for the current soldering tip
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
#endif /* SETTINGS_H_ */
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
|
||||
typedef int32_t TemperatureType_t;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct {
|
||||
} SettingConstants;
|
||||
|
||||
static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOptionsLength] = {
|
||||
//{ min, max, increment, default}
|
||||
//{ min, max, increment, default}
|
||||
{ MIN_TEMP_C, MAX_TEMP_F, 5, SOLDERING_TEMP}, // SolderingTemp
|
||||
{ MIN_TEMP_C, MAX_TEMP_F, 5, 150}, // SleepTemp
|
||||
{ 0, 15, 1, SLEEP_TIME}, // SleepTime
|
||||
@@ -87,13 +87,13 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
|
||||
{ 0, 9, 1, 0}, // AccelMissingWarningCounter
|
||||
{ 0, 9, 1, 0}, // PDMissingWarningCounter
|
||||
{ 0, 0xFFFF, 0, 41431 /*EN*/}, // UILanguage
|
||||
{ 0, 50, 1, 20}, // PDNegTimeout
|
||||
{ 0, 50, 1, USB_PD_TIMEOUT}, // PDNegTimeout
|
||||
{ 0, 1, 1, 0}, // OLEDInversion
|
||||
{ MIN_BRIGHTNESS, MAX_BRIGHTNESS, BRIGHTNESS_STEP, DEFAULT_BRIGHTNESS}, // OLEDBrightness
|
||||
{ 0, 6, 1, 1}, // LOGOTime
|
||||
{ 0, 1, 1, 0}, // CalibrateCJC
|
||||
{ 0, 1, 1, 0}, // BluetoothLE
|
||||
{ 0, 2, 1, 1}, // USBPDMode
|
||||
{ 0, 2, 1, 0}, // USBPDMode
|
||||
{ 1, 5, 1, 4}, // ProfilePhases
|
||||
{ MIN_TEMP_C, MAX_TEMP_F, 5, 90}, // ProfilePreheatTemp
|
||||
{ 1, 10, 1, 1}, // ProfilePreheatSpeed
|
||||
@@ -298,16 +298,12 @@ uint8_t lookupVoltageLevel() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
const char *lookupTipName() {
|
||||
// Get the name string for the current soldering tip
|
||||
tipType_t value = (tipType_t)getSettingValue(SettingsOptions::SolderingTipType);
|
||||
|
||||
switch (value) {
|
||||
#ifdef AUTO_TIP_SELECTION
|
||||
case tipType_t::TIP_TYPE_AUTO:
|
||||
return translatedString(Tr->TipTypeAuto);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TIPTYPE_T12
|
||||
case tipType_t::T12_8_OHM:
|
||||
return translatedString(Tr->TipTypeT12Long);
|
||||
@@ -319,7 +315,7 @@ const char *lookupTipName() {
|
||||
return translatedString(Tr->TipTypeT12PTS);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TIPTYE_TS80
|
||||
#ifdef TIPTYPE_TS80
|
||||
case tipType_t::TS80_4_5_OHM:
|
||||
return translatedString(Tr->TipTypeTS80);
|
||||
break;
|
||||
@@ -328,13 +324,19 @@ const char *lookupTipName() {
|
||||
case tipType_t::JBC_210_2_5_OHM:
|
||||
return translatedString(Tr->TipTypeJBCC210);
|
||||
break;
|
||||
#endif
|
||||
#ifdef AUTO_TIP_SELECTION
|
||||
case tipType_t::TIP_TYPE_AUTO:
|
||||
#endif
|
||||
default:
|
||||
return nullptr;
|
||||
return translatedString(Tr->TipTypeAuto);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
// Returns the resistance for the current tip selected by the user or 0 for auto
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
uint8_t getUserSelectedTipResistance() {
|
||||
tipType_t value = (tipType_t)getSettingValue(SettingsOptions::SolderingTipType);
|
||||
|
||||
@@ -370,3 +372,6 @@ uint8_t getUserSelectedTipResistance() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
uint8_t getUserSelectedTipResistance() { return tipType_t::TIP_TYPE_AUTO; }
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
@@ -26,7 +26,7 @@ static void displayInputMinVRange(void);
|
||||
static void displayQCInputV(void);
|
||||
#endif /* POW_QC */
|
||||
|
||||
#ifdef POW_PD
|
||||
#if defined(POW_PD) || POW_PD_EXT == 2
|
||||
static void displayPDNegTimeout(void);
|
||||
static void displayUSBPDMode(void);
|
||||
#endif /* POW_PD */
|
||||
@@ -116,14 +116,16 @@ static bool showHallEffect(void);
|
||||
#endif /* HALL_SENSOR */
|
||||
|
||||
// Tip type selection
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
static void displaySolderingTipType(void);
|
||||
static bool showSolderingTipType(void);
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
// Menu functions
|
||||
|
||||
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
|
||||
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD) || defined(POW_PD) || POW_PD_EXT == 2
|
||||
static void displayPowerMenu(void);
|
||||
#endif /* POW_DC or POW_QC */
|
||||
#endif /* POW_DC or POW_QC or POW_PD or POD_PD_EXT 2*/
|
||||
|
||||
static void displaySolderingMenu(void);
|
||||
static void displayPowerSavingMenu(void);
|
||||
@@ -234,7 +236,7 @@ const menuitem rootSettingsMenu[] {
|
||||
/* ^^^^ end of menu marker. DO NOT REMOVE ^^^^ */
|
||||
};
|
||||
|
||||
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
|
||||
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD) || POW_PD_EXT == 2
|
||||
const menuitem powerMenu[] = {
|
||||
/*
|
||||
* Power Source
|
||||
@@ -253,7 +255,7 @@ const menuitem powerMenu[] = {
|
||||
/* Voltage input */
|
||||
{SETTINGS_DESC(SettingsItemIndex::QCMaxVoltage), nullptr, displayQCInputV, nullptr, SettingsOptions::QCIdealVoltage, SettingsItemIndex::QCMaxVoltage, 4},
|
||||
#endif
|
||||
#ifdef POW_PD
|
||||
#if defined(POW_PD) || POW_PD_EXT == 2
|
||||
/* PD timeout setup */
|
||||
{SETTINGS_DESC(SettingsItemIndex::PDNegTimeout), nullptr, displayPDNegTimeout, nullptr, SettingsOptions::PDNegTimeout, SettingsItemIndex::PDNegTimeout, 6},
|
||||
/* Toggle PPS & EPR */
|
||||
@@ -267,12 +269,12 @@ const menuitem powerMenu[] = {
|
||||
|
||||
const menuitem solderingMenu[] = {
|
||||
/*
|
||||
* Tip Type
|
||||
* Boost Mode Temp
|
||||
* Auto Start
|
||||
* Temp Change Short Step
|
||||
* Temp Change Long Step
|
||||
* Locking Mode
|
||||
* Tip Type
|
||||
* Profile Phases
|
||||
* Profile Preheat Temperature
|
||||
* Profile Preheat Max Temperature Change Per Second
|
||||
@@ -288,8 +290,6 @@ const menuitem solderingMenu[] = {
|
||||
* Profile Phase 5 Duration (s)
|
||||
* Profile Cooldown Max Temperature Change Per Second
|
||||
*/
|
||||
/* Tip Type */
|
||||
{SETTINGS_DESC(SettingsItemIndex::SolderingTipType), nullptr, displaySolderingTipType, showSolderingTipType, SettingsOptions::SolderingTipType, SettingsItemIndex::SolderingTipType, 5},
|
||||
/* Boost Temp */
|
||||
{SETTINGS_DESC(SettingsItemIndex::BoostTemperature), setBoostTemp, displayBoostTemp, nullptr, SettingsOptions::BoostTemp, SettingsItemIndex::BoostTemperature, 5},
|
||||
/* Auto start */
|
||||
@@ -300,6 +300,10 @@ const menuitem solderingMenu[] = {
|
||||
{SETTINGS_DESC(SettingsItemIndex::TempChangeLongStep), nullptr, displayTempChangeLongStep, nullptr, SettingsOptions::TempChangeLongStep, SettingsItemIndex::TempChangeLongStep, 6},
|
||||
/* Locking Mode */
|
||||
{SETTINGS_DESC(SettingsItemIndex::LockingMode), nullptr, displayLockingMode, nullptr, SettingsOptions::LockingMode, SettingsItemIndex::LockingMode, 7},
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
/* Tip Type */
|
||||
{SETTINGS_DESC(SettingsItemIndex::SolderingTipType), nullptr, displaySolderingTipType, showSolderingTipType, SettingsOptions::SolderingTipType, SettingsItemIndex::SolderingTipType, 5},
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
#ifdef PROFILE_SUPPORT
|
||||
/* Profile Phases */
|
||||
{SETTINGS_DESC(SettingsItemIndex::ProfilePhases), nullptr, displayProfilePhases, nullptr, SettingsOptions::ProfilePhases, SettingsItemIndex::ProfilePhases, 7},
|
||||
@@ -447,7 +451,7 @@ const menuitem advancedMenu[] = {
|
||||
/* clang-format on */
|
||||
|
||||
const menuitem *subSettingsMenus[] {
|
||||
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD)
|
||||
#if defined(POW_DC) || defined(POW_QC) || defined(POW_PD) || POW_PD_EXT == 2
|
||||
powerMenu,
|
||||
#endif
|
||||
solderingMenu, PowerSavingMenu, UIMenu, advancedMenu,
|
||||
@@ -532,7 +536,7 @@ static void displayQCInputV(void) {
|
||||
|
||||
#endif /* POW_QC */
|
||||
|
||||
#ifdef POW_PD /* POW_PD */
|
||||
#if defined(POW_PD) || POW_PD_EXT == 2 /* POW_PD */
|
||||
|
||||
static void displayPDNegTimeout(void) {
|
||||
auto value = getSettingValue(SettingsOptions::PDNegTimeout);
|
||||
@@ -575,7 +579,6 @@ static void setBoostTemp(void) {
|
||||
if (value >= MAX_TEMP_F) {
|
||||
value = 0; // jump to off
|
||||
}
|
||||
setSettingValue(SettingsOptions::BoostTemp, value);
|
||||
} else {
|
||||
if (value == 0) {
|
||||
value = MIN_BOOST_TEMP_C; // loop back at 250
|
||||
@@ -650,14 +653,13 @@ static void setProfileTemp(const enum SettingsOptions option) {
|
||||
if (temp > MAX_TEMP_F) {
|
||||
temp = MIN_TEMP_F;
|
||||
}
|
||||
setSettingValue(option, temp);
|
||||
} else {
|
||||
temp += 5;
|
||||
if (temp > MAX_TEMP_C) {
|
||||
temp = MIN_TEMP_C;
|
||||
}
|
||||
setSettingValue(option, temp);
|
||||
}
|
||||
setSettingValue(option, temp);
|
||||
}
|
||||
|
||||
static void setProfilePreheatTemp(void) { return setProfileTemp(SettingsOptions::ProfilePreheatTemp); }
|
||||
@@ -708,14 +710,13 @@ static void setSleepTemp(void) {
|
||||
if (temp > 580) {
|
||||
temp = 60;
|
||||
}
|
||||
setSettingValue(SettingsOptions::SleepTemp, temp);
|
||||
} else {
|
||||
temp += 10;
|
||||
if (temp > 300) {
|
||||
temp = 10;
|
||||
}
|
||||
setSettingValue(SettingsOptions::SleepTemp, temp);
|
||||
}
|
||||
setSettingValue(SettingsOptions::SleepTemp, temp);
|
||||
}
|
||||
|
||||
static void displaySleepTemp(void) { OLED::printNumber(getSettingValue(SettingsOptions::SleepTemp), 3, FontStyle::LARGE); }
|
||||
@@ -755,20 +756,23 @@ static bool showHallEffect(void) { return getHallSensorFitted(); }
|
||||
static void displayHallEffectSleepTime(void) {
|
||||
if (getSettingValue(SettingsOptions::HallEffectSleepTime)) {
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::HallEffectSleepTime) * 5, 2, FontStyle::LARGE, false);
|
||||
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
|
||||
} else {
|
||||
// When sleep time is set to zero, we sleep for 1 second anyways. This is the default.
|
||||
OLED::printNumber(1, 2, FontStyle::LARGE, false);
|
||||
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
|
||||
}
|
||||
OLED::print(LargeSymbolSeconds, FontStyle::LARGE);
|
||||
}
|
||||
#endif /* HALL_SENSOR */
|
||||
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
static void displaySolderingTipType(void) {
|
||||
// TODO wrapping X value
|
||||
OLED::print(lookupTipName(), FontStyle::SMALL, 255, OLED::getCursorX());
|
||||
}
|
||||
// If there is no detection, and no options, max is 0
|
||||
static bool showSolderingTipType(void) { return tipType_t::TIP_TYPE_MAX != 0; }
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
static void setTempF(const enum SettingsOptions option) {
|
||||
uint16_t Temp = getSettingValue(option);
|
||||
if (getSettingValue(SettingsOptions::TemperatureInF)) {
|
||||
|
||||
@@ -23,22 +23,26 @@ extern "C" {
|
||||
#include "USBPD.h"
|
||||
#include "pd.h"
|
||||
#endif
|
||||
#if POW_PD_EXT == 2
|
||||
#include "FS2711.hpp"
|
||||
#include "FS2711_defines.h"
|
||||
#endif
|
||||
|
||||
enum class OperatingMode {
|
||||
StartupLogo = 0, // Showing the startup logo
|
||||
CJCCalibration, // Cold Junction Calibration
|
||||
StartupWarnings, // Startup checks and warnings
|
||||
InitialisationDone, // Special state we use just before we to home screen at first startup. Allows jumping to extra startup states
|
||||
HomeScreen, // Home/Idle screen that is the main launchpad to other modes
|
||||
Soldering, // Main soldering operating mode
|
||||
SolderingProfile, // Soldering by following a profile, used for reflow for example
|
||||
Sleeping, // Sleep state holds iron at lower sleep temp
|
||||
Hibernating, // Like sleeping but keeps heater fully off until woken
|
||||
SettingsMenu, // Settings Menu
|
||||
DebugMenuReadout, // Debug metrics
|
||||
TemperatureAdjust, // Set point temperature adjustment
|
||||
UsbPDDebug, // USB PD debugging information
|
||||
ThermalRunaway, // Thermal Runaway warning state.
|
||||
StartupLogo=10, // Showing the startup logo
|
||||
CJCCalibration=11, // Cold Junction Calibration
|
||||
StartupWarnings=12, // Startup checks and warnings
|
||||
InitialisationDone=13, // Special state we use just before we to home screen at first startup. Allows jumping to extra startup states
|
||||
HomeScreen=0, // Home/Idle screen that is the main launchpad to other modes
|
||||
Soldering=1, // Main soldering operating mode
|
||||
SolderingProfile=6, // Soldering by following a profile, used for reflow for example
|
||||
Sleeping=3, // Sleep state holds iron at lower sleep temp
|
||||
Hibernating=14, // Like sleeping but keeps heater fully off until woken
|
||||
SettingsMenu=4, // Settings Menu
|
||||
DebugMenuReadout=5, // Debug metrics
|
||||
TemperatureAdjust=7, // Set point temperature adjustment
|
||||
UsbPDDebug=8, // USB PD debugging information
|
||||
ThermalRunaway=9, // Thermal Runaway warning state.
|
||||
};
|
||||
|
||||
enum class TransitionAnimation {
|
||||
|
||||
@@ -63,6 +63,13 @@ int8_t getPowerSourceNumber(void) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if POW_PD_EXT == 2
|
||||
if (FS2711::has_run_selection()) {
|
||||
poweredbyPD = true;
|
||||
// FS2711IC has VBUS always connected
|
||||
pdHasVBUSConnected = true;
|
||||
}
|
||||
#endif
|
||||
if (poweredbyPD) {
|
||||
if (pdHasVBUSConnected) {
|
||||
|
||||
@@ -6,7 +6,7 @@ ALL_MINIWARE_MODELS=TS100 TS80 TS80P TS101
|
||||
ALL_PINECIL_MODELS=Pinecil
|
||||
ALL_PINECIL_V2_MODELS=Pinecilv2
|
||||
ALL_MHP30_MODELS=MHP30
|
||||
ALL_SEQURE_MODELS=S60 S60P T55
|
||||
ALL_SEQURE_MODELS=S60 S60P T55 S99
|
||||
ALL_MODELS=$(ALL_MINIWARE_MODELS) $(ALL_PINECIL_MODELS) $(ALL_MHP30_MODELS) $(ALL_PINECIL_V2_MODELS) $(ALL_SEQURE_MODELS)
|
||||
|
||||
ifneq ($(model),$(filter $(model),$(ALL_MODELS)))
|
||||
@@ -145,6 +145,9 @@ flash_size=62k
|
||||
ifeq ($(model), S60P)
|
||||
bootldr_size=0x5000
|
||||
DEVICE_DFU_ADDRESS=0x08005000
|
||||
else ifeq ($(model), S99)
|
||||
bootldr_size=0x4c00
|
||||
DEVICE_DFU_ADDRESS=0x08004c00
|
||||
else
|
||||
# S60 or T55
|
||||
bootldr_size=0x4400
|
||||
@@ -287,7 +290,7 @@ DEV_GLOBAL_DEFS=-DCFG_FREERTOS \
|
||||
# -DCONFIG_BT_SMP
|
||||
|
||||
# Required to be turned off due to their drivers tripping warnings
|
||||
DEV_CFLAGS=-Wno-error=enum-conversion -Wno-type-limits -Wno-implicit-fallthrough
|
||||
DEV_CFLAGS=-Wno-error=enum-conversion -Wno-type-limits -Wno-implicit-fallthrough -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types
|
||||
DEV_CXXFLAGS=$(DEV_CFLAGS)
|
||||
flash_size=128k
|
||||
bootldr_size=0x0
|
||||
|
||||
@@ -397,6 +397,9 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
||||
/* Check for multiplication overflow. */
|
||||
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
|
||||
|
||||
/* Check for addition overflow. */
|
||||
configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
|
||||
|
||||
/* Allocate the queue and storage area. Justification for MISRA
|
||||
* deviation as follows: pvPortMalloc() always ensures returned memory
|
||||
* blocks are aligned per the requirements of the MCU stack. In this case
|
||||
|
||||
@@ -6,7 +6,7 @@ TRANSLATION_DIR="../Translations"
|
||||
# AVAILABLE_LANGUAGES will be calculating according to json files in $TRANSLATION_DIR
|
||||
AVAILABLE_LANGUAGES=()
|
||||
BUILD_LANGUAGES=()
|
||||
AVAILABLE_MODELS=("TS100" "TS80" "TS80P" "Pinecil" "MHP30" "Pinecilv2" "S60" "S60P" "T55" "TS101")
|
||||
AVAILABLE_MODELS=("TS100" "TS80" "TS80P" "Pinecil" "MHP30" "Pinecilv2" "S60" "S60P" "T55" "S99" "TS101")
|
||||
BUILD_MODELS=()
|
||||
|
||||
builder_info() {
|
||||
|
||||
Reference in New Issue
Block a user