Commit Graph

502 Commits

Author SHA1 Message Date
MX
9a57b19bfb Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2025-04-12 19:08:58 +03:00
WillyJL
1eb57ba462 FBT: Fix for Python 3.13 (#4187)
Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-04-12 15:35:19 +04:00
Anna Antonenko
096c088bf1 vcp, cli: Handle Tx/Rx events before Connect/Disconnect + extra fixes (#4181)
* cli_vcp: handle tx/rx before connext/disconnect

* cli_vcp: disable trace

* cli_perf: advanced error reporting

* cli_vcp: reset tx flag directly in event handler

* fix formatting

* cli_vcp: make tx flag volatile

* storage_settings: fix scene ids

* cli_shell: add safety check to set_prompt

* cli_registry: move from bptree to dict, fix memory leak

* cli_vcp: go back to message queue for event signaling

* loader: move BeforeLoad event even earlier

* fix formatting
2025-04-11 14:53:10 +04:00
MX
d1f9921f83 Merge remote-tracking branch 'OFW/porta/cli-event-ordering' into dev 2025-04-08 17:50:48 +03:00
Anna Antonenko
c8cf76f75e fix formatting 2025-04-07 23:56:09 +04:00
Anna Antonenko
b39912af11 cli_perf: advanced error reporting 2025-04-07 23:30:39 +04:00
MX
00dde53304 Merge remote-tracking branch 'OFW/dev' into dev 2025-04-07 18:02:16 +03:00
Anna Antonenko
3d02063bce fbt: Deterministic STARTUP order & additional checks (#4179)
* unit_tests: clear startup order

* fam: ensure unique STARTUP order

* fbt: warn on same .order values within a group leading to non-determinitic builds

* fbt: better formatting for app order warning

---------

Co-authored-by: hedger <hedger@nanode.su>
2025-04-07 16:45:09 +04:00
MX
c8fc2fa7b3 Merge remote-tracking branch 'OFW/dev' into dev 2025-04-06 01:54:22 +03:00
Anna Antonenko
5dcf6b55ef [FL-3928, FL-3929] CLI commands in fals and threads (#4116)
* feat: FuriThread stdin

* ci: fix f18

* feat: stdio callback context

* feat: FuriPipe

* POTENTIALLY EXPLOSIVE pipe welding

* fix: non-explosive welding

* Revert welding

* docs: furi_pipe

* feat: pipe event loop integration

* update f18 sdk

* f18

* docs: make doxygen happy

* fix: event loop not triggering when pipe attached to stdio

* fix: partial stdout in pipe

* allow simultaneous in and out subscription in event loop

* feat: vcp i/o

* feat: cli ansi stuffs and history

* feat: more line editing

* working but slow cli rewrite

* restore previous speed after 4 days of debugging 🥲

* fix: cli_app_should_stop

* fix: cli and event_loop memory leaks

* style: remove commented out code

* ci: fix pvs warnings

* fix: unit tests, event_loop crash

* ci: fix build

* ci: silence pvs warning

* feat: cli gpio

* ci: fix formatting

* Fix memory leak during event loop unsubscription

* Event better memory leak fix

* feat: cli completions

* Merge remote-tracking branch 'origin/dev' into portasynthinca3/3928-cli-threads

* merge fixups

* temporarily exclude speaker_debug app

* pvs and unit tests fixups

* feat: commands in fals

* move commands out of flash, code cleanup

* ci: fix errors

* fix: run commands in buffer when stopping session

* speedup cli file transfer

* fix f18

* separate cli_shell into modules

* fix pvs warning

* fix qflipper refusing to connect

* remove temp debug logs

* remove erroneous conclusion

* Fix memory leak during event loop unsubscription

* Event better memory leak fix

* unit test for the fix

* improve thread stdio callback signatures

* pipe stdout timeout

* update api symbols

* fix f18, formatting

* fix pvs warnings

* increase stack size, hope to fix unit tests

* cli completions

* more key combos

* commands in fals

* move commands out of flash

* ci: fix errors

* speedup cli file transfer

* merge fixups

* fix f18

* cli: revert flag changes

* cli: fix formatting

* cli, fbt: loopback perf benchmark

* thread, event_loop: subscribing to thread flags

* cli: signal internal events using thread flags, improve performance

* fix f18, formatting

* event_loop: fix crash

* storage_cli: increase write_chunk buffer size again

* cli: explanation for order=0

* thread, event_loop: thread flags callback refactor

* cli: increase stack size

* cli: rename cli_app_should_stop -> cli_is_pipe_broken_or_is_etx_next_char

* cli: use plain array instead of mlib for history

* cli: prepend file name to static fns

* cli: fix formatting

* cli_shell: increase stack size

* cli_shell: give up pipe to command thread

* fix formatting

* fix: format

* fix merge

* fix. merge.

* cli_shell: fix detach ordering

* desktop: record_cli -> record_cli_vcp

* cli: fix spelling, reload/remove ext cmds on card mount/unmount

* cli: fix race conditions and formatting

* scripts: wait for CTS to go high before starting flipper

* scripts: better race condition fix

* REVERT THIS: test script race condition fix

* Revert "REVERT THIS: test script race condition fix"

This reverts commit 3b028d29b07212755872c5706c8c6a58be551636.

* REVERT THIS: test script fix

* scripts: sleep?

* cli: updated oplist for CliCommandTree

* Revert "REVERT THIS: test script fix"

This reverts commit e9846318549ce092ef422ff97522ba51916163be.

* cli: mention memory leak in FL ticket

---------

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
2025-04-03 21:39:53 +04:00
Anna Antonenko
13333edd30 [FL-3954, FL-3955] New CLI architecture (#4111)
* feat: FuriThread stdin

* ci: fix f18

* feat: stdio callback context

* feat: FuriPipe

* POTENTIALLY EXPLOSIVE pipe welding

* fix: non-explosive welding

* Revert welding

* docs: furi_pipe

* feat: pipe event loop integration

* update f18 sdk

* f18

* docs: make doxygen happy

* fix: event loop not triggering when pipe attached to stdio

* fix: partial stdout in pipe

* allow simultaneous in and out subscription in event loop

* feat: vcp i/o

* feat: cli ansi stuffs and history

* feat: more line editing

* working but slow cli rewrite

* restore previous speed after 4 days of debugging 🥲

* fix: cli_app_should_stop

* fix: cli and event_loop memory leaks

* style: remove commented out code

* ci: fix pvs warnings

* fix: unit tests, event_loop crash

* ci: fix build

* ci: silence pvs warning

* feat: cli gpio

* ci: fix formatting

* Fix memory leak during event loop unsubscription

* Event better memory leak fix

* feat: cli completions

* Merge remote-tracking branch 'origin/dev' into portasynthinca3/3928-cli-threads

* merge fixups

* temporarily exclude speaker_debug app

* pvs and unit tests fixups

* feat: commands in fals

* move commands out of flash, code cleanup

* ci: fix errors

* fix: run commands in buffer when stopping session

* speedup cli file transfer

* fix f18

* separate cli_shell into modules

* fix pvs warning

* fix qflipper refusing to connect

* remove temp debug logs

* remove erroneous conclusion

* Fix memory leak during event loop unsubscription

* Event better memory leak fix

* unit test for the fix

* improve thread stdio callback signatures

* pipe stdout timeout

* update api symbols

* fix f18, formatting

* fix pvs warnings

* increase stack size, hope to fix unit tests

* cli: revert flag changes

* cli: fix formatting

* cli, fbt: loopback perf benchmark

* thread, event_loop: subscribing to thread flags

* cli: signal internal events using thread flags, improve performance

* fix f18, formatting

* event_loop: fix crash

* storage_cli: increase write_chunk buffer size again

* cli: explanation for order=0

* thread, event_loop: thread flags callback refactor

* cli: increase stack size

* cli: rename cli_app_should_stop -> cli_is_pipe_broken_or_is_etx_next_char

* cli: use plain array instead of mlib for history

* cli: prepend file name to static fns

* cli: fix formatting

* cli_shell: increase stack size

* cli: fix rpc lockup

* cli: better lockup fix

* cli: fix f18

* fix merge

---------

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: あく <alleteam@gmail.com>
2025-04-02 22:10:10 +04:00
MX
48ef579ee6 Merge remote-tracking branch 'OFW/dev' into dev 2025-03-31 22:04:08 +03:00
hedger
5fcaef25b0 Stricter constness for const data (#4126)
* libs: stricter constness for saving RAM with .rodata section; fbt: sdk: fixed signature generation for nested const params

* hal: additional fixes for constness in USB subsystem

* debug apps: additional usb-related fixes

* mjs: more consts for token parser

* fatfs: const driver struct

* hal: more consts for ble & nfc vars

* hal: made FuriHalSpiBusHandle static

* hal: made FuriHalI2cBusHandle static

* usb: restored previous api

* linter fixes

* API fixes
2025-03-31 19:23:32 +04:00
Evgeny E
bcbf78a45d github: support bound and symlinked devices (#4163)
* Fix unaccessible flipper for binded access points

workaround to work with symlinked devices

* Fix return None if Flipper not started

* exception handling

* decreased timeouts

* Check environment variables for flipper path
2025-03-31 17:20:25 +04:00
MX
ed1f4000e6 Merge remote-tracking branch 'OFW/dev' into dev 2025-03-15 03:11:19 +03:00
Evgeny E
9a8dcc340f fix: flipper detected before it was rebooted (#4146) 2025-03-12 13:25:37 +00:00
MX
b38d239eb8 Merge remote-tracking branch 'OFW/hedger/more-constness' into dev [ci skip] 2025-02-24 21:18:11 +03:00
hedger
b0835220ac libs: stricter constness for saving RAM with .rodata section; fbt: sdk: fixed signature generation for nested const params 2025-02-22 16:05:56 +00:00
MX
aef8a97ab4 Merge remote-tracking branch 'OFW/dev' into dev 2025-02-20 18:40:54 +03:00
Astra
2817666eb9 [FL-3774] Fix 5V on GPIO (#4103)
* Move OTG controls to the power service
* Accessor: add missing power service import
* Power: add is_otg_enabled to info and properly handle OTG enable with VBUS voltage present
* Power: method naming
* Power: add backward compatibility with old-style use of furi_hal_power
* Scripts: lower MIN_GAP_PAGES to 1
* SubGhz: fix incorrect logging tag
* SubGhz: delegate OTG management to power service
* Power: fix condition race, various improvements

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2025-02-20 12:37:52 +09:00
MX
486dc48a7a Merge remote-tracking branch 'OFW/dev' into dev 2025-02-20 03:08:53 +03:00
hedger
93b0277938 vscode: disabled auto-update for clangd since correct version is in the toolchain (#4122)
Co-authored-by: あく <alleteam@gmail.com>
2025-02-20 08:32:20 +09:00
MX
0849aec661 Merge remote-tracking branch 'OFW/dev' into dev 2025-02-18 00:50:48 +03:00
あく
3a42bf812d Furi, USB, BLE, Debug: various bug fixes and improvements (#4114)
* Furi, USB, BLE: extra stack space for some threads, small code cleanup.

* Furi: thread watermark check on exit, explicitly crash if built with LIB_DEBUG=1

* Debug: color logging in apps/furi gdb helper, check and show crash message in gdb console.
2025-02-17 22:16:14 +04:00
MX
a3ffdac763 Merge remote-tracking branch 'OFW/dev' into dev 2025-02-10 21:55:03 +03:00
hedger
490e66b21f ufbt: bumped action version in example github workflow for project template (#4097)
Co-authored-by: あく <alleteam@gmail.com>
2025-02-10 19:44:44 +09:00
MX
9c5341edb1 Merge remote-tracking branch 'OFW/dev' into dev 2024-12-23 15:56:12 +03:00
Sanghee Park
519b89665f Fix invalid path errors while deploying SDK by enforcing toolchain to use UTF-8 on initial SDK Extraction (#4036)
* Fix invalid path errors for non-Latin characters by enforcing UTF-8 (#4024)
  Due to cryillic alphabet on `/openocd/scripts/target/1986ве1т.cfg`, If the system codepage is handling `WideChar` for cryillic properly, It would cause jumbled characters and fail to decompress via System.IO.Compression.ZipFile without Encoding enforcement. (See https://github.com/flipperdevices/flipperzero-firmware/issues/4024#issuecomment-2545385580)
* Scripts: fix line endings

Co-authored-by: あく <alleteam@gmail.com>
2024-12-23 11:55:58 +09:00
ru-asdx
dc73096966 using GITHUB_TOKEN to make API requests in scripts/get_env.py (#4033)
Co-authored-by: あく <alleteam@gmail.com>
2024-12-23 11:05:19 +09:00
WillyJL
33f1a16094 FBT: Don't lint JS packages (#4030)
Co-authored-by: あく <alleteam@gmail.com>
2024-12-23 09:52:37 +09:00
MX
bd348cf72d Merge remote-tracking branch 'OFW/dev' into dev 2024-12-21 17:37:08 +03:00
Evgeny E
8dd5e64c03 Move updater and unit tests to dockerized runner (#4028)
* extended unit_tests and changed to dockerized runner
* added branch to run units
* fixing unit-tests-output
* online output
* command not found fix
* added stm logging
* cleaned output
* Updated updater test to work on dockerized runner
* Test run for changed actions
* small refactor of run_unit_tests
* Final test of jobs
* Checked
* On-failure actions runs only on fail
* Set action trigger to pull request
* Bumped timeout a little
* Removed extra steps
* Removed stm monitor, as it's now part of docker-runner
* fix: testops without stm_monitoring
* fix: timeout extended


Co-authored-by: あく <alleteam@gmail.com>
2024-12-20 02:52:37 +09:00
MX
306e34c64b Merge remote-tracking branch 'OFW/dev' into dev 2024-10-07 04:47:24 +03:00
あく
0469ef0e55 FuriHal, drivers: rework gauge initialization routine (#3912)
* FuriHal, drivers: rework gauge initialization, ensure that we can recover from any kind of internal/external issue
* Make PVS happy
* Format sources
* bq27220: add gaps injection into write operations
* Drivers: bq27220 cleanup and various fixes
* Drivers: bq27220 verbose logging and full access routine fix
* Drivers: better cfg mode exit handling in bq27220 driver
* Drivers: rewrite bq27220 based on bqstudio+ev2400, experiments and guessing. Fixes all known issues.
* PVS: hello license check
* Drivers: minimize reset count in bq27220 init sequence
* Drivers: bq27220 hide debug logging, reorganize routine to ensure predictable result and minimum amount of interaction with gauge, add documentation and notes.
* Drivers: more reliable bq27220_full_access routine
* Drivers: replace some warning with error in bq27220
* Drivers: move static asserts to headers in bq27220
* Fix PVS warnings
* Drivers: simplify logic in bq27220

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-10-06 22:36:05 +04:00
MX
d91e390690 Merge remote-tracking branch 'OFW/dev' into dev 2024-10-02 23:18:30 +03:00
jay candel
3c93761d1d [IR] universal remote additions (#3922)
* multiple new additions
  Hisense K321UW, Soniq E55V13A, Soniq E32W13B and 2 others
* updated with proper names
  Viano STV65UHD4K
  Hisense K321UW
  Hisense EN2B27
  Soniq E55V13A
  Soniq E32W13B
* format tv.ir
* Update tv.ir
* new universal ac additions
  Maytag M6X06F2A
  Panasonic CS-E9HKR
* new universal audio additions
  Sony MHC_GSX75
  Elac EA101EQ-G
  Philips FW750C
  Pioneer VSX-D1-S
* remove final # audio.ir
* Scripts: update deprecated methods use in python scripts
* Scripts: add comment reading support to fff, preserve comments in infrared cleanup script
* Scripts: improved infrared files cleanup script
* Scripts: add missing new line at the end of file in infrared file cleanup script
* Infrared: cleanup universal remotes

Co-authored-by: あく <alleteam@gmail.com>
2024-10-02 17:28:24 +01:00
MX
e407c623e0 Revert "Merge remote-tracking branch 'OFW/portasynthinca3/3332-autolock-fixes' into dev"
This reverts commit ba4c4e528a, reversing
changes made to 16e4b9219a.
2024-09-26 21:58:50 +03:00
MX
ba4c4e528a Merge remote-tracking branch 'OFW/portasynthinca3/3332-autolock-fixes' into dev 2024-09-21 03:54:08 +03:00
Anna Antonenko
4a8202514d style: fix linter errors 2024-09-16 19:29:55 +03:00
Anna Antonenko
15b271bd92 fix: cli autolock inhibit 2024-09-16 16:27:24 +03:00
MX
56530ee61c Merge remote-tracking branch 'OFW/dev' into dev 2024-09-05 22:10:41 +03:00
あく
62bbf406be Debug: use proper hook for handle_exit in flipperapps (#3842)
* Debug: use proper hook for handle_exit in flipperapps
* fbt: flash firmware for `blackmagic` target

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-09-05 19:55:43 +01:00
Georgii Surkov
fa2d611652 [FL-3889] 5V on GPIO control for ext. modules (#3830)
* Make file extensions case-insensitive
* Bump protobuf version
* Add support for 5V control via RPC
* Add support for 5V control via Expansion protocol
* Update running instructions
* Update expansion module documentation
* Prettify condition
* Test RPC OTG control as well
* Assets: bump protobuf version
* Disable PVS license expiration check, fix PVS warnings

Co-authored-by: あく <alleteam@gmail.com>
2024-09-05 15:40:14 +01:00
MX
f6ebc13342 Merge remote-tracking branch 'OFW/dev' into dev 2024-08-12 12:41:59 +03:00
hedger
99655c15e4 scripts: improved size validator for updater image (#3834)
* scripts: update.py: reduced reservation size for flash memory; improved error messages; added checks for updater images
* scripts: update: fixed imports

Co-authored-by: あく <alleteam@gmail.com>
2024-08-12 10:09:41 +09:00
MX
821f5bab18 Merge remote-tracking branch 'OFW/dev' into dev 2024-08-10 14:47:38 +03:00
MX
28272f7a7a Storage: remove LFS (#3577)
* Storage: drop internal storage

* Storage: rollback some unnecessary changes

* Storage: rollback some unnecessary changes part 2

* Storage: cleanup various defines and int handling. Ble: allow short connection interval if internal flash is not used.

* Storage: do not return storage if it is not ready

* Save PIN code to RTC, update settings

* Simplify the code, clean up includes

* Rearrange some code

* apps: storage_move_to_sd: conditionally enable with --extra-define=STORAGE_INT_ON_LFS

* Load Desktop settings automatically

* Redirect /any to /ext

* Abolish storage_move_to_sd app

* Remove as many mentions of ANY_PATH as possible

* Fix desktop settings wrongly not loading

* Improve desktop settings handling and strings

* Load BLE settings and keys automatically

* Improve BLE configuration procedure

* Do not load bluetooth keys twice if they were already loaded

* Load dolphin state automatically

* Fix merge artifact

* Load notification settings automatically

* Update desktop settings strings

* Load expansion settings automatically

* Do not use thread signals to reload desktop settings

* Load region data automatically, separate to its own hook

* Improve ble behaviour with no keys

* Fix Dolphin state not resetting correctly

* Add a status check

* Make Desktop save its own settings

* Check result when taking and releasing mutex

* Improve default thread signal handling in FuriEventLoop

* Make bt service in charge of saving settings, add settings api

* Fix a deadlock due to timer thread not receiving time

* Lock core2 when reinitialising bt

* Update clang-format

* Revert "Update clang-format"

This reverts commit d61295ac063c6ec879375ceeab54d6ff2c90a9a1.

* Format sources with clang-format

* Revert old stack size for desktop settings

* Allocate big struct dynamically

* Simplify PIN comparison

* Save pointer to storage in Desktop object

* Fix region provisioning for hardware regions

* Remove stale TODO + siimplify code

* Clean up region.c

* Use sizeof instead of macro define

* Limit PIN length to 10 for consistency

* Emit a warning upon usage of /any

* Add delay after finding flipper

* Remove unnecessary delay

* Remove all mentions of STORAGE_INT_ON_LFS

* Remove littlefs and internal storage

* Remove all possible LittleFS mentions

* Fix browser tab in Archive

* Ble: fix connection interval explanation

* Bump API Symbols

* BLE: Update comments interval connection comments

* Storage: clear FuriHalRtcFlagStorageFormatInternal if set

---------

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-08-10 13:18:51 +03:00
Sean Skyhawk
41fcead710 Images linting: ensure that all images conform specification (#3802)
* Change all icons to be white background
* assets: re-processed all *.png images to 1-bit
* assets: also stripped profile data from .pngs
* assets: also stripped datetime from metadata (`-define png:exclude-chunks=date,time`)
* scripts: added image linter and formatter; fbt: added `lint_img` && `format_img` targets; github: integrated image lint step into CI
* scripts: imglint: fixed deprecation warning
* images: applied `format_img`
* fbt: added `lint_all` and `format_all` targets; docs: updated for new targets

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-08-07 11:57:32 +09:00
あく
4d985ba8f8 Storage: remove LFS (#3577)
* Storage: drop internal storage

* Storage: rollback some unnecessary changes

* Storage: rollback some unnecessary changes part 2

* Storage: cleanup various defines and int handling. Ble: allow short connection interval if internal flash is not used.

* Storage: do not return storage if it is not ready

* Save PIN code to RTC, update settings

* Simplify the code, clean up includes

* Rearrange some code

* apps: storage_move_to_sd: conditionally enable with --extra-define=STORAGE_INT_ON_LFS

* Load Desktop settings automatically

* Redirect /any to /ext

* Abolish storage_move_to_sd app

* Remove as many mentions of ANY_PATH as possible

* Fix desktop settings wrongly not loading

* Improve desktop settings handling and strings

* Load BLE settings and keys automatically

* Improve BLE configuration procedure

* Do not load bluetooth keys twice if they were already loaded

* Load dolphin state automatically

* Fix merge artifact

* Load notification settings automatically

* Update desktop settings strings

* Load expansion settings automatically

* Do not use thread signals to reload desktop settings

* Load region data automatically, separate to its own hook

* Improve ble behaviour with no keys

* Fix Dolphin state not resetting correctly

* Add a status check

* Make Desktop save its own settings

* Check result when taking and releasing mutex

* Improve default thread signal handling in FuriEventLoop

* Make bt service in charge of saving settings, add settings api

* Fix a deadlock due to timer thread not receiving time

* Lock core2 when reinitialising bt

* Update clang-format

* Revert "Update clang-format"

This reverts commit d61295ac063c6ec879375ceeab54d6ff2c90a9a1.

* Format sources with clang-format

* Revert old stack size for desktop settings

* Allocate big struct dynamically

* Simplify PIN comparison

* Save pointer to storage in Desktop object

* Fix region provisioning for hardware regions

* Remove stale TODO + siimplify code

* Clean up region.c

* Use sizeof instead of macro define

* Limit PIN length to 10 for consistency

* Emit a warning upon usage of /any

* Add delay after finding flipper

* Remove unnecessary delay

* Remove all mentions of STORAGE_INT_ON_LFS

* Remove littlefs and internal storage

* Remove all possible LittleFS mentions

* Fix browser tab in Archive

* Ble: fix connection interval explanation

* Bump API Symbols

* BLE: Update comments interval connection comments

* Storage: clear FuriHalRtcFlagStorageFormatInternal if set

---------

Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-08-04 10:54:02 +01:00
MX
e74e6cdd02 Merge remote-tracking branch 'OFW/dev' into dev 2024-07-31 22:38:15 +03:00