1
0
forked from me/IronOS

Compare commits

...

41 Commits
v2.02 ... v2.03

Author SHA1 Message Date
Ben V. Brown
8eadb98496 Enable SWD back, Add Off mode for Sleep 2018-03-30 19:16:38 +11:00
Ben V. Brown
fe5ee91104 Swap breakpoints to resets to try and prevent lockups 2018-03-29 21:36:16 +11:00
Ángel González
762236b485 Spanish translation updated (#253) 2018-03-29 21:16:40 +11:00
Ben V. Brown
c4230d79bf Update Build Script
Fixes #252
2018-03-25 11:33:24 +11:00
Ben V. Brown
03b2bede4d Fix #231 2018-03-23 13:14:59 +11:00
Ben V. Brown
37d5cf1e70 ADC Timing alignment bought in 2018-03-23 12:57:06 +11:00
Ben V. Brown
85869d507e Add lockouts for no accel 2018-03-23 10:02:35 +11:00
Ben V. Brown
6c34675083 Sleep screen check bug
Should fix #248
2018-03-23 10:00:07 +11:00
federck
b4235bea75 Translation.cpp revised and reformatted (#250)
* Translation.cpp revised and reformatted

* Update Translation.cpp
2018-03-23 09:38:41 +11:00
gkrystev
ecf6e8aeb4 Bulgarian translation update (#236)
Updated translation for Bulgarian with the latest version of Translation.cpp
2018-03-19 12:47:48 +11:00
federck
174380bcb0 Update italian translation.cpp (#242)
* Update Translation.cpp
2018-03-19 12:47:13 +11:00
jonnieZG
96ab173c4b Menu Navigation - Long-Press Speed Ramping (#238)
Exponential button acceleration from @jonnieZG
2018-03-19 07:22:42 +11:00
Jan Krupička
fb6981dbe3 Updated czech translation (#241) 2018-03-18 21:37:36 +11:00
Julius Vitkauskas
30be520692 Add Lithuanian language (#239) 2018-03-18 21:36:38 +11:00
jonnieZG
ebab60c79b Translation HR update (#237)
* Enabled DOUBLE line for Croatian + translation fix
2018-03-18 12:36:50 +11:00
The-M1k3y
bf445e9b26 updated german translation (#234) 2018-03-16 10:57:58 +11:00
jonnieZG
8f6a65825d Translation hr (#232)
* Croatian translation updated
2018-03-16 10:47:07 +11:00
Ben V. Brown
0d2bfb9a29 Fix Menu / RC2
#214
New Icons
Fix Hold to scroll timer with a lockout
Fix Menu lengths

New French Translation Closes #228

Fix confirmation message scroll speed
Fix translations.cpp
2018-03-14 23:21:29 +11:00
Ben V. Brown
fcfa44a949 Layered menu (#229)
* Split menu handling,speed up OLED

* Split menu apart

Split menu apart.
Next to add icons etc

* Finished main menu re-layout

* Added menu option for scroll speed

* Speed up scroll settings, pad translations
2018-03-14 22:11:04 +11:00
Ben V. Brown
17c0d15a8b Add issue and pull request templates 2018-03-12 17:04:11 +11:00
jonnieZG
719953a2bf Croatian translation corrections, enabled DOUBLE-line menus (#220)
* Enabled DOUBLE line for Croatian + translation fix

Enabled DOUBLE line Menu for Croatian.
A minor translation fix.

* Added Double line menus for Croatian

Added Double line menus for Croatian. For some reason they were not included in the previous pull request, even though I made them (most probably it was by my mistake).

* Added "Power: " translation for Croatian

* Menu desciption scroll sped up 3x

* Slow scroll

* Additional HR translation fix

* EOL fixed

* Fixed flickering - update only when required

* HR translation improvement.

* Added "Are you sure...?" translation
2018-03-11 13:12:59 +11:00
jonnieZG
33edf6ba76 Description scroll speed parametrized + smooth scroll in userConfirmation (#221)
* Enabled DOUBLE line for Croatian + translation fix

Enabled DOUBLE line Menu for Croatian.
A minor translation fix.

* Added Double line menus for Croatian

Added Double line menus for Croatian. For some reason they were not included in the previous pull request, even though I made them (most probably it was by my mistake).

* Added "Power: " translation for Croatian

* Menu desciption scroll sped up 3x

* Slow scroll

* Additional HR translation fix

* EOL fixed

* Fixed flickering - update only when required

* Parametrized description scrolling speed

* Synchronized Translation.c with original Ralim master

* Removed unnecessary check

* lcd.refresh() in description scroll called only when required

* Smooth scrolling also implemented in userConfirmation() method

* Variable messageSpeedFactor renamed to messageSpeedFactor

* Variable renamed
2018-03-11 13:12:49 +11:00
Shawn Anastasio
fbd730760b Fix display sleep on idle, addresses #223 (#224) 2018-03-10 11:34:09 +11:00
Jan Krupička
b46c17078b Adjust left limit for drawing (#219)
* adjust left limit for drawing

do draw area also if part just of it is visible - e.g. do not skip whole letter in rolling description if half of it can be shown

* render just visible area part

* fix visible area part computation
2018-03-07 12:01:59 +11:00
jonnieZG
a30569eda2 Fast menu scroll (#218)
* Enabled DOUBLE line for Croatian
* Menu desciption scroll sped 
* Better description smooth-scrolling routine.
* Tearing fixed. The screen will update only when required.
2018-03-05 23:06:43 +11:00
Jan Krupička
677b278478 Use unicode chars U2713/U2717 as true/false in menu (#183)
* Use checkbox for true/false menu options
2018-03-03 22:33:59 +11:00
Ben V. Brown
57949a7937 Bump I2C speed back up 2018-03-03 21:20:01 +11:00
Ben V. Brown
f14ea321a7 Add detailed soldering screen
This adds a detailed soldering screen to take a step towards #181
2018-03-03 16:20:01 +11:00
Ben V. Brown
aef8f5f5bb LIS2DH - Adding support for the new accelerometer (#216)
+ Creates a new driver for the LIS2DH accelerometer
+ Fixes timing issues since we're already touching a chunk of code

The LIS2DH driver should output similar numbers to the old MMA accelerometer.

Fixes #202
Fixes #189
2018-03-03 15:43:10 +11:00
Jan Krupička
3ce0cc0d99 Logos (#197)
* added HEX for removing logo
- flash this HEX to remove logo
* Added 001_TS100 logo
2018-02-26 11:07:01 +11:00
Ben V. Brown
5e30152f40 Detect PCB Version
This probes the I2C bus to look for the MMA model accelerometer or if the new one is present.
2018-02-25 14:26:10 +11:00
federck
5b0eb3fb0d [FIX] Italian translation (#195) 2018-02-23 11:31:26 +11:00
Igor Feghali
f26da12948 pt br translation (#207) 2018-02-09 09:31:35 +11:00
Ben V. Brown
b47098e9c2 Add lockout for #187
Fix first part of #188
2018-01-26 12:50:00 +11:00
Ben V. Brown
653c71ba2d Remove unused I2C DMA
Slow down I2C to 50kHz
Adjust ADC timing
2018-01-26 12:42:38 +11:00
Ben V. Brown
715be0b0b6 Move watchdog resets to only be in PID 2018-01-26 12:30:09 +11:00
Jan Krupička
93869b979e Fix comments (translation max lengths) (#196)
* fix translation max length comments

* fix comments

* fix logo address in comment
2018-01-10 08:34:35 +11:00
federck
2281dbd5ad Italian translation (#192) 2018-01-09 07:55:43 +11:00
jonnieZG
7ba3818cdb Croatian Language: Double-line menus + some minor translation corrections (#186)
* Croatian: Double-line Menus + minor corrections

* Updated main.css - externalizing string

Externalized strings:
"Undervoltage"
"Input V: "
"DC LOW" (Using previously unused ULOWarningString)
"Tip Temp: " (At temperature warning)
"Tip:" (At sleeping advanced)
"Tip:" (At idle screen)
" Set:" (At idle screen)
"BAD TIP"
"Tip Disconnected!" (changed to "TIP DISCONNECTED" due to <=16 limit)

* Update Translation.c - Externalized strings

Externalized strings:
"Undervoltage"
"Input V: "
"DC LOW" (Using previously unused ULOWarningString)
"Tip Temp: " (At temperature warning)
"Tip:" (At sleeping advanced)
"Tip:" (At idle screen)
" Set:" (At idle screen)
"BAD TIP"
"Tip Disconnected!" (changed to "TIP DISCONNECTED" due to <=16 limit)

Max string length corrected from 17 to 16.

* Update Translation.h - Externalized strings

Externalized strings:
"Undervoltage"
"Input V: "
"DC LOW" (Using previously unused ULOWarningString)
"Tip Temp: " (At temperature warning)
"Tip:" (At sleeping advanced)
"Tip:" (At idle screen)
" Set:" (At idle screen)
"BAD TIP"
"Tip Disconnected!" (changed to "TIP DISCONNECTED" due to <=16 limit)
2018-01-08 22:28:13 +11:00
Jan Krupička
84305ce0a9 Update translation cs_CZ (#185)
- updated to mach current codebase
- added diacritics
2018-01-03 10:40:02 +11:00
Jan Krupička
b01525272a Menu factory reset last (#184)
* Factory reset is the last menu option

* English translation fix - little char in second word

Unifies big/small first chars in english translation
2018-01-03 08:04:30 +11:00
38 changed files with 3906 additions and 2162 deletions

1
.gitignore vendored
View File

@@ -43,3 +43,4 @@ Logo GUI/TS100 Logo Editor/TS100 Logo Editor/bin/
workspace/ts100/ts100.xml workspace/ts100/ts100.xml
workspace/ts100_old/* workspace/ts100_old/*
*.cache *.cache
workspace/TS100/.settings/language.settings.xml

View File

@@ -148,7 +148,7 @@ namespace TS100_Logo_Editor
data[i] = data[i + 1]; data[i] = data[i + 1];
data[i + 1] = temp; data[i + 1] = temp;
} }
string outputHexFile = IntelHex.IntelHex.encode(data, 0x0800F800, 16, true, true);//16 bytes is the only format the DFU seems to support //0x0800B800 string outputHexFile = IntelHex.IntelHex.encode(data, 0x0800F800, 16, true, true);//16 bytes is the only format the DFU seems to support //0x0800F800
//^ This string now just needs to be written out to a text file :) //^ This string now just needs to be written out to a text file :)
SaveFileDialog dlg = new SaveFileDialog(); SaveFileDialog dlg = new SaveFileDialog();
dlg.Title = "Save DFU File"; dlg.Title = "Save DFU File";

View File

@@ -0,0 +1,258 @@
:020000040800F2
:10F8000055AA0DF080002A54821580818080808066
:10F8100080808080808080808080808000000000E8
:10F82000000000004080402020C020201010080868
:10F8300008080C080C0C0C0C080808080C0C0C0C24
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
:10F850008808284808E828C828A80CCC28CC28A85C
:10F8600008C800F80200050208050808080808088A
:10F8700008080A080A090A090A0908090505050508
:10F880000505050510081020201F4040404020407D
:10F890002020202020202020202020202020202068
:10F8A00020202F202F28202025202A2A2A2A2728F6
:10F8B0002120282F202F2827282B20272827282BD6
:10F8C0002027001F000000000000000000000000D2
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:10F8000055AA0DF080002A54821580818080808066
:10F8100080808080808080808080808000000000E8
:10F82000000000004080402020C020201010080868
:10F8300008080C080C0C0C0C080808080C0C0C0C24
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
:10F850008808284808E828C828A80CCC28CC28A85C
:10F8600008C800F80200050208050808080808088A
:10F8700008080A080A090A090A0908090505050508
:10F880000505050510081020201F4040404020407D
:10F890002020202020202020202020202020202068
:10F8A00020202F202F28202025202A2A2A2A2728F6
:10F8B0002120282F202F2827282B20272827282BD6
:10F8C0002027001F000000000000000000000000D2
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:10F8000055AA0DF080002A54821580818080808066
:10F8100080808080808080808080808000000000E8
:10F82000000000004080402020C020201010080868
:10F8300008080C080C0C0C0C080808080C0C0C0C24
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
:10F850008808284808E828C828A80CCC28CC28A85C
:10F8600008C800F80200050208050808080808088A
:10F8700008080A080A090A090A0908090505050508
:10F880000505050510081020201F4040404020407D
:10F890002020202020202020202020202020202068
:10F8A00020202F202F28202025202A2A2A2A2728F6
:10F8B0002120282F202F2827282B20272827282BD6
:10F8C0002027001F000000000000000000000000D2
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:10F8000055AA0DF080002A54821580818080808066
:10F8100080808080808080808080808000000000E8
:10F82000000000004080402020C020201010080868
:10F8300008080C080C0C0C0C080808080C0C0C0C24
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
:10F850008808284808E828C828A80CCC28CC28A85C
:10F8600008C800F80200050208050808080808088A
:10F8700008080A080A090A090A0908090505050508
:10F880000505050510081020201F4040404020407D
:10F890002020202020202020202020202020202068
:10F8A00020202F202F28202025202A2A2A2A2728F6
:10F8B0002120282F202F2827282B20272827282BD6
:10F8C0002027001F000000000000000000000000D2
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:00000001FF

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

View File

@@ -0,0 +1,258 @@
:020000040800F2
:10F8000000000000000000000000000000000000F8
:10F8100000000000000000000000000000000000E8
:10F8200000000000000000000000000000000000D8
:10F8300000000000000000000000000000000000C8
:10F8400000000000000000000000000000000000B8
:10F8500000000000000000000000000000000000A8
:10F860000000000000000000000000000000000098
:10F870000000000000000000000000000000000088
:10F880000000000000000000000000000000000078
:10F890000000000000000000000000000000000068
:10F8A0000000000000000000000000000000000058
:10F8B0000000000000000000000000000000000048
:10F8C0000000000000000000000000000000000038
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:10F8000000000000000000000000000000000000F8
:10F8100000000000000000000000000000000000E8
:10F8200000000000000000000000000000000000D8
:10F8300000000000000000000000000000000000C8
:10F8400000000000000000000000000000000000B8
:10F8500000000000000000000000000000000000A8
:10F860000000000000000000000000000000000098
:10F870000000000000000000000000000000000088
:10F880000000000000000000000000000000000078
:10F890000000000000000000000000000000000068
:10F8A0000000000000000000000000000000000058
:10F8B0000000000000000000000000000000000048
:10F8C0000000000000000000000000000000000038
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:10F8000000000000000000000000000000000000F8
:10F8100000000000000000000000000000000000E8
:10F8200000000000000000000000000000000000D8
:10F8300000000000000000000000000000000000C8
:10F8400000000000000000000000000000000000B8
:10F8500000000000000000000000000000000000A8
:10F860000000000000000000000000000000000098
:10F870000000000000000000000000000000000088
:10F880000000000000000000000000000000000078
:10F890000000000000000000000000000000000068
:10F8A0000000000000000000000000000000000058
:10F8B0000000000000000000000000000000000048
:10F8C0000000000000000000000000000000000038
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:10F8000000000000000000000000000000000000F8
:10F8100000000000000000000000000000000000E8
:10F8200000000000000000000000000000000000D8
:10F8300000000000000000000000000000000000C8
:10F8400000000000000000000000000000000000B8
:10F8500000000000000000000000000000000000A8
:10F860000000000000000000000000000000000098
:10F870000000000000000000000000000000000088
:10F880000000000000000000000000000000000078
:10F890000000000000000000000000000000000068
:10F8A0000000000000000000000000000000000058
:10F8B0000000000000000000000000000000000048
:10F8C0000000000000000000000000000000000038
:10F8D0000000000000000000000000000000000028
:10F8E0000000000000000000000000000000000018
:10F8F0000000000000000000000000000000000008
:10F9000000000000000000000000000000000000F7
:10F9100000000000000000000000000000000000E7
:10F9200000000000000000000000000000000000D7
:10F9300000000000000000000000000000000000C7
:10F9400000000000000000000000000000000000B7
:10F9500000000000000000000000000000000000A7
:10F960000000000000000000000000000000000097
:10F970000000000000000000000000000000000087
:10F980000000000000000000000000000000000077
:10F990000000000000000000000000000000000067
:10F9A0000000000000000000000000000000000057
:10F9B0000000000000000000000000000000000047
:10F9C0000000000000000000000000000000000037
:10F9D0000000000000000000000000000000000027
:10F9E0000000000000000000000000000000000017
:10F9F0000000000000000000000000000000000007
:10FA000000000000000000000000000000000000F6
:10FA100000000000000000000000000000000000E6
:10FA200000000000000000000000000000000000D6
:10FA300000000000000000000000000000000000C6
:10FA400000000000000000000000000000000000B6
:10FA500000000000000000000000000000000000A6
:10FA60000000000000000000000000000000000096
:10FA70000000000000000000000000000000000086
:10FA80000000000000000000000000000000000076
:10FA90000000000000000000000000000000000066
:10FAA0000000000000000000000000000000000056
:10FAB0000000000000000000000000000000000046
:10FAC0000000000000000000000000000000000036
:10FAD0000000000000000000000000000000000026
:10FAE0000000000000000000000000000000000016
:10FAF0000000000000000000000000000000000006
:10FB000000000000000000000000000000000000F5
:10FB100000000000000000000000000000000000E5
:10FB200000000000000000000000000000000000D5
:10FB300000000000000000000000000000000000C5
:10FB400000000000000000000000000000000000B5
:10FB500000000000000000000000000000000000A5
:10FB60000000000000000000000000000000000095
:10FB70000000000000000000000000000000000085
:10FB80000000000000000000000000000000000075
:10FB90000000000000000000000000000000000065
:10FBA0000000000000000000000000000000000055
:10FBB0000000000000000000000000000000000045
:10FBC0000000000000000000000000000000000035
:10FBD0000000000000000000000000000000000025
:10FBE0000000000000000000000000000000000015
:10FBF0000000000000000000000000000000000005
:00000001FF

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

46
ISSUE_TEMPLATE.md Normal file
View File

@@ -0,0 +1,46 @@
Please edit this template and fill out all the information you can (where relevant). Failure to provide essential information can delay the response you receive.
* **I'm submitting a ...**
- [ ] Bug report
- [ ] Feature request
- [ ] Translation
* **Do you want to request a *feature* or report a *bug*?**
* **What is the current behavior?**
* **What is the expected behavior?**
* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem**
***Steps to reproduce:***
1.
2.
3.
***Video of problem if hard to reproduce***
* **What is the motivation / use case for changing the behavior?**
* **What are you running:**
On the idle screen, you can hold the settings button and it will show you the firmware version.
- Firmware Version: 2.x
- PCB Version: (1/2)
- Power Supply (Voltage and Current Rating) :
* **Other information**
If submitting graphics to go on the iron, please use BMP or PNG files over JPG.

29
PULL_REQUEST_TEMPLATE.md Normal file
View File

@@ -0,0 +1,29 @@
Please try and fill out this template where possible, not all fields are required and can be removed.
* **Please check if the PR fulfills these requirements**
- [ ] The commit message make sense
- [ ] The changes have been tested locally
- [ ] New features have been documented in the Wiki
- [ ] I'm willing to maintain this in the future (Totally Optional)
* **What kind of change does this PR introduce?**
(Bug fix, feature, docs update, ...)
* **What is the current behavior?**
(You can also link to an open issue here)
* **What is the new behavior (if this is a feature change)?**
* **Does this PR introduce a breaking change?**
(What changes might users need to make in their application due to this PR?)
* **Other information**:

View File

@@ -22,7 +22,7 @@
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.317155453" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/> <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.317155453" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/TS100}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.910934658" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/> <builder buildPath="${workspace_loc:/TS100}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.910934658" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.319926124" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler"> <tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.319926124" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1178790692" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.debug" valueType="enumerated"/> <option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1178790692" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.size" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.1214895662" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.option.debugging.level.1214895662" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1766485383" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.1766485383" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/> <listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
@@ -44,11 +44,12 @@
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/> <listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
</option> </option>
<option id="gnu.c.compiler.option.dialect.std.565083189" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/> <option id="gnu.c.compiler.option.dialect.std.565083189" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.338139343" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.176392389" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.176392389" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.893418158" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.893418158" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool> </tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1941847243" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler"> <tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1941847243" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1283353237" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.debug" valueType="enumerated"/> <option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1283353237" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.size" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.224874042" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.debugging.level.224874042" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1749257477" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.1749257477" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/> <listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
@@ -70,6 +71,7 @@
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/> <listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
</option> </option>
<option id="gnu.cpp.compiler.option.dialect.std.1681974405" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.dialect.std.1681974405" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata.1463726438" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.149685854" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.149685854" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.1092052043" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.1092052043" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/>
</tool> </tool>
@@ -130,7 +132,7 @@
<builder buildPath="${workspace_loc:/TS100}/Release" id="fr.ac6.managedbuild.builder.gnu.cross.548236022" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/> <builder buildPath="${workspace_loc:/TS100}/Release" id="fr.ac6.managedbuild.builder.gnu.cross.548236022" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1363306495" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler"> <tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1363306495" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1100266163" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.more" valueType="enumerated"/> <option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1100266163" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.more" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.2139237845" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/> <option id="gnu.c.compiler.option.debugging.level.2139237845" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1770182855" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.1770182855" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/> <listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/core&quot;"/> <listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/core&quot;"/>
@@ -150,12 +152,14 @@
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/> <listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
</option> </option>
<option id="gnu.c.compiler.option.dialect.std.356859384" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/> <option id="gnu.c.compiler.option.dialect.std.356859384" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.1580070223" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.misc.pic.1841660469" name="Position Independent Code (-fPIC)" superClass="gnu.c.compiler.option.misc.pic" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.747173367" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.747173367" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1210653460" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1210653460" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool> </tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1414722294" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler"> <tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1414722294" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1489744363" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.more" valueType="enumerated"/> <option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1489744363" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.more" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.641509376" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.debugging.level.641509376" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.105977434" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> <option id="gnu.cpp.compiler.option.include.paths.105977434" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/> <listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/core&quot;"/> <listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/core&quot;"/>
@@ -175,12 +179,14 @@
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/> <listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
</option> </option>
<option id="gnu.cpp.compiler.option.dialect.std.2101054556" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/> <option id="gnu.cpp.compiler.option.dialect.std.2101054556" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata.1877154487" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.688034595" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.688034595" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.6473827" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.6473827" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/>
</tool> </tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1409185098" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker"/> <tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1409185098" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.162825548" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker"> <tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.162825548" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker">
<option id="gnu.cpp.link.option.strip.459660118" name="Omit all symbol information (-s)" superClass="gnu.cpp.link.option.strip" useByScannerDiscovery="false" value="true" valueType="boolean"/> <option id="gnu.cpp.link.option.strip.459660118" name="Omit all symbol information (-s)" superClass="gnu.cpp.link.option.strip" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.gcsections.664103720" name="Discard unused sections (-Wl,--gc-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.gcsections" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1735005640" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1735005640" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/> <additionalInput kind="additionalinput" paths="$(LIBS)"/>
@@ -201,6 +207,10 @@
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1588000933" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1588000933" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1118741214" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/> <inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1118741214" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool> </tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.exe.release.63862661" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.983697759" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1721181053" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain> </toolChain>
</folderInfo> </folderInfo>
<sourceEntries> <sourceEntries>

View File

@@ -6,7 +6,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1512662983927490956" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="3703734836139458" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>
@@ -18,7 +18,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1512662983927490956" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true"> <provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="3703734836139458" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>

View File

@@ -35,7 +35,7 @@ OPTIM=-O2 -finline-small-functions -findirect-inlining -fdiagnostics-color
# global defines --------------------------------------------------------------- # global defines ---------------------------------------------------------------
GLOBAL_DEFINES += -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D LANG_$(lang) GLOBAL_DEFINES += -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D LANG_$(lang) -D LANG
# Enable debug code generation # Enable debug code generation
DEBUG=-g DEBUG=-g

View File

@@ -23,3 +23,13 @@ make -j16 lang=SE
rm -rf Objects/src rm -rf Objects/src
make -j16 lang=TR make -j16 lang=TR
rm -rf Objects/src rm -rf Objects/src
make -j16 lang=BG
rm -rf Objects/src
make -j16 lang=SK
rm -rf Objects/src
make -j16 lang=HUN
rm -rf Objects/src
make -j16 lang=BR
rm -rf Objects/src
make -j16 lang=LT
rm -rf Objects/src

View File

@@ -10,6 +10,9 @@
#ifndef FONT_H_ #ifndef FONT_H_
#define FONT_H_ #define FONT_H_
#include "Translation.h" #include "Translation.h"
#define FONT_12_WIDTH 12
/* /*
* Remember screen is LSB at the top, MSB at the bottom of the strip! * Remember screen is LSB at the top, MSB at the bottom of the strip!
*/ */
@@ -490,8 +493,8 @@ const uint8_t ExtraFontChars[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x10,0x10, // cooling 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x10,0x10, // cooling
0x00,0x60,0xE0,0xFE,0xE0,0xE0,0xE0,0xE0,0xFE,0xE0,0x60,0x00,0x00,0x00,0x00,0x01,0x03,0xFF,0xFF,0x03,0x01,0x00,0x00,0x00, // AC 0x00,0x60,0xE0,0xFE,0xE0,0xE0,0xE0,0xE0,0xFE,0xE0,0x60,0x00,0x00,0x00,0x00,0x01,0x03,0xFF,0xFF,0x03,0x01,0x00,0x00,0x00, // AC
0xE0,0xF0,0x98,0x18,0x18,0x18,0x18,0xD8,0x78,0x38,0xFC,0xE6,0x1F,0x3F,0x61,0x63,0x66,0x6C,0x67,0x61,0x60,0x60,0x3F,0x1F, // checkbox on 0xFC,0x02,0x02,0x02,0x02,0x02,0x02,0x82,0x62,0x1A,0x02,0xFC,0x3F,0x40,0x42,0x46,0x4C,0x58,0x46,0x41,0x40,0x40,0x40,0x3F, // ☑ (check box on, menu true)
0xE0,0xF0,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF0,0xE0,0x1F,0x3F,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x3F,0x1F // checkbox off 0xFC,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0xFC,0x3F,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x3F, // ☐ (check box off, menu false)
/* /*
0x00,0x00,0x00,0x80,0x80,0xFE,0xFF,0x83,0x87,0x06,0x00,0x00,0x00,0x00,0x30,0x70,0x60,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00, // Function? 0x00,0x00,0x00,0x80,0x80,0xFE,0xFF,0x83,0x87,0x06,0x00,0x00,0x00,0x00,0x30,0x70,0x60,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00, // Function?
@@ -592,6 +595,47 @@ const uint8_t idleScreenBGF[] = {
0x87,0x86,0x86,0x86,0x82,0x80,0x40,0x40,0x20,0x18,0x07,0x00 0x87,0x86,0x86,0x86,0x82,0x80,0x40,0x40,0x20,0x18,0x07,0x00
}; };
/*
* 16x16 icons
* */
const uint8_t SettingsMenuIcons[] = {
// Soldering
//width = 16
//height = 16
0x00,0x02,0x04,0x08,0x12,0x24,0xC4,0x42,0x82,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x07,0x0A,0x14,0x28,0x50,0x60,0x00,
//Sleep
//width = 16
//height = 16
0x00,0xC6,0xE6,0xF6,0xBE,0x9E,0x8E,0x86,0x00,0x00,0x40,0x40,0xC0,0xC0,0xC0,0x00,
0x00,0x01,0x01,0x01,0x45,0x65,0x75,0x5D,0x4C,0x00,0x06,0x07,0x07,0x05,0x04,0x00,
//Menu
//width = 16
//height = 16
0x00,0x80,0x06,0x86,0x46,0x06,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x00,
0x00,0x00,0x61,0x60,0x00,0x00,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x00,
//Wrench
///width = 16
//height = 16
0x00,0x18,0x30,0x32,0x7E,0x7C,0xF0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x0F,0x3E,0x7E,0x4C,0x0C,0x18,0x00,
#ifdef NOTUSED
//Calibration (Not used, kept for future menu layouts)
//width = 16
//height = 16
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE8,0x70,0x7A,0x5E,0x8E,0x1C,0x30,0x00,
0x00,0x10,0x38,0x1C,0x0E,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
#endif
};
const uint8_t FONT_6x8[] = { const uint8_t FONT_6x8[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 000: ' ' U+0020 (utf-8: 20) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 000: ' ' U+0020 (utf-8: 20)
0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, // 001: '!' U+0021 (utf-8: 21) 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, // 001: '!' U+0021 (utf-8: 21)
@@ -898,8 +942,8 @@ const uint8_t FONT_6x8[] = {
0x20, 0x55, 0x55, 0x55, 0x78, 0x00, // 193: 'ā' U+0101 (utf-8: c4 81) 0x20, 0x55, 0x55, 0x55, 0x78, 0x00, // 193: 'ā' U+0101 (utf-8: c4 81)
0x78, 0x15, 0x16, 0x15, 0x78, 0x00, // 194: 'Ă' U+0102 (utf-8: c4 82) 0x78, 0x15, 0x16, 0x15, 0x78, 0x00, // 194: 'Ă' U+0102 (utf-8: c4 82)
0x20, 0x55, 0x56, 0x55, 0x78, 0x00, // 195: 'ă' U+0103 (utf-8: c4 83) 0x20, 0x55, 0x56, 0x55, 0x78, 0x00, // 195: 'ă' U+0103 (utf-8: c4 83)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 196: 'Ą' U+0104 (utf-8: c4 84) 0x7e, 0x09, 0x09, 0x49, 0xbe, 0x00, // 196: 'Ą' U+0104 (utf-8: c4 84)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 197: 'ą' U+0105 (utf-8: c4 85) 0x20, 0x54, 0x54, 0xd4, 0x78, 0x00, // 197: 'ą' U+0105 (utf-8: c4 85)
0x38, 0x44, 0x46, 0x45, 0x28, 0x00, // 198: 'Ć' U+0106 (utf-8: c4 86) 0x38, 0x44, 0x46, 0x45, 0x28, 0x00, // 198: 'Ć' U+0106 (utf-8: c4 86)
0x38, 0x44, 0x46, 0x45, 0x20, 0x00, // 199: 'ć' U+0107 (utf-8: c4 87) 0x38, 0x44, 0x46, 0x45, 0x20, 0x00, // 199: 'ć' U+0107 (utf-8: c4 87)
0x38, 0x46, 0x45, 0x46, 0x28, 0x00, // 200: 'Ĉ' U+0108 (utf-8: c4 88) 0x38, 0x46, 0x45, 0x46, 0x28, 0x00, // 200: 'Ĉ' U+0108 (utf-8: c4 88)
@@ -918,8 +962,8 @@ const uint8_t FONT_6x8[] = {
0x38, 0x55, 0x56, 0x55, 0x08, 0x00, // 213: 'ĕ' U+0115 (utf-8: c4 95) 0x38, 0x55, 0x56, 0x55, 0x08, 0x00, // 213: 'ĕ' U+0115 (utf-8: c4 95)
0x7c, 0x54, 0x55, 0x54, 0x44, 0x00, // 214: 'Ė' U+0116 (utf-8: c4 96) 0x7c, 0x54, 0x55, 0x54, 0x44, 0x00, // 214: 'Ė' U+0116 (utf-8: c4 96)
0x38, 0x54, 0x55, 0x54, 0x08, 0x00, // 215: 'ė' U+0117 (utf-8: c4 97) 0x38, 0x54, 0x55, 0x54, 0x08, 0x00, // 215: 'ė' U+0117 (utf-8: c4 97)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 216: 'Ę' U+0118 (utf-8: c4 98) 0x7f, 0x49, 0x49, 0xc9, 0x41, 0x00, // 216: 'Ę' U+0118 (utf-8: c4 98)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 217: 'ę' U+0119 (utf-8: c4 99) 0x38, 0x54, 0x54, 0xd4, 0x18, 0x00, // 217: 'ę' U+0119 (utf-8: c4 99)
0x7c, 0x55, 0x56, 0x55, 0x44, 0x00, // 218: 'Ě' U+011a (utf-8: c4 9a) 0x7c, 0x55, 0x56, 0x55, 0x44, 0x00, // 218: 'Ě' U+011a (utf-8: c4 9a)
0x38, 0x55, 0x56, 0x55, 0x08, 0x00, // 219: 'ě' U+011b (utf-8: c4 9b) 0x38, 0x55, 0x56, 0x55, 0x08, 0x00, // 219: 'ě' U+011b (utf-8: c4 9b)
0x38, 0x46, 0x55, 0x56, 0x70, 0x00, // 220: 'Ĝ' U+011c (utf-8: c4 9c) 0x38, 0x46, 0x55, 0x56, 0x70, 0x00, // 220: 'Ĝ' U+011c (utf-8: c4 9c)
@@ -940,8 +984,8 @@ const uint8_t FONT_6x8[] = {
0x00, 0x45, 0x7d, 0x41, 0x00, 0x00, // 235: 'ī' U+012b (utf-8: c4 ab) 0x00, 0x45, 0x7d, 0x41, 0x00, 0x00, // 235: 'ī' U+012b (utf-8: c4 ab)
0x44, 0x45, 0x7e, 0x45, 0x44, 0x00, // 236: 'Ĭ' U+012c (utf-8: c4 ac) 0x44, 0x45, 0x7e, 0x45, 0x44, 0x00, // 236: 'Ĭ' U+012c (utf-8: c4 ac)
0x00, 0x45, 0x7e, 0x41, 0x00, 0x00, // 237: 'ĭ' U+012d (utf-8: c4 ad) 0x00, 0x45, 0x7e, 0x41, 0x00, 0x00, // 237: 'ĭ' U+012d (utf-8: c4 ad)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 238: 'Į' U+012e (utf-8: c4 ae) 0x00, 0x41, 0x7f, 0xc1, 0x00, 0x00, // 238: 'Į' U+012e (utf-8: c4 ae)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 239: 'į' U+012f (utf-8: c4 af) 0x00, 0x44, 0x7d, 0xc0, 0x00, 0x00, // 239: 'į' U+012f (utf-8: c4 af)
0x44, 0x44, 0x7d, 0x44, 0x44, 0x00, // 240: 'İ' U+0130 (utf-8: c4 b0) 0x44, 0x44, 0x7d, 0x44, 0x44, 0x00, // 240: 'İ' U+0130 (utf-8: c4 b0)
0x00, 0x44, 0x7c, 0x40, 0x00, 0x00, // 241: 'ı' U+0131 (utf-8: c4 b1) 0x00, 0x44, 0x7c, 0x40, 0x00, 0x00, // 241: 'ı' U+0131 (utf-8: c4 b1)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 242: 'IJ' U+0132 (utf-8: c4 b2) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 242: 'IJ' U+0132 (utf-8: c4 b2)

View File

@@ -0,0 +1,27 @@
/*
* LIS2DH12.hpp
*
* Created on: 27Feb.,2018
* Author: Ralim
*/
#ifndef LIS2DH12_HPP_
#define LIS2DH12_HPP_
#include "stm32f1xx_hal.h"
#include "LIS2DH12_defines.hpp"
class LIS2DH12 {
public:
LIS2DH12(I2C_HandleTypeDef* i2cHandle);
void initalize();
uint8_t getOrientation();
void getAxisReadings(int16_t *x, int16_t *y, int16_t *z);
private:
void setSensitivity(uint8_t threshold, uint8_t filterTime); // Sets the sensitivity of the unit
void I2C_RegisterWrite(uint8_t reg, uint8_t data);
uint8_t I2C_RegisterRead(uint8_t reg);
I2C_HandleTypeDef* i2c;
};
#endif /* LIS2DH12_HPP_ */

View File

@@ -0,0 +1,28 @@
/*
* LIS2DH12_defines.hpp
*
* Created on: 27Feb.,2018
* Author: Ralim
*/
#ifndef LIS2DH12_DEFINES_HPP_
#define LIS2DH12_DEFINES_HPP_
#define LIS2DH_I2C_ADDRESS (25<<1)
#define LIS_CTRL_REG1 0x20|0x80
#define LIS_CTRL_REG2 0x21|0x80
#define LIS_CTRL_REG3 0x22|0x80
#define LIS_CTRL_REG4 0x23|0x80
#define LIS_CTRL_REG5 0x24|0x80
#define LIS_CTRL_REG6 0x25|0x80
#define LIS_INT1_CFG 0xB0|0x80
#define LIS_INT2_CFG 0xB4|0x80
#define LIS_INT1_DURATION 0x33|0x80
#define LIS_INT1_THS 0x32|0x80
#define LIS_INT1_SRC 0x31|0x80
#define LIS_INT2_DURATION 0x37|0x80
#define LIS_INT2_THS 0x36|0x80
#define LIS_INT2_SRC 0x35|0x80
#endif /* LIS2DH12_DEFINES_HPP_ */

View File

@@ -15,7 +15,7 @@ public:
MMA8652FC(I2C_HandleTypeDef* i2cHandle); MMA8652FC(I2C_HandleTypeDef* i2cHandle);
void initalize(); // Initalize the system void initalize(); // Initalize the system
bool getOrientation();// Reads the I2C register and returns the orientation (true == left) uint8_t getOrientation();// Reads the I2C register and returns the orientation (true == left)
void getAxisReadings(int16_t *x, int16_t *y, int16_t *z); void getAxisReadings(int16_t *x, int16_t *y, int16_t *z);
private: private:

View File

@@ -21,6 +21,7 @@ extern "C" {
} }
#endif #endif
#define DEVICEADDR_OLED (0x3c<<1) #define DEVICEADDR_OLED (0x3c<<1)
#define OLED_WIDTH 96
class OLED { class OLED {
public: public:

View File

@@ -11,7 +11,7 @@
#define SETTINGS_H_ #define SETTINGS_H_
#include <stdint.h> #include <stdint.h>
#include "stm32f1xx_hal.h" #include "stm32f1xx_hal.h"
#define SETTINGSVERSION 0x11 /*Change this if you change the struct below to prevent people getting out of sync*/ #define SETTINGSVERSION 0x12 /*Change this if you change the struct below to prevent people getting out of sync*/
/* /*
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks * This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
@@ -30,6 +30,7 @@ typedef struct {
uint8_t detailedIDLE :1; //Detailed idle screen uint8_t detailedIDLE :1; //Detailed idle screen
uint8_t detailedSoldering :1; //Detailed soldering screens uint8_t detailedSoldering :1; //Detailed soldering screens
uint8_t temperatureInF; //Should the temp be in F or C (true is F) uint8_t temperatureInF; //Should the temp be in F or C (true is F)
uint8_t descriptionScrollSpeed:1; // Description scroll speed
uint16_t voltageDiv; //Voltage divisor factor uint16_t voltageDiv; //Voltage divisor factor
uint16_t BoostTemp; //Boost mode set point for the iron uint16_t BoostTemp; //Boost mode set point for the iron
int16_t CalibrationOffset; //This stores the temperature offset for this tip in the iron. int16_t CalibrationOffset; //This stores the temperature offset for this tip in the iron.
@@ -37,7 +38,7 @@ typedef struct {
uint32_t padding; //This is here for in case we are not an even divisor so that nothing gets cut off uint32_t padding; //This is here for in case we are not an even divisor so that nothing gets cut off
} systemSettingsType; } systemSettingsType;
extern systemSettingsType systemSettings; extern volatile systemSettingsType systemSettings;
void saveSettings(); void saveSettings();
void restoreSettings(); void restoreSettings();

View File

@@ -18,8 +18,7 @@ extern ADC_HandleTypeDef hadc1;
extern DMA_HandleTypeDef hdma_adc1; extern DMA_HandleTypeDef hdma_adc1;
extern I2C_HandleTypeDef hi2c1; extern I2C_HandleTypeDef hi2c1;
extern DMA_HandleTypeDef hdma_i2c1_rx;
extern DMA_HandleTypeDef hdma_i2c1_tx;
extern IWDG_HandleTypeDef hiwdg; extern IWDG_HandleTypeDef hiwdg;

View File

@@ -17,15 +17,29 @@ enum ShortNameType {
* use SettingsShortNames as SettingsShortNames[16][1].. second column undefined * use SettingsShortNames as SettingsShortNames[16][1].. second column undefined
*/ */
extern const enum ShortNameType SettingsShortNameType; extern const enum ShortNameType SettingsShortNameType;
extern const char* SettingsShortNames[16][2]; extern const char* SettingsShortNames[17][2];
extern const char* SettingsLongNames[16]; extern const char* SettingsDescriptions[17];
extern const char* SettingsMenuEntries[4];
extern const char* SettingsMenuEntriesDescriptions[4];
extern const char* SettingsCalibrationWarning; extern const char* SettingsCalibrationWarning;
extern const char* SettingsResetWarning; extern const char* SettingsResetWarning;
extern const char* UVLOWarningString; extern const char* UVLOWarningString;
extern const char* UndervoltageString;
extern const char* InputVoltageString;
extern const char* WarningTipTempString;
extern const char* BadTipString;
extern const char* SleepingSimpleString; extern const char* SleepingSimpleString;
extern const char* SleepingAdvancedString; extern const char* SleepingAdvancedString;
extern const char* WarningSimpleString; extern const char* WarningSimpleString;
extern const char* WarningAdvancedString; extern const char* WarningAdvancedString;
extern const char* SleepingTipAdvancedString;
extern const char* IdleTipString;
extern const char* IdleSetString;
extern const char* TipDisconnectedString;
extern const char* SolderingAdvancedPowerPrompt;
extern const char* OffString;
extern const char SettingTrueChar; extern const char SettingTrueChar;
extern const char SettingFalseChar; extern const char SettingFalseChar;
@@ -33,6 +47,9 @@ extern const char SettingRightChar;
extern const char SettingLeftChar; extern const char SettingLeftChar;
extern const char SettingAutoChar; extern const char SettingAutoChar;
#define LANG_EN extern const char SettingFastChar;
extern const char SettingSlowChar;
#endif /* TRANSLATION_H_ */ #endif /* TRANSLATION_H_ */

View File

@@ -5,17 +5,21 @@
* Author: Ben V. Brown * Author: Ben V. Brown
*/ */
#ifndef GUI_H_ #ifndef GUI_HPP_
#define GUI_H_ #define GUI_HPP_
#include "Translation.h"
#include "Settings.h"
#include "hardware.h"
#define PRESS_ACCEL_STEP 3
#define PRESS_ACCEL_INTERVAL_MIN 10
#define PRESS_ACCEL_INTERVAL_MAX 30
//GUI holds the menu structure and all its methods for the menu itself //GUI holds the menu structure and all its methods for the menu itself
#include "main.hpp"
#include "Settings.h"
#include "Translation.h"
//Declarations for all the methods for the settings menu (at end of this file) //Declarations for all the methods for the settings menu (at end of this file)
//Wrapper for holding a function pointer //Wrapper for holding a function pointer
typedef struct state_func_t { typedef struct state_func_t {
void (*func)(void); void (*func)(void);
@@ -28,6 +32,7 @@ typedef struct {
const state_func draw; const state_func draw;
} menuitem; } menuitem;
extern const menuitem settingsMenu[]; void enterSettingsMenu();
extern const menuitem rootSettingsMenu[];
#endif /* GUI_H_ */ #endif /* GUI_HPP_ */

View File

@@ -7,7 +7,7 @@
extern OLED lcd; extern OLED lcd;
extern MMA8652FC accel; extern MMA8652FC accel;
extern uint8_t PCBVersion;
enum ButtonState { enum ButtonState {
BUTTON_NONE = 0, /* No buttons pressed / < filter time*/ BUTTON_NONE = 0, /* No buttons pressed / < filter time*/
BUTTON_F_SHORT = 1, /* User has pressed the front button*/ BUTTON_F_SHORT = 1, /* User has pressed the front button*/

View File

@@ -0,0 +1,73 @@
/*
* LIS2DH12.cpp
*
* Created on: 27Feb.,2018
* Author: Ralim
*/
#include <LIS2DH12.hpp>
#include "cmsis_os.h"
LIS2DH12::LIS2DH12(I2C_HandleTypeDef* i2cHandle) {
i2c = i2cHandle;
}
void LIS2DH12::initalize() {
I2C_RegisterWrite(LIS_CTRL_REG1, 0x17); //25Hz
I2C_RegisterWrite(LIS_CTRL_REG2, 0b00001000); //Highpass filter off
I2C_RegisterWrite(LIS_CTRL_REG3, 0b01100000); //Setup interrupt pins
I2C_RegisterWrite(LIS_CTRL_REG4, 0b00001000); //Block update mode off,HR on
I2C_RegisterWrite(LIS_CTRL_REG5, 0b00000010);
I2C_RegisterWrite(LIS_CTRL_REG6, 0b01100010);
//Basically setup the unit to run, and enable 4D orientation detection
I2C_RegisterWrite(LIS_INT2_CFG, 0b01111110); //setup for movement detection
I2C_RegisterWrite(LIS_INT2_THS, 0x28);
I2C_RegisterWrite(LIS_INT2_DURATION, 64);
I2C_RegisterWrite(LIS_INT1_CFG, 0b01111110); //setup for movement detection
I2C_RegisterWrite(LIS_INT1_THS, 0x28);
I2C_RegisterWrite(LIS_INT1_DURATION, 64);
}
//0=no change, 1= right handed, 2= left handed
uint8_t LIS2DH12::getOrientation() {
// 8=right handed,4=left,16=flat
//So we ignore if not 8/4
uint8_t pos = I2C_RegisterRead(LIS_INT2_SRC);
if (pos == 8)
return 1;
else if (pos == 4)
return 2;
else
return 0;
}
void LIS2DH12::getAxisReadings(int16_t* x, int16_t* y, int16_t* z) {
uint8_t tempArr[6];
taskENTER_CRITICAL();
while (HAL_I2C_Mem_Read(i2c, LIS2DH_I2C_ADDRESS, 0xA8,
I2C_MEMADD_SIZE_8BIT, (uint8_t*) tempArr, 6, 5000) != HAL_OK) {
HAL_Delay(5);
}
taskEXIT_CRITICAL();
(*x) = ((uint16_t) (tempArr[1] << 8 | tempArr[0]));
(*y) = ((uint16_t) (tempArr[3] << 8 | tempArr[2]));
(*z) = ((uint16_t) (tempArr[5] << 8 | tempArr[4]));
}
void LIS2DH12::setSensitivity(uint8_t threshold, uint8_t filterTime) {
}
void LIS2DH12::I2C_RegisterWrite(uint8_t reg, uint8_t data) {
HAL_I2C_Mem_Write(i2c, LIS2DH_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, &data,
1, 500);
}
uint8_t LIS2DH12::I2C_RegisterRead(uint8_t reg) {
uint8_t tx_data[1];
HAL_I2C_Mem_Read(i2c, LIS2DH_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT,
tx_data, 1, 500);
return tx_data[0];
}

View File

@@ -14,12 +14,14 @@ MMA8652FC::MMA8652FC(I2C_HandleTypeDef* i2cHandle) {
void MMA8652FC::I2C_RegisterWrite(uint8_t reg, uint8_t data) { void MMA8652FC::I2C_RegisterWrite(uint8_t reg, uint8_t data) {
HAL_I2C_Mem_Write(i2c, MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, &data, 1, 0xFFFF); HAL_I2C_Mem_Write(i2c, MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT,
&data, 1, 500);
} }
uint8_t MMA8652FC::I2C_RegisterRead(uint8_t reg) { uint8_t MMA8652FC::I2C_RegisterRead(uint8_t reg) {
uint8_t tx_data[1]; uint8_t tx_data[1];
HAL_I2C_Mem_Read(i2c, MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, tx_data, 1, 0xFFFF); HAL_I2C_Mem_Read(i2c, MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT,
tx_data, 1, 500);
return tx_data[0]; return tx_data[0];
} }
@@ -41,36 +43,41 @@ void MMA8652FC::initalize() {
I2C_RegisterWrite( HP_FILTER_CUTOFF_REG, 0x03); //select high pass filtered data I2C_RegisterWrite( HP_FILTER_CUTOFF_REG, 0x03); //select high pass filtered data
I2C_RegisterWrite( CTRL_REG1, 0x19); // ODR=12 Hz, Active mode I2C_RegisterWrite( CTRL_REG1, 0x19); // ODR=12 Hz, Active mode
HAL_Delay(2); // ~1ms delay
} }
void MMA8652FC::setSensitivity(uint8_t threshold, uint8_t filterTime) { void MMA8652FC::setSensitivity(uint8_t threshold, uint8_t filterTime) {
uint8_t sens = 9 * 2 + 17; uint8_t sens = 9 * 2 + 17;
sens -= 2 * threshold; sens -= 2 * threshold;
taskENTER_CRITICAL();
I2C_RegisterWrite( CTRL_REG1, 0); // sleep mode I2C_RegisterWrite( CTRL_REG1, 0); // sleep mode
I2C_RegisterWrite(FF_MT_THS_REG, (sens & 0x7F)); // Set accumulation threshold I2C_RegisterWrite(FF_MT_THS_REG, (sens & 0x7F));// Set accumulation threshold
I2C_RegisterWrite(FF_MT_COUNT_REG, filterTime); // Set debounce threshold I2C_RegisterWrite(FF_MT_COUNT_REG, filterTime); // Set debounce threshold
I2C_RegisterWrite( CTRL_REG1, 0x31); // ODR=12 Hz, Active mode I2C_RegisterWrite( CTRL_REG1, 0x31); // ODR=12 Hz, Active mode
taskEXIT_CRITICAL();
} }
bool MMA8652FC::getOrientation() { uint8_t MMA8652FC::getOrientation() {
//First read the PL_STATUS registertaskENTER_CRITICAL(); //First read the PL_STATUS register
taskENTER_CRITICAL(); taskENTER_CRITICAL();
uint8_t plStatus = I2C_RegisterRead(PL_STATUS_REG); uint8_t plStatus = I2C_RegisterRead(PL_STATUS_REG);
taskEXIT_CRITICAL(); taskEXIT_CRITICAL();
if ((plStatus & 0b10000000) == 0b10000000) {
plStatus >>= 1; //We don't need the up/down bit plStatus >>= 1; //We don't need the up/down bit
plStatus &= 0x03; //mask to the two lower bits plStatus &= 0x03; //mask to the two lower bits
//0 == left handed //0 == left handed
//1 == right handed //1 == right handed
return !plStatus; return plStatus==0?2:1;
} else
return 0;
} }
void MMA8652FC::getAxisReadings(int16_t *x, int16_t *y, int16_t *z) { void MMA8652FC::getAxisReadings(int16_t *x, int16_t *y, int16_t *z) {
uint8_t tempArr[6]; uint8_t tempArr[6];
taskENTER_CRITICAL(); taskENTER_CRITICAL();
while (HAL_I2C_Mem_Read(i2c, MMA8652FC_I2C_ADDRESS, OUT_X_MSB_REG, I2C_MEMADD_SIZE_8BIT, (uint8_t*) tempArr, 6, while (HAL_I2C_Mem_Read(i2c, MMA8652FC_I2C_ADDRESS, OUT_X_MSB_REG,
0xFFFF) != HAL_OK) { I2C_MEMADD_SIZE_8BIT, (uint8_t*) tempArr, 6, 0xFFFF) != HAL_OK) {
HAL_Delay(5); HAL_Delay(5);
} }
taskEXIT_CRITICAL(); taskEXIT_CRITICAL();

View File

@@ -90,7 +90,7 @@ void OLED::refresh() {
//Because I2C is shared, we cant task switch in the middle of the xfer //Because I2C is shared, we cant task switch in the middle of the xfer
HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, screenBuffer, 12 + 96 * 2 + 1, HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, screenBuffer, 12 + 96 * 2 + 1,
0xFFFF); 500);
taskEXIT_CRITICAL(); taskEXIT_CRITICAL();
} }
@@ -101,6 +101,11 @@ void OLED::refresh() {
* Precursor is the command char that is used to select the table. * Precursor is the command char that is used to select the table.
*/ */
void OLED::drawChar(char c, char PrecursorCommand) { void OLED::drawChar(char c, char PrecursorCommand) {
if( c=='\n' && cursor_y==0)
{
cursor_x=0;
cursor_y=8;
}
if (c < ' ') { if (c < ' ') {
return; return;
} }
@@ -286,25 +291,32 @@ void OLED::drawSymbol(uint8_t symbolID) {
void OLED::drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, void OLED::drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height,
const uint8_t* ptr) { const uint8_t* ptr) {
// Splat this from x->x+wide in two strides // Splat this from x->x+wide in two strides
if (x < 0) if (x <= -wide)
return; //cutoffleft return; //cutoffleft
if ((x) > 96) if (x > 96)
return; //cutoff right return; //cutoff right
uint8_t width = wide;
if ((x + wide) > 96) uint8_t visibleStart = 0;
width = 96 - x; // trimming to draw partials uint8_t visibleEnd = wide;
// trimming to draw partials
if(x < 0) {
visibleStart -= x; //subtract negative value == add absolute value
}
if(x + wide > 96) {
visibleEnd = 96 - x;
}
if (y == 0) { if (y == 0) {
//Splat first line of data //Splat first line of data
for (uint8_t xx = 0; xx < (width); xx++) { for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) {
firstStripPtr[xx + x] = ptr[xx]; firstStripPtr[xx + x] = ptr[xx];
} }
} }
if (y == 8 || height == 16) { if (y == 8 || height == 16) {
// Splat the second line // Splat the second line
for (uint8_t xx = 0; xx < width; xx++) { for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) {
secondStripPtr[x + xx] = ptr[xx + (height == 16 ? wide : 0)]; secondStripPtr[x + xx] = ptr[xx + (height == 16 ? wide : 0)];
} }
} }
} }

View File

@@ -11,7 +11,7 @@
#include "Setup.h" #include "Setup.h"
#define FLASH_ADDR (0x8000000|0xFC00)/*Flash start OR'ed with the maximum amount of flash - 1024 bytes*/ #define FLASH_ADDR (0x8000000|0xFC00)/*Flash start OR'ed with the maximum amount of flash - 1024 bytes*/
#include "string.h" #include "string.h"
systemSettingsType systemSettings; volatile systemSettingsType systemSettings;
void saveSettings() { void saveSettings() {
//First we erase the flash //First we erase the flash
@@ -66,7 +66,7 @@ void restoreSettings() {
*/ */
uint8_t lookupVoltageLevel(uint8_t level) { uint8_t lookupVoltageLevel(uint8_t level) {
if (level == 0) if (level == 0)
return 100; //10V since iron does not function effectively below this return 90; //9V since iron does not function effectively below this
else else
return (level * 33) + (33 * 2); return (level * 33) + (33 * 2);
} }
@@ -89,6 +89,7 @@ void resetSettings() {
systemSettings.coolingTempBlink = 0; //Blink the temperature on the cooling screen when its > 50C systemSettings.coolingTempBlink = 0; //Blink the temperature on the cooling screen when its > 50C
systemSettings.CalibrationOffset = 10; //This appears to be quite close for both of my tips, in both of my handles systemSettings.CalibrationOffset = 10; //This appears to be quite close for both of my tips, in both of my handles
systemSettings.temperatureInF = 0; //default to 0 systemSettings.temperatureInF = 0; //default to 0
systemSettings.descriptionScrollSpeed=0;//default to slow
saveSettings(); saveSettings();
} }

View File

@@ -9,8 +9,6 @@ ADC_HandleTypeDef hadc1;
DMA_HandleTypeDef hdma_adc1; DMA_HandleTypeDef hdma_adc1;
I2C_HandleTypeDef hi2c1; I2C_HandleTypeDef hi2c1;
DMA_HandleTypeDef hdma_i2c1_rx;
DMA_HandleTypeDef hdma_i2c1_tx;
IWDG_HandleTypeDef hiwdg; IWDG_HandleTypeDef hiwdg;
TIM_HandleTypeDef htim2; TIM_HandleTypeDef htim2;
@@ -60,27 +58,29 @@ void SystemClock_Config(void) {
/**Initializes the CPU, AHB and APB busses clocks /**Initializes the CPU, AHB and APB busses clocks
*/ */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_LSI; RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI
| RCC_OSCILLATORTYPE_LSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = 16; RCC_OscInitStruct.HSICalibrationValue = 16;
RCC_OscInitStruct.LSIState = RCC_LSI_ON; RCC_OscInitStruct.LSIState = RCC_LSI_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI_DIV2; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI_DIV2;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16; //64MHz
HAL_RCC_OscConfig(&RCC_OscInitStruct); HAL_RCC_OscConfig(&RCC_OscInitStruct);
/**Initializes the CPU, AHB and APB busses clocks /**Initializes the CPU, AHB and APB busses clocks
*/ */
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV16; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV16; //TIM 2,3,4,5,6,7,12,13,14
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; //64 mhz to soem peripherals and adc
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2); HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2);
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC; PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;
PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV2; PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; //6 or 8 are the only non overclocked options
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit); HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit);
/**Configure the Systick interrupt time /**Configure the Systick interrupt time
@@ -100,7 +100,6 @@ static void MX_ADC1_Init(void) {
ADC_ChannelConfTypeDef sConfig; ADC_ChannelConfTypeDef sConfig;
ADC_InjectionConfTypeDef sConfigInjected; ADC_InjectionConfTypeDef sConfigInjected;
/**Common config /**Common config
*/ */
hadc1.Instance = ADC1; hadc1.Instance = ADC1;
@@ -127,10 +126,15 @@ static void MX_ADC1_Init(void) {
/**Configure Injected Channel /**Configure Injected Channel
*/ */
//F in = 10.66 MHz
/*
* Injected time is 1 delay clock + (12 adc cycles*4)+4*sampletime =~217 clocks = 0.2ms
*
* */
sConfigInjected.InjectedChannel = ADC_CHANNEL_8; sConfigInjected.InjectedChannel = ADC_CHANNEL_8;
sConfigInjected.InjectedRank = 1; sConfigInjected.InjectedRank = 1;
sConfigInjected.InjectedNbrOfConversion = 4; sConfigInjected.InjectedNbrOfConversion = 4;
sConfigInjected.InjectedSamplingTime = ADC_SAMPLETIME_55CYCLES_5; sConfigInjected.InjectedSamplingTime = ADC_SAMPLETIME_13CYCLES_5;
sConfigInjected.ExternalTrigInjecConv = ADC_EXTERNALTRIGINJECCONV_T2_CC1; sConfigInjected.ExternalTrigInjecConv = ADC_EXTERNALTRIGINJECCONV_T2_CC1;
sConfigInjected.AutoInjectedConv = DISABLE; sConfigInjected.AutoInjectedConv = DISABLE;
sConfigInjected.InjectedDiscontinuousConvMode = DISABLE; sConfigInjected.InjectedDiscontinuousConvMode = DISABLE;
@@ -142,14 +146,14 @@ static void MX_ADC1_Init(void) {
HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected); HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected);
sConfigInjected.InjectedRank = 4; sConfigInjected.InjectedRank = 4;
HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected); HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected);
//SET_BIT(hadc1.Instance->CR1, ( ADC_CR1_JEOCIE ));//Enable end of injected conv irq
} }
/* I2C1 init function */ /* I2C1 init function */
static void MX_I2C1_Init(void) { static void MX_I2C1_Init(void) {
hi2c1.Instance = I2C1; hi2c1.Instance = I2C1;
hi2c1.Init.ClockSpeed = 100000; hi2c1.Init.ClockSpeed = 300000; //200Khz
hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2; hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
hi2c1.Init.OwnAddress1 = 0; hi2c1.Init.OwnAddress1 = 0;
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
@@ -158,8 +162,6 @@ static void MX_I2C1_Init(void) {
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
HAL_I2C_Init(&hi2c1); HAL_I2C_Init(&hi2c1);
HAL_NVIC_EnableIRQ(DMA1_Channel6_IRQn);
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
} }
@@ -168,7 +170,7 @@ static void MX_IWDG_Init(void) {
hiwdg.Instance = IWDG; hiwdg.Instance = IWDG;
hiwdg.Init.Prescaler = IWDG_PRESCALER_256; hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
hiwdg.Init.Reload = 4095; hiwdg.Init.Reload = 100;
HAL_IWDG_Init(&hiwdg); HAL_IWDG_Init(&hiwdg);
} }
@@ -181,10 +183,10 @@ static void MX_TIM3_Init(void) {
TIM_OC_InitTypeDef sConfigOC; TIM_OC_InitTypeDef sConfigOC;
htim3.Instance = TIM3; htim3.Instance = TIM3;
htim3.Init.Prescaler = 1; htim3.Init.Prescaler = 2;
htim3.Init.CounterMode = TIM_COUNTERMODE_UP; htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
htim3.Init.Period = 100; htim3.Init.Period = 100; //10 Khz PWM freq
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //2mhz htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //4mhz before div
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
HAL_TIM_Base_Init(&htim3); HAL_TIM_Base_Init(&htim3);
@@ -232,10 +234,10 @@ static void MX_TIM2_Init(void) {
//Timer 2 is fairly slow as its being used to run the PWM and trigger the ADC in the PWM off time. //Timer 2 is fairly slow as its being used to run the PWM and trigger the ADC in the PWM off time.
htim2.Instance = TIM2; htim2.Instance = TIM2;
htim2.Init.Prescaler = 1500; htim2.Init.Prescaler = 2000; // pwm out is 10k, we want to run our PWM at around 100hz
htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 120; htim2.Init.Period = 122;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //2mhz htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //4mhz before divide
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
HAL_TIM_Base_Init(&htim2); HAL_TIM_Base_Init(&htim2);
@@ -250,7 +252,12 @@ static void MX_TIM2_Init(void) {
HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig); HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig);
sConfigOC.OCMode = TIM_OCMODE_PWM1; sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 110; sConfigOC.Pulse = 117;
/*
* It takes 4 milliseconds for output to be stable after PWM turns off.
* Assume ADC samples in 0.5ms
* We need to set this to 100% + 4.5ms
* */
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_ENABLE; sConfigOC.OCFastMode = TIM_OCFAST_ENABLE;
HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_1); HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_1);
@@ -321,13 +328,15 @@ static void MX_GPIO_Init(void) {
/*Configure GPIO pins : PA0 PA1 PA2 PA3 /*Configure GPIO pins : PA0 PA1 PA2 PA3
PA4 PA5 PA10 PA15 */ PA4 PA5 PA10 PA15 */
GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_10 GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3
| GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_15; | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12
| GPIO_PIN_15;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
//Set PA 11 and PA 12 to GND to stop usb detection //Set PA 11 and PA 12 to GND to stop usb detection, 14 re-rused for debug
GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12; GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_14 | GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_RESET); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);

View File

@@ -1,826 +0,0 @@
/*
* Translation.c
*
* Created on: 31Aug.,2017
* Author: Ben V. Brown
*/
#include "Translation.h"
// TEMPLATES for short names - choose one and use it as base for your
// translation:
//const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
//const char* SettingsShortNames[16][2] = {
// /* (<= 5) Power source (DC or batt) */ {"PWRSC"},
// /* (<= 4) Sleep temperature */ {"STMP"},
// /* (<= 4) Sleep timeout */ {"STME"},
// /* (<= 5) Shutdown timeout */ {"SHTME"},
// /* (<= 6) Motion sensitivity level */ {"MSENSE"},
// /* (<= 6) Temperature in F and C */ {"TMPUNT"},
// /* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
// /* (<= 6) Display rotation mode */ {"DSPROT"},
// /* (<= 6) Boost enabled */ {"BOOST"},
// /* (<= 4) Boost temperature */ {"BTMP"},
// /* (<= 6) Automatic start mode */ {"ASTART"},
// /* (<= 6) Cooldown blink */ {"CLBLNK"},
// /* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
// /* (<= 8) Settings reset command */ {"RESET?"},
// /* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
// /* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
//};
//const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
//const char* SettingsShortNames[16][2] = {
// /* (<= 11) Power source (DC or batt) */ {"Power", "source"},
// /* (<= 9) Sleep temperature */ {"Sleep", "temp"},
// /* (<= 9) Sleep timeout */ {"Sleep", "timeout"},
// /* (<= 11) Shutdown timeout */ {"Shutdown", "timeout"},
// /* (<= 13) Motion sensitivity level */ {"Motion", "sensitivity"},
// /* (<= 13) Temperature in F and C */ {"Temperature", "units"},
// /* (<= 13) Advanced idle display mode enabled */ {"Detailed", "idle screen"},
// /* (<= 13) Display rotation mode */ {"Display", "orientation"},
// /* (<= 13) Boost enabled */ {"Boost mode", "enabled"},
// /* (<= 9) Boost temperature */ {"Boost", "temp"},
// /* (<= 13) Automatic start mode */ {"Auto", "start"},
// /* (<= 13) Cooldown blink */ {"Cooldown", "blink"},
// /* (<= 16) Temperature calibration enter menu */ {"Calibrate", "temperature?"},
// /* (<= 16) Settings reset command */ {"Factory", "Reset?"},
// /* (<= 16) Calibrate input voltage */ {"Calibrate", "input voltage?"},
// /* (<= 13) Advanced soldering screen enabled */ {"Detailed", "solder screen"},
//};
#ifdef LANG_EN
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Power source. Sets cutoff voltage. <DC 10V> <S 3.3V per cell>",
/* Sleep temperature */ "Sleep Temperature <C>",
/* Sleep timeout */ "Sleep Timeout <Minutes/Seconds>",
/* Shutdown timeout */ "Shutdown Timeout <Minutes>",
/* Motion sensitivity level */ "Motion Sensitivity <0.Off 1.least sensitive 9.most sensitive>",
/* Temperature in F and C */ "Temperature Unit <C=Celsius F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Display detailed information in a smaller font on the idle screen.",
/* Display rotation mode */ "Display Orientation <A. Automatic L. Left Handed R. Right Handed>",
/* Boost enabled */ "Enable front key enters boost mode 450C mode when soldering",
/* Boost temperature */ "Temperature when in \"boost\" mode",
/* Automatic start mode */ "Automatically starts the iron into soldering on power up. T=Soldering, S= Sleep mode,F=Off",
/* Cooldown blink */ "Blink the temperature on the cooling screen while the tip is still hot.",
/* Temperature calibration enter menu */ "Calibrate tip offset.",
/* Settings reset command */ "Reset all settings",
/* Calibrate input voltage */ "VIN Calibration. Buttons adjust, long press to exit",
/* Advanced soldering screen enabled */ "Display detailed information while soldering",
};
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "WARNING! TIP HOT!";
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 11) Power source (DC or batt) */ {"Power", "source"},
/* (<= 9) Sleep temperature */ {"Sleep", "temp"},
/* (<= 9) Sleep timeout */ {"Sleep", "timeout"},
/* (<= 11) Shutdown timeout */ {"Shutdown", "timeout"},
/* (<= 13) Motion sensitivity level */ {"Motion", "sensitivity"},
/* (<= 13) Temperature in F and C */ {"Temperature", "units"},
/* (<= 13) Advanced idle display mode enabled */ {"Detailed", "idle screen"},
/* (<= 13) Display rotation mode */ {"Display", "orientation"},
/* (<= 13) Boost enabled */ {"Boost mode", "enabled"},
/* (<= 9) Boost temperature */ {"Boost", "temp"},
/* (<= 13) Automatic start mode */ {"Auto", "start"},
/* (<= 13) Cooldown blink */ {"Cooldown", "blink"},
/* (<= 16) Temperature calibration enter menu */ {"Calibrate", "temperature?"},
/* (<= 16) Settings reset command */ {"Factory", "Reset?"},
/* (<= 16) Calibrate input voltage */ {"Calibrate", "input voltage?"},
/* (<= 13) Advanced soldering screen enabled */ {"Detailed", "solder screen"},
};
#endif
#ifdef LANG_RU
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Источник питания. Установка напряжения отключения. <DC 10V> <S 3.3 V на батарею>",
/* Sleep temperature */ "Температура режима ожидания <С>",
/* Sleep timeout */ "Время до перехода в режим ожидания <Минуты>",
/* Shutdown timeout */ "Время до отключения <Минуты>",
/* Motion sensitivity level */ "Акселерометр <0. Выкл. 1. мин. чувствительный 9. макс. чувствительный>",
/* Temperature in F and C */ "В чем измерять температуру",
/* Advanced idle display mode enabled */ "Показывать детальную информацию маленьким шрифтом на домашнем экране",
/* Display rotation mode */ "Ориентация дисплея <A. Автоматический, Л. Левая рука, П. Правая рука>",
/* Boost enabled */ "Турбо-режим при удержании кнопки А при пайке ",
/* Boost temperature */ "Температура в турбо-режиме",
/* Automatic start mode */ "Автоматический запуск паяльника при включении питания. T=Нагрев, S=Режим ожидания,F=Выкл.",
/* Cooldown blink */ "Показывать температуру на экране охлаждения, пока жало остается горячим.",
/* Temperature calibration enter menu */ "Калибровка термодатчика.",
/* Settings reset command */ "Сброс всех настроек.",
/* Calibrate input voltage */ "Калибровка напряжения входа. Настройка кнопками, нажать и удержать чтобы завершить.",
/* Advanced soldering screen enabled */ "Показывать детальную информацию при пайке.",
};
const char* SettingsCalibrationWarning = "Убедитесь, что жало остыло до комнатной температуры, прежде чем продолжать!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "БАТ РАЗР"; // Fixed width 8 chars
const char* SleepingSimpleString = "Хррр"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Ожидание..."; // <=17 chars
const char* WarningSimpleString = " АЙ!"; // Must be <= 4 chars
const char* WarningAdvancedString = "ОСТОРОЖНО! ГОРЯЧО";
/*
* #TODO change support for multibyte constants here
const char SettingRightChar = 'П';
const char SettingLeftChar = 'Л';
const char SettingAutoChar = 'A';*/
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"ИстП "},
/* (<= 4) Sleep temperature */ {"Тожд"},
/* (<= 4) Sleep timeout */ {"Вожд "},
/* (<= 5) Shutdown timeout */ {"Тоткл "},
/* (<= 6) Motion sensitivity level */ {"ЧувсДв "},
/* (<= 6) Temperature in F and C */ {"ЕдТемп "},
/* (<= 6) Advanced idle display mode enabled */ {"ИнфОжд "},
/* (<= 6) Display rotation mode */ {"ПовЭкр "},
/* (<= 6) Boost enabled */ {"Турбо "},
/* (<= 4) Boost temperature */ {"Ттур "},
/* (<= 6) Automatic start mode */ {"Астарт"},
/* (<= 6) Cooldown blink */ {"Охлажд "},
/* (<= 8) Temperature calibration enter menu */ {"КалибрТ"},
/* (<= 8) Settings reset command */ {"СБРОС?"},
/* (<= 8) Calibrate input voltage */ {"КалибрU?"},
/* (<= 6) Advanced soldering screen enabled */ {"ИнфПай "},
};
#endif
#ifdef LANG_ES
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Fuente de energía. Ajusta el límite inferior de voltaje. <DC=10V S=3.3V por celda>",
/* Sleep temperature */ "Temperatura en reposo. <C>",
/* Sleep timeout */ "Tiempo hasta activar reposo. <Minutos>",
/* Shutdown timeout */ "Tiempo hasta apagado. <Minutos>",
/* Motion sensitivity level */ "Sensibilidad del movimiento. <0=Apagado 1=El menos sensible 9=El más sensible>",
/* Temperature in F and C */ "Unidad de temperatura.",
/* Advanced idle display mode enabled */ "Display detailed information in a smaller font on the idle screen.",
/* Display rotation mode */ "Orientación de la pantalla <A=Automático I=Mano izquierda D=Mano derecha>",
/* Boost enabled */ "Activar el botón \"Boost\" en modo soldadura.",
/* Boost temperature */ "Temperatura en modo \"Boost\". <C>",
/* Automatic start mode */ "Iniciar modo soldadura en el encendido. <V=Sí S=Modo reposo F=No>",
/* Cooldown blink */ "Parpadea la temperatura en el enfriamiento si la punta sigue caliente.",
/* Temperature calibration enter menu */ "Calibrate tip offset.",
/* Settings reset command */ "Reset all settings",
/* Calibrate input voltage */ "VIN Calibration. Buttons adjust, long press to exit",
/* Advanced soldering screen enabled */ "Display detailed information while soldering",
};
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "WARNING! TIP HOT!";
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif
#ifdef LANG_SE
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Источник питания. Установка напряжения отключения. <DC 10V> <S 3.3 V на батарею>",
/* Sleep temperature */ "Температура Сна <С>",
/* Sleep timeout */ "Переход в режим Сна <Минуты>",
/* Shutdown timeout */ "Переходит в режим ожидания <Минуты>",
/* Motion sensitivity level */ "Акселерометр <0. Выкл. 1. мин. чувствительный 9. макс. чувствительный>",
/* Temperature in F and C */ "В чем измерять температуру",
/* Advanced idle display mode enabled */ "Display detailed information in a smaller font on the idle screen.",
/* Display rotation mode */ "Ориентация Дисплея <A. Автоматический L. Левая Рука R. Правая Рука>",
/* Boost enabled */ "Активация кнопки A для Турбо режима до 450С при пайке ",
/* Boost temperature */ "Установка температуры для Турбо режима",
/* Automatic start mode */ "Автоматический запуск паяльника при включении питания. T=Нагрев, S= Режим Сна,F=Выкл.",
/* Cooldown blink */ "Мигает температура на экране охлаждения, пока жало остается горячим.",
/* Temperature calibration enter menu */ "Calibrate tip offset.",
/* Settings reset command */ "Reset all settings",
/* Calibrate input voltage */ "VIN Calibration. Buttons adjust, long press to exit",
/* Advanced soldering screen enabled */ "Display detailed information while soldering",
};
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "WARNING! TIP HOT!";
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif
#ifdef LANG_IT
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */"Scegli la sorgente di alimentazione; imposta la soglia di scaricamento per alimentazione Li-Po <DC: 10V; S: 3.3V per cella>",
/* Sleep temperature */"Imposta temperatura in modalità standby <°C>",
/* Sleep timeout */"Imposta timer per entrare in modalità standby <minuti/secondi>",
/* Shutdown timeout */"Imposta timer per lo spegnimento <minuti>",
/* Motion sensitivity level */"Imposta sensibilità al movimento per uscire dalla modalità standby <0: nessuna; 1: minima; 9: massima>",
/* Temperature in F and C */"Scegli l'unità di misura per la temperatura <C: Celsius; F: Farenheit>",
/* Advanced idle display mode enabled */"Mostra informazioni dettagliate con un carattere più piccolo nella schermata principale",
/* Display rotation mode */"Imposta orientamento del display <A: automatico; S: mano sinistra; D: mano destra>",
/* Boost enabled */"Il tasto anteriore attiva la funzione \"boost\" durante la saldatura",
/* Boost temperature */"Imposta la temperatura in funzione \"boost\"",
/* Automatic start mode */"Attiva automaticamente il saldatore quando viene alimentato <A: saldatura; S: standby; D: disattiva>",
/* Cooldown blink */"Mostra la temperatura durante il raffreddamento se la punta è ancora calda",
/* Temperature calibration enter menu */"Calibra la differenza di temperatura rilevata da quella presente sulla punta",
/* Settings reset command */"Ripristina tutte le impostazioni",
/* Calibrate input voltage */"Calibra la tensione in ingresso; regola con i bottoni, tieni premuto per uscire",
/* Advanced soldering screen enabled */"Mostra informazioni dettagliate in modalità saldatura",
};
const char* SettingsCalibrationWarning = "Assicurati che la punta si trovi a temperatura ambiente prima di continuare!";
const char* SettingsResetWarning = "Ripristinare le impostazioni iniziali?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Standby"; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "ATTENZIONE! PUNTA CALDA!";
const char SettingRightChar = 'D';
const char SettingLeftChar = 'S';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 11) Power source (DC or batt) */ {"Sorgente", "alimentaz"},
/* (<= 9) Sleep temperature */ {"Temp", "standby"},
/* (<= 9) Sleep timeout */ {"Timer", "standby"},
/* (<= 11) Shutdown timeout */ {"Timer", "spegnimento"},
/* (<= 13) Motion sensitivity level */ {"Sensibilità", "al movimento"},
/* (<= 13) Temperature in F and C */ {"Unità di", "temperatura"},
/* (<= 13) Advanced idle display mode enabled */ {"Mostra", "dettagli"},
/* (<= 13) Display rotation mode */ {"Orientamento", "display"},
/* (<= 13) Boost enabled */ {"Funzione", "\"boost\""},
/* (<= 9) Boost temperature */ {"Temp", "\"boost\""},
/* (<= 13) Automatic start mode */ {"Avvio", "automatico"},
/* (<= 13) Cooldown blink */ {"Avviso", "punta calda"},
/* (<= 16) Temperature calibration enter menu */ {"Calibrazione", "temperatura"},
/* (<= 16) Settings reset command */ {"Ripristino", "impostazioni"},
/* (<= 16) Calibrate input voltage */ {"Calibrazione", "tensione"},
/* (<= 13) Advanced soldering screen enabled */ {"Dettagli", "saldatura"},
};
#endif
#ifdef LANG_FR
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Source d'alimentation. Règle la tension de coupure <DC=10V S=3.3V par cellules>",
/* Sleep temperature */ "Température en veille <C>",
/* Sleep timeout */ "Délai avant mise en veille <Minutes>",
/* Shutdown timeout */ "Délai avant extinction <Minutes>",
/* Motion sensitivity level */ "Sensibilité du capteur de mouvement <0=Inactif 1=Peu sensible 9=Tres sensible>",
/* Temperature in F and C */ "Unité de température <C=Celsius F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Afficher des informations détaillées lors de la veille",
/* Display rotation mode */ "Orientation de l'affichage <A=Automatique G=Gaucher D=Droitier>",
/* Boost enabled */ "Activer le mode \"Boost\" en maintenant le bouton de devant pendant la soudure",
/* Boost temperature */ "Température du mode \"Boost\" <C>",
/* Automatic start mode */ "Démarrer automatiquement la soudure à l'allumage",
/* Cooldown blink */ "Faire clignoter la température lors du refroidissement tant que la panne est chaude",
/* Temperature calibration enter menu */ "Étalonner la température de la panne",
/* Settings reset command */ "Réinitialiser tous les réglages",
/* Calibrate input voltage */ "Étalonner la tension d'entrée. Boutons pour ajuster, appui long pour quitter",
/* Advanced soldering screen enabled */ "Afficher des informations détaillées pendant la soudure",
};
const char* SettingsCalibrationWarning = "Assurez-vous que la panne soit à température ambiante avant de continuer!";
const char* SettingsResetWarning = "Voulez-vous vraiment réinitialiser les paramètres aux valeurs d'usine?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "En veille..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "ATTENTION! CHAUD"; // Must be <= 16 chars
const char SettingRightChar = 'D';
const char SettingLeftChar = 'G';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 11) Power source (DC or batt) */ {"Source", "d'alim"},
/* (<= 9) Sleep temperature */ {"Temp.", "veille"},
/* (<= 9) Sleep timeout */ {"Délai", "veille"},
/* (<= 11) Shutdown timeout */ {"Délai", "extinction"},
/* (<= 13) Motion sensitivity level */ {"Sensibilité", "au mouvement"},
/* (<= 13) Temperature in F and C */ {"Unité de", "température"},
/* (<= 13) Advanced idle display mode enabled */ {"Écran veille", "détaillé"},
/* (<= 13) Display rotation mode */ {"Orientation", "de l'écran"},
/* (<= 13) Boost enabled */ {"Activation du", "mode Boost"},
/* (<= 9) Boost temperature */ {"Temp.", "Boost"},
/* (<= 13) Automatic start mode */ {"Démarrage", "automatique"},
/* (<= 13) Cooldown blink */ {"Refroidir en", "clignottant"},
/* (<= 16) Temperature calibration enter menu */ {"Étalonner", "température"},
/* (<= 16) Settings reset command */ {"Réinitialisation", "d'usine"},
/* (<= 16) Calibrate input voltage */ {"Étalonner", "tension d'entrée"},
/* (<= 13) Advanced soldering screen enabled */ {"Écran soudure", "détaillé"},
};
#endif
#ifdef LANG_DE
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Spannungsquelle (Abschaltspannung) <DC=10V, nS=n*3.3V für n LiIon-Zellen>",
/* Sleep temperature */ "Ruhetemperatur (In der eingestellten Einheit)",
/* Sleep timeout */ "Ruhemodus nach <Sekunden/Minuten>",
/* Shutdown timeout */ "Abschaltzeit <Minuten>",
/* Motion sensitivity level */ "Bewegungsempfindlichkeit <0=Aus, 1=Minimal ... 9=Maximal>",
/* Temperature in F and C */ "Temperatureinheit <C=Celsius, F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Detaillierte Anzeige im Ruhemodus <J=An, N=Aus>",
/* Display rotation mode */ "Ausrichtung der Anzeige <A=Automatisch, L=Linkshändig, R=Rechtshändig>",
/* Boost enabled */ "Vordere Taste für Temperaturboost verwenden <J=An, N=Aus>",
/* Boost temperature */ "Temperatur im Boostmodus (In der eingestellten Einheit)",
/* Automatic start mode */ "Automatischer Start des Lötmodus beim Einschalten der Spannungsversorgung. <J=An, N=Aus>",
/* Cooldown blink */ "Blinkende Temperaturanzeige beim Abkühlen, solange heiß. <J=An, N=Aus>",
/* Temperature calibration enter menu */ "Kalibrierung der Lötspitzentemperatur",
/* Settings reset command */ "Alle Einstellungen zurücksetzen",
/* Calibrate input voltage */ "Kalibrierung der Eingangsspannung. Kurzer Tastendruck zum Einstellen, langer Tastendruck zum Verlassen.",
/* Advanced soldering screen enabled */ "Detaillierte Anzeige im Lötmodus <J=An, N=Aus>",
};
const char* SettingsCalibrationWarning = "Vor dem Fortfahren muss die Lötspitze vollständig abgekühlt sein!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzz "; // Must be <= 4 chars
const char* SleepingAdvancedString = "Ruhemodus..."; // <=17 chars
const char* WarningSimpleString = "HEIß"; // Must be <= 4 chars
const char* WarningAdvancedString = "Achtung! Spitze Heiß!";
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 11) Power source (DC or batt) */ {"Spannungs-", "quelle"},
/* (<= 9) Sleep temperature */ {"Ruhetemp-", "eratur"},
/* (<= 9) Sleep timeout */ {"Ruhever-", "zoegerung"},
/* (<= 11) Shutdown timeout */ {"Abschalt-", "zeit"},
/* (<= 13) Motion sensitivity level */ {"Bewegungs-", "empfindlichk."},
/* (<= 13) Temperature in F and C */ {"Temperatur-", "einheit"},
/* (<= 13) Advanced idle display mode enabled */ {"Detaillierte", "Ruheansicht"},
/* (<= 13) Display rotation mode */ {"Anzeige-", "ausrichtung"},
/* (<= 13) Boost enabled */ {"Boosttaste", "aktiv?"},
/* (<= 9) Boost temperature */ {"Boosttemp-", "eratur"},
/* (<= 13) Automatic start mode */ {"Start im", "Loetmodus?"},
/* (<= 13) Cooldown blink */ {"Abkuehl-", "blinken?"},
/* (<= 16) Temperature calibration enter menu */ {"Temperatur", "kalibrieren?"},
/* (<= 16) Settings reset command */ {"Einstellungen", "zuruecksetzen?"},
/* (<= 16) Calibrate input voltage */ {"Eingangsspannung", "kalibrieren?"},
/* (<= 13) Advanced soldering screen enabled */ {"Detaillierte", "Loetansicht"},
};
#endif
#ifdef LANG_SK
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Zdroj napatia. Nastavit napatie pre vypnutie (cutoff) <DC=10V, nS=n*3.3V pre LiIon clanky>",
/* Sleep temperature */ "Kludova teplota (v nastavenych jednotkach)",
/* Sleep timeout */ "Kludovy rezim po <sekundach/minutach>",
/* Shutdown timeout */ "Cas na vypnutie <minuty>",
/* Motion sensitivity level */ "Citlivost detekcie pohybu <0=Vyp, 1=Min ... 9=Max>",
/* Temperature in F and C */ "Jednotky merania teploty <C=stupne Celzia, F=stupne Fahrenheita>",
/* Advanced idle display mode enabled */ "Zobrazit detailne informacie v kludovom rezime <T=Zap, F=Vyp>",
/* Display rotation mode */ "Orientacia displeja <A=Auto, L=Lavak, R=Pravak>",
/* Boost enabled */ "Povolit tlacidlo pre prudky nahrev <T=Zap, F=Vyp>",
/* Boost temperature */ "Cielova teplota pre prudky nahrev (v nastavenych jednotkach)",
/* Automatic start mode */ "Pri starte spustit rezim spajkovania <T=Zap, F=Vyp, S=Spanok>",
/* Cooldown blink */ "Blikanie ukazovatela teploty pocas chladnutia hrotu <T=Zap, F=Vyp>",
/* Temperature calibration enter menu */ "Kalibracia posunu hrotu",
/* Settings reset command */ "Tovarenske nastavenia",
/* Calibrate input voltage */ "Kalibracia VIN. Kratke stlacenie meni nastavenie, dlhe stlacenie pre navrat",
/* Advanced soldering screen enabled */ "Zobrazenie detailov pocas spajkovania <T=Zap, F=Vyp>",
};
const char* SettingsCalibrationWarning = "Najprv sa prosim uistite, ze hrot ma izbovu teplotu!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Chrr"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Kludovy rezim..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "Pozor! Hrot je horuci!";
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif
#ifdef LANG_TR
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Güç Kaynağı. kesim geriliminı ayarlar. <DC 10V> <S 3.3V hücre başına>",
/* Sleep temperature */ "Uyku Sıcaklığı <C>",
/* Sleep timeout */ "Uyku Zaman Aşımı <Dakika/Saniye>",
/* Shutdown timeout */ "Kapatma Zaman Aşımı <Dakika>",
/* Motion sensitivity level */ "Hareket Hassasiyeti <0.Kapalı 1.En az duyarlı 9.En duyarlı>",
/* Temperature in F and C */ "Sıcaklık Ünitesi <C=Celsius F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Boş ekranda ayrıntılı bilgileri daha küçük bir yazı tipi ile göster.",
/* Display rotation mode */ "Görüntü Yönlendirme <A. Otomatik L. Solak R. Sağlak>",
/* Boost enabled */ "Lehimleme yaparken ön tuşa basmak Boost moduna sokar(450C)",
/* Boost temperature */ "\"boost\" Modu Derecesi",
/* Automatic start mode */ "Güç verildiğinde otomatik olarak lehimleme modunda başlat. T=Lehimleme Modu, S= Uyku Modu,F=Kapalı",
/* Cooldown blink */ "Soğutma ekranında uç hala sıcakken derece yanıp sönsün.",
/* Temperature calibration enter menu */ "Ucu kalibre et.",
/* Settings reset command */ "Bütün ayarları sıfırla",
/* Calibrate input voltage */ "VIN Kalibrasyonu. Düğmeler ayarlar, çıkmak için uzun bas.",
/* Advanced soldering screen enabled */ "Lehimleme yaparken detaylı bilgi göster",
};
const char* SettingsCalibrationWarning = "Lütfen devam etmeden önce ucun oda sıcaklığında olduğunu garantiye alın!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Uyuyor..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "UYARI! UÇ SICAK!";
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif
#ifdef LANG_HR
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length.
/* Power source (DC or batt) */ "Izvor napajanja. Postavlja napon isključivanja. <DC 10V> <S 3.3V po ćeliji>",
/* Sleep temperature */ "Temperatura spavanja. <C>",
/* Sleep timeout */ "Vrijeme spavanja. <Minute/Sekunde>",
/* Shutdown timeout */ "Vrijeme gašenja. <Minutes>",
/* Motion sensitivity level */ "Osjetljivost prepoznavanja pokreta. <0=Ugašeno, 1=Najmanje osjetljivo, 9=Najosjetljivije>",
/* Temperature in F and C */ "Jedinica temperature. <C=Celzij, F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Prikazivanje detaljnih informacija manjim fontom tijekom čekanja.",
/* Display rotation mode */ "Orijentacija ekrana. <A=Automatski, L=Ljevoruki, D=Desnoruki>",
/* Boost enabled */ "Držanjem prednjeg gumba prilikom lemljenja aktivira se pojačani (Boost) način.",
/* Boost temperature */ "Temperatura u pojačanom (Boost) načinu.",
/* Automatic start mode */ "Početno stanje lemilice po uključivanju napajanja. <+=Lemljenje, S=Spavanje, -=Ugašeno>",
/* Cooldown blink */ "Bljeskanje temperature prilikom hlađenja, ako je lemilica vruća.",
/* Temperature calibration enter menu */ "Kalibriranje temperature mjeri razliku temperature vška i temperature drške, dok je lemilica hladna.",
/* Settings reset command */ "Vraćanje svih postavki.",
/* Calibrate input voltage */ "Kalibracija ulaznog napona. Podešavanje gumbima, dugački pritisak za kraj.",
/* Advanced soldering screen enabled */ "Prikazivanje detaljnih informacija tijekom lemljenja.",
};
const char* SettingsCalibrationWarning = "Provjerite da je vršak ohlađen na sobnu temperaturu prije nego što nastavite!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "NAPON!!!"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Spavanje..."; // <=17 chars
const char* WarningSimpleString = "VRUĆ"; // Must be <= 4 chars
const char* WarningAdvancedString = "OPREZ! Vršak je vruć!";
const char SettingRightChar = 'D';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif
#ifdef LANG_CS_CZ
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length
/* Power source (DC or batt) */ "Pri nizsim napeti se odpoji <DC=10V, xS=x*3.3V pro LiPo,LiIon...>",
/* Sleep temperature */ "Teplota v rezimu spanku",
/* Sleep timeout */ "Cas do rezimu spanku <Minut/Sekund>",
/* Shutdown timeout */ "Cas do automatickeho vypnuti <Minut>",
/* Motion sensitivity level */ "Citlivost detekce pohybu <0=Vyp, 1=Min, ... 9=Max>",
/* Temperature in F and C */ "Jednotky mereni teploty <C=Celsius, F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Zobrazit podrobnosti na vychozi obrazovce <Z=Zap, V=Vyp>",
/* Display rotation mode */ "Orientace obrazovky <A=Auto, L=Levak, P=Pravak>",
/* Boost enabled */ "Povolit boost drzenim leveho tlacitka pri pajeni <Z=Zap, V=Vyp>",
/* Boost temperature */ "Teplota v rezimu boost",
/* Automatic start mode */ "Pri startu ihned nahrivat hrot <Z=Zap, V=Vyp, S=Rezim spanku>",
/* Cooldown blink */ "Blikani teploty pri chladnuti, dokud je hrot horky <Z=Zap, V=Vyp>",
/* Temperature calibration enter menu */ "Kalibrovat mereni teploty",
/* Settings reset command */ "Obnovit tovarni nastaveni",
/* Calibrate input voltage */ "Kalibrovat vstupni napeti. Tlacitky upravte, podrzenim potvrdte.",
/* Advanced soldering screen enabled */ "Zobrazit podrobnosti pri pajeni <Z=Zap, V=Vyp>",
};
const char* SettingsCalibrationWarning = "Ujistete se, ze hrot ma pokojovou teplotu! "; // ending space needed
const char* SettingsResetWarning = "Opravdu chcete resetovat zarizeni do tovarniho nastaveni?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzz "; // Must be <= 4 chars
const char* SleepingAdvancedString = "Rezim spanku..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "!! HORKY HROT !!"; // <= 16 chars
const char SettingRightChar = 'P';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 11) Power source (DC or batt) */ {"Zdroj", "napajeni"},
/* (<= 9) Sleep temperature */ {"Teplota v", "r. spanku"},
/* (<= 9) Sleep timeout */ {"Cas do", "r. spanku"},
/* (<= 11) Shutdown timeout */ {"Cas do", "vypnuti"},
/* (<= 13) Motion sensitivity level */ {"Citlivost", "det. pohybu"},
/* (<= 13) Temperature in F and C */ {"Jednotky", "teploty"},
/* (<= 13) Advanced idle display mode enabled */ {"Podrobnosti", "na vych. obr."},
/* (<= 13) Display rotation mode */ {"Orientace", "obrazovky"},
/* (<= 13) Boost enabled */ {"Povolit", "boost"},
/* (<= 9) Boost temperature */ {"Teplota v", "r. boost"},
/* (<= 13) Automatic start mode */ {"Auto", "start"},
/* (<= 13) Cooldown blink */ {"Blikani pri", "chladnuti"},
/* (<= 16) Temperature calibration enter menu */ {"Kalibrovat", "teplotu?"},
/* (<= 16) Settings reset command */ {"Tovarni", "nastaveni?"},
/* (<= 16) Calibrate input voltage */ {"Kalibrovat", "vstupni napeti?"},
/* (<= 13) Advanced soldering screen enabled */ {"Podrobnosti", "pri pajeni"},
};
#endif
#ifdef LANG_HUN
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length
/* Power source (DC or batt) */ "Áramforrás. Beállítja a lekapcsolási feszültséget. <DC 10V> <S 3.3V cellánként>",
/* Sleep temperature */ "Alvási hőmérséklet <C>",
/* Sleep timeout */ "Elalvási időzítő <Perc/Másodperc>",
/* Shutdown timeout */ "Kikapcsolási időzítő <Minutes>",
/* Motion sensitivity level */ "Mozgás érzékenység beállítása. <0.Ki 1.kevésbé érzékeny 9.legérzékenyebb>",
/* Temperature in F and C */ "Hőmérsékleti egység <C=Celsius F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Részletes információ megjelenítése kisebb betűméretben a készenléti képernyőn.",
/* Display rotation mode */ "Megjelenítési tájolás <A. Automatikus L. Balkezes R. Jobbkezes>",
/* Boost enabled */ "Elülső gombbal lépjen boost módba, 450C forrasztás közben",
/* Boost temperature */ "Hőmérséklet \"boost\" módban",
/* Automatic start mode */ "Bekapcsolás után automatikusan lépjen forrasztás módba. T=Forrasztás, S=Alvó mód,F=Ki",
/* Cooldown blink */ "Villogjon a hőmérséklet hűlés közben, amíg a hegy forró.",
/* Temperature calibration enter menu */ "Hegy hőmérsékletének kalibrálása",
/* Settings reset command */ "Beállítások alaphelyzetbe állítása",
/* Calibrate input voltage */ "A bemeneti feszültség kalibrálása. Röviden megnyomva állítsa be, hosszan nyomja meg a kilépéshez.",
/* Advanced soldering screen enabled */ "Részletes információk megjelenítése forrasztás közben",
};
const char* SettingsCalibrationWarning = "Folytatás előtt győződj meg róla, hogy a hegy szobahőmérsékletű!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Alvás..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "FIGYELEM! FORRÓ HEGY!";
const char SettingRightChar = 'R';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif
#ifdef LANG_DK
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length
/* Power source (DC or batt) */ "Strømforsyning. Indstil Cutoff Spændingen. <DC 10V <S 3.3V per cell",
/* Sleep temperature */ "Dvale Temperatur <C",
/* Sleep timeout */ "Dvale Timeout <Minutter/Sekunder",
/* Shutdown timeout */ "sluknings Timeout <Minutter",
/* Motion sensitivity level */ "Bevægelsesfølsomhed <0.Slukket 1.Mindst følsom 9.Mest følsom",
/* Temperature in F and C */ "Temperatur Enhed <C=Celsius F=Fahrenheit",
/* Advanced idle display mode enabled */ "Vis detialieret information med en mindre skriftstørrelse på standby skærmen.",
/* Display rotation mode */ "Skærm Orientering <A. Automatisk V. Venstre Håndet H. Højre Håndet",
/* Boost enabled */ "Ved tryk på front knap Aktiveres boost-funktionen, 450C tilstand når der loddes",
/* Boost temperature */ "Temperatur i \"boost\" mode",
/* Automatic start mode */ "Start automatisk med lodning når strøm sættes til. L=Lodning, D= Dvale tilstand,S=Slukket",
/* Cooldown blink */ "Blink temperaturen på skærmen, mens spidsen stadig er varm.",
/* Temperature calibration enter menu */ "kalibrere spids temperatur.",
/* Settings reset command */ "Gendan alle indstillinger",
/* Calibrate input voltage */ "VIN kalibrering. Knapperne justere, Lang tryk for at gå ud",
/* Advanced soldering screen enabled */ "Vis detialieret information mens der loddes",
};
const char* SettingsCalibrationWarning = "Sørg for at loddespidsen er ved stuetemperatur, inden du fortsætter!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "Lav Volt"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Dvale..."; // <=17 chars
const char* WarningSimpleString = "Varm"; // Must be <= 4 chars
const char* WarningAdvancedString = "ADVARSEL! VARM LODDESPIDS!";
const char SettingRightChar = 'H';
const char SettingLeftChar = 'V';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif
#ifdef LANG_PL
const char* SettingsLongNames[16] = {
// These are all the help text for all the settings.
// No requirements on spacing or length
/* Power source (DC or batt) */ "Źródło zasilania. Ustaw napięcie odcięcia. <DC 10V> <S 3.3V dla ogniw Li>",
/* Sleep temperature */ "Temperatura uśpienia <°C>",
/* Sleep timeout */ "Czas uśpienia <Minuty/Sekundy>",
/* Shutdown timeout */ "Czas wyłączenia <Minuty>",
/* Motion sensitivity level */ "Czułość ruchu <0.Wyłączona 1.minimalna 9.maksymalna>",
/* Temperature in F and C */ "Jednostka temperatury <C=Celsius F=Fahrenheit>",
/* Advanced idle display mode enabled */ "Wyświetla szczegółowe informacje za pomocą mniejszej czcionki na ekranie bezczynnośći <T = wł., N = wył.>",
/* Display rotation mode */ "Orientacja wyświetlacza <A. Automatyczna L. Leworęczna P. Praworęczna>",
/* Boost enabled */ "Użyj przycisku przedniego w celu zwiększenia temperatury <T = wł., N = wył.>",
/* Boost temperature */ "Temperatura w trybie \"boost\" ",
/* Automatic start mode */ "Automatyczne uruchamianie trybu lutowania po włączeniu zasilania. T=Lutowanie, S= Tryb Uspienia ,N=Wyłącz",
/* Cooldown blink */ "Temperatura na ekranie miga, gdy grot jest jeszcze gorący. <T = wł., N = wył.>",
/* Temperature calibration enter menu */ "Kalibracja temperatury grota lutownicy",
/* Settings reset command */ "Zresetuj wszystkie ustawienia",
/* Calibrate input voltage */ "Kalibracja napięcia wejściowego. Krótkie naciśnięcie, aby ustawić, długie naciśnięcie, aby wyjść.",
/* Advanced soldering screen enabled */ "Wyświetl szczegółowe informacje podczas lutowania <T = wł., N = wył.>",
};
const char* SettingsCalibrationWarning = "Przed kontynuowaniem upewnij się, że końcówka osiągnela temperature pokojowa!";
const char* SettingsResetWarning = "Are you sure to reset settings to default values?";
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
const char* SleepingSimpleString = "Zzz!"; // Must be <= 4 chars
const char* SleepingAdvancedString = "Uspienie..."; // <=17 chars
const char* WarningSimpleString = "HOT!"; // Must be <= 4 chars
const char* WarningAdvancedString = "UWAGA! GORĄCA KOŃCÓWKA!";
const char SettingRightChar = 'P';
const char SettingLeftChar = 'L';
const char SettingAutoChar = 'A';
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
const char* SettingsShortNames[16][2] = {
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
/* (<= 4) Sleep temperature */ {"STMP"},
/* (<= 4) Sleep timeout */ {"STME"},
/* (<= 5) Shutdown timeout */ {"SHTME"},
/* (<= 6) Motion sensitivity level */ {"MSENSE"},
/* (<= 6) Temperature in F and C */ {"TMPUNT"},
/* (<= 6) Advanced idle display mode enabled */ {"ADVIDL"},
/* (<= 6) Display rotation mode */ {"DSPROT"},
/* (<= 6) Boost enabled */ {"BOOST"},
/* (<= 4) Boost temperature */ {"BTMP"},
/* (<= 6) Automatic start mode */ {"ASTART"},
/* (<= 6) Cooldown blink */ {"CLBLNK"},
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
/* (<= 8) Settings reset command */ {"RESET?"},
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -5,11 +5,14 @@
* Author: Ben V. Brown * Author: Ben V. Brown
*/ */
#include "gui.h" #include "gui.hpp"
#include "main.hpp"
#include "cmsis_os.h" #include "cmsis_os.h"
#include "hardware.h" #include "Translation.h"
#include "string.h"
#include "string.h"
extern uint32_t lastButtonTime;
void gui_Menu(const menuitem* menu);
static void settings_setInputVRange(void); static void settings_setInputVRange(void);
static void settings_displayInputVRange(void); static void settings_displayInputVRange(void);
static void settings_setSleepTemp(void); static void settings_setSleepTemp(void);
@@ -26,6 +29,8 @@ static void settings_setAdvancedSolderingScreens(void);
static void settings_displayAdvancedSolderingScreens(void); static void settings_displayAdvancedSolderingScreens(void);
static void settings_setAdvancedIDLEScreens(void); static void settings_setAdvancedIDLEScreens(void);
static void settings_displayAdvancedIDLEScreens(void); static void settings_displayAdvancedIDLEScreens(void);
static void settings_setScrollSpeed(void);
static void settings_displayScrollSpeed(void);
static void settings_setDisplayRotation(void); static void settings_setDisplayRotation(void);
static void settings_displayDisplayRotation(void); static void settings_displayDisplayRotation(void);
@@ -44,57 +49,139 @@ static void settings_displayCalibrate(void);
static void settings_setCalibrateVIN(void); static void settings_setCalibrateVIN(void);
static void settings_displayCalibrateVIN(void); static void settings_displayCalibrateVIN(void);
const menuitem settingsMenu[] = { //Menu functions
/*Struct used for all settings options in the settings menu*/ static void settings_displaySolderingMenu(void);
{(const char*)SettingsLongNames[0], static void settings_enterSolderingMenu(void);
{settings_setInputVRange}, static void settings_displayPowerMenu(void);
{settings_displayInputVRange}}, /*Voltage input*/ static void settings_enterPowerMenu(void);
{(const char*)SettingsLongNames[1], static void settings_displayUIMenu(void);
{settings_setSleepTemp}, static void settings_enterUIMenu(void);
{settings_displaySleepTemp}}, /*Sleep Temp*/ static void settings_displayAdvancedMenu(void);
{(const char*)SettingsLongNames[2], static void settings_enterAdvancedMenu(void);
{settings_setSleepTime}, /*
{settings_displaySleepTime}}, /*Sleep Time*/ * Root Settings Menu
{(const char*)SettingsLongNames[3], *
{settings_setShutdownTime}, * Power Source
{settings_displayShutdownTime}}, /*Shutdown Time*/ * Soldering
{(const char*)SettingsLongNames[4], * Boost Mode Enabled
{settings_setSensitivity}, * Boost Mode Temp
{settings_displaySensitivity}}, /* Motion Sensitivity*/ * Auto Start
{(const char*)SettingsLongNames[5], *
{settings_setTempF}, * Power Saving
{settings_displayTempF}}, /* Motion Sensitivity*/ * Sleep Temp
{(const char*)SettingsLongNames[6], * Sleep Time
{settings_setAdvancedIDLEScreens}, * Shutdown Time
{settings_displayAdvancedIDLEScreens}}, /* Advanced screens*/ * Motion Sensitivity
{(const char*)SettingsLongNames[15], *
{settings_setAdvancedSolderingScreens}, * UI
{settings_displayAdvancedSolderingScreens}}, /* Advanced screens*/ * // Language
{(const char*)SettingsLongNames[7], * Scrolling Speed
{settings_setDisplayRotation}, * Temperature Unit
{settings_displayDisplayRotation}}, /*Display Rotation*/ * Display orientation
{(const char*)SettingsLongNames[8], * Cooldown blink
{settings_setBoostModeEnabled}, *
{settings_displayBoostModeEnabled}}, /*Enable Boost*/ * Advanced
{(const char*)SettingsLongNames[9], * Detailed IDLE
{settings_setBoostTemp}, * Detailed Soldering
{settings_displayBoostTemp}}, /*Boost Temp*/ * Logo Time
{(const char*)SettingsLongNames[10], * Calibrate Temperature
{settings_setAutomaticStartMode}, * Calibrate Input V
{settings_displayAutomaticStartMode}}, /*Auto start*/ * Reset Settings
{(const char*)SettingsLongNames[11], *
{settings_setCoolingBlinkEnabled}, */
{settings_displayCoolingBlinkEnabled}}, /*Cooling blink warning*/ const menuitem rootSettingsMenu[] {
{(const char*)SettingsLongNames[12], /*
{settings_setCalibrate}, * Power Source
{settings_displayCalibrate}}, /*Calibrate tip*/ * Soldering Menu
{(const char*)SettingsLongNames[13], * Power Saving Menu
{settings_setResetSettings}, * UI Menu
{settings_displayResetSettings}}, /*Resets settings*/ * Advanced Menu
{(const char*)SettingsLongNames[14], * Exit
{settings_setCalibrateVIN}, */
{settings_displayCalibrateVIN}}, /*Voltage input cal*/ { (const char*) SettingsDescriptions[0], { settings_setInputVRange }, {
{NULL, {NULL}, {NULL}} // end of menu marker. DO NOT REMOVE settings_displayInputVRange } }, /*Voltage input*/
{ (const char*) SettingsMenuEntriesDescriptions[0], {
settings_enterSolderingMenu }, { settings_displaySolderingMenu } }, /*Soldering*/
{ (const char*) SettingsMenuEntriesDescriptions[1], { settings_enterPowerMenu },
{ settings_displayPowerMenu } }, /*Sleep Options Menu*/
{ (const char*) SettingsMenuEntriesDescriptions[2], { settings_enterUIMenu }, {
settings_displayUIMenu } }, /*UI Menu*/
{ (const char*) SettingsMenuEntriesDescriptions[3],
{ settings_enterAdvancedMenu }, { settings_displayAdvancedMenu } }, /*Advanced Menu*/
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
};
const menuitem solderingMenu[] = {
/*
* Boost Mode Enabled
* Boost Mode Temp
* Auto Start
*/
{ (const char*) SettingsDescriptions[8], { settings_setBoostModeEnabled }, {
settings_displayBoostModeEnabled } }, /*Enable Boost*/
{ (const char*) SettingsDescriptions[9], { settings_setBoostTemp }, {
settings_displayBoostTemp } }, /*Boost Temp*/
{ (const char*) SettingsDescriptions[10], { settings_setAutomaticStartMode }, {
settings_displayAutomaticStartMode } }, /*Auto start*/
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
};
const menuitem UIMenu[] = {
/*
// Language
* Scrolling Speed
* Temperature Unit
* Display orientation
* Cooldown blink
*/
{ (const char*) SettingsDescriptions[5], { settings_setTempF }, {
settings_displayTempF } }, /* Temperature units*/
{ (const char*) SettingsDescriptions[7], { settings_setDisplayRotation }, {
settings_displayDisplayRotation } }, /*Display Rotation*/
{ (const char*) SettingsDescriptions[11], { settings_setCoolingBlinkEnabled }, {
settings_displayCoolingBlinkEnabled } }, /*Cooling blink warning*/
{ (const char*) SettingsDescriptions[16], { settings_setScrollSpeed }, {
settings_displayScrollSpeed } }, /*Scroll Speed for descriptions*/
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
};
const menuitem PowerMenu[] = {
/*
* Sleep Temp
* Sleep Time
* Shutdown Time
* Motion Sensitivity
*/
{ (const char*) SettingsDescriptions[1], { settings_setSleepTemp }, {
settings_displaySleepTemp } }, /*Sleep Temp*/
{ (const char*) SettingsDescriptions[2], { settings_setSleepTime }, {
settings_displaySleepTime } }, /*Sleep Time*/
{ (const char*) SettingsDescriptions[3], { settings_setShutdownTime }, {
settings_displayShutdownTime } }, /*Shutdown Time*/
{ (const char*) SettingsDescriptions[4], { settings_setSensitivity }, {
settings_displaySensitivity } }, /* Motion Sensitivity*/
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
};
const menuitem advancedMenu[] = {
/*
* Detailed IDLE
* Detailed Soldering
* Logo Time
* Calibrate Temperature
* Calibrate Input V
* Reset Settings
*/
{ (const char*) SettingsDescriptions[6], { settings_setAdvancedIDLEScreens }, {
settings_displayAdvancedIDLEScreens } }, /* Advanced idle screen*/
{ (const char*) SettingsDescriptions[15],
{ settings_setAdvancedSolderingScreens }, {
settings_displayAdvancedSolderingScreens } }, /* Advanced soldering screen*/
{ (const char*) SettingsDescriptions[13], { settings_setResetSettings }, {
settings_displayResetSettings } }, /*Resets settings*/
{ (const char*) SettingsDescriptions[12], { settings_setCalibrate }, {
settings_displayCalibrate } }, /*Calibrate tip*/
{ (const char*) SettingsDescriptions[14], { settings_setCalibrateVIN }, {
settings_displayCalibrateVIN } }, /*Voltage input cal*/
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
}; };
static void printShortDescriptionSingleLine(uint32_t shortDescIndex) { static void printShortDescriptionSingleLine(uint32_t shortDescIndex) {
@@ -133,18 +220,29 @@ static void printShortDescription(uint32_t shortDescIndex,
} }
static int userConfirmation(const char* message) { static int userConfirmation(const char* message) {
uint8_t maxOffset = strlen(message) + 7; uint16_t messageWidth = FONT_12_WIDTH * (strlen(message) + 7);
uint32_t messageStart = HAL_GetTick(); uint32_t messageStart = xTaskGetTickCount();
lcd.setFont(0); lcd.setFont(0);
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
int16_t lastOffset = -1;
bool lcdRefresh = true;
for (;;) { for (;;) {
int16_t messageOffset = (((HAL_GetTick() - messageStart) / 150) % maxOffset);
int16_t messageOffset = ((xTaskGetTickCount() - messageStart)
/ (systemSettings.descriptionScrollSpeed == 1 ? 1 : 2));
messageOffset %= messageWidth; //Roll around at the end
if (lastOffset != messageOffset) {
lcd.clearScreen(); lcd.clearScreen();
lcd.setCursor(12 * (7 - messageOffset), 0);
//^ Rolling offset based on time
lcd.setCursor((OLED_WIDTH - messageOffset), 0);
lcd.print(message); lcd.print(message);
lastOffset = messageOffset;
lcdRefresh = true;
}
ButtonState buttons = getButtonState(); ButtonState buttons = getButtonState();
switch (buttons) { switch (buttons) {
@@ -152,22 +250,25 @@ static int userConfirmation(const char* message) {
//User confirmed //User confirmed
return 1; return 1;
case BUTTON_NONE:
break;
default:
case BUTTON_BOTH: case BUTTON_BOTH:
case BUTTON_B_SHORT: case BUTTON_B_SHORT:
case BUTTON_F_LONG: case BUTTON_F_LONG:
case BUTTON_B_LONG: case BUTTON_B_LONG:
return 0; return 0;
case BUTTON_NONE:
break;
} }
if (lcdRefresh) {
lcd.refresh(); lcd.refresh();
osDelay(50); osDelay(20);
lcdRefresh = false;
} }
}
return 0;
} }
static void settings_setInputVRange(void) { static void settings_setInputVRange(void) {
systemSettings.cutoutSetting = (systemSettings.cutoutSetting + 1) % 5; systemSettings.cutoutSetting = (systemSettings.cutoutSetting + 1) % 5;
} }
@@ -183,10 +284,10 @@ static void settings_displayInputVRange(void) {
} }
} }
static void settings_setSleepTemp(void) { static void settings_setSleepTemp(void) {
systemSettings.SleepTemp += 10; systemSettings.SleepTemp += 10;
if (systemSettings.SleepTemp > 300) systemSettings.SleepTemp = 50; if (systemSettings.SleepTemp > 300)
systemSettings.SleepTemp = 50;
} }
static void settings_displaySleepTemp(void) { static void settings_displaySleepTemp(void) {
@@ -194,19 +295,21 @@ static void settings_displaySleepTemp(void) {
lcd.printNumber(systemSettings.SleepTemp, 3); lcd.printNumber(systemSettings.SleepTemp, 3);
} }
static void settings_setSleepTime(void) { static void settings_setSleepTime(void) {
systemSettings.SleepTime++; // Go up 1 minute at a time systemSettings.SleepTime++; // Go up 1 minute at a time
if (systemSettings.SleepTime >= 16) { if (systemSettings.SleepTime >= 16) {
systemSettings.SleepTime = 1; // can't set time over 10 mins systemSettings.SleepTime = 0; // can't set time over 10 mins
} }
// Remember that ^ is the time of no movement // Remember that ^ is the time of no movement
if (PCBVersion == 3)
systemSettings.SleepTime = 0; //Disable sleep on no accel
} }
static void settings_displaySleepTime(void) { static void settings_displaySleepTime(void) {
printShortDescription(2, 5); printShortDescription(2, 5);
if (systemSettings.SleepTime == 0) {
if (systemSettings.SleepTime < 6) { lcd.print(OffString);
} else if (systemSettings.SleepTime < 6) {
lcd.printNumber(systemSettings.SleepTime * 10, 2); lcd.printNumber(systemSettings.SleepTime * 10, 2);
lcd.drawChar('S'); lcd.drawChar('S');
} else { } else {
@@ -215,20 +318,25 @@ static void settings_displaySleepTime(void) {
} }
} }
static void settings_setShutdownTime(void) { static void settings_setShutdownTime(void) {
systemSettings.ShutdownTime++; systemSettings.ShutdownTime++;
if (systemSettings.ShutdownTime > 60) { if (systemSettings.ShutdownTime > 60) {
systemSettings.ShutdownTime = 0; // wrap to off systemSettings.ShutdownTime = 0; // wrap to off
} }
if (PCBVersion == 3)
systemSettings.ShutdownTime = 0; //Disable shutdown on no accel
} }
static void settings_displayShutdownTime(void) { static void settings_displayShutdownTime(void) {
printShortDescription(3, 6); printShortDescription(3, 5);
if (systemSettings.ShutdownTime == 0) {
lcd.print(OffString);
} else {
lcd.printNumber(systemSettings.ShutdownTime, 2); lcd.printNumber(systemSettings.ShutdownTime, 2);
lcd.drawChar('M');
}
} }
static void settings_setTempF(void) { static void settings_setTempF(void) {
systemSettings.temperatureInF = !systemSettings.temperatureInF; systemSettings.temperatureInF = !systemSettings.temperatureInF;
} }
@@ -239,7 +347,6 @@ static void settings_displayTempF(void) {
lcd.drawChar((systemSettings.temperatureInF) ? 'F' : 'C'); lcd.drawChar((systemSettings.temperatureInF) ? 'F' : 'C');
} }
static void settings_setSensitivity(void) { static void settings_setSensitivity(void) {
systemSettings.sensitivity++; systemSettings.sensitivity++;
systemSettings.sensitivity = systemSettings.sensitivity % 10; systemSettings.sensitivity = systemSettings.sensitivity % 10;
@@ -250,7 +357,6 @@ static void settings_displaySensitivity(void) {
lcd.printNumber(systemSettings.sensitivity, 1); lcd.printNumber(systemSettings.sensitivity, 1);
} }
static void settings_setAdvancedSolderingScreens(void) { static void settings_setAdvancedSolderingScreens(void) {
systemSettings.detailedSoldering = !systemSettings.detailedSoldering; systemSettings.detailedSoldering = !systemSettings.detailedSoldering;
} }
@@ -261,7 +367,6 @@ static void settings_displayAdvancedSolderingScreens(void) {
lcd.drawCheckbox(systemSettings.detailedSoldering); lcd.drawCheckbox(systemSettings.detailedSoldering);
} }
static void settings_setAdvancedIDLEScreens(void) { static void settings_setAdvancedIDLEScreens(void) {
systemSettings.detailedIDLE = !systemSettings.detailedIDLE; systemSettings.detailedIDLE = !systemSettings.detailedIDLE;
} }
@@ -271,11 +376,36 @@ static void settings_displayAdvancedIDLEScreens(void) {
lcd.drawCheckbox(systemSettings.detailedIDLE); lcd.drawCheckbox(systemSettings.detailedIDLE);
} }
static void settings_setScrollSpeed(void) {
if (systemSettings.descriptionScrollSpeed == 0)
systemSettings.descriptionScrollSpeed = 1;
else
systemSettings.descriptionScrollSpeed = 0;
}
static void settings_displayScrollSpeed(void) {
printShortDescription(16, 7);
lcd.drawChar(
(systemSettings.descriptionScrollSpeed) ?
SettingFastChar : SettingSlowChar);
}
static void settings_setDisplayRotation(void) { static void settings_setDisplayRotation(void) {
systemSettings.OrientationMode++; systemSettings.OrientationMode++;
systemSettings.OrientationMode = systemSettings.OrientationMode % 3; systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
switch (systemSettings.OrientationMode) {
case 0:
lcd.setRotation(false);
break;
case 1:
lcd.setRotation(true);
break;
case 2:
//do nothing on auto
break;
default:
break;
}
} }
static void settings_displayDisplayRotation(void) { static void settings_displayDisplayRotation(void) {
@@ -297,7 +427,6 @@ static void settings_displayDisplayRotation(void) {
} }
} }
static void settings_setBoostModeEnabled(void) { static void settings_setBoostModeEnabled(void) {
systemSettings.boostModeEnabled = !systemSettings.boostModeEnabled; systemSettings.boostModeEnabled = !systemSettings.boostModeEnabled;
} }
@@ -308,7 +437,6 @@ static void settings_displayBoostModeEnabled(void) {
lcd.drawCheckbox(systemSettings.boostModeEnabled); lcd.drawCheckbox(systemSettings.boostModeEnabled);
} }
static void settings_setBoostTemp(void) { static void settings_setBoostTemp(void) {
systemSettings.BoostTemp += 10; // Go up 10 at a time systemSettings.BoostTemp += 10; // Go up 10 at a time
if (systemSettings.temperatureInF) { if (systemSettings.temperatureInF) {
@@ -327,7 +455,6 @@ static void settings_displayBoostTemp(void) {
lcd.printNumber(systemSettings.BoostTemp, 3); lcd.printNumber(systemSettings.BoostTemp, 3);
} }
static void settings_setAutomaticStartMode(void) { static void settings_setAutomaticStartMode(void) {
systemSettings.autoStartMode++; systemSettings.autoStartMode++;
systemSettings.autoStartMode %= 2; systemSettings.autoStartMode %= 2;
@@ -339,7 +466,6 @@ static void settings_displayAutomaticStartMode(void) {
lcd.drawCheckbox(systemSettings.autoStartMode); lcd.drawCheckbox(systemSettings.autoStartMode);
} }
static void settings_setCoolingBlinkEnabled(void) { static void settings_setCoolingBlinkEnabled(void) {
systemSettings.coolingTempBlink = !systemSettings.coolingTempBlink; systemSettings.coolingTempBlink = !systemSettings.coolingTempBlink;
} }
@@ -350,9 +476,8 @@ static void settings_displayCoolingBlinkEnabled(void) {
lcd.drawCheckbox(systemSettings.coolingTempBlink); lcd.drawCheckbox(systemSettings.coolingTempBlink);
} }
static void settings_setResetSettings(void) { static void settings_setResetSettings(void) {
if(userConfirmation(SettingsResetWarning)) { if (userConfirmation(SettingsResetWarning)) {
resetSettings(); resetSettings();
lcd.setFont(0); lcd.setFont(0);
@@ -360,7 +485,7 @@ static void settings_setResetSettings(void) {
lcd.print("RESET OK"); lcd.print("RESET OK");
lcd.refresh(); lcd.refresh();
waitForButtonPressOrTimeout(2000); waitForButtonPressOrTimeout(200);
} }
} }
@@ -368,9 +493,8 @@ static void settings_displayResetSettings(void) {
printShortDescription(13, 7); printShortDescription(13, 7);
} }
static void settings_setCalibrate(void) { static void settings_setCalibrate(void) {
if(userConfirmation(SettingsCalibrationWarning)) { if (userConfirmation(SettingsCalibrationWarning)) {
//User confirmed //User confirmed
//So we now perform the actual calculation //So we now perform the actual calculation
lcd.clearScreen(); lcd.clearScreen();
@@ -400,7 +524,6 @@ static void settings_displayCalibrate(void) {
printShortDescription(12, 5); printShortDescription(12, 5);
} }
static void settings_setCalibrateVIN(void) { static void settings_setCalibrateVIN(void) {
// Jump to the voltage calibration subscreen // Jump to the voltage calibration subscreen
lcd.setFont(0); lcd.setFont(0);
@@ -450,3 +573,172 @@ static void settings_setCalibrateVIN(void) {
static void settings_displayCalibrateVIN(void) { static void settings_displayCalibrateVIN(void) {
printShortDescription(14, 5); printShortDescription(14, 5);
} }
static void settings_displaySolderingMenu(void) {
//Call into the menu
lcd.setFont(1);
lcd.setCursor(0, 0);
//Draw title
lcd.print(SettingsMenuEntries[0]);
//Draw symbol
//16 pixel wide image
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 0]));
}
static void settings_enterSolderingMenu(void) {
gui_Menu(solderingMenu);
}
static void settings_displayPowerMenu(void) {
lcd.setFont(1);
lcd.setCursor(0, 0);
//Draw title
lcd.print(SettingsMenuEntries[1]);
//Draw symbol
//16 pixel wide image
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 1]));
}
static void settings_enterPowerMenu(void) {
gui_Menu(PowerMenu);
}
static void settings_displayUIMenu(void) {
lcd.setFont(1);
lcd.setCursor(0, 0);
//Draw title
lcd.print(SettingsMenuEntries[2]);
//Draw symbol
//16 pixel wide image
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 2]));
}
static void settings_enterUIMenu(void) {
gui_Menu(UIMenu);
}
static void settings_displayAdvancedMenu(void) {
lcd.setFont(1);
lcd.setCursor(0, 0);
//Draw title
lcd.print(SettingsMenuEntries[3]);
//Draw symbol
//16 pixel wide image
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 3]));
}
static void settings_enterAdvancedMenu(void) {
gui_Menu(advancedMenu);
}
void gui_Menu(const menuitem* menu) {
// Draw the settings menu and provide iteration support etc
uint8_t currentScreen = 0;
uint32_t autoRepeatTimer = 0;
uint8_t autoRepeatAcceleration = 0;
bool earlyExit = false;
uint32_t descriptionStart = 0;
int16_t lastOffset = -1;
bool lcdRefresh = true;
ButtonState lastButtonState = BUTTON_NONE;
while ((menu[currentScreen].draw.func != NULL) && earlyExit == false) {
lcd.setFont(0);
lcd.setCursor(0, 0);
//If the user has hesitated for >=3 seconds, show the long text
//Otherwise "draw" the option
if (xTaskGetTickCount() - lastButtonTime < 300) {
lcd.clearScreen();
menu[currentScreen].draw.func();
lastOffset = -1;
lcdRefresh = true;
} else {
// Draw description
if (descriptionStart == 0)
descriptionStart = xTaskGetTickCount();
// lower the value - higher the speed
int16_t descriptionWidth = FONT_12_WIDTH
* (strlen(menu[currentScreen].description) + 7);
int16_t descriptionOffset =
((xTaskGetTickCount() - descriptionStart)
/ (systemSettings.descriptionScrollSpeed == 1 ?
1 : 2));
descriptionOffset %= descriptionWidth; //Roll around at the end
if (lastOffset != descriptionOffset) {
lcd.clearScreen();
//^ Rolling offset based on time
lcd.setCursor((OLED_WIDTH - descriptionOffset), 0);
lcd.print(menu[currentScreen].description);
lastOffset = descriptionOffset;
lcdRefresh = true;
}
}
ButtonState buttons = getButtonState();
if (buttons != lastButtonState) {
autoRepeatAcceleration = 0;
lastButtonState = buttons;
}
switch (buttons) {
case BUTTON_BOTH:
earlyExit = true; // will make us exit next loop
descriptionStart = 0;
break;
case BUTTON_F_SHORT:
// increment
if (descriptionStart == 0) {
if (menu[currentScreen].incrementHandler.func != NULL)
menu[currentScreen].incrementHandler.func();
else
earlyExit = true;
} else
descriptionStart = 0;
break;
case BUTTON_B_SHORT:
if (descriptionStart == 0)
currentScreen++;
else
descriptionStart = 0;
break;
case BUTTON_F_LONG:
if (xTaskGetTickCount() - autoRepeatTimer
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
menu[currentScreen].incrementHandler.func();
autoRepeatTimer = xTaskGetTickCount();
descriptionStart = 0;
autoRepeatAcceleration += PRESS_ACCEL_STEP;
}
break;
case BUTTON_B_LONG:
if (xTaskGetTickCount() - autoRepeatTimer
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
currentScreen++;
autoRepeatTimer = xTaskGetTickCount();
descriptionStart = 0;
autoRepeatAcceleration += PRESS_ACCEL_STEP;
}
break;
case BUTTON_NONE:
default:
break;
}
if ((PRESS_ACCEL_INTERVAL_MAX - autoRepeatAcceleration)
< PRESS_ACCEL_INTERVAL_MIN) {
autoRepeatAcceleration = PRESS_ACCEL_INTERVAL_MAX
- PRESS_ACCEL_INTERVAL_MIN;
}
if (lcdRefresh) {
lcd.refresh(); // update the LCD
osDelay(20);
lcdRefresh = false;
}
}
}
void enterSettingsMenu() {
gui_Menu(rootSettingsMenu); //Call the root menu
saveSettings();
}

View File

@@ -18,7 +18,7 @@ uint16_t getHandleTemperature() {
// STM32 = 4096 count @ 3.3V input -> But // STM32 = 4096 count @ 3.3V input -> But
// We oversample by 32/(2^2) = 8 times oversampling // We oversample by 32/(2^2) = 8 times oversampling
// Therefore 32768 is the 3.3V input, so 0.201416015625 mV per count // Therefore 32768 is the 3.3V input, so 0.201416015625 mV per count
// So we need to subtract an offset of 0.5V to center on 0C (2482 counts) // So we need to subtract an offset of 0.5V to center on 0C (2482*2 counts)
// //
uint16_t result = getADC(0); uint16_t result = getADC(0);
if (result < 4964) if (result < 4964)
@@ -29,21 +29,25 @@ uint16_t getHandleTemperature() {
} }
uint16_t tipMeasurementToC(uint16_t raw) { uint16_t tipMeasurementToC(uint16_t raw) {
return ((raw - 532) / 33) + (getHandleTemperature() / 10) - CalibrationTempOffset; return ((raw - 532) / 33) + (getHandleTemperature() / 10)
- CalibrationTempOffset;
//Surprisingly that appears to be a fairly good linear best fit //Surprisingly that appears to be a fairly good linear best fit
} }
uint16_t ctoTipMeasurement(uint16_t temp) { uint16_t ctoTipMeasurement(uint16_t temp) {
//We need to compensate for cold junction temp //We need to compensate for cold junction temp
return ((temp - (getHandleTemperature() / 10) + CalibrationTempOffset) * 33) + 532; return ((temp - (getHandleTemperature() / 10) + CalibrationTempOffset) * 33)
+ 532;
} }
uint16_t tipMeasurementToF(uint16_t raw) { uint16_t tipMeasurementToF(uint16_t raw) {
return ((((raw - 532) / 33) + (getHandleTemperature() / 10) - CalibrationTempOffset) * 9) / 5 + 32; return ((((raw - 532) / 33) + (getHandleTemperature() / 10)
- CalibrationTempOffset) * 9) / 5 + 32;
} }
uint16_t ftoTipMeasurement(uint16_t temp) { uint16_t ftoTipMeasurement(uint16_t temp) {
return (((((temp - 32) * 5) / 9) - (getHandleTemperature() / 10) + CalibrationTempOffset) * 33) + 532; return (((((temp - 32) * 5) / 9) - (getHandleTemperature() / 10)
+ CalibrationTempOffset) * 33) + 532;
} }
uint16_t getTipInstantTemperature() { uint16_t getTipInstantTemperature() {
@@ -58,7 +62,7 @@ uint16_t getTipInstantTemperature() {
uint16_t getTipRawTemp(uint8_t instant) { uint16_t getTipRawTemp(uint8_t instant) {
#define filterDepth1 1 #define filterDepth1 1
/*Pre filter used before PID*/ /*Pre filter used before PID*/
#define filterDepth2 64 #define filterDepth2 32
/*Post filter used for UI display*/ /*Post filter used for UI display*/
static uint16_t filterLayer1[filterDepth1]; static uint16_t filterLayer1[filterDepth1];
static uint16_t filterLayer2[filterDepth2]; static uint16_t filterLayer2[filterDepth2];
@@ -116,7 +120,7 @@ uint8_t getTipPWM() {
return htim2.Instance->CCR4; return htim2.Instance->CCR4;
} }
void setTipPWM(uint8_t pulse) { void setTipPWM(uint8_t pulse) {
PWMSafetyTimer = 100; //This is decremented in the handler for PWM so that the tip pwm is disabled if the PID task is not scheduled often enough. PWMSafetyTimer = 640; //This is decremented in the handler for PWM so that the tip pwm is disabled if the PID task is not scheduled often enough.
if (pulse > 100) if (pulse > 100)
pulse = 100; pulse = 100;
if (pulse) { if (pulse) {
@@ -153,6 +157,14 @@ void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) {
if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_4) { if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_4) {
HAL_TIM_PWM_Stop(&htim3, TIM_CHANNEL_1); HAL_TIM_PWM_Stop(&htim3, TIM_CHANNEL_1);
htim3.Instance->CCR1 = 0; htim3.Instance->CCR1 = 0;
}
} /*else if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) {
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_13, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_14, GPIO_PIN_RESET);
}*/
} }
} }
void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc) {
}

View File

@@ -5,15 +5,18 @@
#include "Settings.h" #include "Settings.h"
#include "Translation.h" #include "Translation.h"
#include "cmsis_os.h" #include "cmsis_os.h"
#include "gui.h"
#include "stdlib.h" #include "stdlib.h"
#include "stm32f1xx_hal.h" #include "stm32f1xx_hal.h"
#include "string.h" #include "string.h"
#include "LIS2DH12.hpp"
#include <gui.hpp>
#define ACCELDEBUG 0
// C++ objects // C++ objects
OLED lcd(&hi2c1); OLED lcd(&hi2c1);
MMA8652FC accel(&hi2c1); MMA8652FC accel(&hi2c1);
LIS2DH12 accel2(&hi2c1);
uint8_t PCBVersion = 0;
// File local variables // File local variables
uint16_t currentlyActiveTemperatureTarget = 0; uint16_t currentlyActiveTemperatureTarget = 0;
uint32_t lastMovementTime = 0; uint32_t lastMovementTime = 0;
@@ -33,7 +36,7 @@ void startMOVTask(void const *argument);
void startRotationTask(void const *argument); void startRotationTask(void const *argument);
// End FreeRTOS // End FreeRTOS
// Main inits hardware then hands over to the FreeRTOS kernel // Main sets up the hardware then hands over to the FreeRTOS kernel
int main(void) { int main(void) {
/* Reset of all peripherals, Initializes the Flash interface and the Systick. /* Reset of all peripherals, Initializes the Flash interface and the Systick.
*/ */
@@ -42,12 +45,29 @@ int main(void) {
setTipPWM(0); setTipPWM(0);
lcd.initialize(); // start up the LCD lcd.initialize(); // start up the LCD
lcd.setFont(0); // default to bigger font lcd.setFont(0); // default to bigger font
//Testing for new weird board version
uint8_t buffer[1];
HAL_IWDG_Refresh(&hiwdg);
if (HAL_I2C_Mem_Read(&hi2c1, 29 << 1, 0x0F, I2C_MEMADD_SIZE_8BIT, buffer, 1,
1000) == HAL_OK) {
PCBVersion = 1;
accel.initalize(); // this sets up the I2C registers and loads up the default accel.initalize(); // this sets up the I2C registers and loads up the default
// settings // settings
} else if (HAL_I2C_Mem_Read(&hi2c1, 25 << 1, 0x0F, I2C_MEMADD_SIZE_8BIT,
buffer, 1, 1000) == HAL_OK) {
PCBVersion = 2;
//Setup the ST Accelerometer
accel2.initalize(); //startup the accelerometer
} else {
PCBVersion = 3;
systemSettings.SleepTime=0;
systemSettings.ShutdownTime=0;//No accel -> disable sleep
}
HAL_IWDG_Refresh(&hiwdg); HAL_IWDG_Refresh(&hiwdg);
restoreSettings(); // load the settings from flash restoreSettings(); // load the settings from flash
setCalibrationOffset(systemSettings.CalibrationOffset); setCalibrationOffset(systemSettings.CalibrationOffset);
HAL_IWDG_Refresh(&hiwdg); HAL_IWDG_Refresh(&hiwdg);
/* Create the thread(s) */ /* Create the thread(s) */
/* definition and creation of GUITask */ /* definition and creation of GUITask */
osThreadDef(GUITask, startGUITask, osPriorityBelowNormal, 0, 512); osThreadDef(GUITask, startGUITask, osPriorityBelowNormal, 0, 512);
@@ -107,19 +127,21 @@ ButtonState getButtonState() {
*/ */
static uint8_t previousState = 0; static uint8_t previousState = 0;
static uint32_t previousStateChange = 0; static uint32_t previousStateChange = 0;
const uint16_t timeout = 400; const uint16_t timeout = 40;
uint8_t currentState; uint8_t currentState;
currentState = currentState = (
(HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET ? 1 : 0) HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET ?
<< 0; 1 : 0) << 0;
currentState |= currentState |= (
(HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ? 1 : 0) HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ?
<< 1; 1 : 0) << 1;
if (currentState) lastButtonTime = HAL_GetTick(); if (currentState)
lastButtonTime = xTaskGetTickCount();
if (currentState == previousState) { if (currentState == previousState) {
if (currentState == 0) return BUTTON_NONE; if (currentState == 0)
if ((HAL_GetTick() - previousStateChange) > timeout) { return BUTTON_NONE;
if ((xTaskGetTickCount() - previousStateChange) > timeout) {
// User has been holding the button down // User has been holding the button down
// We want to send a buttong is held message // We want to send a buttong is held message
if (currentState == 0x01) if (currentState == 0x01)
@@ -140,7 +162,7 @@ ButtonState getButtonState() {
// User has released buttons // User has released buttons
// If they previously had the buttons down we want to check if they were < // If they previously had the buttons down we want to check if they were <
// long hold and trigger a press // long hold and trigger a press
if ((HAL_GetTick() - previousStateChange) < timeout) { if ((xTaskGetTickCount() - previousStateChange) < timeout) {
// The user didn't hold the button for long // The user didn't hold the button for long
// So we send button press // So we send button press
@@ -153,7 +175,7 @@ ButtonState getButtonState() {
} }
} }
previousState = currentState; previousState = currentState;
previousStateChange = HAL_GetTick(); previousStateChange = xTaskGetTickCount();
return retVal; return retVal;
} }
return BUTTON_NONE; return BUTTON_NONE;
@@ -166,26 +188,25 @@ static void waitForButtonPress() {
while (buttons) { while (buttons) {
buttons = getButtonState(); buttons = getButtonState();
GUIDelay(); GUIDelay();
HAL_IWDG_Refresh(&hiwdg);
lcd.refresh(); lcd.refresh();
} }
while (!buttons) { while (!buttons) {
buttons = getButtonState(); buttons = getButtonState();
GUIDelay(); GUIDelay();
HAL_IWDG_Refresh(&hiwdg);
lcd.refresh(); lcd.refresh();
} }
} }
void waitForButtonPressOrTimeout(uint32_t timeout) { void waitForButtonPressOrTimeout(uint32_t timeout) {
timeout += HAL_GetTick(); timeout += xTaskGetTickCount();
// Make timeout our exit value // Make timeout our exit value
for (;;) { for (;;) {
ButtonState buttons = getButtonState(); ButtonState buttons = getButtonState();
if (buttons) return; if (buttons)
if (HAL_GetTick() > timeout) return; return;
if (xTaskGetTickCount() > timeout)
return;
GUIDelay(); GUIDelay();
HAL_IWDG_Refresh(&hiwdg);
} }
} }
@@ -197,17 +218,19 @@ static bool checkVoltageForExit() {
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
if (systemSettings.detailedSoldering) { if (systemSettings.detailedSoldering) {
lcd.setFont(1); lcd.setFont(1);
lcd.print("Undervoltage"); lcd.print(UndervoltageString);
lcd.setCursor(0, 8); lcd.setCursor(0, 8);
lcd.print("Input V: "); lcd.print(InputVoltageString);
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2); lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10,
2);
lcd.drawChar('.'); lcd.drawChar('.');
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1); lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10,
1);
lcd.print("V"); lcd.print("V");
} else { } else {
lcd.setFont(0); lcd.setFont(0);
lcd.print("DC LOW"); lcd.print(UVLOWarningString);
} }
lcd.refresh(); lcd.refresh();
@@ -222,25 +245,29 @@ static void gui_drawBatteryIcon() {
// User is on a lithium battery // User is on a lithium battery
// we need to calculate which of the 10 levels they are on // we need to calculate which of the 10 levels they are on
uint8_t cellCount = systemSettings.cutoutSetting + 2; uint8_t cellCount = systemSettings.cutoutSetting + 2;
uint16_t cellV = getInputVoltageX10(systemSettings.voltageDiv) / cellCount; uint16_t cellV = getInputVoltageX10(systemSettings.voltageDiv)
/ cellCount;
// Should give us approx cell voltage X10 // Should give us approx cell voltage X10
// Range is 42 -> 33 = 9 steps therefore we will use battery 1-10 // Range is 42 -> 33 = 9 steps therefore we will use battery 1-10
if (cellV < 33) cellV = 33; if (cellV < 33)
cellV = 33;
cellV -= 33; // Should leave us a number of 0-9 cellV -= 33; // Should leave us a number of 0-9
if (cellV > 9) cellV = 9; if (cellV > 9)
cellV = 9;
lcd.drawBattery(cellV + 1); lcd.drawBattery(cellV + 1);
} else } else
lcd.drawSymbol(16); // Draw the DC Logo lcd.drawSymbol(16); // Draw the DC Logo
} }
static void gui_solderingTempAdjust() { static void gui_solderingTempAdjust() {
uint32_t lastChange = HAL_GetTick(); uint32_t lastChange = xTaskGetTickCount();
currentlyActiveTemperatureTarget = 0; currentlyActiveTemperatureTarget = 0;
for (;;) { for (;;) {
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.clearScreen(); lcd.clearScreen();
lcd.setFont(0); lcd.setFont(0);
ButtonState buttons = getButtonState(); ButtonState buttons = getButtonState();
if (buttons) lastChange = HAL_GetTick(); if (buttons)
lastChange = xTaskGetTickCount();
switch (buttons) { switch (buttons) {
case BUTTON_NONE: case BUTTON_NONE:
// stay // stay
@@ -285,12 +312,13 @@ static void gui_solderingTempAdjust() {
if (systemSettings.SolderingTemp < 120) if (systemSettings.SolderingTemp < 120)
systemSettings.SolderingTemp = 120; systemSettings.SolderingTemp = 120;
} else { } else {
if (systemSettings.SolderingTemp < 50) systemSettings.SolderingTemp = 50; if (systemSettings.SolderingTemp < 50)
systemSettings.SolderingTemp = 50;
} }
if (HAL_GetTick() - lastChange > 1500) if (xTaskGetTickCount() - lastChange > 200)
return; // exit if user just doesn't press anything for a bit return; // exit if user just doesn't press anything for a bit
lcd.drawChar('<'); lcd.drawChar('-');
lcd.drawChar(' '); lcd.drawChar(' ');
lcd.printNumber(systemSettings.SolderingTemp, 3); lcd.printNumber(systemSettings.SolderingTemp, 3);
if (systemSettings.temperatureInF) if (systemSettings.temperatureInF)
@@ -298,85 +326,11 @@ static void gui_solderingTempAdjust() {
else else
lcd.drawSymbol(1); lcd.drawSymbol(1);
lcd.drawChar(' '); lcd.drawChar(' ');
lcd.drawChar('>'); lcd.drawChar('+');
lcd.refresh(); lcd.refresh();
GUIDelay(); GUIDelay();
} }
} }
static void gui_settingsMenu() {
// Draw the settings menu and provide iteration support etc
uint8_t currentScreen = 0;
uint32_t autoRepeatTimer = 0;
bool earlyExit = false;
uint32_t descriptionStart = 0;
while ((settingsMenu[currentScreen].incrementHandler.func != NULL) &&
earlyExit == false) {
lcd.setFont(0);
lcd.clearScreen();
lcd.setCursor(0, 0);
if (HAL_GetTick() - lastButtonTime < 4000) {
settingsMenu[currentScreen].draw.func();
} else {
// Draw description
// draw string starting from descriptionOffset
int16_t maxOffset = strlen(settingsMenu[currentScreen].description) + 7;
if (descriptionStart == 0) descriptionStart = HAL_GetTick();
int16_t descriptionOffset =
(((HAL_GetTick() - descriptionStart) / 3) % (maxOffset * 12));
//^ Rolling offset based on time
lcd.setCursor(((7 * 12) - descriptionOffset), 0);
lcd.print(settingsMenu[currentScreen].description);
}
ButtonState buttons = getButtonState();
switch (buttons) {
case BUTTON_BOTH:
earlyExit = true; // will make us exit next loop
descriptionStart = 0;
break;
case BUTTON_F_SHORT:
// increment
if (descriptionStart == 0)
settingsMenu[currentScreen].incrementHandler.func();
else
descriptionStart = 0;
break;
case BUTTON_B_SHORT:
if (descriptionStart == 0)
currentScreen++;
else
descriptionStart = 0;
break;
case BUTTON_F_LONG:
if (HAL_GetTick() - autoRepeatTimer > 200) {
settingsMenu[currentScreen].incrementHandler.func();
autoRepeatTimer = HAL_GetTick();
descriptionStart = 0;
}
break;
case BUTTON_B_LONG:
if (HAL_GetTick() - autoRepeatTimer > 200) {
currentScreen++;
autoRepeatTimer = HAL_GetTick();
descriptionStart = 0;
}
break;
case BUTTON_NONE:
default:
break;
}
lcd.refresh(); // update the LCD
osDelay(20);
HAL_IWDG_Refresh(&hiwdg);
}
saveSettings();
}
static int gui_showTipTempWarning() { static int gui_showTipTempWarning() {
for (;;) { for (;;) {
@@ -387,7 +341,7 @@ static int gui_showTipTempWarning() {
lcd.setFont(1); lcd.setFont(1);
lcd.print(WarningAdvancedString); lcd.print(WarningAdvancedString);
lcd.setCursor(0, 8); lcd.setCursor(0, 8);
lcd.print("Tip Temp: "); lcd.print(WarningTipTempString);
if (systemSettings.temperatureInF) { if (systemSettings.temperatureInF) {
lcd.printNumber(tipMeasurementToF(getTipRawTemp(0)), 3); lcd.printNumber(tipMeasurementToF(getTipRawTemp(0)), 3);
@@ -410,8 +364,9 @@ static int gui_showTipTempWarning() {
lcd.drawSymbol(1); lcd.drawSymbol(1);
} }
} }
if (systemSettings.coolingTempBlink && tipTemp > 50) { if (systemSettings.coolingTempBlink && tipTemp > 70) {
if (HAL_GetTick() % 500 < 250) lcd.clearScreen(); if (xTaskGetTickCount() % 50 < 25)
lcd.clearScreen();
} }
lcd.refresh(); lcd.refresh();
ButtonState buttons = getButtonState(); ButtonState buttons = getButtonState();
@@ -420,11 +375,12 @@ static int gui_showTipTempWarning() {
else if (buttons == BUTTON_B_SHORT || buttons == BUTTON_BOTH) else if (buttons == BUTTON_B_SHORT || buttons == BUTTON_BOTH)
return 0; return 0;
if (tipTemp < 30) return 0; if (tipTemp < 50)
return 0; //Exit the warning screen
HAL_IWDG_Refresh(&hiwdg);
GUIDelay(); GUIDelay();
} }
return 0;
} }
static uint16_t min(uint16_t a, uint16_t b) { static uint16_t min(uint16_t a, uint16_t b) {
if (a > b) if (a > b)
@@ -437,18 +393,22 @@ static int gui_SolderingSleepingMode() {
for (;;) { for (;;) {
ButtonState buttons = getButtonState(); ButtonState buttons = getButtonState();
if (buttons) return 0; if (buttons)
if ((HAL_GetTick() - lastMovementTime < 1000) || return 0;
(HAL_GetTick() - lastButtonTime < 1000)) if ((xTaskGetTickCount() - lastMovementTime < 100)
|| (xTaskGetTickCount() - lastButtonTime < 100))
return 0; // user moved or pressed a button, go back to soldering return 0; // user moved or pressed a button, go back to soldering
if (checkVoltageForExit()) return 1; // return non-zero on error if (checkVoltageForExit())
return 1; // return non-zero on error
if (systemSettings.temperatureInF) if (systemSettings.temperatureInF)
currentlyActiveTemperatureTarget = ftoTipMeasurement( currentlyActiveTemperatureTarget = ftoTipMeasurement(
min(systemSettings.SleepTemp, systemSettings.SolderingTemp)); min(systemSettings.SleepTemp,
systemSettings.SolderingTemp));
else else
currentlyActiveTemperatureTarget = ctoTipMeasurement( currentlyActiveTemperatureTarget = ctoTipMeasurement(
min(systemSettings.SleepTemp, systemSettings.SolderingTemp)); min(systemSettings.SleepTemp,
systemSettings.SolderingTemp));
// draw the lcd // draw the lcd
uint16_t tipTemp; uint16_t tipTemp;
if (systemSettings.temperatureInF) if (systemSettings.temperatureInF)
@@ -462,7 +422,7 @@ static int gui_SolderingSleepingMode() {
lcd.setFont(1); lcd.setFont(1);
lcd.print(SleepingAdvancedString); lcd.print(SleepingAdvancedString);
lcd.setCursor(0, 8); lcd.setCursor(0, 8);
lcd.print("Tip:"); lcd.print(SleepingTipAdvancedString);
lcd.printNumber(tipTemp, 3); lcd.printNumber(tipTemp, 3);
if (systemSettings.temperatureInF) if (systemSettings.temperatureInF)
lcd.print("F"); lcd.print("F");
@@ -470,9 +430,11 @@ static int gui_SolderingSleepingMode() {
lcd.print("C"); lcd.print("C");
lcd.print(" "); lcd.print(" ");
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2); lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10,
2);
lcd.drawChar('.'); lcd.drawChar('.');
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1); lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10,
1);
lcd.drawChar('V'); lcd.drawChar('V');
} else { } else {
lcd.setFont(0); lcd.setFont(0);
@@ -485,16 +447,16 @@ static int gui_SolderingSleepingMode() {
} }
if (systemSettings.ShutdownTime) // only allow shutdown exit if time > 0 if (systemSettings.ShutdownTime) // only allow shutdown exit if time > 0
if (lastMovementTime) if (lastMovementTime)
if (((uint32_t)(HAL_GetTick() - lastMovementTime)) > if (((uint32_t) (xTaskGetTickCount() - lastMovementTime))
(uint32_t)(systemSettings.ShutdownTime * 60 * 1000)) { > (uint32_t) (systemSettings.ShutdownTime * 60 * 100)) {
// shutdown // shutdown
currentlyActiveTemperatureTarget = 0; currentlyActiveTemperatureTarget = 0;
return 1; // we want to exit soldering mode return 1; // we want to exit soldering mode
} }
lcd.refresh(); lcd.refresh();
GUIDelay(); GUIDelay();
HAL_IWDG_Refresh(&hiwdg);
} }
return 0;
} }
static void gui_solderingMode() { static void gui_solderingMode() {
/* /*
@@ -513,9 +475,9 @@ static void gui_solderingMode() {
bool boostModeOn = false; bool boostModeOn = false;
uint32_t sleepThres = 0; uint32_t sleepThres = 0;
if (systemSettings.SleepTime < 6) if (systemSettings.SleepTime < 6)
sleepThres = systemSettings.SleepTime * 10 * 1000; sleepThres = systemSettings.SleepTime * 10 * 100;
else else
sleepThres = (systemSettings.SleepTime - 5) * 60 * 1000; sleepThres = (systemSettings.SleepTime - 5) * 60 * 100;
for (;;) { for (;;) {
uint16_t tipTemp = getTipRawTemp(0); uint16_t tipTemp = getTipRawTemp(0);
@@ -534,7 +496,8 @@ static void gui_solderingMode() {
break; break;
case BUTTON_F_LONG: case BUTTON_F_LONG:
// if boost mode is enabled turn it on // if boost mode is enabled turn it on
if (systemSettings.boostModeEnabled) boostModeOn = true; if (systemSettings.boostModeEnabled)
boostModeOn = true;
break; break;
case BUTTON_F_SHORT: case BUTTON_F_SHORT:
case BUTTON_B_SHORT: { case BUTTON_B_SHORT: {
@@ -543,7 +506,8 @@ static void gui_solderingMode() {
if (oldTemp != systemSettings.SolderingTemp) { if (oldTemp != systemSettings.SolderingTemp) {
saveSettings(); // only save on change saveSettings(); // only save on change
} }
} break; }
break;
default: default:
break; break;
} }
@@ -552,11 +516,39 @@ static void gui_solderingMode() {
lcd.clearScreen(); lcd.clearScreen();
lcd.setFont(0); lcd.setFont(0);
if (tipTemp > 16300) { if (tipTemp > 16300) {
lcd.print("BAD TIP"); lcd.print(BadTipString);
lcd.refresh(); lcd.refresh();
currentlyActiveTemperatureTarget = 0; currentlyActiveTemperatureTarget = 0;
waitForButtonPress(); waitForButtonPress();
return; return;
} else {
if (systemSettings.detailedSoldering) {
lcd.setFont(1);
lcd.print(SolderingAdvancedPowerPrompt); //Power:
lcd.printNumber(getTipPWM(), 3);
lcd.print("%");
lcd.setCursor(0, 8);
lcd.print(SleepingTipAdvancedString);
uint16_t Temp = getTipRawTemp(0);
if (systemSettings.temperatureInF)
Temp = tipMeasurementToF(Temp);
else
Temp = tipMeasurementToC(Temp);
lcd.printNumber(Temp, 3);
if (systemSettings.temperatureInF)
lcd.print("F");
else
lcd.print("C");
lcd.print(" ");
lcd.printNumber(
getInputVoltageX10(systemSettings.voltageDiv) / 10, 2);
lcd.drawChar('.');
lcd.printNumber(
getInputVoltageX10(systemSettings.voltageDiv) % 10, 1);
lcd.drawChar('V');
} else { } else {
// We switch the layout direction depending on the orientation of the lcd. // We switch the layout direction depending on the orientation of the lcd.
if (lcd.getRotation()) { if (lcd.getRotation()) {
@@ -610,23 +602,23 @@ static void gui_solderingMode() {
gui_drawBatteryIcon(); gui_drawBatteryIcon();
} }
} }
}
// Update the setpoints for the temperature // Update the setpoints for the temperature
if (boostModeOn) { if (boostModeOn) {
if (systemSettings.temperatureInF) if (systemSettings.temperatureInF)
currentlyActiveTemperatureTarget = currentlyActiveTemperatureTarget = ftoTipMeasurement(
ftoTipMeasurement(systemSettings.BoostTemp); systemSettings.BoostTemp);
else else
currentlyActiveTemperatureTarget = currentlyActiveTemperatureTarget = ctoTipMeasurement(
ctoTipMeasurement(systemSettings.BoostTemp); systemSettings.BoostTemp);
} else { } else {
if (systemSettings.temperatureInF) if (systemSettings.temperatureInF)
currentlyActiveTemperatureTarget = currentlyActiveTemperatureTarget = ftoTipMeasurement(
ftoTipMeasurement(systemSettings.SolderingTemp); systemSettings.SolderingTemp);
else else
currentlyActiveTemperatureTarget = currentlyActiveTemperatureTarget = ctoTipMeasurement(
ctoTipMeasurement(systemSettings.SolderingTemp); systemSettings.SolderingTemp);
} }
// Undervoltage test // Undervoltage test
@@ -636,17 +628,16 @@ static void gui_solderingMode() {
lcd.refresh(); lcd.refresh();
if (systemSettings.sensitivity) if (systemSettings.sensitivity)
if (HAL_GetTick() - lastMovementTime > sleepThres && if (xTaskGetTickCount() - lastMovementTime > sleepThres
HAL_GetTick() - lastButtonTime > sleepThres) { && xTaskGetTickCount() - lastButtonTime > sleepThres) {
if (gui_SolderingSleepingMode()) { if (gui_SolderingSleepingMode()) {
return; // If the function returns non-0 then exit return; // If the function returns non-0 then exit
} }
} }
GUIDelay(); GUIDelay();
HAL_IWDG_Refresh(&hiwdg);
} }
} }
#define ACCELDEBUG 0
/* StartGUITask function */ /* StartGUITask function */
void startGUITask(void const *argument) { void startGUITask(void const *argument) {
/* /*
@@ -672,14 +663,39 @@ void startGUITask(void const *argument) {
uint8_t animationStep = 0; uint8_t animationStep = 0;
uint8_t tempWarningState = 0; uint8_t tempWarningState = 0;
bool buttonLockout = false;
HAL_IWDG_Refresh(&hiwdg); HAL_IWDG_Refresh(&hiwdg);
if (showBootLogoIfavailable()) waitForButtonPressOrTimeout(2000); switch (systemSettings.OrientationMode) {
case 0:
lcd.setRotation(false);
break;
case 1:
lcd.setRotation(true);
break;
case 2:
lcd.setRotation(false);
break;
default:
break;
}
uint32_t ticks = xTaskGetTickCount();
ticks += 400; //4 seconds from now
while (xTaskGetTickCount() < ticks) {
if (showBootLogoIfavailable() == false)
ticks = xTaskGetTickCount();
ButtonState buttons = getButtonState();
if (buttons)
ticks = xTaskGetTickCount(); //make timeout now so we will exit
GUIDelay();
}
HAL_IWDG_Refresh(&hiwdg); HAL_IWDG_Refresh(&hiwdg);
if (systemSettings.autoStartMode) { if (systemSettings.autoStartMode) {
// jump directly to the autostart mode // jump directly to the autostart mode
if (systemSettings.autoStartMode == 1) gui_solderingMode(); if (systemSettings.autoStartMode == 1)
gui_solderingMode();
} }
#if ACCELDEBUG #if ACCELDEBUG
for (;;) { for (;;) {
@@ -691,13 +707,19 @@ void startGUITask(void const *argument) {
for (;;) { for (;;) {
ButtonState buttons = getButtonState(); ButtonState buttons = getButtonState();
if (tempWarningState == 2) buttons = BUTTON_F_SHORT; if (tempWarningState == 2)
buttons = BUTTON_F_SHORT;
if (buttons != BUTTON_NONE && buttonLockout)
buttons = BUTTON_NONE;
else
buttonLockout = false;
switch (buttons) { switch (buttons) {
case BUTTON_NONE: case BUTTON_NONE:
// Do nothing // Do nothing
break; break;
case BUTTON_BOTH: case BUTTON_BOTH:
// Not used yet // Not used yet
//In multi-language this might be used to reset language on a long hold or some such
break; break;
case BUTTON_B_LONG: case BUTTON_B_LONG:
@@ -706,7 +728,8 @@ void startGUITask(void const *argument) {
lcd.clearScreen(); // Ensure the buffer starts clean lcd.clearScreen(); // Ensure the buffer starts clean
lcd.setCursor(0, 0); // Position the cursor at the 0,0 (top left) lcd.setCursor(0, 0); // Position the cursor at the 0,0 (top left)
lcd.setFont(1); // small font lcd.setFont(1); // small font
lcd.print((char *)"V2.01"); // Print version number lcd.print((char *) "V2.03 PCB"); // Print version number
lcd.printNumber(PCBVersion, 1);
lcd.setCursor(0, 8); // second line lcd.setCursor(0, 8); // second line
lcd.print(__DATE__); // print the compile date lcd.print(__DATE__); // print the compile date
lcd.refresh(); lcd.refresh();
@@ -727,28 +750,30 @@ void startGUITask(void const *argument) {
case BUTTON_B_SHORT: case BUTTON_B_SHORT:
lcd.setFont(0); lcd.setFont(0);
lcd.displayOnOff(true); // turn lcd on lcd.displayOnOff(true); // turn lcd on
gui_settingsMenu(); // enter the settings menu enterSettingsMenu(); // enter the settings menu
saveSettings(); saveSettings();
setCalibrationOffset( buttonLockout = true;
systemSettings.CalibrationOffset); // ensure cal offset is applied setCalibrationOffset(systemSettings.CalibrationOffset); // ensure cal offset is applied
break; break;
default: default:
break; break;
} }
currentlyActiveTemperatureTarget = 0; // ensure tip is off currentlyActiveTemperatureTarget = 0; // ensure tip is off
if (systemSettings.sensitivity) {
if ((HAL_GetTick() - lastMovementTime) > 60000 &&
(HAL_GetTick() - lastButtonTime) > 60000)
lcd.displayOnOff(false); // turn lcd off when no movement
else if (HAL_GetTick() - lastMovementTime < 1000 ||
HAL_GetTick() - lastButtonTime <
1000) /*Use short time for test, and prevent lots of I2C
writes for no need*/
lcd.displayOnOff(true); // turn lcd back on
}
uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0)); uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0));
if (tipTemp > 600) tipTemp = 0; if (tipTemp < 50) {
if (systemSettings.sensitivity) {
if ((xTaskGetTickCount() - lastMovementTime) > 6000
&& (xTaskGetTickCount() - lastButtonTime) > 6000) {
lcd.displayOnOff(false); // turn lcd off when no movement
} else
lcd.displayOnOff(true); // turn lcd on
} else
lcd.displayOnOff(true); // turn lcd on - disabled motion sleep
} else
lcd.displayOnOff(true); // turn lcd on when temp > 50C
if (tipTemp > 600)
tipTemp = 0;
if (tipTemp > 50) { if (tipTemp > 50) {
if (tempWarningState == 0) { if (tempWarningState == 0) {
currentlyActiveTemperatureTarget = 0; // ensure tip is off currentlyActiveTemperatureTarget = 0; // ensure tip is off
@@ -766,22 +791,23 @@ void startGUITask(void const *argument) {
if (systemSettings.detailedIDLE) { if (systemSettings.detailedIDLE) {
lcd.setFont(1); lcd.setFont(1);
if (tipTemp > 470) { if (tipTemp > 470) {
lcd.print("Tip Disconnected!"); lcd.print(TipDisconnectedString);
} else { } else {
lcd.print("Tip:"); lcd.print(IdleTipString);
if (systemSettings.temperatureInF) if (systemSettings.temperatureInF)
lcd.printNumber(tipMeasurementToF(getTipRawTemp(0)), 3); lcd.printNumber(tipMeasurementToF(getTipRawTemp(0)), 3);
else else
lcd.printNumber(tipMeasurementToC(getTipRawTemp(0)), 3); lcd.printNumber(tipMeasurementToC(getTipRawTemp(0)), 3);
lcd.print(" "); lcd.print(IdleSetString);
lcd.print("Set:");
lcd.printNumber(systemSettings.SolderingTemp, 3); lcd.printNumber(systemSettings.SolderingTemp, 3);
} }
lcd.setCursor(0, 8); lcd.setCursor(0, 8);
lcd.print("Input V: "); lcd.print(InputVoltageString);
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2); lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10,
2);
lcd.drawChar('.'); lcd.drawChar('.');
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1); lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10,
1);
lcd.print("V"); lcd.print("V");
} else { } else {
@@ -799,7 +825,6 @@ void startGUITask(void const *argument) {
lcd.refresh(); lcd.refresh();
animationStep++; animationStep++;
HAL_IWDG_Refresh(&hiwdg);
GUIDelay(); GUIDelay();
} }
} }
@@ -818,16 +843,14 @@ void startPIDTask(void const *argument) {
*/ */
int32_t integralCount = 0; int32_t integralCount = 0;
int32_t derivativeLastValue = 0; int32_t derivativeLastValue = 0;
int32_t kp, ki, kd, kb; int32_t kp, ki, kd;
int32_t backoffOverflow = 0; kp = 40;
kp = 20; ki = 60;
ki = 50; kd = 30;
kd = 40;
kb = 0;
// REMEBER ^^^^ These constants are backwards // REMEBER ^^^^ These constants are backwards
// They act as dividers, so to 'increase' a P term, you make the number // They act as dividers, so to 'increase' a P term, you make the number
// smaller. // smaller.
const int32_t itermMax = 40; const int32_t itermMax = 60;
for (;;) { for (;;) {
uint16_t rawTemp = getTipRawTemp(1); // get instantaneous reading uint16_t rawTemp = getTipRawTemp(1); // get instantaneous reading
if (currentlyActiveTemperatureTarget) { if (currentlyActiveTemperatureTarget) {
@@ -848,40 +871,37 @@ void startPIDTask(void const *argument) {
/*Compute PID Output*/ /*Compute PID Output*/
int32_t output = (rawTempError / kp); int32_t output = (rawTempError / kp);
if (ki) output += integralCount; if (ki)
if (kd) output -= (dInput / kd); output += integralCount;
if (kb) output -= backoffOverflow / kb; if (kd)
output -= (dInput / kd);
if (output > 100) { if (output > 100) {
backoffOverflow = output;
output = 100; // saturate output = 100; // saturate
} else if (output < 0) { } else if (output < 0) {
backoffOverflow = output;
output = 0; output = 0;
} else }
backoffOverflow = 0;
if (currentlyActiveTemperatureTarget < rawTemp) { if (currentlyActiveTemperatureTarget < rawTemp) {
output = 0; output = 0;
integralCount = 0;
backoffOverflow = 0;
derivativeLastValue = 0;
} }
setTipPWM(output); setTipPWM(output);
derivativeLastValue = rawTemp; // store for next loop
} else { } else {
setTipPWM(0); // disable the output driver if the output is set to be off setTipPWM(0); // disable the output driver if the output is set to be off
// elsewhere
integralCount = 0; integralCount = 0;
backoffOverflow = 0;
derivativeLastValue = 0; derivativeLastValue = 0;
} }
derivativeLastValue = rawTemp; // store for next loop
HAL_IWDG_Refresh(&hiwdg); HAL_IWDG_Refresh(&hiwdg);
osDelay(100); // 10 Hz temp loop osDelay(10); // 100 Hz temp loop
} }
} }
#define MOVFilter 8 #define MOVFilter 8
void startMOVTask(void const *argument) { void startMOVTask(void const *argument) {
osDelay(4000); // wait for accel to stabilize osDelay(4000); // wait for accel to stabilize
int16_t datax[MOVFilter]; int16_t datax[MOVFilter];
int16_t datay[MOVFilter]; int16_t datay[MOVFilter];
int16_t dataz[MOVFilter]; int16_t dataz[MOVFilter];
@@ -891,19 +911,27 @@ void startMOVTask(void const *argument) {
memset(dataz, 0, MOVFilter * sizeof(int16_t)); memset(dataz, 0, MOVFilter * sizeof(int16_t));
int16_t tx, ty, tz; int16_t tx, ty, tz;
int32_t avgx, avgy, avgz; int32_t avgx, avgy, avgz;
if (systemSettings.sensitivity > 9) systemSettings.sensitivity = 9; if (systemSettings.sensitivity > 9)
systemSettings.sensitivity = 9;
#if ACCELDEBUG #if ACCELDEBUG
uint32_t max = 0; uint32_t max = 0;
#endif #endif
if (PCBVersion == 3) {
for (;;)
osDelay(5000);
}
for (;;) { for (;;) {
int32_t threshold = 1200 + (9 * 200); int32_t threshold = 1200 + (9 * 200);
threshold -= systemSettings.sensitivity * 200; // 200 is the step size threshold -= systemSettings.sensitivity * 200; // 200 is the step size
if (PCBVersion == 2)
accel2.getAxisReadings(&tx, &ty, &tz);
else if (PCBVersion == 1)
accel.getAxisReadings(&tx, &ty, &tz); accel.getAxisReadings(&tx, &ty, &tz);
datax[currentPointer] = (int32_t)tx; datax[currentPointer] = (int32_t) tx;
datay[currentPointer] = (int32_t)ty; datay[currentPointer] = (int32_t) ty;
dataz[currentPointer] = (int32_t)tz; dataz[currentPointer] = (int32_t) tz;
currentPointer = (currentPointer + 1) % MOVFilter; currentPointer = (currentPointer + 1) % MOVFilter;
#if ACCELDEBUG #if ACCELDEBUG
// Debug for Accel // Debug for Accel
@@ -919,9 +947,9 @@ void startMOVTask(void const *argument) {
avgz /= MOVFilter; avgz /= MOVFilter;
lcd.setFont(1); lcd.setFont(1);
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.printNumber(abs(avgx - (int32_t)tx), 5); lcd.printNumber(abs(avgx - (int32_t) tx), 5);
lcd.print(" "); lcd.print(" ");
lcd.printNumber(abs(avgy - (int32_t)ty), 5); lcd.printNumber(abs(avgy - (int32_t) ty), 5);
if ((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)) > max) if ((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)) > max)
max = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)); max = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
lcd.setCursor(0, 8); lcd.setCursor(0, 8);
@@ -930,7 +958,8 @@ void startMOVTask(void const *argument) {
lcd.printNumber((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)), 5); lcd.printNumber((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)), 5);
lcd.refresh(); lcd.refresh();
if (HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET) max = 0; if (HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET)
max = 0;
#endif #endif
// Only run the actual processing if the sensitivity is set (aka we are // Only run the actual processing if the sensitivity is set (aka we are
// enabled) // enabled)
@@ -951,7 +980,7 @@ void startMOVTask(void const *argument) {
int32_t error = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)); int32_t error = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
// If error has occured then we update the tick timer // If error has occured then we update the tick timer
if (error > threshold) { if (error > threshold) {
lastMovementTime = HAL_GetTick(); lastMovementTime = xTaskGetTickCount();
} }
} }
@@ -964,13 +993,10 @@ void startRotationTask(void const *argument) {
* This task is used to manage rotation of the LCD screen & button re-mapping * This task is used to manage rotation of the LCD screen & button re-mapping
* *
*/ */
osDelay(1000); // wait for accel to stabilize if (PCBVersion == 3) {
HAL_NVIC_SetPriority(EXTI3_IRQn, 5, 0); for (;;)
HAL_NVIC_EnableIRQ(EXTI3_IRQn); osDelay(5000);
HAL_NVIC_SetPriority(EXTI9_5_IRQn, 5, 0); }
HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
//^ We hold off enabling these until now to ensure the semaphore is available
// to be used first
switch (systemSettings.OrientationMode) { switch (systemSettings.OrientationMode) {
case 0: case 0:
lcd.setRotation(false); lcd.setRotation(false);
@@ -984,28 +1010,24 @@ void startRotationTask(void const *argument) {
default: default:
break; break;
} }
for (;;) { osDelay(500); // wait for accel to stabilize
if (xSemaphoreTake(rotationChangedSemaphore, portMAX_DELAY) == pdTRUE ||
(HAL_GPIO_ReadPin(INT_Orientation_GPIO_Port, INT_Orientation_Pin) ==
GPIO_PIN_RESET)) {
// a rotation event has occured
bool rotation = accel.getOrientation();
if (systemSettings.OrientationMode == 2)
lcd.setRotation(rotation); // link the data through
}
osDelay(300);
}
}
// Handler called by HAL when a EXTI occurs, but after IRQ bit is cleared for (;;) {
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
static signed long xHigherPriorityTaskWoken; // a rotation event has occurred
if (GPIO_Pin == INT_Orientation_Pin) { uint8_t rotation = 0;
xSemaphoreGiveFromISR(rotationChangedSemaphore, &xHigherPriorityTaskWoken); if (PCBVersion == 2) {
} else if (GPIO_Pin == INT_Movement_Pin) { rotation = accel2.getOrientation();
// New data is available for reading from the unit } else if (PCBVersion == 1) {
// xSemaphoreGiveFromISR(accelDataAvailableSemaphore, rotation = accel.getOrientation();
// &xHigherPriorityTaskWoken); }
if (systemSettings.OrientationMode == 2) {
if (rotation != 0) {
lcd.setRotation(rotation == 2); // link the data through
}
}
osDelay(500);
} }
} }
@@ -1018,7 +1040,7 @@ bool showBootLogoIfavailable() {
uint16_t temp[98]; uint16_t temp[98];
for (uint8_t i = 0; i < (98); i++) { for (uint8_t i = 0; i < (98); i++) {
temp[i] = *(uint16_t *)(FLASH_LOGOADDR + (i * 2)); temp[i] = *(uint16_t *) (FLASH_LOGOADDR + (i * 2));
} }
uint8_t temp8[98 * 2]; uint8_t temp8[98 * 2];
for (uint8_t i = 0; i < 98; i++) { for (uint8_t i = 0; i < 98; i++) {
@@ -1026,12 +1048,16 @@ bool showBootLogoIfavailable() {
temp8[i * 2 + 1] = temp[i] & 0xFF; temp8[i * 2 + 1] = temp[i] & 0xFF;
} }
if (temp8[0] != 0xAA) return false; if (temp8[0] != 0xAA)
if (temp8[1] != 0x55) return false; return false;
if (temp8[2] != 0xF0) return false; if (temp8[1] != 0x55)
if (temp8[3] != 0x0D) return false; return false;
if (temp8[2] != 0xF0)
return false;
if (temp8[3] != 0x0D)
return false;
lcd.drawArea(0, 0, 96, 16, (uint8_t *)(temp8 + 4)); lcd.drawArea(0, 0, 96, 16, (uint8_t *) (temp8 + 4));
lcd.refresh(); lcd.refresh();
return true; return true;
} }

