82 Commits

Author SHA1 Message Date
Willy-JL
a0619c01d7 Merge remote-tracking branch 'ofw/dev' into mntm-dev --nobuild 2025-04-01 07:42:00 +00:00
Anna Antonenko
79bb24406e Reduced ieee754 parser size (#4154)
Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-03-31 08:24:27 +04:00
Willy-JL
5f98c5d986 Merge remote-tracking branch 'ofw/dev' into yeet-lfs 2024-08-13 02:27:09 +02:00
Georgii Surkov
f4122a924a [FL-3841] FuriEventLoop Pt.2 (#3703)
* Abstract primitive type from main logic in FuriEventLoop
* Remove message_queue_i.h
* Add stream buffer support for event loop
* Add semaphore support for event loop
* Add temporary unit test workaround
* Make the linter happy
* Add mutex support for event loop
* Implement event subscription and unsubscription while the event loop is running
* Implement edge events
* Fix leftover logical errors
* Add event loop timer example application
* Implement flag-based edge trigger and one-shot mode
* Add event loop mutex example application
* Only notify the event loop if stream buffer is at or above its trigger level
* Reformat comments
* Add event loop stream buffer example application
* Add event loop multiple elements example application
* Improve event loop flag names
* Remove redundant signal handler as it is already handled by the event loop
* Refactor Power service, improve ViewHolder
* Use ViewHolder instead of ViewDispatcher in About app
* Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue()
* Remove all invocations of view_dispatcher_enable_queue()
* Remove app-scened-template
* Remove missing library from target.json
* Port Accessor app to ViewHolder
* Make the linter happy
* Add example_view_holder application, update ViewHolder docs
* Add example_view_dispatcher application, update ViewDispatcher docs
* Replace FuriSemaphore with FuriApiLock, remove workaround delay
* Fix logical error
* Fix another logical error
* Use the sources directive to speed up compilation
* Use constant define macro
* Improve FuriEventLoop documentation
* Improve FuriEventLoop documentation once more
* Bump API Version
* Gui: remove redundant checks from ViewDispatcher
* Gui: remove dead ifs from ViewDispatcher

Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-08-07 12:49:41 +09:00
Willy-JL
b8a6579379 Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-08-05 20:05:13 +02: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
Willy-JL
0b91b2e31f Merge remote-tracking branch 'ofw/dev' into mntm-dev 2024-07-10 22:38:00 +01:00
hedger
3d7cd57371 [FL-3553] lib: sconscript todo cleanup (#3769)
Co-authored-by: あく <alleteam@gmail.com>
2024-07-10 16:51:19 +01:00
WillyJL
b18ac01485 Updater: Gzip resources dejavu, refactor for CompressStreamDecoder API (#152)
* Add back uzlib

* FBT: Support different resources compress methods

* Tar: Detect gzip compress type

* Tar: Generic compressed stream refactor

* Compress: Shared config params

* Fix comment

* Compress: Scaffolding for gzip implementation

* Compress: Handle errors from allocation

* Compress: Gzip support implementation

* Tar/Compress: Don't rewind if already at stream cursor

* Update changelog
2024-07-03 02:26:59 +02:00
Willy-JL
9b41168e85 Revert gzip resources (OFW made heatshrink equivalent)
- a83845aec4
- 9b748ea792
2024-07-01 22:33:32 +02:00
Willy-JL
7ffcf97acb Revert TLSF 2024-06-17 02:41:13 +02:00
Willy-JL
5b8a9dcf9f Merge branch 'zlo/tlsf-and-a-temple-of-memcorrupt' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev 2024-06-11 23:29:18 +02:00
SG
d4b70a6aa6 tlsf: third encounter, now with aligment by 8 2024-06-11 15:19:30 +01:00
Willy-JL
4659c68eef Merge branch 'zlo/tlsf-and-a-temple-of-memcorrupt' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev 2024-05-16 21:49:35 +01:00
Willy-JL
54d2763177 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev 2024-05-16 21:47:58 +01:00
Sergei Gavrilov
e90dc38e4d TLSF memory allocator. Less free flash, moar free ram. (#3572)
* add tlsf as submodule
* libs: tlsf
* Furi: tlsf as allocator
* Furi: heap walker
* shmal fixshesh
* f18: tlsf
* PVS: ignore tlsf
* I like to moving
* merge upcoming changes
* memmgr: alloc aligned, realloc
* Furi: distinct name for auxiliary memory pool
* Furi: put idle and timer thread to mem2
* Furi: fix smal things in allocator
* Furi: remove aligned_free. Use free instead.
* aligned_malloc -> aligned_alloc
* aligned_alloc, parameters order
* aligned_alloc: check that alignment is correct
* unit test: malloc
* unit tests: realloc and test with memory fragmentation
* unit tests: aligned_alloc
* update api
* updater: properly read large update file

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-05-16 19:52:26 +01:00
あく
7c63bf7574 Revert "TLSF memory allocator. Less free flash, moar free ram. (#3572)" (#3651)
* Revert "TLSF memory allocator. Less free flash, moar free ram. (#3572)"

This reverts commit 1d17206e23.

* Fix PVS warnings

* github: logging for ticket number checks to stdout

* memgr: removed offending todo

---------

Co-authored-by: hedger <hedger@nanode.su>
2024-05-16 18:43:27 +04:00
Sergei Gavrilov
1d17206e23 TLSF memory allocator. Less free flash, moar free ram. (#3572)
* add tlsf as submodule
* libs: tlsf
* Furi: tlsf as allocator
* Furi: heap walker
* shmal fixshesh
* f18: tlsf
* PVS: ignore tlsf
* I like to moving
* merge upcoming changes
* memmgr: alloc aligned, realloc
* Furi: distinct name for auxiliary memory pool
* Furi: put idle and timer thread to mem2
* Furi: fix smal things in allocator
* Furi: remove aligned_free. Use free instead.
* aligned_malloc -> aligned_alloc
* aligned_alloc, parameters order
* aligned_alloc: check that alignment is correct
* unit test: malloc
* unit tests: realloc and test with memory fragmentation
* unit tests: aligned_alloc
* update api
* updater: properly read large update file

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-05-15 16:47:21 +01:00
Willy-JL
f2074ae4c3 Merge branch 'zlo/zlib-tests' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev 2024-05-02 05:10:22 +01:00
Willy-JL
d81e72d0a6 Merge branch 'zlo/allocator-playground' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev 2024-04-09 22:15:50 +01:00
SG
39899a9b0d libs: tlsf 2024-04-04 22:04:17 +03:00
Willy-JL
b7220237de Small bump in the road
- Update assets and references for new project
- Revert DFU image and CLI motd
- Remove NSFW text and flag
- Remove credits animation (will be replaced with a setting menu soon)
- New EvilPortal example HTML and better error message
- Initial standalone naming for asset packs and mainmenu apps
- File migration fixes/improvements
- Remove hotfix workflow
2024-03-01 06:11:16 +00:00
Willy-JL
b4932e3f45 Merge branch 'hedger/toochain_29' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2024-02-22 23:11:15 +00:00
hedger
90a8009d43 libs: moved callback-connector to accessor app 2024-02-21 15:53:34 +00:00
Willy-JL
92fb61f585 Merge branch 'hedger/toochain_29' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2024-02-21 03:00:41 +00:00
hedger
02a827da38 libs: added callback-connector to SDK 2024-02-19 09:35:01 +00:00
Willy-JL
ef3cfea721 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2024-02-16 12:53:07 +00:00
hedger
60a9d7e6cf ble: profile rework (#3272)
* ble: profile rework, initial
* apps: hid: fix for pairing cleanup
* app: hid: select transport based on #define
* fixing PVS warnings
* ble: serial service: fixed uid naming
* bt service: on-demand dialog init; ble profiles: docs; battery svc: proper update
* Added shci_cmd_resp_wait/shci_cmd_resp_release impl with semaphore
* app: hid: separated transport code
* ble: fixed service init order for serial svc; moved hardfault check to ble_glue
* cli: ps: added thread prio to output, fixed heap display
* ble_glue: naming changes; separate thread for event processing;
* furi: added runtime stats; cli: added cpu% to `ps`
* cli: fixed thread time calculation
* furi: added getter for thread priority
* fixing pvs warnings
* hid profile: fixed naming
* more naming fixes
* hal: ble init small cleanup
* cleanup & draft beacon api
* f18: api sync
* apps: moved example_custom_font from debug to examples
* BLE extra beacon demo app
* naming fix
* UI fixes for demo app (wip)
* desktop, ble svc: added statusbar icon for beacon
* minor cleanup
* Minor cleanup & naming fixes
* api sync
* Removed stale header
* hal: added FURI_BLE_EXTRA_LOG for extra logging; comments & code cleanup
* naming & macro fixes
* quick fixes from review
* Eliminated stock svc_ctl
* cli: ps: removed runtime stats
* minor include fixes
* (void)
* naming fixes
* More naming fixes
* fbt: always build all libs
* fbt: explicitly globbing libs; dist: logging SDK path
* scripts: fixed lib path precedence
* hal: bt: profiles: naming changes, support for passing params to a profile; include cleanup
* ble: hid: added parameter processing for profile template
* api sync
* BLE HID: long name trim
* Removed unused check
* desktop: updated beacon status icon; ble: hid: cleaner device name management
* desktop: updated status icon

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: nminaylov <nm29719@gmail.com>
2024-02-16 14:20:45 +07:00
Willy-JL
fe0ff08c52 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2024-02-15 22:48:18 +00:00
Leptopt1los
feb45f6645 FuriHalRtc refactor: new datetime lib (#3386)
* datetimelib created
* datetimelib unit tests added
* firmware fixes to new datetimelib
* typo fix
* merge artifacts fixed, datetimelib renamed to datetime

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-15 10:44:41 +07:00
Willy-JL
6ef8e40874 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2024-02-14 10:00:02 +00:00
Leptopt1los
dd988ba449 bit_lib and nfc_util refactor (#3383)
* nfc_util functions for processing bytes moved into bit_lib
* bitlib test update
* bit_lib moved from lfrfid to standalone lib
* Added bit functions for any supported data types
* Error fix and api add
* Added test for 64
* Added doc
* Testcase for 64 rewrited
* Realization error fix
* API version bump
* sync api version, fix after-merge old libs usage
* fix build errors
* build fix
* fbt format

Co-authored-by: assasinfil <nfa57643@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-02-14 11:41:42 +07:00
Willy-JL
4027db5156 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2024-02-12 16:43:26 +00:00
Nikolay Minaylov
0154018363 [FL-3579, FL-3601, FL-3714] JavaScript runner (#3286)
* FBT: cdefines to env, libs order
* API: strtod, modf, itoa, calloc
* Apps: elk js
* Apps: mjs
* JS: scripts as assets
* mjs: composite resolver
* mjs: stack trace
* ELK JS example removed
* MJS thread, MJS lib modified to support script interruption
* JS console UI
* Module system, BadUSB bindings rework
* JS notifications, simple dialog, BadUSB demo
* Custom dialogs, dialog demo
* MJS as system library, some dirty hacks to make it compile
* Plugin-based js modules
* js_uart(BadUART) module
* js_uart: support for byte array arguments
* Script icon and various fixes
* File browser: multiple extensions filter, running js scripts from app loader
* Running js scripts from archive browser
* JS Runner as system app
* Example scripts moved to /ext/apps/Scripts
* JS bytecode listing generation
* MJS builtin printf cleanup
* JS examples cleanup
* mbedtls version fix
* Unused lib cleanup
* Making PVS happy & TODOs cleanup
* TODOs cleanup #2
* MJS: initial typed arrays support
* JS: fix mem leak in uart destructor

Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-12 15:54:32 +07:00
Willy-JL
05ae0dbf14 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into dev 2023-12-02 06:09:01 +00:00
hedger
890c9e87ce [FL-3690] Libraries cleanup; u2f crypto rework to use mbedtls (#3234)
* examples: plugins: utilize fal_embedded
* libs: removed fnv1a_hash
* furi: added FURI_PACKED; apps, libs: changed to use FURI_PACKED
* lib: mbedtls: using custom config
* lib: toolbox: removed md5, switched to mbedtls
* targets: f18: link fix
* lib: added mbedtls_cfg.h
* apps: nfc: explicit dependency on libmbedtls
* u2f: reworking to mbedtls
* u2f: replaced sha256 & hmac with mbedtls
* u2f: functional rework using mbedtls
* libs: dropped micro-ecc
* u2f: dropped old implementation
* toolbox: removed sha256 impl
* mcheck() for mbedtls
* libs: removed libmisc; split into smaller libs
* apps: debug: fixed display_test
* apps: include cleanups
* fbt: fixed VERSIONCOMSTR
* furi: added FURI_CHECK_RETURN
* lib: removed qrcode
* cleanup
* fbt: lint_py+format_py: fixed excessive command length
* api: Removed bzero from f7
* api: Removed bzero from f18
* Bump API Symbols

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 18:16:48 +09:00
Willy-JL
aa1e50e653 Merge branch 'nfcrefactoring' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev 2023-11-12 01:04:33 +00:00
gornekich
d92b0a82cc NFC refactoring (#3050)
"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring.

Starring:

- @gornekich - NFC refactoring project lead, architect, senior developer
- @gsurkov - architect, senior developer
- @RebornedBrain - senior developer

Supporting roles:

- @skotopes, @DrZlo13, @hedger - general architecture advisors, code review
- @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance

Special thanks:

@bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
2023-10-24 12:08:09 +09:00
SG
14c0240411 Storage: unzip 2023-10-18 16:03:34 +03:00
Willy-JL
17a6822a09 Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev 2023-08-27 22:14:33 +02:00
Astra
e353433cd8 [FL-3488] Assign tickets to all TODO items (#2988)
Co-authored-by: あく <alleteam@gmail.com>
2023-08-23 02:56:27 +09:00
Willy-JL
ad4b43d096 Lint xtreme lib too 2023-07-29 02:34:52 +02:00
Willy-JL
f0701c79e1 Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev 2023-06-29 20:23:33 +02:00
Sergey Gavrilov
95c1585df6 [FL-3211][FL-3212] Debug apps: speaker, uart_echo with baudrate (#2812)
* Music player: move music_worker to library
* Music player: drop cli
* Debug: speaker debug app
* Debug: baudrate arg in uart_echo app
* Libs: add music_worker to api
* Libs: add music_worker to targets linker_dependencies

Co-authored-by: あく <alleteam@gmail.com>
2023-06-29 20:23:04 +09:00
Willy-JL
8f37a6a79d Asset packs in FAPs + cleanup unused icons 2023-06-29 02:03:32 +02:00
Willy-JL
f2bfc5301f Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev 2023-06-02 22:27:42 +01:00
gornekich
1d7966f74e NFC: fix MFC timings (#2719)
* digital signal: add optimization
* nfc test: more restrict tests
* digital signal: build as separate library
* digital signal: remove unused flags, format sources
* digital signal: fix cflag name
* target: fix build for f18 target

Co-authored-by: あく <alleteam@gmail.com>
2023-06-01 21:37:47 +09:00
Willy-JL
805f14b996 Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev 2023-05-22 14:27:27 +01:00
MX
aab4d2bd34 API CleanUp part 3 2023-05-22 03:45:17 +03:00
Willy-JL
ee0212d05d Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev 2023-05-10 15:59:20 +01:00