251 Commits

Author SHA1 Message Date
MX
f4529dc8c1 Merge remote-tracking branch 'OFW/dev' into dev 2025-09-29 23:11:36 +03:00
Ivan Barsukov
1e0f3a606f cli: Buzzer command (#4006)
* Add args_read_float_and_trim function

* Add args_read_duration function

* Add notes_frequency_from_name function

* Add cli_sleep function and sleep CLI command

* Update CLI top command to use cli_sleep

* Add buzzer CLI command

* toolbox: make args_read_duration less convoluted

* notification: make notification_messages_notes_frequency_from_name less convoluted

* unit_tests: better float checking

* fix formatting and f18

---------

Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
2025-09-29 21:53:10 +04:00
Nathan N
e7634d7563 NFC: Ultralight C App Key Management, Dictionary Attack (#4271)
* Upstream Ultralight C dictionary attack (squashed)

* linter: formatting

* unit_tests: nfc: split nfc data to named var

* Fix mf_ultralight_poller_sync_read_card

* linter: suppressed warnings on TODOs

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2025-09-29 21:05:06 +04:00
MX
958cc79596 Merge remote-tracking branch 'OFW/dev' into dev 2025-09-29 16:33:57 +03:00
RebornedBrain
eea53491de [FL-3569] NFC CLI commands (#4158)
* 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

* Now cli_shell can be customized with another motd and another command set

* Added custom motd callback definition

* Now user can alloc and free his own cli command set

* cli_vcp can now restart shell with another command set

* Help command modified to show available commands from different command sets

* Api adjustement

* Reworked nfc_cli to start new shell with another command set

* Revert custom shell changes from vcp

* Custom motd callback moved to cli_shell

* Cli Shell now can be started from ongoing cli command

* Help command moved to a separate function so it can be used for custom shell

* Now nfc command spawns separate shell for further nfc commands

* cli_shell: give up pipe to command thread

* fix formatting

* cli_shell: separate into toolbox

* speaker_debug: fix

* fix: format

* Merge branch 'portasynthinca3/3928-3929-cli-fals-threads' into portasynthinca3/3965-cli_shell-toolbox

* fix merge

* fix. merge.

* fix formatting

* fix: cmd flags

* fix: formatting

* Added basic command descriptor structs and macros

* Basic nfc commands definitions added

* Nfc cli commands collection and functions added

* Raw skeleton of nfc cli processor added

* cli: increase default stack depth

* New callbacks for ctx alloc / free added

* nfc_cli moved to cli folder

* Some more logic for command processor

* Scanner command no works via command_processor

* plugin manifest adj

* Argument descriptors were removed, now only keys left

* Some helper command function implemented

* Command processor logic now mostly works

* Added all parsers and dummy implementation of raw cmd

* Now processor checks duplicated keys and treat them as errors

* Some renamings

* Arguments processing moved to separate function

* Now command processor can reuse context of previuos command for the next one if it's allowed

* can_reuse callback added for checking if context can be reused

* command processor is now freed on nfc cli exit

* Some cleanups

* First working version of raw command

* Now input data are placed directly to bit buffer

* Added tag

* Introduced request/response structs

* Moved raw command to a separate folder

* Moved some common types to header

* Added protocol specific handlers for iso14a and felica

* Opened felica crc header for referencing

* Added handler for iso14443_3b

* Opened iso15693_3_poller for referencing

* Added iso15693_3 handler for raw command

* NfcCliRawError enum introduced for response result

* Refactored handlers implementation

* Formatting functions now added as helpers

* New printing result logic

* Not present error value added to enum

* Timeout added to raw command

* Command processor now supports multivalue keys

* Apdu command implementation added

* NfcScanner moved to helpers and command now uses it

* Helper now can format protocol names

* Dump command added

* Added some more functions to scanner helper

* Dump main logic simplified

* Dump handlers moved to protocols folder

* Protocol parser added to simplify searching protocol by name

* Protocol and key arguments added to dump command

* Cleanups

* Apdu now parses protocol using helper parser

* Raw now parses protocol using helper parser

* Wrong naming fix

* Emulate command added to cli

* Description added to action descriptor and command macros

* Description field added to all commands

* Removed unnecessary enum for commands

* Added functions for formatting command and action info

* Proper error messages and help added

* Fix for unsupported single action command

* Function renamed to more appropriate

* Field command moved to all other commands

* Cleanups

* Nfc commands modified with new cli shell

* Removed previous nfc_cli.c after merge

* Removed nfc_cli.h header

* Some renamings and cleanups

* Some comments and instructions added

* Some comments and instructions added

* TODOs removed

* Fix for missing parse callback

* Added not implemented dummy for mfu actions, for now

* Fix name mismatch

* Remove unneeded header

* Mfu command moved to separate folder, also raw info action logic added

* Dictionary with id/vendors added to assets. It is used by nfc_cli_mfu_info_get_vendor function

* One more unneeded header removed

* Moved mfu info action to a separate file

* Info action now uses sync mfu poller

* mfu rdbl action added

* wrbl action added for mfu command

* Some formatting for rdbl command

* Function for formatting mfu errors added

* All mfu actions now show errors in the same way

* Fix error with sync poller. Previously when read failed function returned ErrorNone, now it processes iso14a error to get proper value

* Make PVS happy

* Nfc cli now doesn't start if desktop app is running

* Make action description look more common

* Scanner now has -t key and can show detected protocol hierarchies

* Apdu now checks max input payload data

* Proper format

* Proper error handling added to dump command

* Timeout key added dump command

* Fix merge issue

* formatting

* Pragma pack replaced with FURI_PACKED

* Fix felica memory leak

---------

Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2025-09-29 14:34:49 +04:00
MX
93b4ad4595 Merge remote-tracking branch 'OFW/dev' into dev 2025-09-24 22:32:16 +03:00
Anna Antonenko
d0360625d6 [FL-3925] JS views finished (#4155)
* js: value destructuring and tests

* js: temporary fix to see size impact

* js_val: reduce code size 1

* i may be stupid.

* test: js_value args

* Revert "js: temporary fix to see size impact"

This reverts commit f51d726dbafc4300d3552020de1c3b8f9ecd3ac1.

* pvs: silence warnings

* style: formatting

* pvs: silence warnings?

* pvs: silence warnings??

* js_value: redesign declaration types for less code

* js: temporary fix to see size impact

* style: formatting

* pvs: fix helpful warnings

* js_value: reduce .rodata size

* pvs: fix helpful warning

* js_value: reduce code size 1

* fix build error

* style: format

* Revert "js: temporary fix to see size impact"

This reverts commit d6a46f01794132e882e03fd273dec24386a4f8ba.

* style: format

* js: move to new arg parser

* style: format

* feat: all js views done

* js, toolbox: generalize string owning

* toolbox: silence pvs warning

---------

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-09-24 23:24:28 +04:00
MMX
30077dd512 Fix PVS warnings (#4277)
* Fixing PVS warns

* pvs: additional fixes

---------

Co-authored-by: hedger <hedger@nanode.su>
2025-09-24 21:00:39 +04:00
WillyJL
ad94694fbd CLI: Fix long delay with quick connect/disconnect (#4251)
* CLI: Fix long delay with quick connect/disconnect

noticeable with qflipper, for some reason it sets DTR on/off/on again
so flipper starts CLI, stops it, then starts again
but cli shell is trying to print motd, and pipe is already broken
so each character of motd times out for 100ms
changing pipe timeout to 10ms works too, but is just a workaround

it didnt always happen, i think that variable time of loading ext cmds
made it so on ofw it usually manages to print motd before pipe is broken
on cfw with more ext commands it always hung, on ofw only sometimes

important part is bailing early in cli shell
in cli vcp i made it cleanup cli shell on disconnect so it doesnt stay
around after disconnecting usb, might free a little ram maybe

* cli_shell: possibly more robust fix?

* Fix use after free crash

* cli_shell: waste even less time

Co-Authored-By: WillyJL <me@willyjl.dev>

---------

Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-09-24 13:19:18 +04:00
WillyJL
470f6a679d CLI: Fix crash with unexpected plugin files (#4243) 2025-09-22 22:08:29 +04:00
MX
2c2228a4b9 merge ofw pr 4271
also thanks WillyJL
link to PR
https://github.com/flipperdevices/flipperzero-firmware/pull/4271/files
2025-09-21 16:45:31 +03:00
MX
6a2f062234 OFW PR. 4251 CLI: Fix long delay with quick connect/disconnect
by WillyJL
2025-07-30 03:43:36 +03:00
MX
c5d077fc7a various fixes
by WillyJL
2025-05-11 19:38:34 +03:00
MX
2e4a838202 Merge remote-tracking branch 'OFW/dev' into dev 2025-04-18 20:45:06 +03:00
Anna Antonenko
5b911f5405 RC fixes (#4192)
* cli_shell: fix FL-3983

* fix formatting and submodules

* loader: fix FL-3986

* fix submodules

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-04-18 16:41:13 +04:00
Anna Antonenko
e1bccf66b3 Fix NULL dereference in CLI completions (#4184)
* cli_completions: fix null dereference

* cli: mark free_blocks as parallel safe

* codeowners: add me to co-owners of cli
2025-04-11 23:38:28 +01:00
MX
638182a5ff Merge remote-tracking branch 'OFW/porta/cli-deref-fix' into dev 2025-04-12 00:59:58 +03:00
Anna Antonenko
936096d2fc cli_completions: fix null dereference 2025-04-12 01:58:28 +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
4140952605 cli_registry: move from bptree to dict, fix memory leak 2025-04-08 18:05:08 +04:00
Anna Antonenko
9a6aa17bee cli_shell: add safety check to set_prompt 2025-04-08 16:02:33 +04:00
MX
edb327e50a Merge remote-tracking branch 'OFW/dev' into dev 2025-04-07 18:01:37 +03:00
Anna Antonenko
eb0f5ef8c0 [FL-3947] Pinning of settings options (#4077)
* feat: pinning settings in favorites

* include archive in unit tests fw

* change settings icon

* update text with suggestions from the ui team

* Small touch of constness

---------

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2025-04-07 03:17:58 +04:00
MX
c8fc2fa7b3 Merge remote-tracking branch 'OFW/dev' into dev 2025-04-06 01:54:22 +03:00
Anna Antonenko
7192c9e68b [FL-3965] Separate cli_shell into toolbox (#4175)
* cli_shell: separate into toolbox

* fix: cmd flags

* fix formatting

* cli: increase default stack depth

* cli_shell: fix loader lock logic

* cli: fix command flags

* fix f18

* speaker_debug: fix

* cli_registry: fix docs

* ufbt: rename cli target back

* cli: rename app and record

* cli: fix and simplify help command

* cli_master_shell: fix ext commands

* fix formatting

* cli: rename master to main

* fix formatting

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-04-05 02:58:58 +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
WillyJL
0eb3fc33dd NFC: Fix NDEF parser for MIFARE Classic (#4153)
* Add div() to API

* Revert "Add div() to API"

This reverts commit e03b5c42449365735ce3d2fc73a4e801c4d5f91f.

* Use / and %

* NFC: More MFC NDEF fixes

* Simplify duplicated code in MFC data generator

* NFC: Print NDEF hex data with pretty format

* NFC: Consider NDEF strings with last \0 byte as text

* Pretty Format: Add padding to last line to keep table width

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-04-01 00:34:54 +04: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
MX
6cc4976568 NFC: Fix NDEF parser for MIFARE Classic [ci skip]
by Willy-JL in OFW PR 4153
2025-03-28 14:10:16 +03:00
MX
b38d239eb8 Merge remote-tracking branch 'OFW/hedger/more-constness' into dev [ci skip] 2025-02-24 21:18:11 +03:00
MX
9f4b1aead7 Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2025-02-23 18:35:22 +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
Anna Antonenko
ef024e8086 [FL-3958] Stdio API improvements (#4110)
* improve thread stdio callback signatures
* pipe stdout timeout
* update api symbols

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2025-02-22 08:11:27 +09:00
MX
7e1dae67a3 remove from api [ci skip] 2025-02-13 20:24:24 +03:00
MX
dea16b7055 add missing api [ci skip] 2025-02-13 20:20:25 +03:00
MX
189c87cb08 Merge remote-tracking branch 'OFW/dev' into dev 2024-12-24 14:04:07 +03:00
Anna Antonenko
5fd423951b [FL-3933] Pipe (#3996)
* 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
* refactor: move pipe out of furi and decouple from event loop
* chore: api versioning
* Bump api versions
* refactor: rename pipe_set_pipe_broken_callback
* Toolbox: add missing pragma once

Co-authored-by: あく <alleteam@gmail.com>
2024-12-24 10:58:27 +09:00
Nathan N
8427ec0098 MIFARE Classic Key Recovery Improvements (#3822)
* Initial structure for nonce collection
* Nonce logging
* Dictionary attack structure
* Fix compilation
* Identified method to reduce candidate states
* Use EXT_PATH instead of ANY_PATH
* Use median calibrated distance, collect parity bits
* Modify parity collection
* Fixed parity bit collection
* Add note to fix nonce logging
* Fix nonce logging
* Clean redundant code
* Fix valid_nonce
* First attempt disambiguous nonce implementation
* FM11RF08S backdoor detection
* Initial accelerated dictionary attack for weak PRNGs
* Refactor to nested dictionary attack
* Renaming some variables
* Hard PRNG support for accelerated dictionary attack
* Update found keys, initial attempt
* Update found keys, second attempt
* Code cleanup
* Misc bugfixes
* Only use dicts in search_dicts_for_nonce_key if we have them
* Collect nonces again
* Should be detecting both backdoors now
* Relocate backdoor detection
* Hardnested support
* Fix regression for regular nested attack
* Backdoor read
* Backdoor working up to calibration
* Backdoor nested calibration
* Don't recalibrate hard PRNG tags
* Static encrypted nonce collection
* Update TODO
* NFC app UI updates, MVP
* Bump f18 API version (all functions are NFC related)
* Add new backdoor key, fix UI status update carrying over from previous read
* Clear TODO line
* Fix v1/v2 backdoor nonce collection
* Speed up backdoor detection, alert on new backdoor
* Add additional condition to backdoor check
* I'll try freeing memory, that's a good trick!
* Do not enter nested attack if card is already finished
* Do not reset the poller between collected nonces
* Clean up various issues
* Fix Hardnested sector/key type logging
* Add nested_target_key 64 to TODO
* Implement progress bar for upgraded attacks in NFC app
* Typo
* Zero nested_target_key and msb_count on exit
* Note TODO (malloc)
* Dismiss duplicate nonces
* Fix calibration (ensure values are within 3 standard deviations)
* Log static
* No nested dictionary attack re-entry
* Note minor inefficiency
* Uniformly use crypto1_ prefix for symbols in Crypto1 API
* Fix include paths
* Fix include paths cont
* Support CUID dictionary
* Fix log levels
* Avoid storage errors, clean up temporary files
* Handle invalid key candidates
* Fix memory leak in static encrypted attack
* Fix memory leak, use COUNT_OF macro
* Use single call to free FuriString
* Refactor enums to avoid redefinition
* Fix multiple crashes and state machine logic
* Fix inconsistent assignment of known key and known key type/sector
* Backdoor known key logic still needs the current key
* Larger data type for 4K support
* Fix typo
* Fix issue with resume logic
* Mark TODOs for next PR
* Remove redundant assignment
* Fix size_t format specifier
* Simplify auth_passed condition

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-10-31 09:53:58 +09:00
MX
9bb3853c80 Merge remote-tracking branch 'noproto/nestednonces' into dev 2024-10-05 05:02:08 +03:00
Nathan N
232560f8e9 Merge branch 'dev' into nestednonces 2024-10-03 11:38:09 -04:00
MX
d91e390690 Merge remote-tracking branch 'OFW/dev' into dev 2024-10-02 23:18:30 +03:00
Astra
00c1611c33 Improve bit_buffer.h docs (#3783)
* Improve bit_buffer.h docs
* Toolbox: update doxygen comments fix spelling
* Toolbox: update bit lib docs

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-10-02 18:51:07 +01:00
Aleksandr Kutuzov
9ea7a4671a Merge remote-tracking branch 'origin/dev' into nestednonces 2024-09-07 13:47:07 +01:00
MX
56530ee61c Merge remote-tracking branch 'OFW/dev' into dev 2024-09-05 22:10:41 +03:00
porta
c9791a280a [FL-3884] Proper integer parsing (#3839)
* feat: strint_to_uint32 and tests
* fix: permit explicit bases and prefixes
* feat: strint_to_{int32,uint16,int16}
* feat: strint_to_u?int64
* refactor: replace strtol, strtoul, sscanf with strint_to_*
* fix: api symbols
* docs: document parameter `end` of strint_to_uint_32
* style: apply changes requested by hedger
* refactor: fix pvs-studio diagnostic
* style: apply changes requested by CookiePLMonster
* fix: unused var
* fix: pointer type
* refactor: convert atoi to strint_to_*
* fix: strint_to_uint8 doesn't actually exist ._ .
* fix: memory leak
* style: address review comments
* Toolbox: couple small comments in the code and doxygen comment update. SubGhz, Loader: fix strint usage.
* Loader: fix incorrect cast

Co-authored-by: あく <alleteam@gmail.com>
2024-09-05 18:02:42 +01:00
noproto
8d1a2203ae Merge remote-tracking branch 'origin/dev' into nestednonces 2024-08-15 10:58:32 -04:00
MX
bf6c6c231f [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-10 14:32:27 +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
noproto
8dd3daf625 Fixed parity bit collection 2024-08-09 20:22:19 -04:00