View File

@@ -28,8 +28,9 @@ void HAL_MspInit(void) {
/**NOJTAG: JTAG-DP Disabled and SW-DP Enabled /**NOJTAG: JTAG-DP Disabled and SW-DP Enabled
*/ */
__HAL_AFIO_REMAP_SWJ_NOJTAG() __HAL_AFIO_REMAP_SWJ_NOJTAG();
; // __HAL_AFIO_REMAP_SWJ_DISABLE(); /*Disable swd for debug io use*/
} }
@@ -73,7 +74,6 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc) {
} }
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) { void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) {
GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitTypeDef GPIO_InitStruct;
@@ -92,38 +92,10 @@ void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) {
__HAL_RCC_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE()
; ;
/* I2C1 DMA Init */
/* I2C1_RX Init */
hdma_i2c1_rx.Instance = DMA1_Channel7;
hdma_i2c1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
hdma_i2c1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_i2c1_rx.Init.MemInc = DMA_MINC_ENABLE;
hdma_i2c1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_i2c1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_i2c1_rx.Init.Mode = DMA_NORMAL;
hdma_i2c1_rx.Init.Priority = DMA_PRIORITY_LOW;
HAL_DMA_Init(&hdma_i2c1_rx);
__HAL_LINKDMA(hi2c, hdmarx, hdma_i2c1_rx);
/* I2C1_TX Init */
hdma_i2c1_tx.Instance = DMA1_Channel6;
hdma_i2c1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_i2c1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_i2c1_tx.Init.MemInc = DMA_MINC_ENABLE;
hdma_i2c1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_i2c1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_i2c1_tx.Init.Mode = DMA_NORMAL;
hdma_i2c1_tx.Init.Priority = DMA_PRIORITY_LOW;
HAL_DMA_Init(&hdma_i2c1_tx);
__HAL_LINKDMA(hi2c, hdmatx, hdma_i2c1_tx);
} }
} }
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) { void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) {
if (htim_base->Instance == TIM3) { if (htim_base->Instance == TIM3) {
/* Peripheral clock enable */ /* Peripheral clock enable */

View File

@@ -12,35 +12,27 @@ extern TIM_HandleTypeDef htim1; //used for the systick
/******************************************************************************/ /******************************************************************************/
void NMI_Handler(void) { void NMI_Handler(void) {
NVIC_SystemReset();
} }
//We have the assembly for a breakpoint trigger here to halt the system when a debugger is connected //We have the assembly for a breakpoint trigger here to halt the system when a debugger is connected
// Hardfault handler, often a screwup in the code // Hardfault handler, often a screwup in the code
void HardFault_Handler(void) { void HardFault_Handler(void) {
while (1) { NVIC_SystemReset();
asm("bkpt");
}
} }
// Memory management unit had an error // Memory management unit had an error
void MemManage_Handler(void) { void MemManage_Handler(void) {
while (1) { NVIC_SystemReset();
asm("bkpt");
}
} }
// Prefetcher or busfault occured // Prefetcher or busfault occured
void BusFault_Handler(void) { void BusFault_Handler(void) {
while (1) { NVIC_SystemReset();
asm("bkpt");
}
} }
void UsageFault_Handler(void) { void UsageFault_Handler(void) {
while (1) { NVIC_SystemReset();
asm("bkpt");
}
} }
void DebugMon_Handler(void) { void DebugMon_Handler(void) {
@@ -63,16 +55,6 @@ void DMA1_Channel1_IRQHandler(void) {
HAL_DMA_IRQHandler(&hdma_adc1); HAL_DMA_IRQHandler(&hdma_adc1);
} }
// DMA used for transmitting I2C packets
void DMA1_Channel6_IRQHandler(void) {
HAL_DMA_IRQHandler(&hdma_i2c1_tx);
}
//DMA used for receiving I2C packets
void DMA1_Channel7_IRQHandler(void) {
HAL_DMA_IRQHandler(&hdma_i2c1_rx);
}
//ADC interrupt used for DMA //ADC interrupt used for DMA
void ADC1_2_IRQHandler(void) { void ADC1_2_IRQHandler(void) {
HAL_ADC_IRQHandler(&hadc1); HAL_ADC_IRQHandler(&hadc1);