1
0
forked from me/IronOS
Commit Graph

186 Commits

Author SHA1 Message Date
Ben V. Brown
13e1c24152 Warn user tick type correction 2023-07-28 19:58:46 +10:00
Ivan Zorin
c7574c4d0c Implement printSymbolDeg() helper function as method for OLED class (#1743)
* implement printSymbolDeg() helper function as method for OLED class

* Remove extra line added by mistake

* OLED::printSymbolDeg - add drawSymbol calls

* OLED: make comments more clear for implemented method

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

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

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

* Implement getTipTemp() helper

* Add missing header

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-07-18 20:38:14 +10:00
Ivan Zorin
d95af7d1a0 clang-format implementation (#1740)
* Testing clang-format style check using github CI

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

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

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

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

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

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

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

* source/Makefile: remove unused target style

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

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

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

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

* source/Makefile: probably final touches on unifying style

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

* source/Makefile: fix missed spaces

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

* gitignore: add clang-format log explicitly

* Refactoring for clang-format compiance

* Dockerfile: add sed

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

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

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

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

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

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

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

* Return headers include order

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

* clang-format refactoring

* clang-format refactoring, part 2

* clang-format refactoring, part 3

* settingsGUI.cpp: refactoring, part 1

* settingsGUI.cpp: refactoring, part 2

* settingsGUI.cpp: refactoring, part 3

* settingsGUI.cpp: refactoring, part 4

* clang-format should be happy now

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

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

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

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

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

* Sleep.cpp: unify style & comments

* source/Makefile: remove unused debug target
2023-07-16 15:25:30 +10:00
Ben V. Brown
552b582bcb Fixup! broken #1672 reflow profile 2023-07-09 22:29:48 +10:00
Ivan Zorin
155cf386b1 Zipping compiler warning about POW_PD_EXT / Two options (#1711)
* Zipping compiler warning about POW_PD_EXT / Option A

* Zipping compiler warning about POW_PD_EXT / Option B

* BSP/configuration.h: implement option A for POW_PD_EXT warning

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-06-20 00:59:36 +00:00
Ben V. Brown
d3d8e3d2d5 TS101 (#1695)
* Refactor I2C_SOFT to new #define

* Stitch in some of TS101

Update ShowStartupWarnings.cpp

Update OLED.hpp

Update stm32f1xx_hal_msp.c

Update Setup.cpp

Update Power.cpp

Update Pins.h

Update configuration.h

Power Muxing

Working dual input Voltage handler

Scan mode required for differing injected channels

Inject both dc readings

Update configuration.h

Update configuration.h

Use htim4 for adc control on TS101

Refactor htim names

Add ADC_TRIGGER

Speed up BB I2C a lil

Update configuration.h

Update startup_stm32f103t8ux.S

Update configuration.h

Add LIS2DH clone

LIS2DH gains another clone

Create tooling to allow mapping accelerometers onto different buses

Update startup_stm32f103t8ux.S

Ensure PD IRQ is pulled up

* Stitch in some of TS101

Update ShowStartupWarnings.cpp

Update OLED.hpp

Update stm32f1xx_hal_msp.c

Update Setup.cpp

Update Power.cpp

Update Pins.h

Update configuration.h

Power Muxing

Working dual input Voltage handler

Scan mode required for differing injected channels

Inject both dc readings

Update configuration.h

Update configuration.h

Use htim4 for adc control on TS101

Refactor htim names

Add ADC_TRIGGER

Speed up BB I2C a lil

Update configuration.h

Update startup_stm32f103t8ux.S

Update configuration.h

Add LIS2DH clone

LIS2DH gains another clone

Create tooling to allow mapping accelerometers onto different buses

Update startup_stm32f103t8ux.S

Ensure PD IRQ is pulled up

Allow toggle which button enters PD debug

* Update Pins.h

* Fix hard coded IRQ Pin

Update stm32f1xx_it.c

* Enable EPR

* Tip resistance measurement

* TS101 is a direct drive tip

Update BSP.cpp

* Add S60 and TS101 to builds

Update push.yml

* Update MOVThread.cpp

* Refactor power menu handler

* Correct prescaler

Forgot to update since I changed the period

* Tune in the timer divider for tip control to make PWM less audible

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2023-06-18 21:58:20 +10:00
Ivan Zorin
a1b9e40f67 Show power source type on detailed screen in soldering mode (#1708) (#1709)
* Show power source type on detailed screen in soldering mode (#1708)

* Update according to code review
2023-06-18 21:38:26 +10:00
Ivan Zorin
c55a640d7f AutoStartMode refactoring (#1712)
* OperatingModes/Sleep: extend current mode with idle status

* OperatingModes/Sleep: tipTemp section refactoring

* source/Core - settings: tiny refactoring of AutoStartMode management

* OperatingModes/Sleep: rollback OperatingMode update
2023-06-17 17:07:26 +10:00
Ben V. Brown
e7bcf920ba Refactor PinecilV2 Tuning
Closes #1688
2023-06-04 12:13:26 +10:00
Ben V. Brown
286afad919 S60 Support (#1692)
* Mock S60

* cleanup

* Start refactor of OLED init

* Setup timers roughly

* Set Vector table offset correctly

Update system_stm32f1xx.c

* Update OLED.cpp

* Update stm32f1xx_hal_msp.c

* Update configuration.h

* I2C init before GPIO

From Errata

Update stm32f1xx_hal_msp.c

Update Software_I2C.h

Allow no hardware I2C

* I2C BB run bus unlock at init

* cleanups

* Software I2C for now

* Mildly more graceful Interpolate

* Handle is powered by DC

Update Power.cpp

Update drawPowerSourceIcon.cpp

Update configuration.h

Update Setup.cpp

* Cleanup HomeScreen

* Segment remap oled at init

* Cleanup

* Update MOVThread.cpp

* Fix PWM Init

* Fix adc2 trigger

* Update configs

* Fixup warning

* Saner default config

* Update ThermoModel.cpp

* Util for current@voltage

* Hub238 warning

* Add hub238 handling in power mode

* Update USBPDDebug_FUSB.cpp

* HUSB238 debug

* Hook PSU Limit

* Use wrapping section of GRAM for scroll

Update OLED.hpp

* Update NTC table

* Fix HUB voltage picker

* Cleanup

* Larger tip filter

* Calibrate in a bunch closer

Update ThermoModel.cpp

* Update configuration.h

* Update HUB238.cpp

* Update configuration.h

* Movement Pin

* Update BSP.cpp

* tim2 irq

* Rough timer conversion (adc broken) but movement working

* Fix tim2 start

* Faster base PWM

* Ensure utils grabs config

* Add wattage limiter tolerance for device

* Speed up PWM and enable PWM current limiting

* tune for 12v

* Prevent start until PD done

* Update configuration.h

* Add HUB238 check for have re-negotiated

* Adjust timer to avoid noise when its possible
2023-06-03 20:05:31 +10:00
Laura Klünder
578fd54463 soldering profile mode → profile mode 2023-04-25 11:56:57 +02:00
Laura Klünder
366cfbd794 add missing comment and exclude sleep code if sleep is disabled 2023-04-25 11:56:52 +02:00
Laura Klünder
f1879353b8 put soldering profile mode into its own file, put common functions in utils 2023-04-25 11:56:41 +02:00
Laura Klünder
cb2e8af700 full profile support 2023-04-23 23:48:24 +02:00
Laura Klünder
448e5c8ad1 profile mode is optional 2023-04-23 18:36:07 +02:00
Samuelrmlink
445069c92b USBPDDebug: Check whether VPDO is EPR or PPS (#1600)
* USBPDDebug: Check whether VPDO is EPR or PPS.

* USBPDDebug - Allow trailing zeros after a decimal point.

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2023-04-02 00:14:45 +11:00
Thomas White
8e7e58018a expand bulk data to match individual value data (#1555)
* track and return Operating mode with BLE

* move global variable to fix build on other platforms

* formatting

* expand bulk data to match individual value data

* formatting

* fix accidental single line if

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2023-02-05 00:04:51 +11:00
Thomas White
9802a622d5 Track and return Operating Mode with BLE (#1553)
Track and return Operating Mode with BLE
2023-02-04 09:33:43 +11:00
discip
fc10a24a89 simplification 2023-01-24 18:22:50 +01:00
Ben V. Brown
c2d69f91a6 Drop decimal when > 99.9W 2023-01-23 17:49:40 +11:00
Ben V. Brown
05628daba2 Merge branch 'dev' into new-translations-format 2023-01-22 22:05:13 +11:00
discip
1b84097e07 fixes cooldown flashing (#1515)
* unify rate of cooldown flashing

* adjusted flashing threshold

* revert adjusted flashing threshold

* revert follow-up
2022-12-31 22:41:00 +11:00
Ben V. Brown
fdc31467aa Use size encoded symbols
Update make_translation.py
2022-12-05 22:26:03 +11:00
Ben V. Brown
cc65cbb05e Update CJC.cpp 2022-11-25 21:25:49 +11:00
Ben V. Brown
6ca5f5c08d Merge branch 'dev' into refactor-gui-files 2022-11-25 21:24:49 +11:00
discip
c55ecbff6c fixed CJC calibration rule
Did not calibrate if *handle temp* was higher than *tip temp*.
2022-11-24 23:56:15 +01:00
Ben V. Brown
2c02f55139 Merge pull request #1436 from Ralim/test-slow-i2c
Improve I2C for PinecilV2
2022-11-23 21:09:04 +11:00
Ben V. Brown
6b8ee8ad48 Update GUIThread.cpp 2022-11-23 21:07:26 +11:00
Ben V. Brown
38b4a87602 Update CJC.cpp 2022-11-23 21:06:01 +11:00
Ben V. Brown
3007a44e45 Merge branch 'dev' into refactor-gui-files 2022-11-23 21:05:54 +11:00
Ben V. Brown
91f939e0f5 Update OperatingModes.h 2022-11-22 18:37:41 +11:00
Ben V. Brown
8ea43ed8be Update OperatingModes.h 2022-11-22 18:35:15 +11:00
Ben V. Brown
91cd702726 Update OperatingModes.h 2022-11-22 18:35:00 +11:00
Ben V. Brown
3b898ddc50 Refactor out home screen 2022-11-22 18:33:01 +11:00
Ben V. Brown
6cbb01db41 References 2022-11-22 18:26:16 +11:00
Ben V. Brown
27297fd692 Headers 2022-11-22 18:26:07 +11:00
Ben V. Brown
fe77fb097e Update printSleepCountdown.cpp 2022-11-22 18:25:58 +11:00
Ben V. Brown
124c3ecade Update shouldDeviceSleep.cpp 2022-11-22 18:25:57 +11:00
Ben V. Brown
da6b780941 Create shouldDeviceShutdown.cpp 2022-11-22 18:25:55 +11:00
Ben V. Brown
8d9e90c7b0 Create ShowWarning.cpp 2022-11-22 18:25:48 +11:00
Ben V. Brown
68eeb1276f Create PrintVoltage.cpp 2022-11-22 18:25:45 +11:00
Ben V. Brown
4cb74bddd7 Create min.cpp 2022-11-22 18:25:43 +11:00
Ben V. Brown
7bb41ff7c9 Create GUIDelay.cpp 2022-11-22 18:25:40 +11:00
Ben V. Brown
3836915b19 Create DrawTipTemperature.cpp 2022-11-22 18:25:38 +11:00
Ben V. Brown
af55cd5da4 Create USBPDDebug.cpp 2022-11-22 18:25:36 +11:00
Ben V. Brown
70e35316d4 Create ShowStartupWarnings.cpp 2022-11-22 18:25:33 +11:00
Ben V. Brown
296e599bf1 Create DebugMenu.cpp 2022-11-22 18:25:29 +11:00
Ben V. Brown
1432fc0dc3 Create CJC.cpp 2022-11-22 18:07:46 +11:00
Ben V. Brown
d82876c630 Create OperatingModes.h 2022-11-22 18:07:42 +11:00
Ben V. Brown
d7e68e074c Create Sleep.cpp 2022-11-22 18:07:40 +11:00