Commit Graph

820 Commits

Author SHA1 Message Date
jonasius
e9117269ef Add experimental detection of separate USB-PD I2C bus for S99 v1.5 and S60P v1.2 2024-06-25 19:07:22 +02:00
jonasius
c776390ac3 Add pins for S99 v1.5 and probably S60P v1.2 2024-06-25 19:03:07 +02:00
jonasius
c8c36d29bf Fix clang-format code style mismatches 2024-06-19 22:24:05 +02:00
jonasius
8514edfdea Fix clang-format code style mismatches 2024-06-06 23:35:12 +02:00
jonasius
f5d6d8b1af Add define for USB_PD_TIMEOUT, the default value for PDNegTimeout 2024-06-06 23:13:58 +02:00
jonasius
da28492f00 Add define for USB_PD_TIMEOUT, the default value for PDNegTimeout 2024-06-06 23:09:43 +02:00
jonasius
6ef1fbd46a Support for S99
* Enable PD Options
* Make PDNegTimeout configureable
* Add default value for PDNegTimeout, also for S60 and S60P
* Add basic DC detection / correct debug readings while powered via DC
* Add basic ThermoModel for C245 Tips
* Modify op-amp gain
2024-06-06 22:35:35 +02:00
jonasius
6e53d85b32 Rename Sequre_S60 folder to Sequre 2024-06-06 20:27:08 +02:00
jonasius
a2615a57b8 Use SettingsOptions::PDNegTimeout in FS2711 driver 2024-06-02 22:53:34 +02:00
jonasius
a306de5c37 Merge branch 'Ralim:dev' into dev 2024-06-01 14:03:50 +02:00
Ben V. Brown
442dbd982e Expand USB-PD mode option (#1917)
Some checks failed
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_readme (push) Has been cancelled
* 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
jonasius
2c5d2a08ed Add whitespaces according to coding style
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-05-26 23:09:13 +02:00
jonasius
5ea42a8bbf Add whitespaces according to coding style
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2024-05-26 23:09:06 +02:00
jonasius
a3b7abbf0e Add Sequre S99 with correct bootloader offset 2024-05-26 21:14:11 +02:00
jonasius
653a0803e2 Add support for Sequre S99, copied S60P settings 2024-05-26 21:13:09 +02:00
Ben V. Brown
88d7a8e154 Handle non-EPR devices not encoding PPS correctly (#1911)
Handle non EPR devices not encoding PPS correctly

By not trusting them at all.
2024-05-24 18:21:42 +10:00
Ivan Zorin
f11290891e Remove register keyword according to ISO C++17 for fixing related warning (#1893)
Some checks failed
Docs / deploy-docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_readme (push) Has been cancelled
* Remove register keyword according to ISO C++17 for fixing related warning from compiler
2024-05-22 19:44:14 +10:00
Ivan Zorin
9a46d98e37 Move Zzz large line from translations to constants 2024-04-04 12:45:45 +03:00
Ben V. Brown
b5fc1b5891 4 ohm tip (#1868)
* Add 4 ohm PTS200 tip for PinecilV2

* Add PTS200 4 ohm tip to TS101

* Update BSP.cpp
2024-03-22 10:03:46 +11:00
slark-yuxj
e8a1c34733 fix: handle is uninitialized when BFLB_BLE_DISABLE_STATIC_ATTR defined (#1895)
Signed-off-by: yuxiaojun <yuxiaojun@uniontech.com>
2024-03-20 11:57:36 +00:00
Ivan Zorin
1d12e9d7dd source/Makefile compatibility with BSD find [#1886] (#1892)
* source/Makefile compatibility with BSD find [#1886]

* Align formatting

* source/Makefile: remove trailing /s from DIR vars to fix build using BSD find/OSX env [#1886]
2024-03-16 19:32:31 +11:00
Arturo
9ea71bc4d2 USB-PD Support for Sequre S60P (#1883)
* Basic Init

* Rought implementation of fs2711 usb pd interface

* Rought implementation of fs2711 usb pd interface

* Still needs work overcurrent protection keeps getting tripped

* New pdo selection logic

* Update push.yml

* Update push.yml

* Update push.yml

* Update Makefile

* Adds PPS

* Removed unused define

* Adds PPS

* Apply suggestions from code review

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>

* Code review changes

* Added osDelay include

* New line alignment for S60 softwarei2c

* Code review

* Fixes code review stuff

* code review changes

* Change voltage limit to 20 as that's what the device is rated for

* Shortened wait time for usb pd

* Fixed issues that cuase S60P to restart constantly

* fixing minimal OLED brightness

With the current settings, the OLED turns off if the first level is selected.

* Adds protocol to s60p debug menu

* loosened fs2711 protocol selection timing

* Adds PDO register reading to negotiation logic

* Fixes FS2711 timeout issue and cleans up driver

* Adds FS2711 protocol negotiation to power loop

* Removed uneeded define

* Reverts changes to Font.h and adds clang-format comments

---------

Co-authored-by: Ben V. Brown <Ralim@Ralimtek.com>
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
2024-02-25 22:04:48 +11:00
Ben V. Brown
9f6f2f86ff Add S60P init code (#1884)
* Basic Init

* Add S60P to CI
2024-02-23 10:19:07 +11: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
813722367d Off=>icon (#1678)
replacing Off by an Icon
2024-01-16 06:54: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
Ben V. Brown
849d1f7d40 Update compilers (#1858)
* Update Alpine Image

* Update push.yml

* Style updates
2023-12-26 19:54:47 +11:00
Ivan Zorin
9931afdb0f Settings: disable Bluetooth LE by default (for PinecilV2) #1856 (#1857) 2023-12-19 14:16:57 +11:00
Ben V. Brown
8ea79e3f7d MHP30: GD32 doesnt implement analog mode (#1845) 2023-12-19 13:53:03 +11:00
Ben V. Brown
ea72aea47d Enforce no EPR polling for non >20V devices 2023-12-09 23:02:20 +11:00
Ivan Zorin
fac46e2187 Font.h: remove extra spaces 2023-11-23 09:34:34 +03:00
discip
8eebb01047 Update Font.h 2023-11-22 18:45:41 +01:00
discip
229ae9b30e Update Font.h 2023-11-22 18:41:02 +01:00
discip
9bfb36e349 Update Font.h 2023-11-22 18:34:25 +01:00
discip
00c3d150dd Update settingsGUI.cpp 2023-11-22 09:21:24 +01:00
discip
37420d3ee1 Update Font.h 2023-11-22 09:20:02 +01:00
discip
faf2c6733e Update settingsGUI.cpp 2023-11-22 00:07:10 +01:00
discip
cf8d6ee783 Update Font.h 2023-11-22 00:05:51 +01:00
discip
4f5bbcf370 Update settingsGUI.cpp 2023-11-21 17:11:21 +01:00
discip
92f74e5881 extend infinity icon 2023-11-21 17:05:23 +01:00
Ivan Zorin
7338a68652 Use half of infinity logo as icon for one-time loop animation setting in the menu 2023-11-21 18:22:27 +03:00
Ivan Zorin
a02f8c8ae3 Implement optional looping for animated boot logo [#1839] 2023-11-21 01:38:10 +03:00
Ben V. Brown
e3bad2adae Migrate all Miniware devices to use Bit-Bang I2C (#1838)
* MHP30 move to I2C Bit Banging

* Fixup Accelerometer drivers so all can use I2CBB

* No STM32 I2C driver anymore

* TS100 on I2CBB

* Miniware on BB

* Fixup S60 build

* format

format
2023-11-16 21:32:56 +11:00
Ben V. Brown
c308fe8cc2 Pinecil v2 tune via PID (#1827)
* Start PWM after adc irq fully done

* Filter len 4

* Use comparitor 2 on timer for wrap around

* Update IRQ.cpp

* Tip measurements are uint16_t

Update BSP.cpp

Update BSP.cpp

* WiP PID

move pid tuning to config

Update PIDThread.cpp

* Handle PWM Timer gitchy comparitor

* Tuning

* Dampen with Kd

* Cleaning up

* Use TemperatureType_t for getTipTemp()

* Add small rolling average to user GUI temp to reduce flicker

* Trigger PID when adc is skipped (will use old values)
2023-10-21 08:21:08 +11:00
Ben V. Brown
c0a5e244b9 Temperature code updates (#1814)
* Create a typedef for temperatures

* Quick parse replace temp types

* Fixup for fast/slow PWM on PinecilV2

* Update PIDThread.cpp

* Pinecil small tips need less smoothing

* Remove incorrect comment

* Remove unused function

* Update PinecilV2 Tune as well
2023-09-22 10:19:50 +10:00
Ben V. Brown
f69c37c4aa Revert "Remove 0.5 ohm increase to resistance" (#1794) 2023-08-12 15:31:02 +10:00
Ivan Zorin
d5035bb956 Update build.sh to pass shellcheck checks (#1789)
source/build.sh: update according to shellcheck recommendations
2023-08-09 08:47:25 +10:00
Ivan Zorin
8b90666f30 metadata.py: update tagging considering github CI builds (#1782) 2023-08-07 09:05:04 +10:00
Ben V. Brown
17b39de903 Use 3 count filter for MHP30 acceleromter (#1762)
* Use 3 count filter for MHP30 acceleromter

Requires it to trip 3 times in a row to fire. So really only knocking the unit over trips it off.

* Reset shutdown timer forwards on shutdown timeout

Default shutdown mode off

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
2023-08-04 21:38:41 +10:00