Commit Graph

66 Commits

Author SHA1 Message Date
Ben V. Brown
a0a779faba Custom tip type selection (#1977)
* Minor doc updates

* pydoc

* Draft tip selection menu

* Start linking in manual tip resistance

* Enable on Pinecilv1 / TS10x

* Fixup drawing tip type

* Update Settings.cpp

* Rename JBC type

* Add translations

* Handle one tip type

* Refactor header includes

* Fixup translation_IT.json

* Fixing up includes

* Format

* Apply suggestions from code review

Co-authored-by: discip <53649486+discip@users.noreply.github.com>

* Update Documentation/Hardware.md

Co-authored-by: discip <53649486+discip@users.noreply.github.com>

---------

Co-authored-by: = <=>
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-11-01 12:20:33 +11:00
ave
02b21a620b Add a sleep timeout setting for hall sensor (#1969)
* Add a sleep timeout setting for hall sensor

* Update Settings.h to reorder HallEffectSleepTime to the end

* Update Settings.cpp to reorder HallEffectSleepTime to the end

* add HallEffSleepTimeout to rest of translations

* mix misaligned number in Settings.cpp

* fix clang-format issue in getHallEffectSleepTimeout
2024-08-21 15:23:34 +10:00
Ben V. Brown
d9c88c9e71 Sequre T55 Support (#1928)
* Add T55 to build

* Approx in T55

* Update ThermoModel.cpp

* use PT1000 lookup logic

* Handle no accelerometer

* Setup for temp reading

* Lock max temp

* No movement pin

* Compensate for heater coil resistance change

* Fix min offset for T55

* Fixup font for T55

* Update draw_profile_advanced.cpp

* Update draw_temperature_change.cpp

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-07-24 19:06:26 +10:00
Ben V. Brown
48649908a7 WIP: Split Render for multiple screen resolutions (#1888)
* Create README.md

* Move to new folder

* Migrating

* Migrate Remainder

* format fix (all but one) (#1889)

* Update USBPDDebug_FS2711.cpp

* Delete PrintVoltage.cpp

* Copy in 128x32 template

* Mask drawing for 96x16

* Import #1819

* Update Font.h

* Homescreen

* Update draw_homescreen_detailed.cpp

* Fix oled normal draw for variable height

* Update OLED.cpp

* Draw settings icons

* Update draw_homescreen_simplified.cpp

* Update draw_power_source_icon.cpp

* Fixup oled drawing for fill area

* Update the region fill for mixed heights

* Fix newline height

* FIXUP! Draw icons in settings menu at correct size

* Fix scrollbar

* Update settingsGUI.cpp

* S60(P) Disable auto display rotation

* On tall oled, scroll in 2 line increments

* Bugfix transition L<->R

@discip I take it back, there was a bug :)

* Draw every other one on transitions

* .

* cleanup

* Bootup logo: Draw in centre

* Update OLED.hpp

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-07-12 08:27:05 +10:00
Ben V. Brown
14b92cde08 Pinecilv2 adc v2 (#1916)
* Updated NTC lookup

* remove float compute from adc (as we dont use it)

* Updated adc settings

* Updated ADC Init

* Custom max temp lookup

* Mask Timer around changing timer rate

* Use timer channels in sane order

* Update IRQ.cpp

* Remove ADC dummy wait on start/stop

* Dont use ADC IRQ

* Disable sampling delay

* Update Setup.cpp

* PinecilV2 disable ROM driver utils

Always use our source

* Force settings upgrade on PinecilV2

Fix forced settings upgrade on Pinecilv2

* Prevent ADC rollover

* Update Setup.cpp

* ADC cleanup

* Rollover prevention

* Measure tip temperature 2nd

* Rebase Buffalo SDK to 1.4.5 (#1923)

* Update bl702_adc.c

* Update board.c

* .

* Update bl702_adc.c

* Import updated hal_drv

* Remove accidental dupe of stack in linker

* First pass update BLE stack

* Update ReleaseNotes

* Update push.yml

* Drop BT Audio which we dont use

* .

* Reformat

* Update conn.c

* Update hog.c
2024-06-08 14:33:06 +10:00
Ben V. Brown
442dbd982e Expand USB-PD mode option (#1917)
* Use PDMode to decide if we do resistance pad

* Rename PDVpdo to USBPDMode

* Add options for PD Mode

* OLED: Allow soft line-wrap x position

* Add new translation option for menu settings values

* Use new setting value for PD Mode

* Update translations for new menu setting

* Fixup! S60

* black python
2024-06-01 16:36:34 +10:00
Ben V. Brown
baf2f26e59 Big overhaul of the UI framework (#1749)
* Starting GUI render refactor to be more immediate mode

Update TemperatureAdjust.cpp

.

Cleanup Soldering

Sleep

SolderingProfiles

Soldering Rework

Rough pass GUI

Temp Adjust

Cleanup old OperatingMode

Debug Menu

* Update TemperatureAdjust.cpp

* Roughing some transition work

* Fixup! Hook in the init starter helper

* Better home screen button handler

* FIXUP! Fix typo's

.

* Update SettingsMenu.cpp

* More settings rework

* More settings rendering

* Fixup

* Transitions

Update SolderingProfile.cpp

Hook in transistions

* Update TemperatureAdjust.cpp

* Update push.yml

* Add auto-repeat to settings menu

* Miniware: Use IT for I2C writes

* Update USBPDDebug_HUSB238.cpp

* Force write screen on side animation cancel

.

* Refactor moving down the settings list

* Update settingsGUI.cpp

* Update I2C_Wrapper.cpp

* Update OLED.cpp

* Rework button handling

* Fix PD debug at boot

* Fixup not showing right menu options

* silence some warnings

* Style cleanup

* Fkit use bit-bang I2C for Miniware

* Update GUIRendering.md

* Fixup transition on enter soldering mode

* Save Settings

* Fixes for some animations not running

Dont bail on animations if keypress is still held

* Fixup settings acceleration

* OLED Up animation

* Link up/down on debug meny

* Make all accelerometers I2C bus aware

Update accelerometers_common.h

* Make I2C mag optional

* Miniware -> Only Bit-Bang I2C

* Fixup for scrollbar

FIXUP! Debug menu returns to home screen

FIXUP! Up oled animation

Fix temp exit

* Settings menu -> Both buttons return a menu layer

* Merge fixup

* Update BMA223.cpp

* Re-Enable OLED sleep

* Save Setting on temp adjust exit

* WiP on startup mode

* Some autostart working

* Add hibernation mode & more autostart fixes

* If cant CJC; go to startup

* Hibernate in sleep

* Cleanup scroll indicator

* FIXUP! Ensure startup warnings are linked in

* FIXUP! Ensure we render out temp change before timing out

* Ensure 100ms delay between CJC samples

* Fix not re-calculating menu length on entering menu

* Implement NegotiationinProgress for USB-PD

* Mask heating until PD finishes negotiation

* Fixup staying in hibernate correctly

* Warning timeout

* Show reset settings warning

* Correctly compensate help text start time

* Update GUIThread.cpp

* Update USBPD.cpp

* .

* Fixup sleep time

* Update printSleepCountdown.cpp

* replacing countdown with big plus while in boost mode

* bringing back the + 1 since it was missing when not in boost mode

* Bail on USB-PD check after 3 seconds incase of DC source

* Fix hibernate

* Update PIDThread.cpp

* did center plus symbol (boost mode)

* Big refactor to not make settings increment handler handle the "is last item" return

* Fixup boot logo

* Fix flashing

* Fixup recalculate the menu length on long hold

* Fixup missing menu entries

* Fix junk left on screen after user confirmation

* Re-order button handler to use custom, then default order to allow setting associated setting

* Attach setting for settings using custom handler

* Fix swap +/- keys

* Fix boost temp

* Implement last menu option for Language selector

* Wait for init before CJC runs

* Check last setting via increment value

* Update BSP.cpp

* removed = from >=

Otherwise incrementing would stop and the scroll bar would already flash at the second to last value.

* (Hacky) Fix for Settings reset

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-02-18 09:42:08 +11:00
discip
fb16575cd9 Update Settings.cpp
format fix
2024-01-14 00:36:24 +01:00
Ben V. Brown
ec5f07ec0c Cleanup make includes and formatting rules (#1860)
* Draft cleanup of the folder definition mess

* Move old startup

* Fixup! broken hacky includes

* Update Makefile

* Update Makefile

* Update Makefile

* Bulk format

* Who knew, header guards are a wise idea

* Squash some sizing warnings

* Drop broken usb stack

* Fix BLE headers to be sensible

* Cleaning up proper c styling

* We have newer clang, it does bracketing now

* Run clang-format brackets

* We can drop the old messy bracket-checker with newer clang format

* WiP formatter

* Align grids of scripts by right side

Massively easier to read in nearly all cases

* Excempt the table for compression from formatter
2023-12-27 09:23:12 +11:00
Ivan Zorin
9931afdb0f Settings: disable Bluetooth LE by default (for PinecilV2) #1856 (#1857) 2023-12-19 14:16:57 +11:00
Ivan Zorin
a02f8c8ae3 Implement optional looping for animated boot logo [#1839] 2023-11-21 01:38:10 +03:00
Ben V. Brown
ea1906e499 Enforce temp unit to C if F not in build
Closes #1741
2023-07-28 18:46:00 +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
Ivan Zorin
cbde61edb4 Cosmetic code style refactoring: add enum for screen orientation & define for OLED state (#1732)
* saveSettings: add comment for #endif, update var name to reflect its purpose regardless its one-time & temporal

* Settings.h: add enum for orientation mode

* settingsGUI.cpp: add markings for #endifs, add/remove extra new lines to propose better code read-ability in my humble vision from the side, didnt touch any functionality only cosmetic syntax

* settingsGUI.cpp: remove added-by-accident new line in the end of the file

* OLED.hpp: unify ifdef section, add markings for #endifs, add readable macros for ON/OFF OLED state instead of magic numbers

* OLED.cpp: add markings for #endifs, add readable macros for ON/OFF OLED state instead of magic numbers, trying unify common style for the whole file for better read-ability

* Settings.cpp: unify code style

* settingsGUI.cpp: revert true/false for setDisplayRotation

* OLED.cpp: unify comments style
2023-07-05 12:41:16 +10:00
Ben V. Brown
9b5d155d31 Handle devices where flash is not 1:1 memory mapped 2023-06-19 16:41:47 +10:00
Ivan Zorin
4d7e4f41e3 Save settings on change only / All builds OK (#1699) (#1704) 2023-06-18 04:31:05 +00:00
Laura Klünder
cb2e8af700 full profile support 2023-04-23 23:48:24 +02:00
Laura Klünder
dbdc0d1ef1 add settings for soldering profile 2023-04-23 17:50:43 +02:00
discip
422b5b7563 unifying (#1657) 2023-04-07 23:42:14 +00:00
discip
9c8abbdfc2 Readjusting brightness (Pinecil v2) (#1622) 2023-03-26 11:43:56 +11:00
Neil Hanlon
a76049acde Fix bug in setSettingsValue for values constrained between 0 and 1
Fixed a bug in the `setSettingValue` function that caused valid values
within the allowed range to be incorrectly constrained to the minimum
value, when the default value of the option was zero and the allowed
range was from zero to one. The bug was fixed by updating the order of
the `if` statements in the function to ensure that the range check is
done before the value is set. This ensures that valid values within the
range are correctly retained, while out-of-range values are still
constrained to the allowed range.
2023-02-22 01:26:06 -05:00
Samuel Hedrick
9892dd0423 Added VPDO option for disabling PPS/EPR PDOs. 2023-02-19 14:13:50 -06:00
Ben V. Brown
82499f4e83 Setting setup for BLEEnabled 2023-01-23 18:01:35 +11:00
discip
02a495d44b Update Settings.cpp 2022-12-29 02:36:43 +01:00
discip
c89db78b45 Calibrate CJC at next boot (#1398)
Changes Cold Junction Compensation (Tip Offset / CJC) to be performed during bootup time. (After starting in settings)
2022-09-10 20:52:57 +10:00
discip
0b8192b690 Bootup logo settings (#1241)
Adds ability to adjust the time shown for the bootup logo.
2022-04-02 12:39:14 +11:00
Ben V. Brown
eee879eed4 Update Settings.cpp 2022-02-09 21:49:15 +11:00
Ben V. Brown
7fcac3aaf1 making hall effect 0-9 scale 2022-02-09 21:18:15 +11:00
Ben V. Brown
02d065778c Update Settings.cpp 2022-02-08 18:28:33 +11:00
Ben V. Brown
3f26bc0103 Update Settings.cpp 2022-02-08 18:26:23 +11:00
Ben V. Brown
5f8fe9ae56 Update Hall sensor tuning 2022-02-06 17:34:34 +11:00
Ben V. Brown
d59db82ead Update Settings.cpp 2022-01-15 08:52:27 +11:00
Ben V. Brown
26c7d0f2cb Clean up soldering temp adjust button handling 2022-01-05 20:41:38 +11:00
Ben V. Brown
9a9a98957d Update Settings.cpp
Set a default sane PD timeout
2021-12-29 23:02:18 +11:00
Ben V. Brown
16db0c7c0b Fix missed limit settings 2021-12-29 17:22:30 +11:00
discip
13bce53249 changed POWER_PULSE since 100 would display as 0.0 2021-12-20 00:57:57 +01:00
Ben V. Brown
7a654caf2a Handle different calibration offset ranges for MHP30 2021-12-19 11:23:42 +11:00
Ben V. Brown
e33b900cff Rework settings to be min-max inclusive 2021-12-19 10:21:19 +11:00
Ben V. Brown
b29c5a9602 Address settings bounds checks 2021-11-19 19:52:14 +11:00
Ben V. Brown
ca02f7606b Fix #1105 2021-10-17 11:20:03 +11:00
Ben V. Brown
d6af4654b3 Fix #1089 2021-10-02 15:03:50 +10:00
discip
5fd16bb673 adjusted max brightness (#1087)
* Delete Development Resources/Images directory

* jpg -> png

* fix value alignment for PD timeout

* Delete 001_TS80.png

* replace TS80 logo

* Update Settings.cpp

* Update gui.cpp

* Update Settings.cpp

* adding missing en dash

* Update translation_EN.json

* Update Settings.cpp

* Update gui.cpp
2021-09-30 21:25:51 +10:00
discip
45f5838067 change increment and values of brightness settings (#1083) 2021-09-27 11:35:50 +10:00
Ben V. Brown
02453ce252 Update Settings.cpp 2021-09-17 21:38:22 +10:00
Ben V. Brown
87b22e52ed Rough pass 2021-09-17 21:13:21 +10:00
Ben V. Brown
2bfb8a6535 Unify settings for each model into once place 2021-09-15 20:24:41 +10:00
Ben V. Brown
ebde786ca1 Bugfixes for settings menu 2021-09-15 19:24:19 +10:00
Ben V. Brown
4b2f350b35 Contrast -> Brightness
As it makes a little more sense in a 1 bit display
2021-09-12 19:14:45 +10:00
Ben V. Brown
87a96bcff7 Fix settings bug 2021-09-12 19:06:50 +10:00
Ben V. Brown
45116fb7b1 Updating translations 2021-09-12 19:03:25 +10:00