mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
4
.github/workflows/push.yml
vendored
4
.github/workflows/push.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
name: ${{ matrix.model }}
|
||||
path: |
|
||||
source/Hexfile/${{ matrix.model }}_*.hex
|
||||
source/Hexfile/${{ matrix.model }}_*.bin
|
||||
source/Hexfile/${{ matrix.model }}_*.dfu
|
||||
source/Hexfile/LICENSE
|
||||
source/Hexfile/LICENSE_RELEASE.md
|
||||
if-no-files-found: error
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
name: ${{ matrix.model }}_multi-lang
|
||||
path: |
|
||||
source/Hexfile/${{ matrix.model }}_*.hex
|
||||
source/Hexfile/${{ matrix.model }}_*.bin
|
||||
source/Hexfile/${{ matrix.model }}_*.dfu
|
||||
source/Hexfile/LICENSE
|
||||
source/Hexfile/LICENSE_RELEASE.md
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -4,9 +4,9 @@ LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
||||
WORKDIR /build
|
||||
# Add extra mirrors for options
|
||||
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal main restricted universe multiverse" > /etc/apt/sources.list && \
|
||||
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
|
||||
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update
|
||||
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
|
||||
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update
|
||||
# Install dependencies to build the firmware
|
||||
RUN apt-get install -y \
|
||||
make \
|
||||
@@ -15,6 +15,7 @@ RUN apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
clang-format \
|
||||
dfu-util \
|
||||
wget --no-install-recommends && \
|
||||
apt-get clean
|
||||
RUN python3 -m pip install bdflib
|
||||
|
||||
@@ -83,9 +83,12 @@ Check the extension of your firmware, it should be `.RDY` now.
|
||||
## Pinecil (Pine64)
|
||||
|
||||
The MCU used in the Pinecil supports usb-dfu.
|
||||
|
||||
To enter DFU mode, hold the button at the back of the iron while connecting to usb over usb-c.
|
||||
Generally all usb controllers work, but some hubs have issues so avoiding hubs may be best.
|
||||
|
||||
Once the device is connected while holding the button, the screen will stay **off**.
|
||||
|
||||
This is normal, and then you can use the appropriate tool to load the .hex or .bin file as per your OS.
|
||||
|
||||
You can also refer to the Pine64 [Wiki](https://wiki.pine64.org/wiki/Pinecil).
|
||||
@@ -95,22 +98,21 @@ You can also refer to the Pine64 [Wiki](https://wiki.pine64.org/wiki/Pinecil).
|
||||
Using `dfu-util` you can flash the firmware using a command line as such:
|
||||
|
||||
```
|
||||
dfu-util -d 28e9:0189 -a 0 -D Pinecil_EN.bin -s 0x08000000:mass-erase:force
|
||||
```
|
||||
|
||||
If this command fails with `dfu-util: Error during special command "MASS_ERASE" get_status`, try this instead:
|
||||
|
||||
```
|
||||
dfu-util -d 28e9:0189 -a 0 -D Pinecil_EN.bin -s 0x08000000
|
||||
dfu-util -D Pinecil_EN.dfu
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
For windows the easiest tool to use is the vendors gui tool from [here](http://www.gd32mcu.com/download/down/document_id/176/path_type/1).
|
||||
|
||||
Should the link break, its called "GD32 MCU Dfu Tool" and can be grabbed from http://www.gd32mcu.com/en/download/.
|
||||
|
||||
You will also need the matching drivers from [here](http://www.gd32mcu.com/download/down/document_id/244/path_type/1) installed if you have not used gigadevice parts before.
|
||||
|
||||
These are called "GD32 Dfu Drivers" if the link breaks.
|
||||
|
||||
You can also use dfu-util if you wish to set it up, but that is better documented by others
|
||||
|
||||
### FAQ
|
||||
|
||||
#### [Miniware] The file is showing up with the extension `.ERR`
|
||||
|
||||
@@ -1,5 +1,48 @@
|
||||
# Version Changes
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
## V2.15
|
||||
|
||||
|
||||
## Feature upgrades:
|
||||
|
||||
* MHP30 support
|
||||
* Multi-lingual firmware combinations now exist for Pinecil
|
||||
* More fine grained voltage controlled options
|
||||
* USB-PD improvements (version one and two)
|
||||
* More configuration options for power pulse
|
||||
* All font / character encoding has been very reworked
|
||||
* More translation updates than one can count
|
||||
* More languages 😱
|
||||
|
||||
### MHP30
|
||||
|
||||
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.
|
||||
Also kudo's to @Vinigas and @GoJian for helping with testing.
|
||||
This is not a _final_ version I'm sure, but this is a working, usable version of firmware support.
|
||||
Programs the same as any one Miniware unit using drag and drop.
|
||||
**Note: The boot logo scripts will need updates for this unit, so not supported yet.**
|
||||
|
||||
The flood doors are now open for feature requests for this unit :)
|
||||
|
||||
## V2.14
|
||||
|
||||
- Fixing auto rotation bug in the LIS accelerometer in the TS80/TS80P
|
||||
|
||||
@@ -4,25 +4,19 @@
|
||||
"fonts": ["ascii_basic", "latin_extended"],
|
||||
"tempUnitFahrenheit": false,
|
||||
"messages": {
|
||||
"SettingsCalibrationDone": "Kalibrierung abgeschlossen!",
|
||||
"SettingsCalibrationWarning": "Vor dem Fortfahren muss die Lötspitze vollständig abgekühlt sein!",
|
||||
"SettingsResetWarning": "Sicher, dass alle Werte zurückgesetzt werden sollen?",
|
||||
"UVLOWarningString": "V niedr.",
|
||||
"UndervoltageString": "Unterspannung",
|
||||
"InputVoltageString": "V Eingang: ",
|
||||
"WarningTipTempString": "Temperatur: ",
|
||||
"BadTipString": "Spitze Defekt",
|
||||
"SleepingSimpleString": "Zzzz",
|
||||
"SleepingAdvancedString": "Ruhemodus...",
|
||||
"WarningSimpleString": "HEISS!",
|
||||
"WarningAdvancedString": "! Achtung Heiß !",
|
||||
"SleepingTipAdvancedString": "Temp:",
|
||||
"IdleTipString": "Ist:",
|
||||
"IdleSetString": " Soll:",
|
||||
"TipDisconnectedString": "Spitze fehlt",
|
||||
"SolderingAdvancedPowerPrompt": "Leistung: ",
|
||||
"OffString": "Aus",
|
||||
"YourGainMessage": "Dein Faktor:"
|
||||
},
|
||||
"messagesWarn": {
|
||||
"ResetOKMessage": "Reset OK",
|
||||
|
||||
@@ -1,213 +1,336 @@
|
||||
{
|
||||
"languageCode": "SK",
|
||||
"languageLocalName": "Slovenčina",
|
||||
"fonts": ["ascii_basic", "latin_extended"],
|
||||
"messages": {
|
||||
"SettingsCalibrationDone": "Kalibrácia hotová!",
|
||||
"SettingsCalibrationWarning": "Najprv sa prosím uistite, že hrot má izbovú teplotu!",
|
||||
"SettingsResetWarning": "Naozaj chcete obnovit továrenské nastavenia?",
|
||||
"UVLOWarningString": "Nízke U!",
|
||||
"UndervoltageString": "Nízke napätie",
|
||||
"InputVoltageString": "Vstupné U: ",
|
||||
"WarningTipTempString": "Tep. hrotu: ",
|
||||
"BadTipString": "ZLÝ HROT",
|
||||
"SleepingSimpleString": "Chrr",
|
||||
"SleepingAdvancedString": "Pokojový režim..",
|
||||
"WarningSimpleString": "PÁLI",
|
||||
"WarningAdvancedString": "HROT JE HORÚCI !",
|
||||
"SleepingTipAdvancedString": "Hrot:",
|
||||
"IdleTipString": "Hrot:",
|
||||
"IdleSetString": "Cieľ:",
|
||||
"TipDisconnectedString": "HROT ODPOJENÝ",
|
||||
"SolderingAdvancedPowerPrompt": "Výkon: ",
|
||||
"OffString": "Vyp",
|
||||
"YourGainMessage": "Zisk:"
|
||||
},
|
||||
"messagesWarn": {
|
||||
"ResetOKMessage": "Reset OK",
|
||||
"SettingsResetMessage": ["Tov. nas. obnov.", ""],
|
||||
"NoAccelerometerMessage": ["Bez pohyb. senz.", ""],
|
||||
"NoPowerDeliveryMessage": ["Chýba čip USB-PD", ""],
|
||||
"LockingKeysString": "ZABLOK.",
|
||||
"UnlockingKeysString": "ODBLOK.",
|
||||
"WarningKeysLockedString": "!ZABLOK!",
|
||||
"WarningThermalRunaway": ["Thermal", "Runaway"]
|
||||
},
|
||||
"characters": {
|
||||
"SettingRightChar": "P",
|
||||
"SettingLeftChar": "L",
|
||||
"SettingAutoChar": "A",
|
||||
"SettingOffChar": "Z",
|
||||
"SettingSlowChar": "P",
|
||||
"SettingMediumChar": "M",
|
||||
"SettingFastChar": "R",
|
||||
"SettingStartNoneChar": "V",
|
||||
"SettingStartSolderingChar": "Z",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "I",
|
||||
"SettingSensitivityOff": "Z",
|
||||
"SettingSensitivityLow": "N",
|
||||
"SettingSensitivityMedium": "S",
|
||||
"SettingSensitivityHigh": "V",
|
||||
"SettingLockDisableChar": "Z",
|
||||
"SettingLockBoostChar": "B",
|
||||
"SettingLockFullChar": "P",
|
||||
"SettingNAChar": "N/A"
|
||||
},
|
||||
"menuGroups": {
|
||||
"PowerMenu": {
|
||||
"text2": ["Power", "settings"],
|
||||
"desc": "Power settings"
|
||||
},
|
||||
"SolderingMenu": {
|
||||
"text2": ["Nastavenie", "spájkovania"],
|
||||
"desc": "Nastavenie spájkovania"
|
||||
},
|
||||
"PowerSavingMenu": {
|
||||
"text2": ["Úsporný", "režim"],
|
||||
"desc": "Nastavenia režimov úspory energie"
|
||||
},
|
||||
"UIMenu": {
|
||||
"text2": ["Nastavenie", "zobrazenia"],
|
||||
"desc": "Nastavenie zobrazenia"
|
||||
},
|
||||
"AdvancedMenu": {
|
||||
"text2": ["Pokročilé", "nastavenia"],
|
||||
"desc": "Pokročilé nastavenia"
|
||||
}
|
||||
},
|
||||
"menuOptions": {
|
||||
"DCInCutoff": {
|
||||
"text2": ["Zdroj", "napätia"],
|
||||
"desc": "Zdroj napätia. Nastavenie napätia pre vypnutie (cutoff) (DC=10V | nS=n*3.3V pre LiIon články)"
|
||||
},
|
||||
"SleepTemperature": {
|
||||
"text2": ["Pokojová", "teplota"],
|
||||
"desc": "Pokojová teplota (v nastavených jednotkách)"
|
||||
},
|
||||
"SleepTimeout": {
|
||||
"text2": ["Pokojový", "režim po"],
|
||||
"desc": "Pokojový režim po (S=sekundách | M=minútach)"
|
||||
},
|
||||
"ShutdownTimeout": {
|
||||
"text2": ["Vypnutie", "po"],
|
||||
"desc": "Čas na vypnutie (minúty)"
|
||||
},
|
||||
"MotionSensitivity": {
|
||||
"text2": ["Citlivosť", "pohybu"],
|
||||
"desc": "Citlivosť detekcie pohybu (0=Vyp | 1=Min | ... | 9=Max)"
|
||||
},
|
||||
"TemperatureUnit": {
|
||||
"text2": ["Jednotka", "teploty"],
|
||||
"desc": "Jednotky merania teploty (C=stupne Celzia | F=stupne Fahrenheita)"
|
||||
},
|
||||
"AdvancedIdle": {
|
||||
"text2": ["Detaily v", "pokoj. režime"],
|
||||
"desc": "Zobraziť detailné informácie v pokojovom režime (T=Zap | F=Vyp)"
|
||||
},
|
||||
"DisplayRotation": {
|
||||
"text2": ["Orientácia", "displeja"],
|
||||
"desc": "Orientácia displeja (P=Pravák | L=Ľavák | A=Auto)"
|
||||
},
|
||||
"BoostTemperature": {
|
||||
"text2": ["Boost", "teplota"],
|
||||
"desc": "Cieľová teplota pre prudký náhrev (v nastavených jednotkách)"
|
||||
},
|
||||
"AutoStart": {
|
||||
"text2": ["Automatické", "spustenie"],
|
||||
"desc": "Pri štarte spustiť režim spájkovania (V=Vyp | Z=Spájkovanie | S=Spanok | I=Spanok izbová teplota)"
|
||||
},
|
||||
"CooldownBlink": {
|
||||
"text2": ["Blikanie pri", "chladnutí"],
|
||||
"desc": "Blikanie ukazovateľa teploty počas chladnutia hrotu"
|
||||
},
|
||||
"TemperatureCalibration": {
|
||||
"text2": ["Kalibrácia", "teploty"],
|
||||
"desc": "Kalibrácia posunu teploty hrotu"
|
||||
},
|
||||
"SettingsReset": {
|
||||
"text2": ["Obnovenie", "nastavení"],
|
||||
"desc": "Obnovenie nastavení na pôvodné hodnoty"
|
||||
},
|
||||
"VoltageCalibration": {
|
||||
"text2": ["Kalibrácia", "nap. napätia"],
|
||||
"desc": "Kalibrácia napájacieho napätia. Krátke stlačenie mení nastavenie, dlhé stlačenie pre návrat"
|
||||
},
|
||||
"AdvancedSoldering": {
|
||||
"text2": ["Detaily počas", "spájkovania"],
|
||||
"desc": "Zobrazenie detailov počas spájkovania"
|
||||
},
|
||||
"ScrollingSpeed": {
|
||||
"text2": ["Rýchlosť", "skrolovania"],
|
||||
"desc": "Rýchlosť pohybu tohto textu"
|
||||
},
|
||||
"QCMaxVoltage": {
|
||||
"text2": ["Obmedzenie", "výkonu"],
|
||||
"desc": "Obmedzenie výkonu podľa použitého zdroja"
|
||||
},
|
||||
"PDNegTimeout": {
|
||||
"text2": ["PD", "timeout"],
|
||||
"desc": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers (0: disabled)"
|
||||
},
|
||||
"PowerLimit": {
|
||||
"text2": ["Obmedzenie", "výkonu"],
|
||||
"desc": "Obmedzenie výkonu podľa použitého zdroja (watt)"
|
||||
},
|
||||
"ReverseButtonTempChange": {
|
||||
"text2": ["Otočenie", "tlačidiel +/-"],
|
||||
"desc": "Prehodenie tlačidiel na nastavovanie teploty"
|
||||
},
|
||||
"TempChangeShortStep": {
|
||||
"text2": ["Malý krok", "teploty"],
|
||||
"desc": "Zmena teploty pri krátkom stlačení tlačidla"
|
||||
},
|
||||
"TempChangeLongStep": {
|
||||
"text2": ["Veľký krok", "teploty"],
|
||||
"desc": "Zmena teploty pri držaní tlačidla"
|
||||
},
|
||||
"PowerPulsePower": {
|
||||
"text2": ["Intenzita", "impulzu"],
|
||||
"desc": "Impulz udržujúci napájací zdroj zapnutý (power banky) (watt)"
|
||||
},
|
||||
"HallEffSensitivity": {
|
||||
"text2": ["Citliv.", "Hall"],
|
||||
"desc": "Citlivosť Halloveho senzora pre detekciu spánku (Z=Zakázať | N=Nízka | S=Stredná | V=Vysoká)"
|
||||
},
|
||||
"LockingMode": {
|
||||
"text2": ["Povoliť zámok", "tlačidiel"],
|
||||
"desc": "Zamknutie tlačidiel - dlhé stlačenie oboch naraz počas spájkovania (Z=Zakázať | B=Okrem boost | P=Plné zamknutie)"
|
||||
},
|
||||
"MinVolCell": {
|
||||
"text2": ["Minimum", "voltage"],
|
||||
"desc": "Minimum allowed voltage per cell (3S: 3 - 3.7V | 4-6S: 2.4 - 3.7V)"
|
||||
},
|
||||
"AnimLoop": {
|
||||
"text2": ["Anim.", "loop"],
|
||||
"desc": "Loop icon animations in root menu"
|
||||
},
|
||||
"AnimSpeed": {
|
||||
"text2": ["Anim.", "speed"],
|
||||
"desc": "Speed of icon animations in menu (O=off | L=low | M=medium | H=high)"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": ["Power pulse", "wait time"],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": ["Power pulse", "duration"],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
},
|
||||
"LanguageSwitch": {
|
||||
"text2": ["Jazyk:", " SK Slovenčina"],
|
||||
"desc": ""
|
||||
},
|
||||
"Brightness": {
|
||||
"text2": ["Screen", "Brightness"],
|
||||
"desc": "Adjust the contrast/brightness of the OLED screen"
|
||||
},
|
||||
"ColourInversion": {
|
||||
"text2": ["Screen", "Invert"],
|
||||
"desc": "Invert the colours of the OLED screen"
|
||||
}
|
||||
}
|
||||
"languageCode": "SK",
|
||||
"languageLocalName": "Slovenčina",
|
||||
"fonts": [
|
||||
"ascii_basic",
|
||||
"latin_extended"
|
||||
],
|
||||
"messages": {
|
||||
"SettingsCalibrationWarning": "Najprv sa prosím uistite, že hrot má izbovú teplotu!",
|
||||
"SettingsResetWarning": "Naozaj chcete obnoviť továrenské nastavenia?",
|
||||
"UVLOWarningString": "Nízke U!",
|
||||
"UndervoltageString": "Nízke napätie",
|
||||
"InputVoltageString": "Vstupné U: ",
|
||||
"SleepingSimpleString": "Chrr",
|
||||
"SleepingAdvancedString": "Pokojový režim..",
|
||||
"SleepingTipAdvancedString": "Hrot:",
|
||||
"IdleTipString": "Hrot:",
|
||||
"IdleSetString": "Cieľ:",
|
||||
"TipDisconnectedString": "HROT ODPOJENÝ",
|
||||
"SolderingAdvancedPowerPrompt": "Výkon: ",
|
||||
"OffString": "Vyp"
|
||||
},
|
||||
"messagesWarn": {
|
||||
"ResetOKMessage": "Reset OK",
|
||||
"SettingsResetMessage": [
|
||||
"Nastavenia",
|
||||
"resetované"
|
||||
],
|
||||
"NoAccelerometerMessage": [
|
||||
"Bez pohyb.",
|
||||
"senzora"
|
||||
],
|
||||
"NoPowerDeliveryMessage": [
|
||||
"Chýba čip",
|
||||
"USB-PD"
|
||||
],
|
||||
"LockingKeysString": "ZABLOK.",
|
||||
"UnlockingKeysString": "ODBLOK.",
|
||||
"WarningKeysLockedString": "!ZABLOK!",
|
||||
"WarningThermalRunaway": [
|
||||
"Únik",
|
||||
"Tepla"
|
||||
]
|
||||
},
|
||||
"characters": {
|
||||
"SettingRightChar": "P",
|
||||
"SettingLeftChar": "L",
|
||||
"SettingAutoChar": "A",
|
||||
"SettingOffChar": "Z",
|
||||
"SettingSlowChar": "P",
|
||||
"SettingMediumChar": "S",
|
||||
"SettingFastChar": "R",
|
||||
"SettingStartNoneChar": "V",
|
||||
"SettingStartSolderingChar": "Z",
|
||||
"SettingStartSleepChar": "S",
|
||||
"SettingStartSleepOffChar": "I",
|
||||
"SettingSensitivityOff": "Z",
|
||||
"SettingSensitivityLow": "N",
|
||||
"SettingSensitivityMedium": "S",
|
||||
"SettingSensitivityHigh": "V",
|
||||
"SettingLockDisableChar": "Z",
|
||||
"SettingLockBoostChar": "B",
|
||||
"SettingLockFullChar": "P",
|
||||
"SettingNAChar": "N/A"
|
||||
},
|
||||
"menuGroups": {
|
||||
"PowerMenu": {
|
||||
"text2": [
|
||||
"Nastavenie",
|
||||
"výkonu"
|
||||
],
|
||||
"desc": "Nastavenie výkonu"
|
||||
},
|
||||
"SolderingMenu": {
|
||||
"text2": [
|
||||
"Nastavenie",
|
||||
"spájkovania"
|
||||
],
|
||||
"desc": "Nastavenie spájkovania"
|
||||
},
|
||||
"PowerSavingMenu": {
|
||||
"text2": [
|
||||
"Úsporný",
|
||||
"režim"
|
||||
],
|
||||
"desc": "Nastavenia režimov úspory energie"
|
||||
},
|
||||
"UIMenu": {
|
||||
"text2": [
|
||||
"Nastavenie",
|
||||
"zobrazenia"
|
||||
],
|
||||
"desc": "Nastavenie zobrazenia"
|
||||
},
|
||||
"AdvancedMenu": {
|
||||
"text2": [
|
||||
"Pokročilé",
|
||||
"nastavenia"
|
||||
],
|
||||
"desc": "Pokročilé nastavenia"
|
||||
}
|
||||
},
|
||||
"menuOptions": {
|
||||
"DCInCutoff": {
|
||||
"text2": [
|
||||
"Zdroj",
|
||||
"napätia"
|
||||
],
|
||||
"desc": "Zdroj napätia. Nastavenie napätia pre vypnutie (cutoff) (DC=10V | nS=n*3.3V pre LiIon články)"
|
||||
},
|
||||
"SleepTemperature": {
|
||||
"text2": [
|
||||
"Pokojová",
|
||||
"teplota"
|
||||
],
|
||||
"desc": "Pokojová teplota (v nastavených jednotkách)"
|
||||
},
|
||||
"SleepTimeout": {
|
||||
"text2": [
|
||||
"Pokojový",
|
||||
"režim po"
|
||||
],
|
||||
"desc": "Pokojový režim po (S=sekundách | M=minútach)"
|
||||
},
|
||||
"ShutdownTimeout": {
|
||||
"text2": [
|
||||
"Vypnutie",
|
||||
"po"
|
||||
],
|
||||
"desc": "Čas na vypnutie (minúty)"
|
||||
},
|
||||
"MotionSensitivity": {
|
||||
"text2": [
|
||||
"Citlivosť",
|
||||
"pohybu"
|
||||
],
|
||||
"desc": "Citlivosť detekcie pohybu (0=Vyp | 1=Min | ... | 9=Max)"
|
||||
},
|
||||
"TemperatureUnit": {
|
||||
"text2": [
|
||||
"Jednotka",
|
||||
"teploty"
|
||||
],
|
||||
"desc": "Jednotky merania teploty (C=stupne Celzia | F=stupne Fahrenheita)"
|
||||
},
|
||||
"AdvancedIdle": {
|
||||
"text2": [
|
||||
"Detaily v",
|
||||
"pokoj. režime"
|
||||
],
|
||||
"desc": "Zobraziť detailné informácie v pokojovom režime (T=Zap | F=Vyp)"
|
||||
},
|
||||
"DisplayRotation": {
|
||||
"text2": [
|
||||
"Orientácia",
|
||||
"displeja"
|
||||
],
|
||||
"desc": "Orientácia displeja (P=Pravák | L=Ľavák | A=Auto)"
|
||||
},
|
||||
"BoostTemperature": {
|
||||
"text2": [
|
||||
"Boost",
|
||||
"teplota"
|
||||
],
|
||||
"desc": "Cieľová teplota pre prudký náhrev (v nastavených jednotkách)"
|
||||
},
|
||||
"AutoStart": {
|
||||
"text2": [
|
||||
"Automatické",
|
||||
"spustenie"
|
||||
],
|
||||
"desc": "Pri štarte spustiť režim spájkovania (V=Vyp | Z=Spájkovanie | S=Spanok | I=Spanok izbová teplota)"
|
||||
},
|
||||
"CooldownBlink": {
|
||||
"text2": [
|
||||
"Blikanie pri",
|
||||
"chladnutí"
|
||||
],
|
||||
"desc": "Blikanie ukazovateľa teploty počas chladnutia hrotu"
|
||||
},
|
||||
"TemperatureCalibration": {
|
||||
"text2": [
|
||||
"Kalibrácia",
|
||||
"teploty"
|
||||
],
|
||||
"desc": "Kalibrácia posunu teploty hrotu"
|
||||
},
|
||||
"SettingsReset": {
|
||||
"text2": [
|
||||
"Obnovenie",
|
||||
"nastavení"
|
||||
],
|
||||
"desc": "Obnovenie nastavení na pôvodné hodnoty"
|
||||
},
|
||||
"VoltageCalibration": {
|
||||
"text2": [
|
||||
"Kalibrácia",
|
||||
"nap. napätia"
|
||||
],
|
||||
"desc": "Kalibrácia napájacieho napätia. Krátke stlačenie mení nastavenie, dlhé stlačenie pre návrat"
|
||||
},
|
||||
"AdvancedSoldering": {
|
||||
"text2": [
|
||||
"Detaily počas",
|
||||
"spájkovania"
|
||||
],
|
||||
"desc": "Zobrazenie detailov počas spájkovania"
|
||||
},
|
||||
"ScrollingSpeed": {
|
||||
"text2": [
|
||||
"Rýchlosť",
|
||||
"skrolovania"
|
||||
],
|
||||
"desc": "Rýchlosť pohybu tohto textu"
|
||||
},
|
||||
"QCMaxVoltage": {
|
||||
"text2": [
|
||||
"Obmedzenie QC",
|
||||
"napätia"
|
||||
],
|
||||
"desc": "Maximálne QC napätie ktoré si má systém vyžiadať"
|
||||
},
|
||||
"PDNegTimeout": {
|
||||
"text2": [
|
||||
"Čas PD",
|
||||
"vypršania"
|
||||
],
|
||||
"desc": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers (0: disabled)"
|
||||
},
|
||||
"PowerLimit": {
|
||||
"text2": [
|
||||
"Obmedzenie",
|
||||
"výkonu"
|
||||
],
|
||||
"desc": "Obmedzenie výkonu podľa použitého zdroja (watt)"
|
||||
},
|
||||
"ReverseButtonTempChange": {
|
||||
"text2": [
|
||||
"Otočenie",
|
||||
"tlačidiel +/-"
|
||||
],
|
||||
"desc": "Prehodenie tlačidiel na nastavovanie teploty"
|
||||
},
|
||||
"TempChangeShortStep": {
|
||||
"text2": [
|
||||
"Malý krok",
|
||||
"teploty"
|
||||
],
|
||||
"desc": "Zmena teploty pri krátkom stlačení tlačidla"
|
||||
},
|
||||
"TempChangeLongStep": {
|
||||
"text2": [
|
||||
"Veľký krok",
|
||||
"teploty"
|
||||
],
|
||||
"desc": "Zmena teploty pri držaní tlačidla"
|
||||
},
|
||||
"PowerPulsePower": {
|
||||
"text2": [
|
||||
"Intenzita",
|
||||
"impulzu"
|
||||
],
|
||||
"desc": "Impulz udržujúci napájací zdroj zapnutý (power banky) (watt)"
|
||||
},
|
||||
"HallEffSensitivity": {
|
||||
"text2": [
|
||||
"Citliv.",
|
||||
"Hall"
|
||||
],
|
||||
"desc": "Citlivosť Halloveho senzora pre detekciu spánku (Z=Zakázať | N=Nízka | S=Stredná | V=Vysoká)"
|
||||
},
|
||||
"LockingMode": {
|
||||
"text2": [
|
||||
"Povoliť zámok",
|
||||
"tlačidiel"
|
||||
],
|
||||
"desc": "Zamknutie tlačidiel - dlhé stlačenie oboch naraz počas spájkovania (Z=Zakázať | B=Okrem boost | P=Plné zamknutie)"
|
||||
},
|
||||
"MinVolCell": {
|
||||
"text2": [
|
||||
"Minimálne",
|
||||
"napätie"
|
||||
],
|
||||
"desc": "Minimálne napätie povolené na jeden článok (3S: 3 - 3.7V | 4-6S: 2.4 - 3.7V)"
|
||||
},
|
||||
"AnimLoop": {
|
||||
"text2": [
|
||||
"Anim.",
|
||||
"loop"
|
||||
],
|
||||
"desc": "Loop icon animations in root menu"
|
||||
},
|
||||
"AnimSpeed": {
|
||||
"text2": [
|
||||
"Anim.",
|
||||
"rýchlosť"
|
||||
],
|
||||
"desc": "Rýchlosť animácií ikoniek v menu (O=off | P=pomaly | S=stredne | R=rýchlo)"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
},
|
||||
"LanguageSwitch": {
|
||||
"text2": [
|
||||
"Jazyk:",
|
||||
" SK Slovenčina"
|
||||
],
|
||||
"desc": "Aktuálny jazyk"
|
||||
},
|
||||
"Brightness": {
|
||||
"text2": [
|
||||
"Jas",
|
||||
"obrazovky"
|
||||
],
|
||||
"desc": "Mení jas/kontrast OLED displeja"
|
||||
},
|
||||
"ColourInversion": {
|
||||
"text2": [
|
||||
"Invertovať",
|
||||
"obrazovku"
|
||||
],
|
||||
"desc": "Invertovať farby OLED displeja"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
setup.sh
2
setup.sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# Setup shell file to setup the environment on an ubuntu machine
|
||||
sudo apt-get update && sudo apt-get install -y make bzip2 git python3 python3-pip wget
|
||||
sudo apt-get update && sudo apt-get install -y make bzip2 git python3 python3-pip wget dfu-util
|
||||
python3 -m pip install bdflib black flake8
|
||||
sudo mkdir -p /build
|
||||
cd /build
|
||||
|
||||
@@ -146,7 +146,8 @@ constexpr uint8_t settings_item_index(const SettingsItemIndex i) { return static
|
||||
const char *translatedString(uint16_t index);
|
||||
|
||||
void prepareTranslations();
|
||||
bool settings_displayLanguageSwitch(void);
|
||||
void settings_displayLanguageSwitch(void);
|
||||
bool settings_showLanguageSwitch(void);
|
||||
bool settings_setLanguageSwitch(void);
|
||||
|
||||
#endif /* TRANSLATION_H_ */
|
||||
|
||||
@@ -26,7 +26,8 @@ typedef struct {
|
||||
uint8_t description;
|
||||
// return true if increment reached the maximum value
|
||||
bool (*const incrementHandler)(void);
|
||||
bool (*const draw)(void);
|
||||
void (*const draw)(void);
|
||||
bool (*const isVisible)(void);
|
||||
// If this is set, we will automatically use the settings increment handler instead, set >= num settings to disable
|
||||
SettingsOptions autoSettingOption;
|
||||
} menuitem;
|
||||
|
||||
@@ -85,7 +85,5 @@ bool settings_setLanguageSwitch(void) {
|
||||
return selectedLangIndex == (LanguageCount - 1);
|
||||
}
|
||||
|
||||
bool settings_displayLanguageSwitch(void) {
|
||||
OLED::printWholeScreen(translatedString(Tr->SettingsShortNames[static_cast<uint8_t>(SettingsItemIndex::LanguageSwitch)]));
|
||||
return false;
|
||||
}
|
||||
bool settings_showLanguageSwitch(void) { return true; }
|
||||
void settings_displayLanguageSwitch(void) { OLED::printWholeScreen(translatedString(Tr->SettingsShortNames[static_cast<uint8_t>(SettingsItemIndex::LanguageSwitch)])); }
|
||||
|
||||
@@ -2,6 +2,5 @@
|
||||
|
||||
bool settings_setLanguageSwitch(void) { return false; }
|
||||
|
||||
bool settings_displayLanguageSwitch(void) {
|
||||
return true; // skip
|
||||
}
|
||||
void settings_displayLanguageSwitch(void) {}
|
||||
bool settings_showLanguageSwitch(void) { return false; }
|
||||
|
||||
@@ -17,71 +17,72 @@
|
||||
void gui_Menu(const menuitem *menu);
|
||||
|
||||
#ifdef POW_DC
|
||||
static bool settings_displayInputVRange(void);
|
||||
static bool settings_displayInputMinVRange(void);
|
||||
static void settings_displayInputVRange(void);
|
||||
static void settings_displayInputMinVRange(void);
|
||||
#endif
|
||||
#ifdef POW_QC
|
||||
static bool settings_displayQCInputV(void);
|
||||
static void settings_displayQCInputV(void);
|
||||
#endif
|
||||
#ifdef POW_PD
|
||||
static bool settings_displayPDNegTimeout(void);
|
||||
static void settings_displayPDNegTimeout(void);
|
||||
#endif
|
||||
#ifndef NO_SLEEP_MODE
|
||||
static bool settings_setSleepTemp(void);
|
||||
static bool settings_displaySleepTemp(void);
|
||||
static bool settings_displaySleepTime(void);
|
||||
static void settings_displaySleepTemp(void);
|
||||
static void settings_displaySleepTime(void);
|
||||
#endif
|
||||
static bool settings_displayShutdownTime(void);
|
||||
static bool settings_displaySensitivity(void);
|
||||
static void settings_displayShutdownTime(void);
|
||||
static void settings_displaySensitivity(void);
|
||||
static bool settings_setTempF(void);
|
||||
static bool settings_displayTempF(void);
|
||||
static bool settings_displayAdvancedSolderingScreens(void);
|
||||
static bool settings_displayAdvancedIDLEScreens(void);
|
||||
static bool settings_displayScrollSpeed(void);
|
||||
static bool settings_displayPowerLimit(void);
|
||||
static void settings_displayTempF(void);
|
||||
static void settings_displayAdvancedSolderingScreens(void);
|
||||
static void settings_displayAdvancedIDLEScreens(void);
|
||||
static void settings_displayScrollSpeed(void);
|
||||
static void settings_displayPowerLimit(void);
|
||||
#ifndef NO_DISPLAY_ROTATE
|
||||
static bool settings_setDisplayRotation(void);
|
||||
static bool settings_displayDisplayRotation(void);
|
||||
static void settings_displayDisplayRotation(void);
|
||||
#endif
|
||||
|
||||
static bool settings_setBoostTemp(void);
|
||||
static bool settings_displayBoostTemp(void);
|
||||
static bool settings_displayAutomaticStartMode(void);
|
||||
static bool settings_displayLockingMode(void);
|
||||
static bool settings_displayCoolingBlinkEnabled(void);
|
||||
static void settings_displayBoostTemp(void);
|
||||
static void settings_displayAutomaticStartMode(void);
|
||||
static void settings_displayLockingMode(void);
|
||||
static void settings_displayCoolingBlinkEnabled(void);
|
||||
static bool settings_setResetSettings(void);
|
||||
static bool settings_displayResetSettings(void);
|
||||
static void settings_displayResetSettings(void);
|
||||
static bool settings_setCalibrate(void);
|
||||
static bool settings_displayCalibrate(void);
|
||||
static void settings_displayCalibrate(void);
|
||||
static bool settings_setCalibrateVIN(void);
|
||||
static bool settings_displayCalibrateVIN(void);
|
||||
static bool settings_displayReverseButtonTempChangeEnabled(void);
|
||||
static bool settings_displayTempChangeShortStep(void);
|
||||
static bool settings_displayTempChangeLongStep(void);
|
||||
static bool settings_displayPowerPulse(void);
|
||||
static bool settings_displayAnimationSpeed(void);
|
||||
static bool settings_displayAnimationLoop(void);
|
||||
static bool settings_displayPowerPulseWait(void);
|
||||
static bool settings_displayPowerPulseDuration(void);
|
||||
static bool settings_displayBrightnessLevel(void);
|
||||
static bool settings_displayInvertColor(void);
|
||||
static void settings_displayCalibrateVIN(void);
|
||||
static void settings_displayReverseButtonTempChangeEnabled(void);
|
||||
static void settings_displayTempChangeShortStep(void);
|
||||
static void settings_displayTempChangeLongStep(void);
|
||||
static void settings_displayPowerPulse(void);
|
||||
static void settings_displayAnimationSpeed(void);
|
||||
static void settings_displayAnimationLoop(void);
|
||||
static void settings_displayPowerPulseWait(void);
|
||||
static bool settings_showPowerPulseOptions(void);
|
||||
static void settings_displayPowerPulseDuration(void);
|
||||
static void settings_displayBrightnessLevel(void);
|
||||
static void settings_displayInvertColor(void);
|
||||
|
||||
#ifdef HALL_SENSOR
|
||||
static bool settings_displayHallEffect(void);
|
||||
static void settings_displayHallEffect(void);
|
||||
#endif
|
||||
// Menu functions
|
||||
|
||||
#if defined(POW_DC) || defined(POW_QC)
|
||||
static bool settings_displayPowerMenu(void);
|
||||
static void settings_displayPowerMenu(void);
|
||||
static bool settings_enterPowerMenu(void);
|
||||
#endif
|
||||
static bool settings_displaySolderingMenu(void);
|
||||
static void settings_displaySolderingMenu(void);
|
||||
static bool settings_enterSolderingMenu(void);
|
||||
static bool settings_displayPowerSavingMenu(void);
|
||||
static void settings_displayPowerSavingMenu(void);
|
||||
static bool settings_enterPowerSavingMenu(void);
|
||||
static bool settings_displayUIMenu(void);
|
||||
static void settings_displayUIMenu(void);
|
||||
static bool settings_enterUIMenu(void);
|
||||
static bool settings_displayAdvancedMenu(void);
|
||||
static void settings_displayAdvancedMenu(void);
|
||||
static bool settings_enterAdvancedMenu(void);
|
||||
/*
|
||||
* Root Settings Menu
|
||||
@@ -134,15 +135,15 @@ const menuitem rootSettingsMenu[] {
|
||||
*/
|
||||
|
||||
#if defined(POW_DC) || defined(POW_QC)
|
||||
{0, settings_enterPowerMenu, settings_displayPowerMenu, SettingsOptions::SettingsOptionsLength}, /*Power*/
|
||||
{0, settings_enterPowerMenu, settings_displayPowerMenu, nullptr, SettingsOptions::SettingsOptionsLength}, /*Power*/
|
||||
#endif
|
||||
{0, settings_enterSolderingMenu, settings_displaySolderingMenu, SettingsOptions::SettingsOptionsLength}, /*Soldering*/
|
||||
{0, settings_enterPowerSavingMenu, settings_displayPowerSavingMenu, SettingsOptions::SettingsOptionsLength}, /*Sleep Options Menu*/
|
||||
{0, settings_enterUIMenu, settings_displayUIMenu, SettingsOptions::SettingsOptionsLength}, /*UI Menu*/
|
||||
{0, settings_enterAdvancedMenu, settings_displayAdvancedMenu, SettingsOptions::SettingsOptionsLength}, /*Advanced Menu*/
|
||||
{0, settings_setLanguageSwitch, settings_displayLanguageSwitch, SettingsOptions::SettingsOptionsLength}, /*Language Switch*/
|
||||
{0, settings_enterSolderingMenu, settings_displaySolderingMenu, nullptr, SettingsOptions::SettingsOptionsLength}, /*Soldering*/
|
||||
{0, settings_enterPowerSavingMenu, settings_displayPowerSavingMenu, nullptr, SettingsOptions::SettingsOptionsLength}, /*Sleep Options Menu*/
|
||||
{0, settings_enterUIMenu, settings_displayUIMenu, nullptr, SettingsOptions::SettingsOptionsLength}, /*UI Menu*/
|
||||
{0, settings_enterAdvancedMenu, settings_displayAdvancedMenu, nullptr, SettingsOptions::SettingsOptionsLength}, /*Advanced Menu*/
|
||||
{0, settings_setLanguageSwitch, settings_displayLanguageSwitch, settings_showLanguageSwitch, SettingsOptions::SettingsOptionsLength}, /*Language Switch*/
|
||||
{
|
||||
0, nullptr, nullptr, SettingsOptions::SettingsOptionsLength
|
||||
0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength
|
||||
} // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
|
||||
@@ -152,16 +153,16 @@ const menuitem powerMenu[] = {
|
||||
* Power Source
|
||||
*/
|
||||
#ifdef POW_DC
|
||||
{SETTINGS_DESC(SettingsItemIndex::DCInCutoff), nullptr, settings_displayInputVRange, SettingsOptions::MinDCVoltageCells}, /*Voltage input*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::MinVolCell), nullptr, settings_displayInputMinVRange, SettingsOptions::MinVoltageCells}, /*Minimum voltage input*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::DCInCutoff), nullptr, settings_displayInputVRange, nullptr, SettingsOptions::MinDCVoltageCells}, /*Voltage input*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::MinVolCell), nullptr, settings_displayInputMinVRange, nullptr, SettingsOptions::MinVoltageCells}, /*Minimum voltage input*/
|
||||
#endif
|
||||
#ifdef POW_QC
|
||||
{SETTINGS_DESC(SettingsItemIndex::QCMaxVoltage), nullptr, settings_displayQCInputV, SettingsOptions::QCIdealVoltage}, /*Voltage input*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::QCMaxVoltage), nullptr, settings_displayQCInputV, nullptr, SettingsOptions::QCIdealVoltage}, /*Voltage input*/
|
||||
#endif
|
||||
#ifdef POW_PD
|
||||
{SETTINGS_DESC(SettingsItemIndex::PDNegTimeout), nullptr, settings_displayPDNegTimeout, SettingsOptions::PDNegTimeout}, /*PD timeout setup*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::PDNegTimeout), nullptr, settings_displayPDNegTimeout, nullptr, SettingsOptions::PDNegTimeout}, /*PD timeout setup*/
|
||||
#endif
|
||||
{0, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
#endif
|
||||
const menuitem solderingMenu[] = {
|
||||
@@ -172,12 +173,12 @@ const menuitem solderingMenu[] = {
|
||||
* Temp change short step
|
||||
* Temp change long step
|
||||
*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::BoostTemperature), settings_setBoostTemp, settings_displayBoostTemp, SettingsOptions::SettingsOptionsLength}, /*Boost Temp*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::AutoStart), nullptr, settings_displayAutomaticStartMode, SettingsOptions::AutoStartMode}, /*Auto start*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::TempChangeShortStep), nullptr, settings_displayTempChangeShortStep, SettingsOptions::TempChangeShortStep}, /*Temp change short step*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::TempChangeLongStep), nullptr, settings_displayTempChangeLongStep, SettingsOptions::TempChangeLongStep}, /*Temp change long step*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::LockingMode), nullptr, settings_displayLockingMode, SettingsOptions::LockingMode}, /*Locking Mode*/
|
||||
{0, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
{SETTINGS_DESC(SettingsItemIndex::BoostTemperature), settings_setBoostTemp, settings_displayBoostTemp, nullptr, SettingsOptions::SettingsOptionsLength}, /*Boost Temp*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::AutoStart), nullptr, settings_displayAutomaticStartMode, nullptr, SettingsOptions::AutoStartMode}, /*Auto start*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::TempChangeShortStep), nullptr, settings_displayTempChangeShortStep, nullptr, SettingsOptions::TempChangeShortStep}, /*Temp change short step*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::TempChangeLongStep), nullptr, settings_displayTempChangeLongStep, nullptr, SettingsOptions::TempChangeLongStep}, /*Temp change long step*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::LockingMode), nullptr, settings_displayLockingMode, nullptr, SettingsOptions::LockingMode}, /*Locking Mode*/
|
||||
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem UIMenu[] = {
|
||||
/*
|
||||
@@ -190,22 +191,22 @@ const menuitem UIMenu[] = {
|
||||
* Detailed IDLE
|
||||
* Detailed Soldering
|
||||
*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::TemperatureUnit), settings_setTempF, settings_displayTempF,
|
||||
{SETTINGS_DESC(SettingsItemIndex::TemperatureUnit), settings_setTempF, settings_displayTempF, nullptr,
|
||||
SettingsOptions::SettingsOptionsLength}, /* Temperature units, this has to be the first element in the array to work with the logic in settings_enterUIMenu() */
|
||||
#ifndef NO_DISPLAY_ROTATE
|
||||
{SETTINGS_DESC(SettingsItemIndex::DisplayRotation), settings_setDisplayRotation, settings_displayDisplayRotation, SettingsOptions::SettingsOptionsLength}, /*Display Rotation*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::DisplayRotation), settings_setDisplayRotation, settings_displayDisplayRotation, nullptr, SettingsOptions::SettingsOptionsLength}, /*Display Rotation*/
|
||||
#endif
|
||||
{SETTINGS_DESC(SettingsItemIndex::CooldownBlink), nullptr, settings_displayCoolingBlinkEnabled, SettingsOptions::CoolingTempBlink}, /*Cooling blink warning*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::ScrollingSpeed), nullptr, settings_displayScrollSpeed, SettingsOptions::DescriptionScrollSpeed}, /*Scroll Speed for descriptions*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::ReverseButtonTempChange), nullptr, settings_displayReverseButtonTempChangeEnabled,
|
||||
SettingsOptions::ReverseButtonTempChangeEnabled}, /* Reverse Temp change buttons + - */
|
||||
{SETTINGS_DESC(SettingsItemIndex::AnimSpeed), nullptr, settings_displayAnimationSpeed, SettingsOptions::AnimationSpeed}, /*Animation Speed adjustment */
|
||||
{SETTINGS_DESC(SettingsItemIndex::AnimLoop), nullptr, settings_displayAnimationLoop, SettingsOptions::AnimationLoop}, /*Animation Loop switch */
|
||||
{SETTINGS_DESC(SettingsItemIndex::Brightness), nullptr, settings_displayBrightnessLevel, SettingsOptions::OLEDBrightness}, /*Brightness Level*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::ColourInversion), nullptr, settings_displayInvertColor, SettingsOptions::OLEDInversion}, /*Invert screen colour*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::AdvancedIdle), nullptr, settings_displayAdvancedIDLEScreens, SettingsOptions::DetailedIDLE}, /* Advanced idle screen*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::AdvancedSoldering), nullptr, settings_displayAdvancedSolderingScreens, SettingsOptions::DetailedSoldering}, /* Advanced soldering screen*/
|
||||
{0, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
{SETTINGS_DESC(SettingsItemIndex::CooldownBlink), nullptr, settings_displayCoolingBlinkEnabled, nullptr, SettingsOptions::CoolingTempBlink}, /*Cooling blink warning*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::ScrollingSpeed), nullptr, settings_displayScrollSpeed, nullptr, SettingsOptions::DescriptionScrollSpeed}, /*Scroll Speed for descriptions*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::ReverseButtonTempChange), nullptr, settings_displayReverseButtonTempChangeEnabled, nullptr,
|
||||
SettingsOptions::ReverseButtonTempChangeEnabled}, /* Reverse Temp change buttons + - */
|
||||
{SETTINGS_DESC(SettingsItemIndex::AnimSpeed), nullptr, settings_displayAnimationSpeed, nullptr, SettingsOptions::AnimationSpeed}, /*Animation Speed adjustment */
|
||||
{SETTINGS_DESC(SettingsItemIndex::AnimLoop), nullptr, settings_displayAnimationLoop, nullptr, SettingsOptions::AnimationLoop}, /*Animation Loop switch */
|
||||
{SETTINGS_DESC(SettingsItemIndex::Brightness), nullptr, settings_displayBrightnessLevel, nullptr, SettingsOptions::OLEDBrightness}, /*Brightness Level*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::ColourInversion), nullptr, settings_displayInvertColor, nullptr, SettingsOptions::OLEDInversion}, /*Invert screen colour*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::AdvancedIdle), nullptr, settings_displayAdvancedIDLEScreens, nullptr, SettingsOptions::DetailedIDLE}, /* Advanced idle screen*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::AdvancedSoldering), nullptr, settings_displayAdvancedSolderingScreens, nullptr, SettingsOptions::DetailedSoldering}, /* Advanced soldering screen*/
|
||||
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem PowerSavingMenu[] = {
|
||||
/*
|
||||
@@ -215,15 +216,15 @@ const menuitem PowerSavingMenu[] = {
|
||||
* Motion Sensitivity
|
||||
*/
|
||||
#ifndef NO_SLEEP_MODE
|
||||
{SETTINGS_DESC(SettingsItemIndex::SleepTemperature), settings_setSleepTemp, settings_displaySleepTemp, SettingsOptions::SettingsOptionsLength}, /*Sleep Temp*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::SleepTimeout), nullptr, settings_displaySleepTime, SettingsOptions::SleepTime}, /*Sleep Time*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::SleepTemperature), settings_setSleepTemp, settings_displaySleepTemp, nullptr, SettingsOptions::SettingsOptionsLength}, /*Sleep Temp*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::SleepTimeout), nullptr, settings_displaySleepTime, nullptr, SettingsOptions::SleepTime}, /*Sleep Time*/
|
||||
#endif
|
||||
{SETTINGS_DESC(SettingsItemIndex::ShutdownTimeout), nullptr, settings_displayShutdownTime, SettingsOptions::ShutdownTime}, /*Shutdown Time*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::MotionSensitivity), nullptr, settings_displaySensitivity, SettingsOptions::Sensitivity}, /* Motion Sensitivity*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::ShutdownTimeout), nullptr, settings_displayShutdownTime, nullptr, SettingsOptions::ShutdownTime}, /*Shutdown Time*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::MotionSensitivity), nullptr, settings_displaySensitivity, nullptr, SettingsOptions::Sensitivity}, /* Motion Sensitivity*/
|
||||
#ifdef HALL_SENSOR
|
||||
{SETTINGS_DESC(SettingsItemIndex::HallEffSensitivity), nullptr, settings_displayHallEffect, SettingsOptions::HallEffectSensitivity}, /* HallEffect Sensitivity*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::HallEffSensitivity), nullptr, settings_displayHallEffect, nullptr, SettingsOptions::HallEffectSensitivity}, /* HallEffect Sensitivity*/
|
||||
#endif
|
||||
{0, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem advancedMenu[] = {
|
||||
|
||||
@@ -238,14 +239,15 @@ const menuitem advancedMenu[] = {
|
||||
* Power Pulse Wait
|
||||
* Power Pulse Duration
|
||||
*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerLimit), nullptr, settings_displayPowerLimit, SettingsOptions::PowerLimit}, /*Power limit*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::SettingsReset), settings_setResetSettings, settings_displayResetSettings, SettingsOptions::SettingsOptionsLength}, /*Resets settings*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::TemperatureCalibration), settings_setCalibrate, settings_displayCalibrate, SettingsOptions::SettingsOptionsLength}, /*Calibrate tip*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::VoltageCalibration), settings_setCalibrateVIN, settings_displayCalibrateVIN, SettingsOptions::SettingsOptionsLength}, /*Voltage input cal*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulsePower), nullptr, settings_displayPowerPulse, SettingsOptions::KeepAwakePulse}, /*Power Pulse adjustment */
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulseWait), nullptr, settings_displayPowerPulseWait, SettingsOptions::KeepAwakePulseWait}, /*Power Pulse Wait adjustment*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulseDuration), nullptr, settings_displayPowerPulseDuration, SettingsOptions::KeepAwakePulseDuration}, /*Power Pulse Duration adjustment*/
|
||||
{0, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerLimit), nullptr, settings_displayPowerLimit, nullptr, SettingsOptions::PowerLimit}, /*Power limit*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::SettingsReset), settings_setResetSettings, settings_displayResetSettings, nullptr, SettingsOptions::SettingsOptionsLength}, /*Resets settings*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::TemperatureCalibration), settings_setCalibrate, settings_displayCalibrate, nullptr, SettingsOptions::SettingsOptionsLength}, /*Calibrate tip*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::VoltageCalibration), settings_setCalibrateVIN, settings_displayCalibrateVIN, nullptr, SettingsOptions::SettingsOptionsLength}, /*Voltage input cal*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulsePower), nullptr, settings_displayPowerPulse, nullptr, SettingsOptions::KeepAwakePulse}, /*Power Pulse adjustment */
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulseWait), nullptr, settings_displayPowerPulseWait, settings_showPowerPulseOptions, SettingsOptions::KeepAwakePulseWait}, /*Power Pulse Wait adjustment*/
|
||||
{SETTINGS_DESC(SettingsItemIndex::PowerPulseDuration), nullptr, settings_displayPowerPulseDuration, settings_showPowerPulseOptions,
|
||||
SettingsOptions::KeepAwakePulseDuration}, /*Power Pulse Duration adjustment*/
|
||||
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength} // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -296,7 +298,7 @@ static int userConfirmation(const char *message) {
|
||||
}
|
||||
#ifdef POW_DC
|
||||
|
||||
static bool settings_displayInputVRange(void) {
|
||||
static void settings_displayInputVRange(void) {
|
||||
printShortDescription(SettingsItemIndex::DCInCutoff, 6);
|
||||
|
||||
if (getSettingValue(SettingsOptions::MinDCVoltageCells)) {
|
||||
@@ -305,10 +307,9 @@ static bool settings_displayInputVRange(void) {
|
||||
} else {
|
||||
OLED::print(SymbolDC, FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayInputMinVRange(void) {
|
||||
static void settings_displayInputMinVRange(void) {
|
||||
if (getSettingValue(SettingsOptions::MinDCVoltageCells)) {
|
||||
printShortDescription(SettingsItemIndex::MinVolCell, 4);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::MinVoltageCells) / 10, 2, FontStyle::LARGE);
|
||||
@@ -318,12 +319,11 @@ static bool settings_displayInputMinVRange(void) {
|
||||
printShortDescription(SettingsItemIndex::MinVolCell, 5);
|
||||
OLED::print(translatedString(Tr->SettingNAChar), FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#ifdef POW_QC
|
||||
|
||||
static bool settings_displayQCInputV(void) {
|
||||
static void settings_displayQCInputV(void) {
|
||||
printShortDescription(SettingsItemIndex::QCMaxVoltage, 4);
|
||||
// These are only used in QC modes
|
||||
// Allows setting the voltage negotiated for QC
|
||||
@@ -332,14 +332,13 @@ static bool settings_displayQCInputV(void) {
|
||||
OLED::print(SymbolDot, FontStyle::LARGE);
|
||||
OLED::printNumber(voltage % 10, 1, FontStyle::LARGE);
|
||||
OLED::print(SymbolVolts, FontStyle::LARGE);
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef POW_PD
|
||||
|
||||
static bool settings_displayPDNegTimeout(void) {
|
||||
static void settings_displayPDNegTimeout(void) {
|
||||
printShortDescription(SettingsItemIndex::PDNegTimeout, 5);
|
||||
auto value = getSettingValue(SettingsOptions::PDNegTimeout);
|
||||
if (value == 0) {
|
||||
@@ -347,7 +346,6 @@ static bool settings_displayPDNegTimeout(void) {
|
||||
} else {
|
||||
OLED::printNumber(value, 2, FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -370,13 +368,12 @@ static bool settings_setSleepTemp(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static bool settings_displaySleepTemp(void) {
|
||||
static void settings_displaySleepTemp(void) {
|
||||
printShortDescription(SettingsItemIndex::SleepTemperature, 5);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::SleepTemp), 3, FontStyle::LARGE);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displaySleepTime(void) {
|
||||
static void settings_displaySleepTime(void) {
|
||||
printShortDescription(SettingsItemIndex::SleepTimeout, 5);
|
||||
if (getSettingValue(SettingsOptions::SleepTime) == 0) {
|
||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||
@@ -387,11 +384,10 @@ static bool settings_displaySleepTime(void) {
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::SleepTime) - 5, 2, FontStyle::LARGE);
|
||||
OLED::print(SymbolMinutes, FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool settings_displayShutdownTime(void) {
|
||||
static void settings_displayShutdownTime(void) {
|
||||
printShortDescription(SettingsItemIndex::ShutdownTimeout, 5);
|
||||
if (getSettingValue(SettingsOptions::ShutdownTime) == 0) {
|
||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||
@@ -399,7 +395,6 @@ static bool settings_displayShutdownTime(void) {
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::ShutdownTime), 2, FontStyle::LARGE);
|
||||
OLED::print(SymbolMinutes, FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static bool settings_setTempF(void) {
|
||||
bool res = nextSettingValue(SettingsOptions::TemperatureInF);
|
||||
@@ -434,33 +429,29 @@ static bool settings_setTempF(void) {
|
||||
return res;
|
||||
}
|
||||
|
||||
static bool settings_displayTempF(void) {
|
||||
static void settings_displayTempF(void) {
|
||||
printShortDescription(SettingsItemIndex::TemperatureUnit, 7);
|
||||
|
||||
OLED::print((getSettingValue(SettingsOptions::TemperatureInF)) ? SymbolDegF : SymbolDegC, FontStyle::LARGE);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displaySensitivity(void) {
|
||||
static void settings_displaySensitivity(void) {
|
||||
printShortDescription(SettingsItemIndex::MotionSensitivity, 7);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::Sensitivity), 1, FontStyle::LARGE, false);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayAdvancedSolderingScreens(void) {
|
||||
static void settings_displayAdvancedSolderingScreens(void) {
|
||||
printShortDescription(SettingsItemIndex::AdvancedSoldering, 7);
|
||||
OLED::drawCheckbox(getSettingValue(SettingsOptions::DetailedSoldering));
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayAdvancedIDLEScreens(void) {
|
||||
static void settings_displayAdvancedIDLEScreens(void) {
|
||||
printShortDescription(SettingsItemIndex::AdvancedIdle, 7);
|
||||
|
||||
OLED::drawCheckbox(getSettingValue(SettingsOptions::DetailedIDLE));
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayPowerLimit(void) {
|
||||
static void settings_displayPowerLimit(void) {
|
||||
printShortDescription(SettingsItemIndex::PowerLimit, 5);
|
||||
if (getSettingValue(SettingsOptions::PowerLimit) == 0) {
|
||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||
@@ -468,13 +459,11 @@ static bool settings_displayPowerLimit(void) {
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::PowerLimit), 2, FontStyle::LARGE);
|
||||
OLED::print(SymbolWatts, FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayScrollSpeed(void) {
|
||||
static void settings_displayScrollSpeed(void) {
|
||||
printShortDescription(SettingsItemIndex::ScrollingSpeed, 7);
|
||||
OLED::print(translatedString((getSettingValue(SettingsOptions::DescriptionScrollSpeed)) ? Tr->SettingFastChar : Tr->SettingSlowChar), FontStyle::LARGE);
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef NO_DISPLAY_ROTATE
|
||||
@@ -496,7 +485,7 @@ static bool settings_setDisplayRotation(void) {
|
||||
return res;
|
||||
}
|
||||
|
||||
static bool settings_displayDisplayRotation(void) {
|
||||
static void settings_displayDisplayRotation(void) {
|
||||
printShortDescription(SettingsItemIndex::DisplayRotation, 7);
|
||||
|
||||
switch (getSettingValue(SettingsOptions::OrientationMode)) {
|
||||
@@ -513,7 +502,6 @@ static bool settings_displayDisplayRotation(void) {
|
||||
OLED::print(translatedString(Tr->SettingRightChar), FontStyle::LARGE);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
static bool settings_setBoostTemp(void) {
|
||||
@@ -543,17 +531,16 @@ static bool settings_setBoostTemp(void) {
|
||||
return value == MAX_TEMP_C;
|
||||
}
|
||||
|
||||
static bool settings_displayBoostTemp(void) {
|
||||
static void settings_displayBoostTemp(void) {
|
||||
printShortDescription(SettingsItemIndex::BoostTemperature, 5);
|
||||
if (getSettingValue(SettingsOptions::BoostTemp)) {
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::BoostTemp), 3, FontStyle::LARGE);
|
||||
} else {
|
||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayAutomaticStartMode(void) {
|
||||
static void settings_displayAutomaticStartMode(void) {
|
||||
printShortDescription(SettingsItemIndex::AutoStart, 7);
|
||||
|
||||
switch (getSettingValue(SettingsOptions::AutoStartMode)) {
|
||||
@@ -573,10 +560,9 @@ static bool settings_displayAutomaticStartMode(void) {
|
||||
OLED::print(translatedString(Tr->SettingStartNoneChar), FontStyle::LARGE);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayLockingMode(void) {
|
||||
static void settings_displayLockingMode(void) {
|
||||
printShortDescription(SettingsItemIndex::LockingMode, 7);
|
||||
|
||||
switch (getSettingValue(SettingsOptions::LockingMode)) {
|
||||
@@ -593,13 +579,11 @@ static bool settings_displayLockingMode(void) {
|
||||
OLED::print(translatedString(Tr->SettingLockDisableChar), FontStyle::LARGE);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayCoolingBlinkEnabled(void) {
|
||||
static void settings_displayCoolingBlinkEnabled(void) {
|
||||
printShortDescription(SettingsItemIndex::CooldownBlink, 7);
|
||||
OLED::drawCheckbox(getSettingValue(SettingsOptions::CoolingTempBlink));
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_setResetSettings(void) {
|
||||
@@ -610,10 +594,7 @@ static bool settings_setResetSettings(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayResetSettings(void) {
|
||||
printShortDescription(SettingsItemIndex::SettingsReset, 7);
|
||||
return false;
|
||||
}
|
||||
static void settings_displayResetSettings(void) { printShortDescription(SettingsItemIndex::SettingsReset, 7); }
|
||||
|
||||
static void setTipOffset() {
|
||||
uint16_t setoffset = 0;
|
||||
@@ -657,10 +638,7 @@ static bool settings_setCalibrate(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayCalibrate(void) {
|
||||
printShortDescription(SettingsItemIndex::TemperatureCalibration, 5);
|
||||
return false;
|
||||
}
|
||||
static void settings_displayCalibrate(void) { printShortDescription(SettingsItemIndex::TemperatureCalibration, 5); }
|
||||
|
||||
static bool settings_setCalibrateVIN(void) {
|
||||
// Jump to the voltage calibration subscreen
|
||||
@@ -701,25 +679,22 @@ static bool settings_setCalibrateVIN(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayReverseButtonTempChangeEnabled(void) {
|
||||
static void settings_displayReverseButtonTempChangeEnabled(void) {
|
||||
printShortDescription(SettingsItemIndex::ReverseButtonTempChange, 7);
|
||||
OLED::drawCheckbox(getSettingValue(SettingsOptions::ReverseButtonTempChangeEnabled));
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayTempChangeShortStep(void) {
|
||||
static void settings_displayTempChangeShortStep(void) {
|
||||
printShortDescription(SettingsItemIndex::TempChangeShortStep, 6);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::TempChangeShortStep), 2, FontStyle::LARGE);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayTempChangeLongStep(void) {
|
||||
static void settings_displayTempChangeLongStep(void) {
|
||||
printShortDescription(SettingsItemIndex::TempChangeLongStep, 6);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::TempChangeLongStep), 2, FontStyle::LARGE);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayPowerPulse(void) {
|
||||
static void settings_displayPowerPulse(void) {
|
||||
printShortDescription(SettingsItemIndex::PowerPulsePower, 5);
|
||||
if (getSettingValue(SettingsOptions::KeepAwakePulse)) {
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulse) / 10, 1, FontStyle::LARGE);
|
||||
@@ -728,16 +703,14 @@ static bool settings_displayPowerPulse(void) {
|
||||
} else {
|
||||
OLED::print(translatedString(Tr->OffString), FontStyle::LARGE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayAnimationLoop(void) {
|
||||
static void settings_displayAnimationLoop(void) {
|
||||
printShortDescription(SettingsItemIndex::AnimLoop, 7);
|
||||
OLED::drawCheckbox(getSettingValue(SettingsOptions::AnimationLoop));
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayAnimationSpeed(void) {
|
||||
static void settings_displayAnimationSpeed(void) {
|
||||
printShortDescription(SettingsItemIndex::AnimSpeed, 7);
|
||||
switch (getSettingValue(SettingsOptions::AnimationSpeed)) {
|
||||
case settingOffSpeed_t::SLOW:
|
||||
@@ -753,40 +726,29 @@ static bool settings_displayAnimationSpeed(void) {
|
||||
OLED::print(translatedString(Tr->SettingOffChar), FontStyle::LARGE);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayPowerPulseWait(void) {
|
||||
if (getSettingValue(SettingsOptions::KeepAwakePulse)) {
|
||||
printShortDescription(SettingsItemIndex::PowerPulseWait, 7);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulseWait), 1, FontStyle::LARGE);
|
||||
return false;
|
||||
} else {
|
||||
return true; // skip
|
||||
}
|
||||
static bool settings_showPowerPulseOptions(void) { return getSettingValue(SettingsOptions::KeepAwakePulse) > 0; }
|
||||
static void settings_displayPowerPulseWait(void) {
|
||||
printShortDescription(SettingsItemIndex::PowerPulseWait, 7);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulseWait), 1, FontStyle::LARGE);
|
||||
}
|
||||
|
||||
static bool settings_displayPowerPulseDuration(void) {
|
||||
if (getSettingValue(SettingsOptions::KeepAwakePulse)) {
|
||||
printShortDescription(SettingsItemIndex::PowerPulseDuration, 7);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulseDuration), 1, FontStyle::LARGE);
|
||||
return false;
|
||||
} else {
|
||||
return true; // skip
|
||||
}
|
||||
static void settings_displayPowerPulseDuration(void) {
|
||||
printShortDescription(SettingsItemIndex::PowerPulseDuration, 7);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::KeepAwakePulseDuration), 1, FontStyle::LARGE);
|
||||
}
|
||||
|
||||
static bool settings_displayBrightnessLevel(void) {
|
||||
static void settings_displayBrightnessLevel(void) {
|
||||
OLED::drawArea(0, 0, 16, 16, brightnessIcon);
|
||||
OLED::setCursor(5 * FONT_12_WIDTH - 2, 0);
|
||||
// printShortDescription(SettingsItemIndex::Brightness, 7);
|
||||
OLED::printNumber(getSettingValue(SettingsOptions::OLEDBrightness), 3, FontStyle::LARGE);
|
||||
// While not optimal to apply this here, it is _very_ convienient
|
||||
OLED::setBrightness(getSettingValue(SettingsOptions::OLEDBrightness));
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool settings_displayInvertColor(void) {
|
||||
static void settings_displayInvertColor(void) {
|
||||
OLED::drawArea(0, 0, 24, 16, invertDisplayIcon);
|
||||
OLED::setCursor(7 * FONT_12_WIDTH - 2, 0);
|
||||
// printShortDescription(SettingsItemIndex::ColourInversion, 7);
|
||||
@@ -794,11 +756,10 @@ static bool settings_displayInvertColor(void) {
|
||||
OLED::drawCheckbox(getSettingValue(SettingsOptions::OLEDInversion));
|
||||
// While not optimal to apply this here, it is _very_ convienient
|
||||
OLED::setInverseDisplay(getSettingValue(SettingsOptions::OLEDInversion));
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef HALL_SENSOR
|
||||
static bool settings_displayHallEffect(void) {
|
||||
static void settings_displayHallEffect(void) {
|
||||
printShortDescription(SettingsItemIndex::HallEffSensitivity, 7);
|
||||
switch (getSettingValue(SettingsOptions::HallEffectSensitivity)) {
|
||||
case 1:
|
||||
@@ -815,7 +776,6 @@ static bool settings_displayHallEffect(void) {
|
||||
OLED::print(translatedString(Tr->SettingSensitivityOff), FontStyle::LARGE);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -860,53 +820,35 @@ static void displayMenu(size_t index) {
|
||||
}
|
||||
// Draw symbol
|
||||
// 16 pixel wide image
|
||||
// 2 pixel wide scrolling indicator
|
||||
// less 2 pixel wide scrolling indicator
|
||||
OLED::drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, (&SettingsMenuIcons[index][(16 * 2) * currentFrame]));
|
||||
}
|
||||
|
||||
static bool settings_displayCalibrateVIN(void) {
|
||||
printShortDescription(SettingsItemIndex::VoltageCalibration, 5);
|
||||
return false;
|
||||
}
|
||||
static void settings_displayCalibrateVIN(void) { printShortDescription(SettingsItemIndex::VoltageCalibration, 5); }
|
||||
|
||||
#if defined(POW_DC) || defined(POW_QC)
|
||||
static bool settings_displayPowerMenu(void) {
|
||||
displayMenu(0);
|
||||
return false;
|
||||
}
|
||||
static void settings_displayPowerMenu(void) { displayMenu(0); }
|
||||
static bool settings_enterPowerMenu(void) {
|
||||
gui_Menu(powerMenu);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
static bool settings_displaySolderingMenu(void) {
|
||||
displayMenu(1);
|
||||
return false;
|
||||
}
|
||||
static void settings_displaySolderingMenu(void) { displayMenu(1); }
|
||||
static bool settings_enterSolderingMenu(void) {
|
||||
gui_Menu(solderingMenu);
|
||||
return false;
|
||||
}
|
||||
static bool settings_displayPowerSavingMenu(void) {
|
||||
displayMenu(2);
|
||||
return false;
|
||||
}
|
||||
static void settings_displayPowerSavingMenu(void) { displayMenu(2); }
|
||||
static bool settings_enterPowerSavingMenu(void) {
|
||||
gui_Menu(PowerSavingMenu);
|
||||
return false;
|
||||
}
|
||||
static bool settings_displayUIMenu(void) {
|
||||
displayMenu(3);
|
||||
return false;
|
||||
}
|
||||
static void settings_displayUIMenu(void) { displayMenu(3); }
|
||||
static bool settings_enterUIMenu(void) {
|
||||
gui_Menu(HasFahrenheit ? UIMenu : UIMenu + 1);
|
||||
return false;
|
||||
}
|
||||
static bool settings_displayAdvancedMenu(void) {
|
||||
displayMenu(4);
|
||||
return false;
|
||||
}
|
||||
static void settings_displayAdvancedMenu(void) { displayMenu(4); }
|
||||
static bool settings_enterAdvancedMenu(void) {
|
||||
gui_Menu(advancedMenu);
|
||||
return false;
|
||||
@@ -940,7 +882,11 @@ void gui_Menu(const menuitem *menu) {
|
||||
ScrollMessage scrollMessage;
|
||||
|
||||
for (uint8_t i = 0; menu[i].draw != nullptr; i++) {
|
||||
scrollContentSize += 1;
|
||||
if (menu[i].isVisible == nullptr) {
|
||||
scrollContentSize += 1; // Always visible
|
||||
} else if (menu[i].isVisible()) {
|
||||
scrollContentSize += 1; // Selectively visible and chosen to show
|
||||
}
|
||||
}
|
||||
|
||||
while ((menu[currentScreen].draw != nullptr) && earlyExit == false) {
|
||||
@@ -952,10 +898,12 @@ void gui_Menu(const menuitem *menu) {
|
||||
// to keep the primary framebuffer intact for the upcoming transition
|
||||
// animation.
|
||||
OLED::useSecondaryFramebuffer(true);
|
||||
if (menu[currentScreen].draw()) {
|
||||
currentScreen++;
|
||||
OLED::useSecondaryFramebuffer(false);
|
||||
continue;
|
||||
if (menu[currentScreen].isVisible != nullptr) {
|
||||
if (!menu[currentScreen].isVisible()) {
|
||||
currentScreen++;
|
||||
OLED::useSecondaryFramebuffer(false);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
animOpenState = true;
|
||||
|
||||
@@ -712,7 +712,7 @@ void showDebugMenu(void) {
|
||||
printVoltage();
|
||||
break;
|
||||
case 10:
|
||||
// Print PCB ID number
|
||||
// Print ACC type
|
||||
OLED::print(AccelTypeNames[(int)DetectedAccelerometerVersion], FontStyle::SMALL);
|
||||
break;
|
||||
case 11:
|
||||
|
||||
@@ -31,7 +31,8 @@ HOST_CC := gcc
|
||||
endif
|
||||
HOST_OUTPUT_DIR=Objects/host
|
||||
|
||||
|
||||
DEVICE_DFU_ADDRESS=0x08000000
|
||||
DEVICE_DFU_VID_PID=0x28E9:0x0189
|
||||
# Enumerate all of the include directories
|
||||
APP_INC_DIR = ./Core/Inc
|
||||
BRIEFLZ_INC_DIR = ./Core/brieflz
|
||||
@@ -100,6 +101,8 @@ CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mfloat-abi=soft
|
||||
flash_size=64k
|
||||
bootldr_size=0x4000
|
||||
DEVICE_DFU_ADDRESS=0x08004000
|
||||
DEVICE_DFU_VID_PID=0x1209:0xDB42
|
||||
endif
|
||||
|
||||
ifeq ($(model),$(filter $(model),$(ALL_MHP30_MODELS)))
|
||||
@@ -128,6 +131,8 @@ CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mfloat-abi=soft
|
||||
flash_size=128k
|
||||
bootldr_size=32k
|
||||
DEVICE_DFU_ADDRESS=0x08008000
|
||||
DEVICE_DFU_VID_PID=0x1209:0xDB42
|
||||
endif
|
||||
ifeq ($(model),$(ALL_PINE_MODELS))
|
||||
$(info Building for Pine64 )
|
||||
@@ -336,7 +341,7 @@ OUT_OBJS_S=$(addprefix $(OUTPUT_DIR)/,$(OBJS_S))
|
||||
|
||||
default : firmware-EN
|
||||
|
||||
firmware-%: $(HEXFILE_DIR)/$(model)_%.hex $(HEXFILE_DIR)/$(model)_%.bin
|
||||
firmware-%: $(HEXFILE_DIR)/$(model)_%.hex $(HEXFILE_DIR)/$(model)_%.bin $(HEXFILE_DIR)/$(model)_%.dfu
|
||||
@true
|
||||
|
||||
ALL_FIRMWARE_TARGETS=$(addprefix firmware-,$(ALL_LANGUAGES))
|
||||
@@ -354,6 +359,9 @@ all: $(ALL_FIRMWARE_TARGETS)
|
||||
$(SIZE) --format=berkeley $<
|
||||
$(OBJCOPY) $< -O binary $@
|
||||
|
||||
%.dfu : %.bin Makefile
|
||||
python3 dfuse-pack.py -b $(DEVICE_DFU_ADDRESS)@0:$< -D $(DEVICE_DFU_VID_PID) $@
|
||||
|
||||
$(HEXFILE_DIR)/$(model)_%.elf : \
|
||||
$(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) \
|
||||
$(OUTPUT_DIR)/Core/Gen/Translation.%.o \
|
||||
|
||||
349
source/dfuse-pack.py
Executable file
349
source/dfuse-pack.py
Executable file
@@ -0,0 +1,349 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Written by Antonio Galea - 2010/11/18
|
||||
# Distributed under Gnu LGPL 3.0
|
||||
# see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
|
||||
import sys, struct, zlib, os
|
||||
import binascii
|
||||
from optparse import OptionParser
|
||||
|
||||
try:
|
||||
from intelhex import IntelHex
|
||||
except ImportError:
|
||||
IntelHex = None
|
||||
|
||||
DEFAULT_DEVICE = "0x0483:0xdf11"
|
||||
DEFAULT_NAME = b"ST..."
|
||||
|
||||
# Prefix and Suffix sizes are derived from ST's DfuSe File Format Specification (UM0391), DFU revision 1.1a
|
||||
PREFIX_SIZE = 11
|
||||
SUFFIX_SIZE = 16
|
||||
|
||||
|
||||
def named(tuple, names):
|
||||
return dict(list(zip(names.split(), tuple)))
|
||||
|
||||
|
||||
def consume(fmt, data, names):
|
||||
n = struct.calcsize(fmt)
|
||||
return named(struct.unpack(fmt, data[:n]), names), data[n:]
|
||||
|
||||
|
||||
def cstring(bytestring):
|
||||
return bytestring.partition(b"\0")[0]
|
||||
|
||||
|
||||
def compute_crc(data):
|
||||
return 0xFFFFFFFF & -zlib.crc32(data) - 1
|
||||
|
||||
|
||||
def parse(file, dump_images=False):
|
||||
print('File: "%s"' % file)
|
||||
data = open(file, "rb").read()
|
||||
crc = compute_crc(data[:-4])
|
||||
prefix, data = consume("<5sBIB", data, "signature version size targets")
|
||||
print(
|
||||
"%(signature)s v%(version)d, image size: %(size)d, targets: %(targets)d"
|
||||
% prefix
|
||||
)
|
||||
for t in range(prefix["targets"]):
|
||||
tprefix, data = consume(
|
||||
"<6sBI255s2I", data, "signature altsetting named name size elements"
|
||||
)
|
||||
tprefix["num"] = t
|
||||
if tprefix["named"]:
|
||||
tprefix["name"] = cstring(tprefix["name"])
|
||||
else:
|
||||
tprefix["name"] = ""
|
||||
print(
|
||||
'%(signature)s %(num)d, alt setting: %(altsetting)s, name: "%(name)s", size: %(size)d, elements: %(elements)d'
|
||||
% tprefix
|
||||
)
|
||||
tsize = tprefix["size"]
|
||||
target, data = data[:tsize], data[tsize:]
|
||||
for e in range(tprefix["elements"]):
|
||||
eprefix, target = consume("<2I", target, "address size")
|
||||
eprefix["num"] = e
|
||||
print(" %(num)d, address: 0x%(address)08x, size: %(size)d" % eprefix)
|
||||
esize = eprefix["size"]
|
||||
image, target = target[:esize], target[esize:]
|
||||
if dump_images:
|
||||
out = "%s.target%d.image%d.bin" % (file, t, e)
|
||||
open(out, "wb").write(image)
|
||||
print(' DUMPED IMAGE TO "%s"' % out)
|
||||
if len(target):
|
||||
print("target %d: PARSE ERROR" % t)
|
||||
suffix = named(
|
||||
struct.unpack("<4H3sBI", data[:SUFFIX_SIZE]),
|
||||
"device product vendor dfu ufd len crc",
|
||||
)
|
||||
print(
|
||||
"usb: %(vendor)04x:%(product)04x, device: 0x%(device)04x, dfu: 0x%(dfu)04x, %(ufd)s, %(len)d, 0x%(crc)08x"
|
||||
% suffix
|
||||
)
|
||||
if crc != suffix["crc"]:
|
||||
print("CRC ERROR: computed crc32 is 0x%08x" % crc)
|
||||
data = data[SUFFIX_SIZE:]
|
||||
if data:
|
||||
print("PARSE ERROR")
|
||||
|
||||
|
||||
def checkbin(binfile):
|
||||
data = open(binfile, "rb").read()
|
||||
if len(data) < SUFFIX_SIZE:
|
||||
return
|
||||
crc = compute_crc(data[:-4])
|
||||
suffix = named(
|
||||
struct.unpack("<4H3sBI", data[-SUFFIX_SIZE:]),
|
||||
"device product vendor dfu ufd len crc",
|
||||
)
|
||||
if crc == suffix["crc"] and suffix["ufd"] == b"UFD":
|
||||
print(
|
||||
"usb: %(vendor)04x:%(product)04x, device: 0x%(device)04x, dfu: 0x%(dfu)04x, %(ufd)s, %(len)d, 0x%(crc)08x"
|
||||
% suffix
|
||||
)
|
||||
print("It looks like the file %s has a DFU suffix!" % binfile)
|
||||
print("Please remove any DFU suffix and retry.")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def build(file, targets, name=DEFAULT_NAME, device=DEFAULT_DEVICE):
|
||||
data = b""
|
||||
for t, target in enumerate(targets):
|
||||
tdata = b""
|
||||
for image in target:
|
||||
tdata += (
|
||||
struct.pack("<2I", image["address"], len(image["data"])) + image["data"]
|
||||
)
|
||||
ealt = image["alt"]
|
||||
tdata = (
|
||||
struct.pack(
|
||||
"<6sBI255s2I", b"Target", ealt, 1, name, len(tdata), len(target)
|
||||
)
|
||||
+ tdata
|
||||
)
|
||||
data += tdata
|
||||
data = (
|
||||
struct.pack(
|
||||
"<5sBIB", b"DfuSe", 1, PREFIX_SIZE + len(data) + SUFFIX_SIZE, len(targets)
|
||||
)
|
||||
+ data
|
||||
)
|
||||
v, d = [int(x, 0) & 0xFFFF for x in device.split(":", 1)]
|
||||
data += struct.pack("<4H3sB", 0, d, v, 0x011A, b"UFD", SUFFIX_SIZE)
|
||||
crc = compute_crc(data)
|
||||
data += struct.pack("<I", crc)
|
||||
open(file, "wb").write(data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
usage = """
|
||||
%prog [-d|--dump] infile.dfu
|
||||
%prog {-b|--build} address:file.bin [-b address:file.bin ...] [{-D|--device}=vendor:device] outfile.dfu
|
||||
%prog {-s|--build-s19} file.s19 [{-D|--device}=vendor:device] outfile.dfu
|
||||
%prog {-i|--build-ihex} file.hex [-i file.hex ...] [{-D|--device}=vendor:device] outfile.dfu"""
|
||||
parser = OptionParser(usage=usage)
|
||||
parser.add_option(
|
||||
"-b",
|
||||
"--build",
|
||||
action="append",
|
||||
dest="binfiles",
|
||||
help="Include a raw binary file, to be loaded at the specified address. The BINFILES argument is of the form address:path-to-file. The address can have @X appended where X is the alternate interface number for this binary file. Note that the binary files must not have any DFU suffix!",
|
||||
metavar="BINFILES",
|
||||
)
|
||||
parser.add_option(
|
||||
"-i",
|
||||
"--build-ihex",
|
||||
action="append",
|
||||
dest="hexfiles",
|
||||
help="build a DFU file from given Intel HEX HEXFILES",
|
||||
metavar="HEXFILES",
|
||||
)
|
||||
parser.add_option(
|
||||
"-s",
|
||||
"--build-s19",
|
||||
type="string",
|
||||
dest="s19files",
|
||||
help="build a DFU file from given S19 S-record S19FILE",
|
||||
metavar="S19FILE",
|
||||
)
|
||||
parser.add_option(
|
||||
"-D",
|
||||
"--device",
|
||||
action="store",
|
||||
dest="device",
|
||||
help="build for DEVICE, defaults to %s" % DEFAULT_DEVICE,
|
||||
metavar="DEVICE",
|
||||
)
|
||||
parser.add_option(
|
||||
"-a",
|
||||
"--alt-intf",
|
||||
action="store",
|
||||
dest="alt",
|
||||
help="build for alternate interface number ALTINTF, defaults to 0",
|
||||
metavar="ALTINTF",
|
||||
)
|
||||
parser.add_option(
|
||||
"-d",
|
||||
"--dump",
|
||||
action="store_true",
|
||||
dest="dump_images",
|
||||
default=False,
|
||||
help="dump contained images to current directory",
|
||||
)
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
targets = []
|
||||
|
||||
if options.alt:
|
||||
try:
|
||||
default_alt = int(options.alt)
|
||||
except ValueError:
|
||||
print("Alternate interface option argument %s invalid." % options.alt)
|
||||
sys.exit(1)
|
||||
else:
|
||||
default_alt = 0
|
||||
|
||||
if (options.binfiles or options.hexfiles) and len(args) == 1:
|
||||
target = []
|
||||
old_ealt = None
|
||||
|
||||
if options.binfiles:
|
||||
for arg in options.binfiles:
|
||||
try:
|
||||
address, binfile = arg.split(":", 1)
|
||||
except ValueError:
|
||||
print("Address:file couple '%s' invalid." % arg)
|
||||
sys.exit(1)
|
||||
try:
|
||||
address, alts = address.split("@", 1)
|
||||
if alts:
|
||||
try:
|
||||
ealt = int(alts)
|
||||
except ValueError:
|
||||
print("Alternate interface number %s invalid." % alts)
|
||||
sys.exit(1)
|
||||
else:
|
||||
ealt = default_alt
|
||||
except ValueError:
|
||||
ealt = default_alt
|
||||
try:
|
||||
address = int(address, 0) & 0xFFFFFFFF
|
||||
except ValueError:
|
||||
print("Address %s invalid." % address)
|
||||
sys.exit(1)
|
||||
if not os.path.isfile(binfile):
|
||||
print("Unreadable file '%s'." % binfile)
|
||||
sys.exit(1)
|
||||
checkbin(binfile)
|
||||
if old_ealt is not None and ealt != old_ealt:
|
||||
targets.append(target)
|
||||
target = []
|
||||
target.append(
|
||||
{
|
||||
"address": address,
|
||||
"alt": ealt,
|
||||
"data": open(binfile, "rb").read(),
|
||||
}
|
||||
)
|
||||
old_ealt = ealt
|
||||
targets.append(target)
|
||||
|
||||
if options.hexfiles:
|
||||
if not IntelHex:
|
||||
print("Error: IntelHex python module could not be found")
|
||||
sys.exit(1)
|
||||
for hexf in options.hexfiles:
|
||||
ih = IntelHex(hexf)
|
||||
for (address, end) in ih.segments():
|
||||
try:
|
||||
address = address & 0xFFFFFFFF
|
||||
except ValueError:
|
||||
print("Address %s invalid." % address)
|
||||
sys.exit(1)
|
||||
target.append(
|
||||
{
|
||||
"address": address,
|
||||
"alt": default_alt,
|
||||
"data": ih.tobinstr(start=address, end=end - 1),
|
||||
}
|
||||
)
|
||||
targets.append(target)
|
||||
|
||||
outfile = args[0]
|
||||
device = DEFAULT_DEVICE
|
||||
if options.device:
|
||||
device = options.device
|
||||
try:
|
||||
v, d = [int(x, 0) & 0xFFFF for x in device.split(":", 1)]
|
||||
except:
|
||||
print("Invalid device '%s'." % device)
|
||||
sys.exit(1)
|
||||
build(outfile, targets, DEFAULT_NAME, device)
|
||||
elif options.s19files and len(args) == 1:
|
||||
address = 0
|
||||
data = ""
|
||||
target = []
|
||||
name = DEFAULT_NAME
|
||||
with open(options.s19files) as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
curaddress = 0
|
||||
curdata = ""
|
||||
line = line.rstrip()
|
||||
if line.startswith("S0"):
|
||||
name = binascii.a2b_hex(line[8 : len(line) - 2])
|
||||
elif line.startswith("S3"):
|
||||
try:
|
||||
curaddress = int(line[4:12], 16) & 0xFFFFFFFF
|
||||
except ValueError:
|
||||
print("Address %s invalid." % address)
|
||||
sys.exit(1)
|
||||
curdata = binascii.unhexlify(line[12:-2])
|
||||
elif line.startswith("S2"):
|
||||
try:
|
||||
curaddress = int(line[4:10], 16) & 0xFFFFFFFF
|
||||
except ValueError:
|
||||
print("Address %s invalid." % address)
|
||||
sys.exit(1)
|
||||
curdata = binascii.unhexlify(line[10:-2])
|
||||
elif line.startswith("S1"):
|
||||
try:
|
||||
curaddress = int(line[4:8], 16) & 0xFFFFFFFF
|
||||
except ValueError:
|
||||
print("Address %s invalid." % address)
|
||||
sys.exit(1)
|
||||
curdata = binascii.unhexlify(line[8:-2])
|
||||
if address == 0:
|
||||
address = curaddress
|
||||
data = curdata
|
||||
elif address + len(data) != curaddress:
|
||||
target.append(
|
||||
{"address": address, "alt": default_alt, "data": data}
|
||||
)
|
||||
address = curaddress
|
||||
data = curdata
|
||||
else:
|
||||
data += curdata
|
||||
outfile = args[0]
|
||||
device = DEFAULT_DEVICE
|
||||
if options.device:
|
||||
device = options.device
|
||||
try:
|
||||
v, d = [int(x, 0) & 0xFFFF for x in device.split(":", 1)]
|
||||
except:
|
||||
print("Invalid device '%s'." % device)
|
||||
sys.exit(1)
|
||||
build(outfile, [target], name, device)
|
||||
elif len(args) == 1:
|
||||
infile = args[0]
|
||||
if not os.path.isfile(infile):
|
||||
print("Unreadable file '%s'." % infile)
|
||||
sys.exit(1)
|
||||
parse(infile, dump_images=options.dump_images)
|
||||
else:
|
||||
parser.print_help()
|
||||
if not IntelHex:
|
||||
print("Note: Intel hex files support requires the IntelHex python module")
|
||||
sys.exit(1)
|
||||
@@ -4,4 +4,4 @@
|
||||
* i.e.: BUILD_VERSION = 'Rel. v2.08' --> Will generated to: 'v2.08.1a2b3c4'
|
||||
*/
|
||||
|
||||
#define BUILD_VERSION "v2.15"
|
||||
#define BUILD_VERSION "v2.16"
|
||||
|
||||
Reference in New Issue
Block a user