1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

Compare commits

..

911 Commits

Author SHA1 Message Date
Methodius
3afee368de electra non-initialized encoded epilogue on render fix 2024-05-24 20:33:34 +03:00
MX
e8cbce6e1d Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2024-05-24 20:25:40 +03:00
gornekich
ab2fcaf4ab [FL-3829] NFC App: fix changing UID (#3663)
* nfc app: fix changing uid on each byte change
* nfc app: remove unused code
2024-05-23 13:46:00 +01:00
MX
8a58fc1ca7 Merge remote-tracking branch 'OFW/dev' into dev 2024-05-23 00:33:57 +03:00
hedger
807bec14b1 Replaced obsolete-format delay (#3660) 2024-05-22 19:13:28 +01:00
あく
8ba938cec1 [FL-3775] Archive: fix condition race on exit (#3659)
* Archive: fix condition race on exit

* Format sources and remove debug logging

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-05-22 21:35:59 +04:00
gornekich
11070c9e5e Text Box: fix displaying text with end text focus (#3658)
* text box: fix reset text offset state after initial text iteration
* debug: add tests for text box view debug app
* hal: flash: removed redundant #else

Co-authored-by: hedger <hedger@nanode.su>
2024-05-22 18:14:33 +01:00
MX
6a91588f52 Merge remote-tracking branch 'OFW/dev' into dev 2024-05-21 01:34:05 +03:00
あく
e0797131ec FuriHal: add flash ops stats, workaround bug in SHCI_C2_SetSystemClock (#3657)
* FuriHal: add flash ops stats, workaround bug in SHCI_C2_SetSystemClock
* hal: flash: added FLASH_OP_DEBUG to enable latency measurement

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-05-20 19:17:01 +01:00
hedger
9e42e00ead Icons: compression fixes & larger dimension support (#3564)
* toolbox, gui: fixes for compressed icon handling
* ufbt: fixes for generated vscode project
* scripts: increased max dimensions for image converter
* icon type changes
* linter fixes; api sync
* gui: docs fix
* toolbox: fixed potential decoder buffer overflow
* minor cleanup
* fbt: sdk: suppressed deprecation warnings in API table
* toolbox: compress: added unit tests
   vscode: now installs resources for unit_tests
   unit_tests: now loads subghz region data
* toolbox: compress: review fixes, pt 1
* compress: now passes decoder buffer size as constructor argument; auto-resize decoder buffer; crash on failed icon decompression
* PVS fixes
* pvs fixes, pt2
* doxygen fixes
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* investigating unit test failures
* UnitTests: move all tests into plugins, brakes testing
* UnitTests: add plugin API and update plugin entrypoints
* UniTests: Test runner that works with plugins
* fbt: extra filtering for extapps to include in build
* UnitTests: filter tests by name
* loader: restored API table for unit_test build config
* Add various missing symbols to API table
* UnitTest: fail on plugin load error
* UnitTests: cleanup plugin api and reporting
* unit_tests: composite resolver
* UnitTests: remove unused declaration
* unit_tests, nfc: moved mock nfc implementation to libnfc
* unit_tests: api: removed redundant #define
* toolbox: compress: removed size_hint for icons; triggering furi_check on oversized icons
* gui: icon, icon_animation: removed size hit APIs
* Format Sources. Cleanup code.
* loader: refuse to start .fal as app
* toolbox: compress: fixed memory corruption in operations with small destination buffer; added unit tests for that case
* unit_tests: proper test skipping; better selective test interface
* unit_tests: moved 'loading' logging to proper location

Co-authored-by: あく <alleteam@gmail.com>
2024-05-20 18:23:47 +01:00
gornekich
d5339f8270 [FL-3816] Text Box rework (#3642)
* text box: rework text box to use less memory
* text box: optimize lines iteration
* text box: fix back scrolling
* text box: add end focus support
* text box: allocate index buffer on stack instead of heap
* text box: fix index decrement
* apps: add text box debug app
* debug: rework text box view app with view stack
* debug app: rename text_box_test app to text_box_element_test
* text box: rework text box module
* debug: update text box view test
* text box: fix end focus initial offset
* debug: fix memory leak in text box view test app

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-05-20 16:13:20 +01:00
MX
e909818f65 fix stealth jiggler icon with ble 2024-05-19 04:53:30 +03:00
MMX
e4ed15ba23 Merge pull request #753 from Willy-JL/hid-app-merge-fix
Hid app merge fix
2024-05-19 04:50:29 +03:00
MX
8275140fe6 rename 2024-05-19 03:57:19 +03:00
MX
4f6c98dc0d move js examples to examples subfolder 2024-05-19 03:56:22 +03:00
MX
21abcb56fd merge ofw dev missing parts 2024-05-19 03:54:21 +03:00
MX
fb6070f29d Merge remote-tracking branch 'OFW/dev' into dev 2024-05-19 03:45:07 +03:00
WillyJL
de4b086083 Fix calling both view_free_model() and view_free() (#3655) 2024-05-18 19:40:01 +01:00
Willy-JL
7c013c0534 HID App: Add few missing things from last merge 2024-05-18 08:31:36 +01:00
Willy-JL
23ca7e7b48 Some formatting to match upstream 2024-05-18 08:28:45 +01:00
Willy-JL
c4709a5b6b HID App: Update icons 2024-05-18 08:26:36 +01:00
Willy-JL
276feac73f HID App: Update to scene based startscreen 2024-05-18 08:24:29 +01:00
WillyJL
0d456aa550 JS: Add textbox module (#3597)
* JS: Add textbox module
* Using view_holder instead of view_dispatcher, more checks in js_textbox_show
* API version sync
* Rename emptyText() to clearText()
* Keeping view_holder allocated for thread sefety
* Js: proper comparision with 0 in js_math_sign
* Js: add comments and fix condition race in textbox

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: nminaylov <nm29719@gmail.com>
2024-05-17 18:43:52 +01:00
WillyJL
c673b53e21 JS: Add math module (#3598)
* JS: Add math module
* Double constants
* Error on argument type mismatch
* Fix missing returns
* Using sin, exp from c library
* asin, acos, pow, sqrt too
* Js: tests for math module and various fixes.

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: nminaylov <nm29719@gmail.com>
2024-05-17 17:45:40 +01:00
MX
51bb9c0a0a Merge remote-tracking branch 'OFW/dev' into dev 2024-05-17 17:15:48 +03:00
gornekich
217bfac2fc NFC: add Slix capabilities (#3652)
* iso15693 listener: fix inventory cmd and buffer overflow
* iso15 listener: fix read multiple blocks command
* slix: print password
* slix: add capabilities field
* slix listener: skip password validation for special capability
* slix: fix capability name
* slix: add capabilities handler to verify and reset
* nfc test: introduce slix tests
* fbt: change toolchain back to 33 version
* slix: fix saving capablities comment
* unit tests: add slix files to resources
* slix: fix set passwrd signature
* nfc tests: add set correct password test
* nfc test: complete slix password tests
* nfc test: add slix file test
* nfc test: handle errors in worker callback
* iso15693_3: code clean up
* iso15693_listener: fix incorrect afi handling
* slix: chage capabilities format to one word camel case
* unit tests: update nfc files with new slix format

Co-authored-by: あく <alleteam@gmail.com>
2024-05-17 12:58:32 +01:00
Astra
603a86dbe6 [FL-3797] Settings refactor fixes (#3654) 2024-05-17 12:52:42 +01:00
MX
7c5111e29f Merge remote-tracking branch 'OFW/dev' into dev 2024-05-16 23:37:03 +03:00
WillyJL
63403bbae2 JS: Add submenu module (#3601)
* JS: Add submenu module
* Using view_holder instead of view_dispatcher

Co-authored-by: nminaylov <nm29719@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-05-16 18:55:08 +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
MX
0ae78dfcdd Revert TLSF
This reverts commit 5dddb075ac
2024-05-16 05:41:16 +03:00
MX
97d5b8b6f6 subghz plugin ext only load 2024-05-16 03:54:20 +03:00
MX
33daa960cf Merge remote-tracking branch 'OFW/dev' into dev 2024-05-16 03:53:59 +03:00
Sergei Gavrilov
5dddb075ac 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 03:51:45 +03:00
Eric Betts
6d1a5c71e6 Skylanders plugin (#3315)
* PoC skylanders plugin
* based on db0c7e4fad
* More figures
* Fix util methods

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-05-16 03:44:40 +03:00
Eric Betts
50bee67748 Skylanders plugin (#3315)
* PoC skylanders plugin
* based on db0c7e4fad
* More figures
* Fix util methods

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-05-15 19:09:08 +01:00
MX
3005f6cd9a Hid app improvements
- Move new mouse jiggler into mouse jiggler stealth
- Set stealth jiggler max time default value to 4 min and min value to 1 min
- Various UI fixes
- Merge changes from OFW commit 11d7f53854

([FL-3770, FL-3680] HID App improvements and little extra (3518))
2024-05-15 19:08:10 +03:00
MX
fb8f59fa1d fix merge issues 2024-05-15 19:04:37 +03: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
MX
548d370ab9 Merge remote-tracking branch 'OFW/dev' into dev 2024-05-15 18:25:03 +03:00
MX
5efbd36bb8 sync anims 2024-05-15 18:23:19 +03:00
MX
1afa3f7ef3 Merge remote-tracking branch 'OFW/dev' into dev 2024-05-15 18:22:54 +03:00
Max Andreev
3d3db9f5b0 Add new map analyser (#3648)
* Add new map analyser
* Fix typos

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-05-15 12:25:02 +01:00
Astra
e3f95a326b [FL-3797] Settings menu refactoring (#3632)
* Settings menu refactoring
* Update F18 api
* Wording changes
* Update certification icon
* Desktop: optimize settings save routine, fix navigation lag
* Gui: add submenu position getter. Desktop: proper menu index preservation.
* Gui: proper index getter for submenu. Desktop: cleaner settings navigation.

Co-authored-by: あく <alleteam@gmail.com>
2024-05-14 19:58:09 +01:00
Leptopt1los
a86aeface5 electra lfrfid protocol implemented (#3640) 2024-05-15 00:27:35 +10:00
gornekich
5f9b300ab2 NFC: Mf Desfire fix reading big files (#3616)
* mf desfire: fix incorrect long files reading
* nfc app: trim record size for mf desfire render
* mf desfire: rework reading long record files
* mf desfire: more robust size check

Co-authored-by: あく <alleteam@gmail.com>
2024-05-14 13:34:27 +01:00
hakuyoku2011
a7715704f8 Infrared: Add Toshiba RAS-2518D (#3635)
* Infrared: Add Toshiba RAS-2518D
* Infrared: cleanup AC universal remote

Co-authored-by: あく <alleteam@gmail.com>
2024-05-14 13:15:30 +01:00
fatale69
98c51d13a1 vscode: config fixes (#3587)
* Update extensions.json

* vscode: fixed extensions config for clangd; updated paths for current toolchain location convention

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2024-05-13 23:33:20 +04:00
あく
b9966a50d9 Ble: new connection parameters negotiation scheme (#3644)
* Ble: new connection parameters negotiation scheme

* Ble: finer connection parameters negotiation flow

* Ble: naming and grammar

* gap: typo fix & field init

---------

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-05-13 21:54:59 +04:00
あく
9648da951a FuriHal: move version init to early stage (#3647) 2024-05-13 21:32:28 +04:00
Samar Sunkaria
8ffee678c6 Add support for R_ARM_REL32 relocations. (#3631)
It is fairly straightforward to correctly resolve an R_ARM_REL32 relocation as described in
in the "Relocation types" section of ARM ELF Specification
(https://developer.arm.com/documentation/espc0003/1-0/?lang=en). The documentation provides
the following formula:

```
S - P + A
```

where `S` is the value of the symbol (symAddr), `P` is the address of the place being
relocated (relAddr), and `A` is the addend (value extracted from the storage unit being
relocated, in this case).

I encountered the R_ARM_REL32 relocation type as part of my work for building apps written
in Swift for the Flipper Zero. I have manually tested that this relocation works correctly
by building and running multiple apps that depend on this relocation.

Co-authored-by: あく <alleteam@gmail.com>
2024-05-13 16:21:28 +01:00
WillyJL
e1cb69d046 Remove unused DolphinWait_61x59 icon (#3645)
Co-authored-by: あく <alleteam@gmail.com>
2024-05-13 16:11:46 +01:00
Astra
b60e6042a5 [FL-3813] Add the Akira animation (#3636)
* Add the Akira animation
* Dolphin: adjust weight for new animation

Co-authored-by: あく <alleteam@gmail.com>
2024-05-13 15:47:07 +01:00
MX
96db11a0d6 Merge remote-tracking branch 'OFW/dev' into dev 2024-05-11 00:54:32 +03:00
あく
b12d43b765 Desktop: fix crash on autolock after restart in locked state (#3643)
* Desktop: fix crash on autolock after restart in locked state
* Desktop: switch to clock model to fix condition race in desktop lock.
2024-05-10 16:01:33 +01:00
MX
a89a67d103 fix naming 2024-05-03 23:04:58 +03:00
MX
9656331618 update changelogus 2024-05-03 22:31:56 +03:00
MMX
a8dcec0dad Merge pull request #750 from DarkFlippers/electra
Electra intercom lfrfid protocol
2024-05-03 22:25:05 +03:00
Methodius
d73832a5dd Merge remote-tracking branch 'origin/dev' into electra 2024-05-03 22:17:14 +03:00
MMX
a27aa0336a Merge pull request #746 from gushmazuko/feature/random_mouse_jiggler
Enhance Random Interval and Movement Functionality in HID Mouse Jiggler for Improved Stealth and Human-Like Behavior
2024-05-03 22:04:55 +03:00
MX
887f6a20fc We already using furi random, cleanup unused parts, format code 2024-05-03 21:28:18 +03:00
MX
786dbfe0c3 Merge branch 'dev' into feature/random_mouse_jiggler 2024-05-03 21:09:21 +03:00
MX
374e96bb7d ibutton and lfrfid small ui improvements 2024-05-03 20:59:28 +03:00
MX
c9d23a9d1d update changelog 2024-05-03 19:02:09 +03:00
MX
6bfa383cea Revert "Merge remote-tracking branch 'OFW/astra/3746-mfp-detect' into dev"
This reverts commit 9b377e6f80, reversing
changes made to 1736a8a7c2.
2024-05-03 14:50:58 +03:00
Methodius
bf721d7a5f Merge remote-tracking branch 'origin/dev' into electra 2024-05-01 21:12:14 +03:00
Methodius
7077d588c7 electra protocol rename. again 2024-05-01 21:12:06 +03:00
MX
75ece9b697 add temp fix since no proper fix exist at the moment 2024-05-01 19:07:57 +03:00
MX
a57dbe446e update DS1420 for latest ibutton changes 2024-05-01 16:53:49 +03:00
MX
9b377e6f80 Merge remote-tracking branch 'OFW/astra/3746-mfp-detect' into dev 2024-05-01 16:49:53 +03:00
MX
1736a8a7c2 Merge remote-tracking branch 'OFW/dev' into dev 2024-04-30 22:31:39 +03:00
Astra
7414e6d4df [FL-3817] iButton: fix crash when deleting some keys (#3617)
* iButton: fix crash when deleting some keys
* Fix cyfral crashes
* Better data formatting
* Remove void returns
2024-04-29 19:56:15 +09:00
MX
e7ef923729 Merge remote-tracking branch 'OFW/astra/3817-ibutton-crash' into dev 2024-04-27 15:09:25 +03:00
MX
c157ca9879 Merge remote-tracking branch 'OFW/gornek/desfire_long_files' into dev 2024-04-27 15:09:21 +03:00
MX
4965215c8d Merge remote-tracking branch 'OFW/dev' into dev 2024-04-27 14:44:18 +03:00
Astra
379e8d2a6a Fix cyfral crashes 2024-04-27 15:53:19 +09:00
Astra
42c69b076a iButton: fix crash when deleting some keys 2024-04-26 19:07:51 +09:00
gornekich
d13017a7fe Merge branch 'dev' into gornek/desfire_long_files 2024-04-25 20:13:20 +01:00
gornekich
0e3cbb4911 mf desfire: rework reading long record files 2024-04-25 20:01:32 +01:00
gornekich
f544aa8eb6 nfc app: trim record size for mf desfire render 2024-04-25 19:55:35 +01:00
gornekich
e5f9af3b43 mf desfire: fix incorrect long files reading 2024-04-25 18:13:52 +01:00
あく
43c4381820 [FL-3814] Desktop: cleanup error popups (#3615)
* Desktop: cleanup error popups, add missing factory keys notification
* Desktop: enclave warning wording
2024-04-25 08:39:38 +09:00
Astra
1559ee6293 [Fl-3809] Troika parser visual fixes (#3614)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-24 21:47:40 +09:00
Astra
34abaa7e27 [FL-3815] Fix the retry/exit confirmation prompts in iButton (#3613) 2024-04-24 21:35:15 +09:00
MX
3108f07a4b faac rc add button B 2024-04-23 15:04:20 +03:00
MX
c3b59a9dba add todo 2024-04-23 14:54:56 +03:00
MX
3269f751cd js vgm module and widget fix
VGM js module by jamisonderek
Js fixes by jamisonderek
2024-04-23 12:24:07 +03:00
Astra
2987a46322 Alloc takes no arguments 2024-04-23 11:00:37 +09:00
Astra
fb018ec170 Bump F18 API 2024-04-23 10:54:11 +09:00
Astra
85fc0a2dd3 Merge branch 'dev' into astra/3746-mfp-detect 2024-04-23 10:39:34 +09:00
Astra
83ff6fb8bf Mifare Plus detection done 2024-04-22 21:09:06 +09:00
Methodius
70cdd26855 electra cleanup, protocol description added 2024-04-21 21:03:10 +03:00
Methodius
0a7e258c1a Merge remote-tracking branch 'origin/dev' into electra 2024-04-21 12:31:55 +03:00
MX
f88a916ccc Merge remote-tracking branch 'OFW/dev' into dev [ci skip] 2024-04-21 11:42:57 +03:00
gushmazuko
6cb9ad12f1 Enhance Random Interval and Movement Functionality 2024-04-21 02:14:46 +02:00
Methodius
5bf16e7e0e no more hardcoded epilogue (for now, whitelist will be great if it is possible) 2024-04-19 23:17:18 +03:00
Methodius
7b99f0b0bb Merge remote-tracking branch 'origin/dev' into electra 2024-04-19 18:07:23 +03:00
gornekich
c87683596a nfc app: add legacy keys for plantain cards (#3602)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-19 23:22:07 +09:00
WillyJL
9bef2aaec6 GUI: Fix array out of bounds in menu exit (#3604)
* GUI: Fix array out of bounds in menu exit
* Gui: fix incorrect empty menu handling
* Gui: add missing item check in menu ok handling
* Gui: remove dead code from menu module

Co-authored-by: あく <alleteam@gmail.com>
2024-04-19 23:10:48 +09:00
Leopold
286fd796e7 add support for S(WTX) request in iso14443_4a_poller (#3590)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-04-19 21:11:22 +09:00
Astra
0d73a58123 Mosgortrans parser output fixes (#3554)
* Fix mosgortrans/troika newlines and mark unused variables
* Supress warnings for TODOs that don't need a ticket

Co-authored-by: あく <alleteam@gmail.com>
2024-04-19 21:01:57 +09:00
Astra
9042009b0b Proper detection (WIP) 2024-04-19 20:43:18 +09:00
MX
8eba6e18ff Merge remote-tracking branch 'OFW/dev' into dev 2024-04-18 17:24:48 +03:00
MX
4422a03ae9 Merge remote-tracking branch 'OFW/dev' into dev 2024-04-18 17:22:36 +03:00
WillyJL
12112e70bc BLE: Add GapPairingNone support (#3596)
* BLE: Add GapPairingNone support
* FuriHal: cleanup naming in ble gap, remove useless config options

Co-authored-by: あく <alleteam@gmail.com>
2024-04-18 10:26:58 +09:00
gornekich
be43e49869 nfc app: fix false positive verification in bip plugin (#3595)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-18 09:56:39 +09:00
MMX
00970a4b12 Allow setting view_dispatcher callbacks to NULL again (#3580)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-18 09:34:33 +09:00
KRukus9
94c2d7a4e3 Update tv.ir (#3584)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-18 08:12:02 +09:00
Astra
4883383b20 [FL-3679] iButton new UI (#3471)
* iButton new UI
* UI final touches
* Satisfy PVS

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-04-18 08:05:37 +09:00
あく
70f93a48f5 [FL-2969] FuriHal: add ADC API (#3583)
* Examples: remove unused context
* FuriHal: add simple ADC API
* Examples: add ADC example app
* FuriHal: add extended configuration options for ADC API
* FuriHal: add ADC clock configuration, fix calibration routine for single ended mode, new optimized parameters, documentation.
* FuriHal: add FuriHalAdcChannelTEMPSENSOR sampling time note
* FuriHal: update FuriHalAdcChannelVBAT description.
* FuriHal: use insomnia while ADC is acquired.
* Examples: cleanup example_adc a little bit
2024-04-18 00:17:40 +09:00
Astra
7189026335 Initial MFPlus draft 2024-04-17 11:00:51 +09:00
MX
b079b46681 Merge remote-tracking branch 'OFW/dev' into dev 2024-04-16 22:46:32 +03:00
gornekich
1a40fae003 [FL-3750] Mf Desfire multiple file rights support (#3576)
* mf desfire: remove unused type
* mf desfire: continue reading after failed get free mem cmd
* mf desfire: fix processing read master key settings command
* mf desfire: don't read applications if they are auth protected
* mf desfire: handle multiple rights
* mf desfire: fix PVS warnings
* mf desfire: fix print format
* mf desfire: fix logs
* mf classic: add send frame functions to poller
* unit tests: add test from mfc crypto frame exchange
* mf classic: add documentation
* mf classic: fix incorrect name
* target: fix api version
2024-04-16 14:55:24 +09:00
MX
f4ffd29bbc Allow no prefix usage of name_generator_make_detailed_datetime
Remove extra check for NULL since check is present in code already
2024-04-12 20:16:42 +03:00
MX
b299604932 js fix badusb double free crash with quit()
by Willy-JL
2024-04-12 20:02:38 +03:00
MX
6bb605f8ce Allow setting view dispatcher callbacks to NULL 2024-04-11 01:20:39 +03:00
MX
c1e8cbf3fd update changelog 2024-04-10 15:46:20 +03:00
MX
2443a702c9 update nfc parser
by zacharyweiss
2024-04-10 15:38:57 +03:00
MX
744ef8138e subghz add manually fixes 2024-04-10 15:26:47 +03:00
MX
b3151c563f Merge remote-tracking branch 'OFW/dev' into dev 2024-04-10 15:18:09 +03:00
RebornedBrain
fb9728d570 [FL-3772] Felica poller (#3570)
* New types for felica poller
* New functions for felica data transmissions
* Felica memory map extended with new fields
* Init/deinit of mbedtls context added for felica encryption
* Functions for session key and mac calculations added
* Raw felica_poller implementation added
* Removed MAC type parameter from check_mac function
* Replaced all data fields needed for auth with context structure
* Clean up felica_poller.c
* Now RC block is filled with random numbers
* New parameter for counting well-read blocks
* Some cleanups
* Felica file save and load logic added
* Now we use card key from context for session key calculation
* Copying card key to card block from auth context when both authentications succeeded, otherwise decrement blocks count by 1
* New felica poller event added
* Moved some data structions to public namespace
* FelicaAuthenticationContext struct moved to felica.h
* Field type and name changed for better ones
* Helper functions for felica_auth added to the app
* New scene for felica card key input added
* Logic for felica key input added
* Auth context request processing added
* Added block index definitions and replaced all index numbers with them
* More macro defines
* Replace nesting with do while block
* New function for write operations mac calculation added
* Replace nesting with do while block
* Make functions static for now because they are used internally
* Wrote some comments
* Raw felica render implementation
* New felica scenes
* Adjusted felica dump rendering according design requirements
* New felica scene added
* Helper for switching scene during unlock added
* Added warning scene and transfer to it
* Moved unlock scene logic to separate files
* Magic number changed
* New felica render logic
* Felica scenes adjusted according to design requirements
* Felica poller cleanups
* Some asserts added and some fixed
* Replcaed asserts to checks in public api
* Fixed pvs warnings in felica_poller
* New event for felica_poller added for incomplete read actions
* Handling of new poller event added
* Update SConscript with felica files
* Update api_symbols.csv with felica functions
* Sync API versions

Co-authored-by: あく <alleteam@gmail.com>
2024-04-10 18:51:36 +09:00
MX
c144611609 update changelog 2024-04-10 01:44:41 +03:00
MX
95da39ba88 Merge remote-tracking branch 'OFW/dev' into dev 2024-04-09 20:33:52 +03:00
Victor Nikitchuk
db14ca964b Status output !TX/RX on the GDO2 CC1101 pin (#3571)
* Status output !TX/RX on the GDO2 CC1101 pin\
* Fix PVS warnings

Co-authored-by: あく <alleteam@gmail.com>
2024-04-10 00:05:30 +09:00
WillyJL
e3ca293eee Desktop/Loader: Unload animations before loading FAPs (#3573)
* Desktop: Unload animations before FAP is loaded
* Loader: Add API to start detached (returns instantly, queues event)
* Desktop: Fix early animation unload deadlocks
* Loader: remove redundant event
* Bump api symbols

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
2024-04-09 22:42:03 +09:00
Nikolay Minaylov
58da27fa91 JS Documentation (#3535)
* Initial JS documentation
* Spelling fix

Co-authored-by: あく <alleteam@gmail.com>
2024-04-09 18:06:37 +09:00
あく
88a6860913 Update radio stack to v1.19.0 (#3545)
* Update radio stack to v1.19.0
* Ble: set max connection interal same as min, kinda speedups everything
2024-04-09 16:01:55 +09:00
MX
c9909467f9 Merge remote-tracking branch 'OFW/dev' into dev 2024-04-09 03:24:16 +03:00
Astra
27e61eb808 Move crypto1 to helpers, add it to the public API (#3567)
* Move crypto1 to helpers, add it to the public API
* F18 API version bump

Co-authored-by: あく <alleteam@gmail.com>
2024-04-07 23:47:48 +09:00
WillyJL
16b34c6e4d Explain RNG differences, add FURI_HAL_RANDOM_MAX (#3565)
* Explain RNG differences, add FURI_HAL_RANDOM_MAX
* Mark FURI_HAL_RANDOM_MAX unsigned

Co-authored-by: あく <alleteam@gmail.com>
2024-04-07 23:11:23 +09:00
WillyJL
6b120a3b09 Furi: Add "out of memory" and "malloc(0)" crash messages (#3574)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-07 22:49:00 +09:00
WillyJL
c31b60c7b7 IR: Fix crash on duty_cycle=1 (#3568)
* IR: Fix crash on duty_cycle=1
* Infrared: use float around duty_cycle

Co-authored-by: あく <alleteam@gmail.com>
2024-04-07 22:21:25 +09:00
MX
d1c75dc57b update changelog 2024-04-06 07:08:55 +03:00
MX
52d97b9329 update readme and fix hex uppercase 2024-04-06 06:44:08 +03:00
MX
294df5d1d4 desktop animations unload apilock revert
+ js layout fix and lfrfid ui fix
by Willy-JL
2024-04-06 05:40:53 +03:00
MX
344b624efc fix apps loading logic 2024-04-05 08:57:34 +03:00
MX
1e324a7314 fix favorites lockup 2024-04-05 08:02:38 +03:00
MX
6e4d32b941 js add badusb layout support
by Willy-JL
2024-04-05 08:01:53 +03:00
MX
22cf19dcef format 2024-04-05 06:42:05 +03:00
MX
7787845479 cleanup unused debug, set proper log levels 2024-04-05 06:41:31 +03:00
MX
ef29ed149d better subghz settings and more anim unload fixes
by Willy-JL
2024-04-05 06:36:35 +03:00
MX
a830d6b511 rework subghz settings, enable tx-rx state on unused gpio pin by default 2024-04-05 04:02:33 +03:00
MMX
f8d4d9397e Merge pull request #742 from quen0n/patch-1
Status output !TX/RX on the GDO2 CC1101 pin
2024-04-05 03:28:14 +03:00
MX
5ba6e3225b allow external apps to use infrared settings
by Willy-JL
2024-04-05 02:46:04 +03:00
MX
ec4b8b8f5e Various fixes
fixes by Willy-JL
nfc parser by zacharyweiss
js widget and path globals by jamisonderek
2024-04-05 01:25:03 +03:00
MX
45e7913435 after merge fixes
add void
2024-04-04 22:55:39 +03:00
Victor Nikitchuk
f5ca3ed2a1 Status output !TX/RX on the GDO2 CC1101 pin 2024-04-04 22:36:44 +03:00
MX
7c6541e513 Merge remote-tracking branch 'OFW/dev' into dev 2024-04-04 21:11:59 +03:00
Sergei Gavrilov
5431257470 [FL-3765][FL-3737] Desktop: ensure that animation is unloaded before app start (#3569)
* Desktop: ensure that animation is unloaded before app start
* Desktop: unload animation only if it is loaded
2024-04-04 21:42:58 +09:00
Eric Betts
5793d5271c Hide unlock with reader for MFU-C (#3553)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-04 19:01:41 +09:00
MX
3ccb2956f3 Merge remote-tracking branch 'OFW/dev' into dev 2024-04-02 17:02:56 +03:00
hedger
d32f195557 fbt: fixed missing FBT_FAP_DEBUG_ELF_ROOT to dist env (#3563) 2024-04-02 20:30:42 +09:00
hedger
096a26b07d fbt: added -Wstrict-prototypes for main firmware (#3557)
* fbt: added -Wstrict-prototypes for main firmware (excludes extapps)
* unit_tests: fixed declarations using strict prototypes
* furi_hal: ble: changed gap stop log level to debug

Co-authored-by: あく <alleteam@gmail.com>
2024-04-02 02:02:45 +09:00
RebornedBrain
f426c44811 [FL-3801] Mifare Ultralight naming fix (#3551)
* Fixed some UI mismatches in plugin and nfc app
* Fixed nameing mismatches in mosgortrans_util
* Fix ultralight naming display
* Fix naming for Ultralight on read screen
* fbt: fixed regression with pvs-reports autoopen
* Revert st25tb_render.c

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
2024-04-02 00:02:11 +09:00
WillyJL
9f71be6fef IR: Remember OTG state (#3549)
Co-authored-by: あく <alleteam@gmail.com>
2024-04-01 22:42:47 +09:00
Guacamolie
002e5cd9de Bad USB: fix crash when selecting a keyboard layout (#3555)
Commit 6de2934 (BadUSB: BLE, media keys, Fn/Globe key commands (#3403),
2024-03-25) changed the life-cycle of the bad_usb_script object, so that
the bad_usb_script is allocated when entering the work scene, and freed
when going to the config scene. It also made it so that the keyboard
layout always gets reloaded when entering the work scene.

The logic of the layout config scene, however, assumes that it still
needs to reload the keyboard layout after selecting it. The keyboard
layout data is stored within bad_usb_script however, which is NULL when
within the layout config scene.

The fix is simple. Since we are now reload the keyboard layout anyway
when entering the work scene, we can just remove this extra call.

Resolves: #3552
2024-04-01 21:49:51 +09:00
MX
e436ea275a Merge remote-tracking branch 'OFW/dev' into dev 2024-03-29 14:05:07 +03:00
Kuronons
3084469d83 L1_Mods animation update : adding VGM visual (#3502)
* Update images
* Update meta.txt
* Reverting to MOD 9999

Co-authored-by: あく <alleteam@gmail.com>
2024-03-29 12:40:26 +09:00
Georgii Surkov
64bd2f9c84 [FL-3677, FL-3798] RFID Improvements (#3524)
* Update saved_info and read_success scenes
* Update EM4100 rendering
* Update HIDExt rendering
* Update Gallagher rendering
* Update HidProx rendering
* Update IOProx rendering
* Update H10301 rendering
* Update PAC/Stanley rendering
* Add strcasecmp() to API, better manufacturer/name handling
* Update Viking rendering
* Update FDX-A rendering
* Update Pyramid rendering
* Update Indala26 rendering
* Update Idteck rendering
* Update Keri rendering
* Update Nexwatch rendering
* Update Jablotron rendering
* Update Paradox rendering
* Truncate long Hex string on scene_read_suceess
* Fix formatting
* Update AWID rendering
* Update FDX-B rendering
* Tweak string formatting in various screens
* More read_success view tweaks
* Fix formatting
* Fix Pyramid brief rendering
* Reset saved key menu when going back
* Reset other menus on back where applicable
* Update confirmation scenes
* Update emulation scene
* Update delete scene
* Update raw read info screen
* Update raw read scene, fix crash
* Update raw read success scene
* Update write scene
* Always return to SceneSelectKey after saving
* Update SceneWriteSuccess and SceneDeleteSuccess
* Replace closing parens with dots
* FL-3798: Fix special formatting in text_box
* Simplify SceneReadSuccess
* Fix crash when having a trailing newline in text_box
* Bump API symbols version
* Make PVS happy
* Format sources

Co-authored-by: あく <alleteam@gmail.com>
2024-03-29 12:32:43 +09:00
RebornedBrain
c353182353 [FL-3800, FL-3801] Fixed plugins and UI (#3543)
* Fixed some UI mismatches in plugin and nfc app
* Fixed nameing mismatches in mosgortrans_util
* Fix ultralight naming display

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-29 11:45:01 +09:00
hedger
538422e2a9 ufbt: fixes for generated vscode project (#3547)
Co-authored-by: あく <alleteam@gmail.com>
2024-03-29 10:47:43 +09:00
gornekich
74cda02368 [FL-3803] NFC: Fix mf desfire detect (#3548) 2024-03-29 10:32:15 +09:00
MX
f02b03172a Merge remote-tracking branch 'OFW/dev' into dev 2024-03-26 13:54:06 +03:00
superKoder
21e7c46033 infrared_transmit.h was missing #pragma once (#3541)
Co-authored-by: superKoder <superKoder@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-26 16:24:28 +09:00
FireFly7386
f5dff83595 Show the wrong PIN Attempt count on the login screen (#3495)
* now shows failed login attempt count
* fixed the memory leaking
* made some text changes
* removed second allocation of the furi string
* cleaned up code
* Changed Position of the Wrong Attempts Text + It removes if you typed an arrow
* aligned text to the center and switched to furi_string_reset insted of furi_string_set_str("")
* fixed weird behavior
* Desktop: cleanup pin scene code, better reporting on transition between states

Co-authored-by: あく <alleteam@gmail.com>
2024-03-26 16:18:44 +09:00
MX
175db7baa3 fix patch 2024-03-25 23:56:32 +03:00
MX
a6aa441edc add missing void 2024-03-25 23:20:48 +03:00
MX
ae84992f25 Merge remote-tracking branch 'OFW/dev' into dev 2024-03-25 23:20:46 +03:00
Silent
8ec1c74baf SavedStruct: Introduce saved_struct_get_metadata (#3392)
* SavedStruct: Replace saved_struct_get_payload_size with saved_struct_get_metadata
  This new function can obtain the magic value, version and payload size
  all at once. This makes the function useful e.g.
  for backwards compatibility.
* SavedStruct: const-qualify saved_struct_save
* Toolbox: add saved struct documentation

Co-authored-by: あく <alleteam@gmail.com>
2024-03-26 03:48:18 +09:00
Nikolay Minaylov
84beb9b23e JS CLI command (#3539)
* js command
* made the js command exit when there's an error
* JS CLI: moved to js_app
* JS: abortable cli invocations
* JS: less debug logging in console logs, fix storage descriptor leak in cli

Co-authored-by: Milk-Cool <milan-pl@mail.ru>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-03-26 01:35:38 +09:00
MX
fda8370255 post merge fixes p2 [ci skip] 2024-03-25 15:47:34 +03:00
MX
7c0939ad52 Merge remote-tracking branch 'OFW/dev' into dev 2024-03-25 14:23:44 +03:00
MX
01f3192957 post merge fix 2024-03-25 14:08:51 +03:00
MX
9961dadee7 Gui: unicode support, new canvas API
merge ofw commit
2024-03-25 14:04:07 +03:00
MX
585b7f963d Api Symbols: replace asserts with checks
merge ofw commit
2024-03-25 13:53:32 +03:00
Brandon Weeks
bb439a9761 Fix DIP decoding for Linear Delta-3 (#3528)
Since my original PR (#2239) DIP values produced have been inverted.

Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 18:24:57 +09:00
Kowalski Dragon
8762629276 Add ChromeOS Bad USB demo (#3486)
Signed-off-by: Kowalski Dragon (kowalski7cc) <kowalski7cc@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 18:03:20 +09:00
Georgii Surkov
adafe96924 [FL-3762] Configurable Infrared TX output (#3484)
* Implement Gui for the feature
* Implement furi_hal side
* Implement IR module detection
* Fix PVS warnings
* Add comments

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-03-25 17:56:56 +09:00
Nikolay Minaylov
6de2934394 BadUSB: BLE, media keys, Fn/Globe key commands (#3403)
* BadUSB: media keys, GLOBE command
* f18 api table fix
* BadUSB over BLE
* Made PVS happy

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-03-25 17:39:33 +09:00
gornekich
f633f476c8 [FL-3787] NFC: Slix privacy password reveal and Desfire detect fix (#3504)
* slix: fix incorrect default privacy passwords
* slix poller: add check privacy password state
* mf desfire: change detect algorithm
* mf desfire: change detection algorithm to check master key version
* mf desfire: change assert to check
* Update api symbols and cleanup code

Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 16:18:28 +09:00
Georgii Surkov
11d7f53854 [FL-3770, FL-3680] HID App improvements and little extra (#3518)
* FL-3680: change capitalisation
* Replace D-Pad graphic
* Fix the bluetooth indicator not showing
* Remove exit confirm scene
* Fix wrong back button durations
* Improve application structure
* Improve mouse clicker view
* Improve mouse jiggler view
* Improve media view
* Improve mouse and media views
* Improve tiktok view
* Reset mouse jiggler state on view exit
* Use alpha in mouse and tiktok views
* Reset mouse left button state on view exit
* Improve button graphics
* Improve mouse graphics

Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 16:00:35 +09:00
hedger
763e2f5bab github: additional pre-upload checks for doxygen workflow (#3526)
Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 15:51:09 +09:00
Protik Banerji
bf769ee398 Add Dutch Originals Sound Bar IR codes to infrared app (#3529)
* Add Dutch Originals Soundbar IR codes
* Switch change_input button to next and prev

Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 15:42:42 +09:00
gornekich
23940bff81 [FL-3796], [FL-3795] NFC UI fixes (#3532)
* nfc app: fix navigation in select protocol scene
* nfc app: fix text box position and size on emulation screen

Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 15:36:17 +09:00
WillyJL
c52f28efa4 GUI: Fix textbox overflow/crash/hang with 256+ lines (#3536)
* GUI: Fix textbox overflow/crash/hang with 256+ lines
* GUI: Textbox calculate lines based on font height
* Gui: proper types in text_box

Co-authored-by: あく <alleteam@gmail.com>
2024-03-25 15:28:20 +09:00
MX
81a16e5a28 update changelog 2024-03-25 01:04:33 +03:00
MX
8d75af8457 update changelog 2024-03-24 00:17:02 +03:00
MX
aaa7c81f99 js modules updates 2
by Willy-JL
2024-03-23 23:48:55 +03:00
MX
385c3c1c01 Sync textbox changes with OFW PR 3536
by Willy-JL
https://github.com/flipperdevices/flipperzero-firmware/pull/3536/files
2024-03-23 23:32:47 +03:00
MX
c323656037 js modules updates
by Willy-JL
2024-03-23 23:18:26 +03:00
WillyJL
0a48658a9a GUI: Fix elements module for new canvas API (#3527)
* GUI: Fix elements module for new canvas API
* Update symbols
* Update f18 symbols
* Gui: update elements for new canvas

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-03-23 14:54:01 +09:00
MX
46a90ec97f BLE/GAP fixes
by hedger
https://github.com/flipperdevices/flipperzero-firmware/pull/3533/files
2024-03-22 23:43:09 +03:00
Egor Koleda
d1d3c43939 Add support for Pioneer SR IR remotes (#3308)
* add support for Pioneer SR IR remotes
* fix minor issues
* fix repeat
* Fix protocol enumeration order
* Add unit tests for Pioneer IR protocol
* Clean up raw test data
* Add encoder/decoder tests, modify parser
* Remove dead code
* Use loops where appropriate

Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
2024-03-22 23:37:37 +03:00
gornekich
34fac96ef6 nfc app: fix text box position and size on emulation screen 2024-03-22 23:37:29 +03:00
gornekich
c1441b1331 nfc app: fix navigation in select protocol scene 2024-03-22 23:37:22 +03:00
MX
6d73b266d5 Fixes for text box and uart echo
thanks Willy-JL !
2024-03-22 22:47:24 +03:00
hedger
6947d3dea2 BLE/GAP fixes (#3533)
* hal: fixed ble_gap race on queue init
* fbt: removed deprecated path_as_posix
* hal: fixed inconsistencies between f7/f18 APIs
* hal: fixed excessively strict event handler re-init checks

Co-authored-by: あく <alleteam@gmail.com>
2024-03-22 21:36:05 +09:00
Egor Koleda
2aa2dcc71b Add support for Pioneer SR IR remotes (#3308)
* add support for Pioneer SR IR remotes
* fix minor issues
* fix repeat
* Fix protocol enumeration order
* Add unit tests for Pioneer IR protocol
* Clean up raw test data
* Add encoder/decoder tests, modify parser
* Remove dead code
* Use loops where appropriate

Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
2024-03-22 21:25:52 +09:00
MX
09c46a3381 Fix DIP decoding for Linear Delta-3
by brandonweeks

https://github.com/flipperdevices/flipperzero-firmware/pull/3528/files
2024-03-22 11:30:55 +03:00
MX
6d9a2cc699 fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms
https://github.com/flipperdevices/flipperzero-firmware/pull/3360/files
2024-03-22 11:27:48 +03:00
Jaroslav Nesterov
760deb66c5 Add support for DEFAULT_STRING_DELAY in Bad USB App (#3476)
* Add support for `DEFAULT_STRING_DELAY` in bad_usb
* Format Sources

Co-authored-by: あく <alleteam@gmail.com>
2024-03-22 11:26:30 +03:00
MX
e0469ae1ed Adding F13-F24 function key support to BadUSB
https://github.com/flipperdevices/flipperzero-firmware/pull/3468/files
2024-03-22 11:26:00 +03:00
Silent
4039ccbcca fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms (#3360)
* fbt/ufbt: Ensure POSIX paths are passed to GDB on all platforms
  GDB heavily dislikes forward slashes from Windows paths and strips
  them internally instead of normalizing them. Account for this by
  passing POSIX paths explicitly.
* fbt: different approach for posix path handling
* fbt, ufbt: further fixes for path handling
* fbt: explicit path stringification
* linter fixes

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 07:36:38 +09:00
小兽兽
0c465f7eb3 Added new IR commands (#3480)
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 07:24:33 +09:00
Jaroslav Nesterov
1bef579b82 Add support for DEFAULT_STRING_DELAY in Bad USB App (#3476)
* Add support for `DEFAULT_STRING_DELAY` in bad_usb
* Format Sources

Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 07:18:02 +09:00
Gabe
702ab672bb Adding F13-F24 function key support to BadUSB (#3468)
* Adding F13-F24 function key support to BadUSB
* Adding F13-F24 function key support to JS version of BadUSB

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 06:45:16 +09:00
Nikolay Minaylov
7d50c4a742 it-IT-mac layout (#3401)
Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 06:35:48 +09:00
MX
139cc3c93d upd changelog 2024-03-20 22:02:13 +03:00
MX
3b83d8b825 the biggest update ever 2024-03-20 21:47:01 +03:00
MX
8c0ba4de9f add icon 2024-03-20 20:17:16 +03:00
hedger
ee36c66572 fbt: doxygen target (#3510)
* fbt: doxygen target
* github: adjustments for doxygen
* github: always generate docs, only upload for dev
* doxygen: fixed exclusion path for awesome-css
* github: stricter check for push ref
* github: bumped action version to fix node.js deprecation
* github: added PVS report url to workflow summary
* github: pvs: reworked report URL handling
* github: added size report to summary
* docs: added `doxygen` target
* fbt: common naming scheme for COMSTR
* Documentation: fix warnings and errors
* Doxygen: stricter warning checks
* fbt: "doxy" target, opens generated doxygen documentation in browser
* github: doxygen: now using edge (1.10) version

Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 01:32:53 +09:00
Astra
4a673397b3 [FL-3760] NFC Parsers cosmetic fixes (#3511)
* NFC Parsers cosmetic fixes
* Clarify the unknown digit indication

Co-authored-by: あく <alleteam@gmail.com>
2024-03-20 18:10:51 +03:00
Astra
a5bb1ead68 NFC wording fixes (#3512)
* NFC wording fixes
* Fix filename

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-20 18:10:34 +03:00
Astra
558f75672f [FL-3760] NFC Parsers cosmetic fixes (#3511)
* NFC Parsers cosmetic fixes
* Clarify the unknown digit indication

Co-authored-by: あく <alleteam@gmail.com>
2024-03-21 00:08:35 +09:00
Georgii Surkov
7987917d85 [FL-3496, FL-3523, FL-3767, FL-3790] Infrared fixes and more (#3515)
* FL-3496: do not hardcode universal library names in CLI
* FL-3523: remove TODO, no changes necessary
* FL-3767: remove TODO, no changes necessary
* FL-3790: fix laggy TextInput by not adding it into a ViewStack
* Improve documentation
* Fix logical error in documentation

Co-authored-by: あく <alleteam@gmail.com>
2024-03-20 23:54:07 +09:00
Astra
1c033e2afe NFC wording fixes (#3512)
* NFC wording fixes
* Fix filename

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-20 23:44:48 +09:00
Georgii Surkov
169522cbe8 [FL-3792] Fix iButton emulation regression (#3519)
Co-authored-by: あく <alleteam@gmail.com>
2024-03-20 23:37:16 +09:00
MX
7c607abfe6 fix module load 2024-03-20 14:48:54 +03:00
MX
6f560ef210 js updates
by Willy-JL , oldip
2024-03-20 13:13:04 +03:00
MX
71111b0d2f sync anims with OFW
[FL-3776] Add the Freedom_2_dolphins animation
2024-03-20 12:48:50 +03:00
Astra
8bd984ff81 [FL-3151] Update the WiFi devboard developer documentation (#3520)
Co-authored-by: あく <alleteam@gmail.com>
2024-03-20 18:44:31 +09:00
MX
2276432745 Merge remote-tracking branch 'OFW/gsurkov/3792_onewire_fix' into dev 2024-03-20 12:42:15 +03:00
Astra
ff0952d66a [FL-3776] Add the Freedom_2_dolphins animation (#3521)
* Add the Freedom_2_dolphins animation
* Dolphin: rebalance animation weights

Co-authored-by: あく <alleteam@gmail.com>
2024-03-20 18:37:07 +09:00
あく
bcde0aefbd [FL-3729] Gui: unicode support, new canvas API (#3322)
* Revert "Rollback #3305 and #3297 fix various rendering issues (#3307)"

This reverts commit 531ba24e9a.

* Gui: refactor canvas to use proper coordinate system types. Furi: new furi_break check macros. Desktop: proper types for negative offset.

* Desktop: proper types in desktop_view_locked_doors_draw

* Examples: update images example, off it goes

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-03-19 19:23:06 +04:00
あく
acc39a4bc0 Api Symbols: replace asserts with checks (#3507)
* Api Symbols: replace asserts with checks
* Api Symbols: replace asserts with checks part 2
* Update no args function signatures with void, to help compiler to track incorrect usage
* More unavoidable void
* Update PVS config and code to make it happy
* Format sources
* nfc: fix checks
* dead code cleanup & include fixes

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2024-03-19 23:43:52 +09:00
Georgii Surkov
c541227483 Merge branch 'dev' into gsurkov/3792_onewire_fix 2024-03-19 12:45:38 +03:00
Anna Prosvetova
a09ec4d976 Infrared: Add Fujitsu ASYG24KMTB (#3513) 2024-03-19 18:19:31 +09:00
Georgii Surkov
a0dc2b5cfc Fix DS1990 emulation 2024-03-18 20:59:35 +03:00
MX
7e9ecdf394 the real update 2024-03-16 02:56:55 +03:00
MX
ce67472dc4 use non prefixed names for regular files with random name 2024-03-15 09:33:27 +03:00
MX
f88da8b0c3 test swap em4100 t5577 blocks (issue 3463 ofw) 2024-03-15 09:32:42 +03:00
MX
d573cc06da js modules updates
by Willy-JL and Sil333033
2024-03-15 07:09:16 +03:00
MX
17dd089b5a sync scenes 2024-03-15 04:27:37 +03:00
MX
eb013ab6ec revert usb cdc config changes to verify issue 3452 2024-03-15 04:08:52 +03:00
MX
d7711d729f Merge branch 'slix_test' into dev 2024-03-15 04:08:43 +03:00
MX
375eb55d33 Merge remote-tracking branch 'OFW/gsurkov/infrared_miscellany' into dev 2024-03-15 04:08:39 +03:00
MX
6e52c591e5 Merge remote-tracking branch 'OFW/gornek/3787_nfc_slix_issues' into slix_test 2024-03-15 04:04:31 +03:00
MX
c5bf29cb8c Merge remote-tracking branch 'OFW/ktq/ac_contrib' into slix_test 2024-03-15 04:04:18 +03:00
Georgii Surkov
2aa85347ee Fix logical error in documentation 2024-03-13 12:28:08 +03:00
Georgii Surkov
75432346de Improve documentation 2024-03-12 19:54:45 +03:00
Georgii Surkov
98c328f93f FL-3790: fix laggy TextInput by not adding it into a ViewStack 2024-03-12 19:45:22 +03:00
Georgii Surkov
3f7a070397 FL-3767: remove TODO, no changes necessary 2024-03-12 16:18:48 +03:00
Georgii Surkov
b27066b508 FL-3523: remove TODO, no changes necessary 2024-03-12 16:14:21 +03:00
Georgii Surkov
5cfc773b7b FL-3496: do not hardcode universal library names in CLI 2024-03-12 15:09:35 +03:00
Anna Prosvetova
2da05bfa6c Infrared: Add Fujitsu ASYG24KMTB 2024-03-12 00:24:29 +01:00
MX
9050a242e6 Merge branch 'ofw_dev' into dev 2024-03-11 21:10:01 +03:00
Georgii Surkov
022fccf0d7 [FL-3783] Asynchronous Infrared remote manipulation (#3503)
* Introduce ConcurrentRunner, load universal and regular remotes concurrently
* Perform all lengthy operations in a ConcurrentRunner
* Fix python formatting
* Clean up code
* Add usage warning
* Remove ConcurrentRunner, use a plain FuriThread instead
* Load remotes asynchronously in RPC mode as well
* Reorder code for clarity
* Clean up, use thread return code to report errors
* Improve wording
* Fix logical error
2024-03-12 02:35:51 +09:00
あく
adbe4d44f4 DateTime: fix missing weekday in datetime_timestamp_to_datetime conversion (#3508) 2024-03-11 17:09:39 +04:00
MX
79a286fe1a upd changelog 2024-03-11 03:53:32 +03:00
MMX
2f5be8f695 Merge pull request #719 from amec0e/dev
Update ac.ir
2024-03-11 02:51:28 +03:00
MMX
e8e596e4c9 Merge pull request #721 from MizumasuShoichi/patch-3
Update subghz_setting.c
2024-03-11 02:51:04 +03:00
MX
7b09a22a5c fix bipki [ci skip] 2024-03-11 02:37:37 +03:00
MX
c9434492b8 Various changes, in expansion, rgb, js
by Willy-JL , Spooks4576 , Sil333033 , HaxSam
2024-03-11 00:37:29 +03:00
Methodius
1bd56fb190 bip parser refactor 2024-03-11 00:24:55 +03:00
MX
25d4c4f829 upd subremote 2024-03-10 23:56:23 +03:00
MX
175f603678 Merge branch 'ofw_dev'
Conflicts:
	.gitmodules
	ReadMe.md
2024-03-10 23:38:56 +03:00
MX
df57ecd786 rem module that is not used in UL for now 2024-03-10 23:37:30 +03:00
MX
58cd56a439 Merge branch 'ofw_dev' into dev p1 2024-03-10 23:35:44 +03:00
gornekich
b1a9904ea5 mf desfire: change detection algorithm to check master key version 2024-03-07 19:29:18 +00:00
gornekich
43d1659200 Merge branch 'dev' into gornek/3787_nfc_slix_issues 2024-03-07 18:55:18 +00:00
gornekich
8f9fbc3a79 mf desfire: change detect algorithm 2024-03-07 18:48:14 +00:00
gornekich
bf97209c9b slix poller: add check privacy password state 2024-03-07 17:38:42 +00:00
gornekich
2961ad5ee1 slix: fix incorrect default privacy passwords 2024-03-07 15:59:27 +00:00
Astra
4f7eb77071 Fix troika 4K keys (#3499) 2024-03-07 15:57:32 +09:00
Astra
ecab4d53d2 [FL-870] Auto-generated firmware documentation take two (#2944)
* Add doxygen and doxygen-awesome css, cleanup docs files
* Ignore more libraries and remove leftover local variables
* Create an actual intro page
* .md files linting
* Add doxygen action
* Fix Doxygen path
* Fix doxyfile path
* Try to upload
* Change docs branch
* Add submudules checkout
* Disable doxygen on PR
* Mention the firmware docs in the readme
* More dev docs mentions in the readme
* Fix runner group, add tags
* Test dev in PR
* Disable running on PR
* Fix a typo in the doxyfile
* Try upload to S3
* Fix local path
* Fix S3 ACL
* Add delete flag, unifying dev and tags
* Update ignored directories
* More ignored directories
* Even more ignored directories
* Fix submodule
* Change S3 uploader
* Change S3 uploader version
* Fix aws sync flags
* Fix ACL
* Disable ACL
* Improve ignores, add WiFi devboard docs
* TEMP: generate dev docs
* TEMP: generate 0.89.0 docs
* Disabling PR trigger
* Enable submodules and test build
* Enable test build
* Disable test build
* Change docs directory structure
* Fix accidentally committed submodule
* Fix submodules
* Update links to the developer documentation
* Markdown linting
* Update workflow, enable test build
* Fix doxygen dir path
* Update Doxyfile-awesome.cfg
* Change paths
* Fix upload docs path
* Disable pull_request debug trigger
* Disable tags building
* Remove autolinks and namespaces
* Establish basic documentation structure
* Add missing changes
* Improve stylesheet, move some files
* Improve examples
* Improve the main page
* Improve application dev docs
* Improve system programming docs
* Improve development tools docs
* Improve other docs
* Improve application examples
* Fix formatting
* Fix PVS-studio warnings
* Improve visuals
* Fix doxygen syntax warnings
* Fix broken links
* Update doxygen action

Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2024-03-06 15:25:21 +09:00
MX
4e7f25a539 Merge branch 'ofw_dev' into dev 2024-03-05 08:51:14 +03:00
Silent
5e47048369 Archive: Fix item focus after aborting the Delete operation (#3475)
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-05 12:03:46 +09:00
assasinfil
a6c5a1ba69 Troyka parser improvements (#3390)
* Updated troyka layout (full version)
* Changed to furi func
* Small refactor
* Bitlib refactor
* Moved to API
* Rollback troyka parser
* Fix functions
* Parser func refactor start
* Layout E3 refactored
* Layout E4 refactored
* Layout 6 refactored
* Layout E5 refactored
* Layout 2 refactored
* Layout E5 fix
* Layout E6 refactored, valid_date need fix
* Layout E6 fix
* Layout FCB refactored
* Layout F0B refactored
* Layout 8 refactored
* Layout A refactored
* Layout C refactored
* Layout D refactored
* Layout E1 refactored
* Layout E2 refactored
* Fixes
* Old code cleanup
* Memory cleanup
* Unused imports cleanup
* Keys struct refactor
* Layout E1 fix
* Added debug info for layout and department
* Fix PVS warnings
* Fix more PVS warnings

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-05 11:56:35 +09:00
philicious
7b26dc5ebf NFC: Fix washcity plugin verify function being to greedy (#3467)
* NFC: Fix washcity plugin verify function being to greedy
  It verifies only a single sector and that one using one of the commonly used key 0xA0A1A2A3A4A5
  This leads to false-positives and the dicts not being used at all
* nfc app: washcity plugin: fix verify function

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-03-05 11:42:39 +09:00
Rodrigo Basoalto
1070064f89 Parser for Santiago, Chile BIP transit card (#3456)
* Parser for Santiago, Chile BIP transit card
  It's used for all public transportation in the city of Santiago, Chile
  (bus, subway). We've reverse-engineered most of the non-zero bits of
  data found, and checked them across dozens of cards.
* Update to use bit_lib instead of nfc_util
* PR feedback

Co-authored-by: Rodrigo Basoalto <basoalto@fintual.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-03-04 18:50:28 +09:00
MX
88b354b57e Merge branch 'ofw_dev' into dev 2024-03-02 07:24:47 +03:00
Sergei Gavrilov
4b7ca736d6 WiFi board: fixed update script on Windows (unfortunately also Mac and Linux) (#3485)
* WiFi board update: windows fix

* Scripts: add python\Scripts to the path

* Windows: another way to call esptool

* Aaaaaand once more!

* logz

* wifi board scripts: udev rule, dev channel

* fbt: added ARGS variable for passing extra options to certain scripts; removed `devboard_flash_dev` in favor of `devboard_flash ARGS="-c dev"`

* fbt: fully removed `devboard_flash_dev

* scripts: wifi_board.py: cleanup

* ufbt: ported ARGS for supported targets to ufbt

* docs: updated for ARGS=...

---------

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-03-01 15:58:15 +04:00
Sergei Gavrilov
18ea2371a4 Gui: reset canvas orientation and frame when entering direct draw mode (#3488) 2024-02-29 02:09:55 +04:00
Methodius
78e6c236c7 electra protocol added 2024-02-28 15:13:54 +09:00
MX
22be2629e0 Merge branch 'ofw_dev' into dev [ci skip] 2024-02-27 20:09:55 +03:00
Silent
7fc4ba7c1c FBT/uFBT: Enable C++20/GNU23 in VSCode IntelliSense (#3394)
* FBT/uFBT: ms-vscode.cpptools can't be a configuration provider to itself

* FBT/uFBT: Enable C++20/C23 in IntelliSense as the compilation options do
2024-02-27 17:56:11 +04:00
MizumasuShoichi
33fe146a57 Update subghz_setting.c
Added frequency: 430.50
2024-02-27 16:02:51 +08:00
MX
a2739ab0c1 Merge branch 'ofw_dev' into dev 2024-02-26 18:54:09 +03:00
hedger
bc309cebe6 Toolchain fixes (#3451)
toolchain: updated to v33 with debugging & other fixes
toolchain: better error handling during update/env configuration process
debugging: improved udev rules file, added readme on installation
firmware: bumped compiler C/C++ standards (stricter code checks)
firmware: fixed warnings emerging from newer standards
ufbt: FBT_NOENV is now also supported by ufbt
fbt: added ccache-related variables to env forward list on Windows
2024-02-26 16:16:19 +04:00
MX
cc937a97ef Merge branch 'new_c_version' into dev 2024-02-22 20:47:01 +03:00
MX
02f8840ac7 Merge remote-tracking branch 'OFW/hedger/toochain_29' into new_c_version 2024-02-22 20:43:41 +03:00
hedger
1c56a30d35 fbt: added "USERPROFILE" to forwarded vars 2024-02-22 15:43:21 +00:00
MX
b0a741233f Fix usbdisk filename
by Willy-JL
2024-02-22 18:28:36 +03:00
MX
b29a5896a4 Merge branch 'new_c_version' into dev [ci skip] 2024-02-22 05:27:50 +03:00
MX
dbb81055f2 Merge remote-tracking branch 'OFW/hedger/toochain_29' into new_c_version 2024-02-22 03:02:52 +03:00
MX
465fcf93a7 Merge branch 'dev' into new_c_version 2024-02-22 03:02:44 +03:00
hedger
65b0aa8e99 accessor: naming fix 2024-02-21 16:27:56 +00:00
hedger
90a8009d43 libs: moved callback-connector to accessor app 2024-02-21 15:53:34 +00:00
hedger
b1ebb142c4 ft: removed debug logging 2024-02-21 14:30:51 +00:00
amec0e
ee2c7bed92 Update ac.ir
Updated AC
2024-02-21 14:15:52 +00:00
hedger
d4433fabd4 fbt: fixed behavior on Win and fbtenv 2024-02-21 11:06:12 +00:00
hedger
10d2911af2 toolchain: bumped to v33 2024-02-21 09:03:58 +00:00
MX
b8d5dfdd05 fix ac file 2024-02-21 04:15:59 +03:00
MMX
c778233223 Merge pull request #718 from amec0e/dev
Update tv.ir
2024-02-21 04:14:46 +03:00
MX
614f9b8705 Revert "auto-stop emulation after 5min feature added"
This reverts commit 19a5f02d66.
2024-02-21 04:02:02 +03:00
MX
26cb315845 Revert "rename timers, stop before free"
This reverts commit 89e1620883.
2024-02-21 04:01:47 +03:00
MX
e1bc60b7eb Revert "nfc/lfrfid emulation abort after 5min disable if debug on"
This reverts commit 4573046df8.
2024-02-21 04:01:21 +03:00
MX
a88adc2a27 Merge remote-tracking branch 'origin/leptoptilos' into dev 2024-02-21 03:56:38 +03:00
MX
aa54a477d8 revert furi_hal_version changes 2024-02-21 02:48:22 +03:00
MX
c69ce4c921 fbt format 2024-02-21 02:21:20 +03:00
MX
b77e430df5 Merge branch 'new_c_version' into dev 2024-02-21 02:02:24 +03:00
MX
a64907d84b Merge remote-tracking branch 'OFW/hedger/toochain_29' into new_c_version 2024-02-21 02:02:17 +03:00
hedger
bc98c788fe fbt: moved FBT_NOEVN check to env setup script for *nix 2024-02-20 22:32:39 +00:00
MX
59370e03db Merge branch 'new_c_version' into dev 2024-02-21 01:07:51 +03:00
MX
16d1e71d6e Merge remote-tracking branch 'OFW/hedger/toochain_29' into new_c_version 2024-02-21 00:43:42 +03:00
MX
111438361d Merge branch 'blerefactr' into dev 2024-02-21 00:41:07 +03:00
MX
113afc0d0f usbdisk support in js
by Willy-JL
2024-02-21 00:40:29 +03:00
MX
21962da715 Subghz Fix led blink on decode raw > signal info
by Willy-JL
2024-02-21 00:29:50 +03:00
hedger
d731918197 linter fixes 2024-02-20 02:21:49 +00:00
hedger
e143833ee1 battery_test_app: signature fixes 2024-02-20 02:19:44 +00:00
hedger
ee11aca464 accessor: unvolatiled stuff according to c++20 2024-02-20 02:13:38 +00:00
hedger
71e763d9b3 fbt: bumped c&cpp standard versions 2024-02-20 02:06:08 +00:00
hedger
02a827da38 libs: added callback-connector to SDK 2024-02-19 09:35:01 +00:00
MX
2d32ea68fe hid app merge fixes
+ changes by Willy-JL
2024-02-19 04:33:36 +03:00
MX
66c60e65aa Merge fixes
+ thanks @Willy-JL !
2024-02-19 03:52:35 +03:00
hedger
b15787053a toolchain: v32 2024-02-18 22:35:23 +00:00
hedger
b38d2e8d84 Merge remote-tracking branch 'remotes/origin/dev' into hedger/toochain_29
# Conflicts:
#	scripts/toolchain/fbtenv.sh
2024-02-18 22:34:12 +00:00
MX
9fcf3795ee Merge branch 'ofw_dev' into blerefactr 2024-02-19 00:46:40 +03:00
amec0e
073902f83e Update tv.ir
Changed duty_cycle to match ofw
2024-02-18 14:00:21 +00:00
amec0e
c7952d57d8 Update projectors.ir
changed duty_cycle to match ofw
2024-02-18 13:59:56 +00:00
amec0e
e114c01ce2 Update fans.ir
Changed duty_cycle to match ofw
2024-02-18 13:59:29 +00:00
amec0e
1e473e59f4 Update audio.ir
Changed duty_cycle to match ofw (though 0.33 works too)
2024-02-18 13:58:56 +00:00
amec0e
3e3250ea5f Update ac.ir
Changed duty_cycle to match ofw (though 0.33 works too)
2024-02-18 13:58:14 +00:00
amec0e
a484e42d42 Update fans.ir
New additions to fans
2024-02-18 13:48:36 +00:00
amec0e
c2613c00f1 Update projectors.ir
New additions to projectors
2024-02-18 13:33:34 +00:00
amec0e
90e60560c7 Update ac.ir
New additions to ACs
2024-02-18 13:15:17 +00:00
amec0e
9edf2a7624 Update audio.ir
New additions to audio
2024-02-18 13:05:08 +00:00
amec0e
fb956e2427 Update tv.ir
New additions for tv.ir
2024-02-18 12:39:57 +00:00
Violet Shreve
4e1089ec49 Quote $FBT_TOOLCHAIN_PATH to avoid splitting (#3459) 2024-02-18 09:20:27 +00:00
Astra
2c650b5bc7 [FL-3699] HID: Add confirmation dialogue to the remove pairing option (#3263)
* HID: Add confirmation dialogue to the un-pair option
* Initial refactor to use SceneManager
* Make PVS happy
* Fix the exit dialog

Co-authored-by: あく <alleteam@gmail.com>
2024-02-17 15:15:44 +07:00
Max Andreev
fcf3b50f69 Add notification sending (#3449)
Co-authored-by: あく <alleteam@gmail.com>
2024-02-17 14:32:32 +07:00
Maxwell Pray
88a3b4593d Add IR codes for PLUS U5/V3-200R projector remote (controls PLUS U5-632h and PLUS U5-732h) (#3453)
* Add IR codes for PLUS U5/V3-200R projector to projector.ir.
* Add U5/V3-200R "freeze" and "cancel" IR codes.
* Remove pause and play IR codes for U5/V3-200R remote.
2024-02-17 14:26:58 +07:00
Methodius
b6a6528526 kinda parser refactor. datetime format added 2024-02-16 17:20:06 +09:00
hedger
01d937ca0b Merge branch 'dev' into hedger/toochain_29 2024-02-16 11:33:18 +04: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
MX
ae160efa16 small readme fixes 2024-02-16 03:27:36 +03:00
MMX
33cf554f06 Merge pull request #713 from wooferguy/dev
SubGhz: Magellan Event Code Update
2024-02-15 19:35:52 +03:00
MMX
200a6138ef Merge pull request #702 from wosk/emv-fixes
Emv fixes
2024-02-15 19:35:39 +03:00
Methodius
4adb492e29 nevermind. target 18 2024-02-16 01:33:42 +09:00
Methodius
698d0b4b49 emv parser day dd->-- 2024-02-16 01:26:31 +09:00
Methodius
f7742c692d Merge remote-tracking branch 'upstream/dev' into emv-fixes 2024-02-16 01:20:51 +09:00
MX
b8b344c6e1 Merge remote-tracking branch 'origin/leptoptilos' into dev [ci skip] 2024-02-15 19:19:19 +03:00
Methodius
4d73794100 emv parser day ??->dd 2024-02-16 00:47:03 +09:00
Methodius
913659325b build fixed. finally, datetime 2024-02-16 00:32:30 +09:00
hedger
d19f8f51ea Merge branch 'dev' into hedger/toochain_29 2024-02-15 17:16:03 +04:00
hedger
8e4c366f0b toolchain: bump to v31 2024-02-15 13:13:58 +00:00
Methodius
7b01a33b3f read transactions fail on some cards fixed 2024-02-15 21:53:06 +09:00
hedger
11a34e5bc3 debug: updated udev rules & added docs on rules installation 2024-02-15 11:49:30 +00:00
MX
2c5973be22 better naming [ci skip]
16 clock merged but still not working, waiting for updates in OFW
2024-02-15 14:09:49 +03:00
MX
597d295743 merge fixes [ci skip]
parsers will be fixed after
2024-02-15 14:08:10 +03:00
MX
62edabe9dd Merge branch 'ofw_dev' into dev 2024-02-15 13:56:57 +03:00
hedger
890bb9838c toolchain: bump to v30 2024-02-15 09:24:08 +00:00
Radek Pilar
87804374c5 lfrfid/em4100: added support for different bit rates (#3410)
* lfrfid/em4100: added support for different bit rates
* Format Sources

Co-authored-by: Radek Pilar <radek.pilar@apollogames.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-02-15 15:31:04 +07:00
Leptopt1los
26ac455fb9 T5577 lib: write with mask function added (#3362)
* T5577 lib: write with mask function added
* t5577_write_with_mask: with_password param added

Co-authored-by: あく <alleteam@gmail.com>
2024-02-15 13:10:48 +07:00
wooferguy
9298e567d0 SubGhz: Magellan Event Code Update
Interpret Magellan event codes correctly.
2024-02-15 18:53:57 +13:00
Nikolay Minaylov
c3c54f672c Archive: fixed Apps tab ext filter (#3450)
Co-authored-by: あく <alleteam@gmail.com>
2024-02-15 10:53:34 +07: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
hedger
887083b7f5 scripts: toolchain: only unlink symlink if exists 2024-02-14 23:35:12 +00:00
Methodius
c061fb1681 transactions render fix part 2 2024-02-15 01:45:48 +09:00
Methodius
8dd59a5d9e Merge remote-tracking branch 'upstream/dev' into emv-fixes 2024-02-15 00:37:24 +09:00
Methodius
cc457fade2 total cleanup. finally, bitlib 2024-02-14 18:34:26 +03:00
hedger
d72c449b13 scripts: better error handling in update process 2024-02-14 13:51:10 +00:00
hedger
d70bcfdfff toolchain: v29 preparations 2024-02-14 13:37:53 +00:00
MX
6d15c23231 Merge branch 'ofw_dev' into dev 2024-02-14 12:12:54 +03:00
Methodius
0397dd0a40 fix false-positive emv protocol detect 2024-02-14 17:43:09 +09: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
gornekich
a46038acbf Gui text box: fix formatted string memory reservation (#3447)
* text box: reserve correct memory size to avoid reallocation
* Furi: change string reset behavior to release memory, prevent realloc call. Gui: fix NULL-ptr dereference in TextBox.

Co-authored-by: あく <alleteam@gmail.com>
2024-02-14 11:19:05 +07:00
Methodius
3f29295380 transactions render fix
Co-authored-by: Nikita Vostokov <1042932+wosk@users.noreply.github.com>
2024-02-14 12:44:03 +09:00
Sören
3c77dc7930 Add Model JTC Genesis 5.5 to IR (#3388)
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-14 10:20:36 +07:00
Nikolay Minaylov
13493916e2 JS debug disabled, archive and file browser fixes (#3446)
Co-authored-by: あく <alleteam@gmail.com>
2024-02-14 10:14:29 +07:00
hedger
0acd3bfc66 VSCode integration fixes for new toolchain (#3448)
* fbtenv: link toolchain to current on *nix
* vscode: simplified tool paths
* fbtenv: link toolchain to 'current' on Windows

Co-authored-by: あく <alleteam@gmail.com>
2024-02-14 10:05:59 +07:00
gornekich
3d9a6a41db FIX ISO15693 emulation (#3444)
* furi hal gpio: allow enabling interrupt without handler
* signal reader: explicitly enable and disable gpio interrupt

Co-authored-by: あく <alleteam@gmail.com>
2024-02-14 09:37:04 +07:00
MX
7d7f15bdf1 Merge remote-tracking branch 'OFW/hedger/vscode4gcc12' into dev 2024-02-13 20:01:37 +03:00
Methodius
5c88e680a6 Merge remote-tracking branch 'upstream/dev' into emv-fixes 2024-02-14 00:36:02 +09:00
MX
fdde5856b8 upd docs 2024-02-13 17:48:49 +03:00
MX
949098bbc5 Merge remote-tracking branch 'OFW/gornek/nfc_fix_oom' into dev 2024-02-13 17:24:07 +03:00
gornekich
4042852825 text box: reserve correct memory size to avoid reallocation 2024-02-13 14:00:44 +00:00
MX
71a93e8cc3 Merge remote-tracking branch 'OFW/nm/js_archive_fixes' into dev 2024-02-13 16:29:15 +03:00
nminaylov
d75f2c62ca JS debug disabled, archive and file browser fixes 2024-02-13 16:05:04 +03:00
MX
dd87afcbde Reduce subghz add manually scene flash size
by @Willy-JL
2024-02-13 15:55:28 +03:00
MX
f5cc40af0c Merge branch 'ofw_dev' into dev 2024-02-13 13:54:26 +03:00
Nikolay Minaylov
25a280c818 JS serial module renamed, uart channel selection (#3445) 2024-02-13 10:04:27 +07:00
MX
19fe8e8954 Merge branch 'js_uart_serial' into dev 2024-02-13 05:05:16 +03:00
hedger
9d5135daff fbtenv: link toolchain to 'current' on Windows 2024-02-12 23:49:32 +00:00
MX
3a847243bc Merge remote-tracking branch 'OFW/gornek/fix_iso15_emulation' into dev 2024-02-13 02:28:11 +03:00
hedger
a9fb8da642 vscode: simplified tool paths 2024-02-12 23:03:13 +00:00
hedger
7e7c2b746c fbtenv: link toolchain to current on *nix 2024-02-12 22:58:48 +00:00
gornekich
42d3876d22 Merge branch 'dev' into gornek/fix_iso15_emulation 2024-02-12 16:59:31 +00:00
nminaylov
0f7411d03a JS serial module renamed, uart channel selection 2024-02-12 18:06:01 +03:00
MX
d61931e69d run fbtformat 2024-02-12 17:26:12 +03:00
MX
75c7c7473a Merge branch 'ofw_dev' into dev 2024-02-12 17:23:50 +03:00
hedger
c8e62ba5e8 mjs: minor fixes (#3442)
* lib: mjs: removed relocation flags

* js: fixed api example script

* js: private api cleanup

* Updated CODEOWNERS & readme for apps
2024-02-12 18:16:58 +04:00
MX
1faeca6e1b Merge branch 'ofw_dev' into dev 2024-02-12 17:11:47 +03:00
gornekich
0fddc8ed60 signal reader: explicitly enable and disable gpio interrupt 2024-02-12 13:33:33 +00:00
gornekich
9d1b14effa furi hal gpio: allow enabling interrupt without handler 2024-02-12 13:32:27 +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
Methodius
b904555ebf application interchange profile parse added 2024-02-12 16:35:56 +09:00
Methodius
14d3510d8e little speed up 2024-02-12 14:46:31 +09:00
Methodius
11cfbd1ec8 bruteforce sfi 2-3 records 1-5 2024-02-12 14:34:11 +09:00
Alessandro Rossi
389affd904 Fixed MyKey check LockID (#3412)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-02-12 09:35:16 +07:00
Georgii Surkov
6d09bebf14 [FL-3769] Check universal remote files before loading (#3438)
* Improve code readability
* Check universal remote files before loading

Co-authored-by: あく <alleteam@gmail.com>
2024-02-12 09:30:10 +07:00
gornekich
b0df852944 NFC: fix retry scene navigation logic (#3439)
* nfc app: fix retry scene navigation logic
* nfc app: fix navigation in exit confirm scene

Co-authored-by: あく <alleteam@gmail.com>
2024-02-12 09:23:44 +07:00
Georgii Surkov
6836a7b7c5 [FL-3764] Expansion module service improvements (#3429)
* Separate expansion control and worker threads
* Add edge case checks
* Reduce expansion control thread stack size, add comments
* Fix crash when disabling expansion modules
* Show a different RPC icon for expansion modules
* Restore expansion interrupt on changing logging settings
* Improve responsiveness in heavy games at the expense of dropped frames
* Improve furi_hal_serial API
* Fix a typo
* Remove too optimistic furi_check, replace with condition
* Fix premature RX interrupt during serial configuration
* Disable expansion interrupt if the handle was acquired
* Do not use a timer callback

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-12 09:16:34 +07:00
hedger
14dabf523a New toolchain with gcc 12 (#3254)
* changes for xPack 12.3
* support for gcc 13.2
* Update tools name
* Add new linux toolchain
* Fixed copro submodule
* Fix gdb-py
* Fixes for c++ apps
* Fix gdb-py3, add udev rules
* Fixed udev rules location
* Add MacOS arm, fix fbt toolchain download
* Fixed downloading error file
* fbt: fixed linker warnings; removed gcc 10 from list of supported toolchains
* ufbt: fixed supported toolchain versions
* nfc: replaced local malloc with calloc
* restored code with Warray-bounds to older state
* Update fbtenv.cmd
* Suppressing warnings
* Bump to 25
* Bump to 26
* lint: reformatted macros for new clang-format
* Bump to 27
* Fix m type word
* Bump to 28
* furi: added FURI_DEPRECATED macro
* scripts: toolchain download on Windows: fixing partially extracted cases

Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
2024-02-12 09:04:12 +07:00
Methodius
809e1b3aff explicit nodata message when no data parsed from card 2024-02-12 03:18:36 +09:00
Methodius
a9de06d6f2 cardholder name parsing prepared 2024-02-12 03:09:47 +09:00
Methodius
08f096df24 EMV dump save/load fix 2024-02-12 00:28:01 +09:00
Methodius
4a382bc1de typos fixed 2024-02-11 04:54:04 +09:00
Methodius
6f71f1113a Merge remote-tracking branch 'upstream/dev' into emv-fixes 2024-02-11 04:45:27 +09:00
Methodius
c24625fae8 14_4a poller: send block max attempts increased 2024-02-11 04:45:07 +09:00
MX
a35159c220 merge official fw hid app keyboard changes
replace our icons with ofw icons, include better modifiers support
2024-02-10 21:58:07 +03:00
MX
2d2fac5045 del unused scene (merge ofw dev) 2024-02-10 21:30:23 +03:00
Methodius
c35f258ab8 parser 0day fix 2024-02-11 02:01:06 +09:00
Methodius
702e4f39ab 0x5F25 tag renamed (issue date->effective date) 2024-02-11 01:32:17 +09:00
Methodius
56875ed9a7 Revert "WIP: Test for some visa cards"
This reverts commit ab609bc294.
2024-02-11 01:18:27 +09:00
Methodius
1e09034e23 Merge remote-tracking branch 'upstream/dev' into emv-fixes 2024-02-11 00:09:52 +09:00
MX
8a86571068 fit full name on display 2024-02-10 17:55:19 +03:00
Methodius
37708b0e79 new parsers minor fixes 2024-02-10 17:52:22 +03:00
MX
14ae52f88f Merge remote-tracking branch 'leptoptilos' into dev 2024-02-10 17:08:45 +03:00
MX
8584702fd7 Merge remote-tracking branch 'OFW/gsurkov/3764_expansion_control' into dev 2024-02-10 17:06:25 +03:00
MX
ed9cb357b5 Merge remote-tracking branch 'OFW/gornek/3768_nfc_fix_mfc_read' into dev 2024-02-10 16:49:57 +03:00
MMX
34a1d9eba4 Merge pull request #703 from eltociear/patch-1
Update ReadMe.md
2024-02-10 16:49:28 +03:00
MX
357df80642 apply fix for msteams on macos
by cpressland

https://github.com/Flipper-XFW/Xtreme-Firmware/pull/545/files
2024-02-10 14:51:23 +03:00
MX
1a02152d03 Update ndef parser, apply mf classic dict changes
by @Willy-JL

https://github.com/Flipper-XFW/Xtreme-Firmware/blob/dev/applications/main/nfc/plugins/supported_cards/ndef.c
https://github.com/Flipper-XFW/Xtreme-Firmware/blob/dev/applications/main/nfc/resources/nfc/assets/mf_classic_dict.nfc
2024-02-10 14:46:46 +03:00
Nikita Vostokov
ab609bc294 WIP: Test for some visa cards
* Could break communication with another cards
2024-02-10 01:38:46 +00:00
Nikita Vostokov
e6935f2a9d Reset transactions widget before enter again 2024-02-10 01:38:46 +00:00
MX
5b97ddc842 Merge branch 'ofw_dev' into dev [ci skip] 2024-02-10 02:38:42 +03:00
MX
7ab888bb98 Revert "NFC: Add manually MF Classic UID desync bug fixed"
This reverts commit d1df26cc83.
2024-02-09 22:00:47 +03:00
MX
b135c8e792 Revert "NFC App: Generate MF Classic with custom UID added"
This reverts commit 941652ec57.
2024-02-09 22:00:24 +03:00
gornekich
edda4e5508 nfc app: fix navigation in exit confirm scene 2024-02-09 18:32:40 +00:00
gornekich
ed055cbdf6 Merge branch 'dev' into gornek/3768_nfc_fix_mfc_read 2024-02-09 17:54:12 +00:00
gornekich
cf41c98d66 nfc app: fix retry scene navigation logic 2024-02-09 17:04:29 +00:00
Georgii Surkov
73deff8863 Do not use a timer callback 2024-02-09 16:31:45 +03:00
Georgii Surkov
4c2e997997 Disable expansion interrupt if the handle was acquired 2024-02-09 15:20:54 +03:00
Georgii Surkov
ade84ccb9c Merge branch 'dev' into gsurkov/3764_expansion_control 2024-02-09 13:17:46 +03:00
JuicyPigWalker
bcdb9cb13c Update tv.ir (#3421)
* Update tv.ir: Added tv "TCL 50P715X1" recorded remote signals. Hope everything is okay, this is my first GitHub contribution.
* Update tv.ir: Fixed my own mistakes when uploading the signals.
* Infrared: revert 962d809ad7

Co-authored-by: Yoel <34217507+yoelci@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-02-09 17:12:46 +07:00
MX
afad5e4407 Merge branch 'ofw_dev' into dev 2024-02-09 12:48:37 +03:00
tomellens
962d809ad7 Update tv.ir (#3399)
Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 16:39:35 +07:00
Nikolay Minaylov
3c73123a81 HID app: keyboard modifiers fix (#3378)
* HID App: Modifier keys fix
* Toggled keys indication
* New enter and backspace button icons

Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 16:33:47 +07:00
Georgii Surkov
f3f3e56c63 Merge branch 'dev' into gsurkov/3764_expansion_control 2024-02-09 12:27:14 +03:00
Nikolay Minaylov
b2a7bb0696 [FL-3672] CLI: cat command crash workaround (#3358)
* Cli input len limit, CDC EP type fix

Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:59:24 +07:00
Skorpionm
c0db3d541e [FL-3753] UI SubGhz: fix UI only_rx scene (#3379)
* UI SubGhz: fix UI only_rx scene
* UI SubGhz: delete unused scene

Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:49:58 +07:00
Tolly Hill
50e0521bf7 NFC: Custom UID entry when adding manually (#3363)
* NFC: Custom UID entry when adding manually
* Fix incorrect types
* Add Change UID option post-generation
* Update UID derived data when using set_uid method
* Fix PVS warnings

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:36:06 +07:00
Alessandro Rossi
ebd09a1981 Added NFC plugin; Some parser (#3335)
* Add parser
* Fix microel.c
* Fix NFC parser positive return
* fix mizip
* Fix NFC parser positive return
* Add parse to hi! tag
* fix false positive reading and kdf
* hi formatting
* fix oom in kdf
* nfc app: fix types in hi plugin
* nfc app: fix return in function body in microel plugin

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:16:14 +07:00
gornekich
6bc63b7734 [FL-3676] Slix disable privacy (#3425)
* slix: add unlock option
* slix: add features for nxp get info and signature commands
* slix: working unlock
* nfc app: rewrite slix unlock
* slix poller: simplify unlock state handler
* nfc app: fix slix key setting
* nfc app: fix navigation
* slix poller: code clean up
* slix: resolve TODO, clean code
* nfc app: fix naming
* nfc app: rework slix unlock success scene
* slix poller: add documentation
* slix listener: fix password comparison

Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:07:54 +07:00
Nick Mooney
f6eb79e1e5 NFC: Add support for Gallagher access control (MIFARE Classic only) (#3306)
* Merge remote-tracking branch 'origin/dev' into dev
* Add basic API interface (inspired by advanced plugins example), modify NfcSupportedCardsLoadContext to contain a pointer to a resolver
* WIP: API resolver implemented / passed to plugin via context, still having resolution issues
* Attempt to add constants to the nfc_app_api_table list
* WIP: We're defining the constants directly in nfc_app_api.c to see if this fixes our woes, which it does not.
* WIP: Remove furi_assert(false) (lmao)
* Working implementation of Gallagher decoding via exposed plugin API
* lib: api_hashtable: change log level for symbol not found message
* nfc app: alloc composite resolver along with supported cards
* nfc app: rework nfc api structure
* nfc app: fix memory leakage in supported cards

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-02-09 15:00:17 +07:00
Nikita Vostokov
d195de502e Fix PDOL parsing 2024-02-09 00:06:34 +00:00
Methodius
ec356626fa code cleanup, gui fixes 2024-02-08 23:59:48 +00:00
Nikita Vostokov
b1674711a1 [EMV] Add Effective date and Preferred Name 2024-02-08 23:58:52 +00:00
Nikita Vostokov
9ceae3a3b2 [EMV] Fix crash while PDOL parsing 2024-02-08 23:58:52 +00:00
Georgii Surkov
ded9b121ba Fix premature RX interrupt during serial configuration 2024-02-08 15:18:58 +03:00
Georgii Surkov
534fe2fb26 Remove too optimistic furi_check, replace with condition 2024-02-08 14:50:39 +03:00
Georgii Surkov
3cbc68f07a Merge branch 'dev' into gsurkov/3764_expansion_control 2024-02-08 13:48:30 +03:00
Kris Bahnsen
26da5f564b furi/core/timer: resolve timer handle use-after-free post deletion (#3431)
When xTimerDelete is called using a dymanic timer handle, the timer
handle should immediately be considered unusable for any operation;
including checking if the timer is still running. Under high system
loads, that memory region may see fast reuse while furi_timer_free
is sleeping between timer active checks. That reuse could result in
memory at that pointer causing the timer active check to return true.

Rework the furi_timer_delete process (in the case of dynamically
allocated callback memory) to stop the timer, wait for it to stop,
free the memory, and then delete the timer. Timers without dynamically
allocated callback memory are just sent a delete command; no need
to stop it first.

Fixes: ff33bc6aea ("Furi: wait for timer wind down in destructor (#1716)")

Signed-off-by: Kris Bahnsen <Kris@KBEmbedded.com>
2024-02-08 16:22:03 +07:00
Georgii Surkov
1ad9bb8caf Merge branch 'dev' into gsurkov/3764_expansion_control 2024-02-07 21:18:25 +03:00
Georgii Surkov
5a92adaefc Fix a typo 2024-02-07 21:16:04 +03:00
Georgii Surkov
c489c956e7 Improve furi_hal_serial API 2024-02-07 21:13:38 +03:00
あく
afd41aade1 FuriHal: various GPIO improvements (#3406) 2024-02-07 12:09:29 +03:00
Georgii Surkov
fee6f12684 Improve responsiveness in heavy games at the expense of dropped frames 2024-02-07 11:43:58 +03:00
Methodius
4265b9c28e parsers cleanup 2024-02-07 14:21:58 +09:00
Methodius
95e653cf76 Merge remote-tracking branch 'origin/dev' into leptoptilos 2024-02-07 14:01:54 +09:00
Sergei Gavrilov
29fa68118d GUI: canvas commit callback has been moved to canvas. Direct Draw apps can now be streamed via RPC. (#3397)
Co-authored-by: あく <alleteam@gmail.com>
2024-02-07 09:38:20 +07:00
Georgii Surkov
4625d6f17c Merge branch 'dev' into gsurkov/3764_expansion_control 2024-02-06 22:47:17 +03:00
MX
dd4f873439 Merge branch 'ofw_dev' into dev [ci skip] 2024-02-06 22:42:19 +03:00
gornekich
4984e9e414 nfc app: fix incorrect protocol detection in save scene (#3430) 2024-02-06 23:25:55 +04:00
MX
3e53e69827 Merge branch 'ofw_dev' into dev 2024-02-06 22:18:29 +03:00
RebornedBrain
8c54c14742 [FL-3758] NFC: MFC Unlock with Dictionary (#3411)
* New menu item "Unlock with Dictionary" added to classic menu

* No retry also returns to dictionary attack if it was previously displayed

* nfc app: format code

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-02-06 23:11:27 +04:00
gsp8181
e180266c1a ITSO Parser (UK) (#3325)
* Create ITSO parser

Standard for UK transport cards outside of Oyster

* Update application.fam with ITSO parser

* Update date buffer to fix access outside array

* nfc app: use rtc function in itso plugin

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-02-06 18:55:38 +00:00
MX
751cf23410 Merge branch 'ofw_dev' into dev 2024-02-06 21:37:32 +03:00
RebornedBrain
cd8e76bbcd [FL-3757] NFC: fix application opening from browser (#3396)
* nfc_protocol_support_has_feature is now public

* Added function to show different scene depending on supported features of the device

* Fix delete button logic when selected from browser

* Fix rename button logic when selected from browser

* Update nfc_scene_save_success.c

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-02-06 22:26:05 +04:00
MX
2d78e23d25 Merge branch 'ofw_dev' into dev 2024-02-06 21:23:11 +03:00
RebornedBrain
9d6f51484a [FL-3755] Rework more info scene for Ultralight cards (#3391)
* Changed event handler signature. Now we put whole SceneManagerEvent not only custom event.

* Changed signature and implementation of common on_event callback

* Changes required due to event signature adjustment

* Reset widget on exit from more info scene

* Enum for more info scene states for ultralight cards

* New implementation of more info logic added

* Check simplified

* Update nfc_protocol_support.c

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-02-06 22:20:57 +04:00
RebornedBrain
9a77dbec56 [FL-3678] NFC UI refactor (#3382)
* Added new image DolphinSaved_113x58.png for all "saved" pages

* New image DolphinDone_80x58.png added

* Replaced dolphins on all scenes accroding to new UI specs

* New success dolphin image added

* Success scene image replaced

* Changed image and text for update initial scene

* Image and text adjusted for "Original restored" scene

* Removed old DolphinNice_96x59.png image

* New image for LFRFID scene

* Removed unused image

* New UI image added to assets

* Replaced warning dolphin on mf_classic write initial fail scene

* Removed old image

* Changed image on scenes to a new one

* New dolphin mafia image

* Replaced dolphin mafia image to a new one

* Removed DolphinMafia_115x62.png

* New check symbol on completed state for detect_reader

* Adjusted layout elements position

* Removed second switching to popup view in order to achieve control in support callbacks

In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol

* CardDetected event now also triggers on_event callback

* Now on AuthRequest we throw CardDetected custom event

* Added callback for read_on_event

* Now we show different screen while reading and unlocking

* Fixed missing asstes for some scenes

* Update DolphinMafia_119x62.png

* Adjusted all the scenes with DolphinMafia image

* Scenes with save image adjusted

* Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png

* All common dolphins moved to Dolphin folder

* Moved DolphinReadingSuccess_59x63.png to Dolphin folder

* Set proper led color for detect and read scenes

* Added new notification sequence for semi_success results

* Use new sequence for semi_success nfc reads

* Different events are now throwed depending on read result

* Added handling of incomplete event for ultralight cards

* Replaced image for iButton scene

* Updated API for f18

* Fixed issue with unlock retry sequence

* Fix after review

* Success notification replaced to semi success in case of incomplete mf classic reading

* New text for read scene

* New read result sound notification logic for mf classic cards

* Change MIFARE name accroding to new requirements

* New QR code image for MFKey app

* Update nfc_scene_mf_classic_mfkey_complete.c scene according to new UI requirements

* Update detect_reader.c and check_big_20x17.png

* New nfc save confirm scene added

* Implemented new flow for 'Detect Reader button' after partial mf classic read according to new UI

* UID for 15693 tags now shown on the new line

* Fix nfc unit tests

* Revert "Fix nfc unit tests"

This reverts commit 685ed6bfad.

* Rolled back all Mifare renamings in library files

* Revert "Change MIFARE name accroding to new requirements"

This reverts commit cfb974dc1f.

* Now Mifare word is changed only on the app level without changes to lib level

* Filename or "Unsaved + CardType" is now showed for saved cards during emulation

* Headers added to Write scenes

* Reordered menu items accrding to new spec

* Filename will be printed for saved tag in info scene

* New info render format for 14443_3a cards

* New info render format for 14443_3b cards

* New info render format for 14443_4a cards

* New info render format for iso15693 cards.

Also More_Info scene added to display Memory data

* New info render format for slix cards.

Also More_Info scene added to display Memory data

* Fixed "Mifare" word for desfire cards

* Aligned text and replaced dolphin image on emulate scene

* Fixed Mifare caption after QA

* Realigned emulation scene and fixed replaced Mifare to MIFARE

---------

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-02-06 21:57:06 +04:00
Jeremy Cooper
a83e421d71 Add an NFC parser for the San Francisco Bay Area "Clipper" transit card. (#3344)
* Add an NFC parser for the San Francisco Bay Area "Clipper" transit card.

* Add more agencies and stations, decode vehicle ids, refactor.

Add more agencies and station names using data from local research
and:

* Metrodroid project (GPLv3): https://github.com/metrodroid/metrodroid
* Farebot (GPLv3): https://github.com/codebutler/farebot

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-02-06 21:47:44 +04:00
MMX
2c784d3fea Fix nfc_protocol_support_scene_save_name_on_event crash (#3418)
* Add Clearing of detected protocols list in nfc_scene_start

* Apply patch

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-02-06 21:42:06 +04:00
Tolly Hill
c736c3f3f0 NFC: Display unread Mifare Classic bytes as question marks (#3384)
* NFC: Display unread Mifare Classic bytes as ??

* Apply patch from @gornekich

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-02-06 21:34:54 +04:00
Astra
e0782966d4 [FL-3661] Troika layout fixes (#3365)
* Add support for different troika layouts

* Display additional data if debug is enabled in settings

* Support for layout 2, where there's no balance

* nfc app plugins: fix mfc read error processing

* nfc app: clean up troika plugin

* nfc app: troika parser more clean up

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-02-06 21:29:17 +04:00
Leptopt1los
ed34dfa1c6 NFC: MF Classic parsers read() fix (dictionary attack skip) (#3355)
* NFC: MF Classic lib: MfClassicErrorPartialRead added

* unnecessary imports removed

* MfClassicError refactor by @gornekich

Co-authored-by: gornekich <n.gorbadey@gmail.com>

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-02-06 20:53:42 +04:00
Georgii Surkov
962a7b1ba7 Restore expansion interrupt on changing logging settings 2024-02-06 19:40:56 +03:00
Georgii Surkov
2e05489a82 Show a different RPC icon for expansion modules 2024-02-06 18:12:13 +03:00
Georgii Surkov
ff28c23f64 Fix crash when disabling expansion modules 2024-02-06 17:10:14 +03:00
Georgii Surkov
3721a71eab Reduce expansion control thread stack size, add comments 2024-02-06 16:38:54 +03:00
Georgii Surkov
6846e808cf Add edge case checks 2024-02-06 16:02:46 +03:00
Georgii Surkov
2f0adf73c7 Separate expansion control and worker threads 2024-02-06 15:41:59 +03:00
Methodius
35674a306b Kazan parser improved: token parse option added 2024-02-05 20:53:08 +09:00
Ikko Eltociear Ashimine
fb2bff6c4d Update ReadMe.md
recomeded -> recommended
2024-02-03 01:33:36 +09:00
MX
12d70a3c32 fix changelog 2024-02-01 06:56:56 +03:00
MX
f9b6d22534 upd changelog 2024-02-01 06:12:12 +03:00
MX
c63089a929 finally 2024-02-01 05:34:48 +03:00
Methodius
ebcc317816 lfrfid enter password scene events handler fix 2024-01-31 22:35:24 +03:00
MX
603421bd8c fix display 2024-01-31 20:19:39 +03:00
MX
6aa7f2e261 upd changelog 2024-01-31 18:35:07 +03:00
MX
1bd42af688 upd changelog 2024-01-31 18:34:22 +03:00
MX
398a468fd7 disable em4100 16clk due to non working read
32 is working well
2024-01-31 18:32:48 +03:00
MX
90b49926ea fix render with no date/amount 2024-01-31 18:32:13 +03:00
Methodius
7caf2bd2ff enter t5577 password scene fix 2024-01-31 18:00:22 +03:00
MX
3446b38a06 OFW PR 3412 - Fixed MyKey LockID
by zProAle
https://github.com/flipperdevices/flipperzero-firmware/pull/3412/files
2024-01-31 16:41:41 +03:00
MX
22be06174a better naming 2024-01-31 16:38:03 +03:00
Radek Pilar
6bfa591e92 lfrfid/em4100: added support for different bit rates 2024-01-31 16:37:49 +03:00
Methodius
4573046df8 nfc/lfrfid emulation abort after 5min disable if debug on 2024-01-31 15:37:29 +03:00
MX
fe05c678c4 fix nfc saved success scene 2024-01-31 15:37:23 +03:00
MX
5d4dae5fa8 update readme and changelog 2024-01-31 04:06:08 +03:00
MX
89e1620883 rename timers, stop before free 2024-01-31 01:32:57 +03:00
MX
4fd0ce3eb5 fix dea mio formula
thanks @Leptopt1los for working on that instead of sleeping lol
2024-01-31 00:50:52 +03:00
MX
28723949c4 fixes for opening nfc files from favourites that doesnt support emulation 2024-01-31 00:04:54 +03:00
MX
cbab316607 render transactions info properly 2024-01-30 23:45:56 +03:00
Methodius
19a5f02d66 auto-stop emulation after 5min feature added 2024-01-30 23:33:14 +03:00
Methodius
754fffac6b typos fixed 2024-01-30 23:33:07 +03:00
MX
289fbe56be subghz raw erase fixes
by @Willy-JL
2024-01-30 23:32:41 +03:00
MX
c31052848a expansion settings read and store in ram
by @Willy-JL
2024-01-30 23:26:08 +03:00
MX
a8651a2861 Merge branch 'nfc_refactors_fixes_merge' into dev 2024-01-30 23:04:37 +03:00
MX
76a5c444fa Merge remote-tracking branch 'TollyH/mfc-view-unknown' into nfc_refactors_fixes_merge 2024-01-30 23:00:08 +03:00
MX
da44d70bf2 Merge remote-tracking branch 'RebornedBrain/reborned/open_from_browser' into nfc_refactors_fixes_merge 2024-01-30 22:59:39 +03:00
MX
e702cdedc3 Merge remote-tracking branch 'RebornedBrain/reborned/scene_info_rework' into nfc_refactors_fixes_merge 2024-01-30 22:58:38 +03:00
MX
67eb679435 Merge remote-tracking branch 'RebornedBrain/reborned/nfc_ui_refactor_2' into nfc_refactors_fixes_merge 2024-01-30 22:57:32 +03:00
MX
ed3cd21f5c run fbt format, add smol fix 2024-01-30 21:18:27 +03:00
MX
d3dcc1d27d Merge branch 'ofw_dev' into dev 2024-01-30 17:14:38 +03:00
Georgii Surkov
e6f078eeb7 [FL-3759] Fix expansion protocol crash when fed lots of garbage (#3409)
* Fix crash caused by garbage input
* Add unit tests for garbage input
* Enable applications to disable and then restore expansion module support
* GPIO App: disable expansion on app start and re-enable on exit

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-01-30 22:54:25 +09:00
gornekich
097632fb7a Merge branch 'dev' into reborned/open_from_browser 2024-01-30 11:28:10 +00:00
MX
834c2efb8b upd changelog 2024-01-30 13:24:26 +03:00
MMX
1cb8b0e369 Merge pull request #700 from Leptopt1los/dev
EMV protocol+parser
2024-01-30 13:22:16 +03:00
MMX
100a46d7af Merge pull request #699 from DarkFlippers/leptoptilos
metromoney parser balance fix
2024-01-30 13:22:06 +03:00
Methodius
b0371b3465 metromoney parser balance fix 2024-01-30 16:55:22 +09:00
Methodius
872987f002 Protocol featore: more info 2024-01-30 13:50:57 +09:00
Nikita Vostokov
51d8b18f3e Read SFI until PAN find
* get rid of input result buffers
2024-01-30 00:26:16 +00:00
Methodius
92a25af3c3 minor parser fixes 2024-01-30 02:39:38 +09:00
Methodius
ce80586822 Merge remote-tracking branch 'upstream/dev' into dev 2024-01-30 02:22:28 +09:00
Methodius
fee4a5a8f7 EMV save/load dump options added 2024-01-30 02:22:21 +09:00
Methodius
a15312e052 parser fix 2024-01-30 00:29:06 +09:00
MX
d23bc9f58a upd changelog 2024-01-29 17:45:05 +03:00
MX
35a93e6eef update honeywell proto to latest one
by Willy-JL
2024-01-29 17:32:25 +03:00
nminaylov
a5b77aa228 it-IT-mac layout 2024-01-29 17:15:39 +03:00
Methodius
3612814a18 back to parser 2024-01-29 23:12:17 +09:00
Nikita Vostokov
1165e25f00 Read all files 2024-01-29 13:48:33 +00:00
MX
64fe987fb5 Merge branch 'ofw_dev' into dev 2024-01-29 15:53:00 +03:00
あく
c8ea167a06 0.98.0-rc various fixes (#3402) 2024-01-29 21:35:46 +09:00
Nikita Vostokov
653af9a5cd Read PIN tries and transactions counters 2024-01-29 00:07:17 +00:00
MX
16d1c938bf more contrast values for replacement displays 2024-01-29 02:23:42 +03:00
Nikita Vostokov
1074af905c Use render
* Add transactions menu item
* Use nfc assets for country/currency/aid
* remove deprecated render
2024-01-28 22:45:26 +00:00
Nikita Vostokov
786f3568c0 Fix retry loop (on Android HCE) 2024-01-28 20:18:17 +00:00
MX
830dbc7a71 subghz dea_mio fixes and programming mode support 2024-01-28 22:47:47 +03:00
MX
686c05d20c change ci node 2024-01-28 08:53:41 +03:00
Nikita Vostokov
4b786fb77e Refactor response decoder
Read transactions history
2024-01-28 03:57:12 +00:00
MX
16b8fa4715 Subghz save files with receive time [ci skip]
+ merge better scene_save_name code (removing kostily)
some modifications to original code was made to keep previous formats
original implementation by Willy-JL

Source:
a1c7dc5eaa
7e7509d481 (diff-1708ba08196de5331f4b4c3d8e13162e78d5edb33e1308c1b4cc09975264151e)
2024-01-28 06:45:33 +03:00
Nikita Vostokov
39055ff701 Improve info screen
* search F only in card_number
2024-01-28 00:08:19 +00:00
MX
cbc0231461 disable expansion and reset some flags for release builds
there is no expansion modules yet, so we can disable uart listen for them being enabled 24/7
p.s. some parts of code was taken from Willy-JL's solution
todo: revert force reset part if there are real use cases for expansion protocol appears
2024-01-27 19:05:52 +03:00
MX
1ceacc6555 subghz keeloq fix emulation for multiple systems
and extend add manually support for 2 of them
2024-01-27 18:55:50 +03:00
MX
ae04fc70eb fix archive filebrowser bugs 2024-01-27 17:53:11 +03:00
MX
acd6445d3b fix NFC V dumps v3 crashing at info page 2024-01-27 03:20:53 +03:00
RebornedBrain
7a89789a28 Check simplified 2024-01-25 15:02:19 +03:00
RebornedBrain
63eeb86bc7 Added function to show different scene depending on supported features of the device 2024-01-24 21:52:24 +03:00
RebornedBrain
1e6fe92b44 nfc_protocol_support_has_feature is now public 2024-01-24 21:51:31 +03:00
Nikita Vostokov
c014491f55 Support 19 bytes PAN (eg.MIR virt) 2024-01-23 22:40:38 +00:00
Nikita Vostokov
5e384ccc43 Fix log 2024-01-23 22:40:38 +00:00
Nikita Vostokov
3fce83eb79 Process error codes 2024-01-23 22:40:38 +00:00
Nikita Vostokov
3f6092d95c Don't stop if SELECT APPLICATION failed 2024-01-23 22:40:38 +00:00
Nikita Vostokov
87f8f1d9c4 Remove kostyly, add raw debug 2024-01-23 22:40:38 +00:00
RebornedBrain
eb4d0bb737 Realigned emulation scene and fixed replaced Mifare to MIFARE 2024-01-23 23:01:43 +03:00
RebornedBrain
b9498826fd New implementation of more info logic added 2024-01-23 22:42:19 +03:00
RebornedBrain
2617eccb46 Enum for more info scene states for ultralight cards 2024-01-23 22:41:19 +03:00
RebornedBrain
aef18f6b2f Reset widget on exit from more info scene 2024-01-23 22:40:33 +03:00
RebornedBrain
aad9f6be28 Changes required due to event signature adjustment 2024-01-23 22:39:25 +03:00
RebornedBrain
9fb14704c3 Changed signature and implementation of common on_event callback 2024-01-23 22:33:55 +03:00
RebornedBrain
1ad17878e3 Changed event handler signature. Now we put whole SceneManagerEvent not only custom event. 2024-01-23 22:33:04 +03:00
TollyH
391c32654b Apply patch from @gornekich 2024-01-23 17:17:37 +00:00
RebornedBrain
74023e43ce Fixed Mifare caption after QA 2024-01-23 18:08:17 +03:00
RebornedBrain
c470748e3f Aligned text and replaced dolphin image on emulate scene 2024-01-23 14:00:45 +03:00
Methodius
84abb53712 Track2 support
Co-authored-by: Nikita Vostokov <1042932+wosk@users.noreply.github.com>
2024-01-23 19:51:59 +09:00
MX
46eec3f568 use printf 2024-01-22 07:26:30 +03:00
MX
007e29425d small ui fix for nfc and fix subghz hopper bug 2024-01-22 07:21:13 +03:00
MX
41c316d612 mac os music remote
todo - add more buttons
2024-01-20 08:48:26 +03:00
Methodius
39e9dd0ab0 T5577 write/clear with custom password option added 2024-01-20 07:47:45 +03:00
MX
a989c8adcc Merge branch 'mergeuartrefac' into dev 2024-01-20 07:25:26 +03:00
Methodius
5f041a22e5 EMV parser: exp date added 2024-01-20 06:39:34 +09:00
Methodius
ecabcbc58a Kostyly for iso14443-4a poller (pwt_ext)
Co-authored-by: Nikita Vostokov <1042932+wosk@users.noreply.github.com>
2024-01-20 05:42:35 +09:00
MX
c002684233 Merge branch 'ofw_dev' into mergeuartrefac 2024-01-19 23:27:38 +03:00
MX
a4ebbeabd2 RFID CLI: better usage (#3376)
Co-authored-by: あく <alleteam@gmail.com>
2024-01-19 23:25:36 +03:00
gornekich
7db8d5aa82 [FL-3648] Mf DESFire fixes (#3367)
* mf desfire: process loading applications with 0 files
* mf desfire: add HID desfire support
* nfc: fix mfdes loading and rendering crashes
* mf desfire: change handling HID cards
* mf desfire: fix PVS warnings
* mf desfire: fix cmp logic

Co-authored-by: あく <alleteam@gmail.com>
2024-01-19 23:24:38 +03:00
MX
7981cb832e [FL-3678] NFC UI refactor (#3369)
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-19 23:24:03 +03:00
MX
c27494ac39 [FL-3669] Expansion module protocol (#3250)
* ApiSymbols: add furi_record_destroy
* FuriHal: cleanup serial API, add logging configuration in RTC
* FuriHal: hide private part in _i header. Toolbox: cleanup value index. SystemSettings: logging device and baudrate.
* FuriHal: RTC logging method documentation
* Synchronize API Symbols
* Furi: mark HEAP_PRINT_DEBUG as broken
* FuriHal: furi_hal_serial, add custom IRQ func
* Fix PR review issues
* Implement basic external module detection and echo
* Update api symbols for f18
* Minimally working implementation (can create directory via rpc)
* Make expansion protocol parser a header-only library
* Rename a function
* Improve thread syncronisation
* Implement multi-packet transmissions
* Improve test application
* Clean up expansion worker code
* Send heartbeat when host is ready
* Update API symbols
* Add draft documentation
* Expansion worker: proper timeout and error handling
* Expansion worker: correct TX, do not disable expansion callback
* Expansion protocol: pc side test script
* PC side expansion test: trying to change baudrate
* Working comms between 2 flippers
* Cleaner exit from expansion worker thread
* Better checks
* Add debug logs
* Remove unneeded delays
* Use USART as default expansion port
* Refactor furi_hal_serial_control, fix crash
* Improve furi_hal abstraction, wait for stable rx pin
* Remove rogue include
* Set proper exit reason on RPC error
* Remove rogue comment
* Remove RX stability check as potentially problematic
* Improve expansion_test application
* Remove rogue define
* Give up on TODO
* Implement expansion protocol checksum support
* Update ExpansionModules.md
* RPC: reverse input
* Assets: sync protobuf
* Fix typos
* FuriHal: UART add reception DMA (#3220)
* FuriHal: add DMA serial rx mode
* usb_uart_bridge: switch to working with DMA
* Sync api symbol versions
* FuriHal: update serial docs and api
* FuriHal: Selial added similar API for simple reception mode as with DMA
* FuriHal: Update API target H18
* API: ver API H7
* FuriHal: Serial error processing
* FuriHal: fix furi_hal_serial set baudrate
* Sync api symbols
* FuriHal: cleanup serial isr and various flag handling procedures
* FuriHal: cleanup and simplify serial API
* Debug: update UART Echo serial related flags
* FuriHal: update serial API symbols naming
* Make expansion_test compile
* Remove unneeded file
* Make PVS-studio happy
* Optimise stack usage
* Optimise heap usage, improve api signature
* Fix typo
* Clean up code
* Update expansion_protocol.h
* Fix unit tests
* Add doxygen comments to expansion.h
* Update/add doxygen comments
* Update ExpansionModules.md
* Github: new global code owner
* FuriHal: naming in serial control
* Expansion: check mutex acquire return result

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SkorP <skorpionm@yandex.ru>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: Skorpionm <85568270+Skorpionm@users.noreply.github.com>
2024-01-19 23:22:48 +03:00
John Scarfone
f37d00a8ba Bugfix: Strip last parity bit from decoded FDX-B data (#3199)
* remove last parity bit from buffer
* add unit tests
* zap old debug logging

---------

Co-authored-by: Sergei Gavrilov <who.just.the.doctor@gmail.com>
2024-01-19 23:22:28 +03:00
あく
11ecb54576 FuriHal: interrupt priorities and documentation (#3366)
* FuriHal: interrupt priorities and documentation
* FuriHal: wording
* FuriHal: update interrupt docs
* FuriHal: add more interrupt priority levels
* FuriHal: proper furi_check in interrupts, shift default level to 10

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-01-19 23:22:21 +03:00
MX
8d60c0ff21 fix typo 2024-01-19 23:21:37 +03:00
MX
a1e62c3e76 FuriHal: UART refactoring (#3211)
* FuriHal: UART refactoring
* ApiSymbols: add furi_record_destroy
* FuriHal: cleanup serial API, add logging configuration in RTC
* FuriHal: hide private part in _i header. Toolbox: cleanup value index. SystemSettings: logging device and baudrate.
* FuriHal: RTC logging method documentation
* Synchronize API Symbols
* Furi: mark HEAP_PRINT_DEBUG as broken
* FuriHal: furi_hal_serial, add custom IRQ func
* Fix PR review issues
* FuriHal: UART add reception DMA (#3220)
* FuriHal: add DMA serial rx mode
* usb_uart_bridge: switch to working with DMA
* Sync api symbol versions
* FuriHal: update serial docs and api
* FuriHal: Selial added similar API for simple reception mode as with DMA
* FuriHal: Update API target H18
* API: ver API H7
* FuriHal: Serial error processing
* FuriHal: fix furi_hal_serial set baudrate
* Sync api symbols
* FuriHal: cleanup serial isr and various flag handling procedures
* FuriHal: cleanup and simplify serial API
* Debug: update UART Echo serial related flags
* FuriHal: update serial API symbols naming
* FuriHalSerial: various improvements and PR review fixes
* FuriHal: proper ISR function signatures

---------

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SkorP <skorpionm@yandex.ru>
Co-authored-by: Skorpionm <85568270+Skorpionm@users.noreply.github.com>
2024-01-19 23:20:37 +03:00
MX
16a3f4c06a add missing include 2024-01-19 23:19:07 +03:00
Methodius
b5964b9795 Enum order fixes by Willy-JL
Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
2024-01-20 05:18:16 +09:00
MX
eef4574a63 small fixes for subghz cli 2024-01-19 23:17:20 +03:00
Methodius
e3930a30c0 emv parser updated 2024-01-20 05:09:01 +09:00
MX
36114de5f7 SubGhz: add subghz tx_from_file CLI cmd, major TX flow refactoring, various improvements and bug fixes (#3302)
By Skorpionm
* SubGhz: add cmd CLI "subghz tx_from_file"
* SubGhz:  add sending raw.sub files
* SubGhz: add load custom preset
* SubGhz: remove unnecessary files
* SubGhz: change message
* SubGhz: fix printf formatting
* SubGhz: Cli refactoring code
* FuriHal: add furi_hal_subghz Tx Rx IDLE state switching test
* SubGhz: remove debug code, fix ext driver compilation
* SubGhz: cleanup code, move wait status routine to cc1101 driver
* SubGhz: proper pin mode transition in tx stop isr routine, proper DMA and ISR priorities, fix issue with async tx stuck
* SubGhz: simplify async tx stop flow, fix ISR ARR check condition race
* SubGhz: check ARR only when we transmitting
* SubGhz: check ARR only when we transmitting for ext cc1101
* SubGhz: lower ISR priorities to safe level
* SubGhz: proper gpio config, comments update

Co-authored-by: あく <alleteam@gmail.com>
2024-01-19 22:45:59 +03:00
Leptopt1los
1fd4839bb6 Furi_hal_rtc: new function (#3294)
* furi_hal_rtc_timestamp_to_datetime added
* hw targets api version sync
* hw targets api version sync, bump
* FuriHal: update rtc docs
* unit tests added

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-01-19 22:36:32 +03:00
RebornedBrain
a7ab4b9c32 [FL-3678] NFC UI refactor (#3361)
* Added new image DolphinSaved_113x58.png for all "saved" pages
* New image DolphinDone_80x58.png added
* Replaced dolphins on all scenes accroding to new UI specs
* New success dolphin image added
* Success scene image replaced
* Changed image and text for update initial scene
* Image and text adjusted for "Original restored" scene
* Removed old DolphinNice_96x59.png image
* New image for LFRFID scene
* Removed unused image
* New UI image added to assets
* Replaced warning dolphin on mf_classic write initial fail scene
* Removed old image
* Changed image on scenes to a new one
* New dolphin mafia image
* Replaced dolphin mafia image to a new one
* Removed DolphinMafia_115x62.png
* New check symbol on completed state for detect_reader
* Adjusted layout elements position
* Removed second switching to popup view in order to achieve control in support callbacks
  In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol
* CardDetected event now also triggers on_event callback
* Now on AuthRequest we throw CardDetected custom event
* Added callback for read_on_event
* Now we show different screen while reading and unlocking
* Fixed missing asstes for some scenes
* Update DolphinMafia_119x62.png
* Adjusted all the scenes with DolphinMafia image
* Scenes with save image adjusted
* Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png
* All common dolphins moved to Dolphin folder
* Moved DolphinReadingSuccess_59x63.png to Dolphin folder
* Set proper led color for detect and read scenes
* Added new notification sequence for semi_success results
* Use new sequence for semi_success nfc reads
* Different events are now throwed depending on read result
* Added handling of incomplete event for ultralight cards
* Replaced image for iButton scene
* Updated API for f18
* Fixed issue with unlock retry sequence
* Fix after review
* Success notification replaced to semi success in case of incomplete mf classic reading
* New text for read scene
* New read result sound notification logic for mf classic cards
* Change MIFARE name accroding to new requirements
* New QR code image for MFKey app
* Update nfc_scene_mf_classic_mfkey_complete.c scene according to new UI requirements
* Update detect_reader.c and check_big_20x17.png
* New nfc save confirm scene added
* Implemented new flow for 'Detect Reader button' after partial mf classic read according to new UI
* UID for 15693 tags now shown on the new line
* Fix nfc unit tests
* Revert "Fix nfc unit tests"
  This reverts commit 685ed6bfad.
* Rolled back all Mifare renamings in library files
* Revert "Change MIFARE name accroding to new requirements"
  This reverts commit cfb974dc1f.
* Now Mifare word is changed only on the app level without changes to lib level

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-19 22:36:16 +03:00
TollyH
51f6dcffa4 NFC: Display unread Mifare Classic bytes as ?? 2024-01-18 21:58:28 +00:00
RebornedBrain
ab236f3763 Fixed "Mifare" word for desfire cards 2024-01-18 12:52:19 +03:00
RebornedBrain
81e4e94adf Merge branch 'dev' 2024-01-18 12:25:20 +03:00
RebornedBrain
5655be1b8f New info render format for slix cards.
Also More_Info scene added to display Memory data
2024-01-17 20:07:28 +03:00
RebornedBrain
61067b0984 New info render format for iso15693 cards.
Also More_Info scene added to display Memory data
2024-01-17 20:07:15 +03:00
RebornedBrain
dc8b0b02d8 New info render format for 14443_4a cards 2024-01-17 20:05:17 +03:00
RebornedBrain
d9e4a60010 New info render format for 14443_3b cards 2024-01-17 20:04:59 +03:00
RebornedBrain
9e8e5d8ae9 New info render format for 14443_3a cards 2024-01-17 20:04:02 +03:00
RebornedBrain
bae0baa42f Filename will be printed for saved tag in info scene 2024-01-16 22:24:54 +03:00
Sergei Gavrilov
027ea9ea36 RFID CLI: better usage (#3376)
Co-authored-by: あく <alleteam@gmail.com>
2024-01-16 18:51:36 +09:00
gornekich
4f50ef9b54 [FL-3648] Mf DESFire fixes (#3367)
* mf desfire: process loading applications with 0 files
* mf desfire: add HID desfire support
* nfc: fix mfdes loading and rendering crashes
* mf desfire: change handling HID cards
* mf desfire: fix PVS warnings
* mf desfire: fix cmp logic

Co-authored-by: あく <alleteam@gmail.com>
2024-01-16 18:41:51 +09:00
RebornedBrain
a11fcfc72d [FL-3678] NFC UI refactor (#3369)
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-16 18:29:17 +09:00
あく
cb0cf7b9e2 Merge branch 'dev' into reborned/nfc_ui_refactor_2 2024-01-16 18:19:27 +09:00
Georgii Surkov
95737958ad [FL-3669] Expansion module protocol (#3250)
* ApiSymbols: add furi_record_destroy
* FuriHal: cleanup serial API, add logging configuration in RTC
* FuriHal: hide private part in _i header. Toolbox: cleanup value index. SystemSettings: logging device and baudrate.
* FuriHal: RTC logging method documentation
* Synchronize API Symbols
* Furi: mark HEAP_PRINT_DEBUG as broken
* FuriHal: furi_hal_serial, add custom IRQ func
* Fix PR review issues
* Implement basic external module detection and echo
* Update api symbols for f18
* Minimally working implementation (can create directory via rpc)
* Make expansion protocol parser a header-only library
* Rename a function
* Improve thread syncronisation
* Implement multi-packet transmissions
* Improve test application
* Clean up expansion worker code
* Send heartbeat when host is ready
* Update API symbols
* Add draft documentation
* Expansion worker: proper timeout and error handling
* Expansion worker: correct TX, do not disable expansion callback
* Expansion protocol: pc side test script
* PC side expansion test: trying to change baudrate
* Working comms between 2 flippers
* Cleaner exit from expansion worker thread
* Better checks
* Add debug logs
* Remove unneeded delays
* Use USART as default expansion port
* Refactor furi_hal_serial_control, fix crash
* Improve furi_hal abstraction, wait for stable rx pin
* Remove rogue include
* Set proper exit reason on RPC error
* Remove rogue comment
* Remove RX stability check as potentially problematic
* Improve expansion_test application
* Remove rogue define
* Give up on TODO
* Implement expansion protocol checksum support
* Update ExpansionModules.md
* RPC: reverse input
* Assets: sync protobuf
* Fix typos
* FuriHal: UART add reception DMA (#3220)
* FuriHal: add DMA serial rx mode
* usb_uart_bridge: switch to working with DMA
* Sync api symbol versions
* FuriHal: update serial docs and api
* FuriHal: Selial added similar API for simple reception mode as with DMA
* FuriHal: Update API target H18
* API: ver API H7
* FuriHal: Serial error processing
* FuriHal: fix furi_hal_serial set baudrate
* Sync api symbols
* FuriHal: cleanup serial isr and various flag handling procedures
* FuriHal: cleanup and simplify serial API
* Debug: update UART Echo serial related flags
* FuriHal: update serial API symbols naming
* Make expansion_test compile
* Remove unneeded file
* Make PVS-studio happy
* Optimise stack usage
* Optimise heap usage, improve api signature
* Fix typo
* Clean up code
* Update expansion_protocol.h
* Fix unit tests
* Add doxygen comments to expansion.h
* Update/add doxygen comments
* Update ExpansionModules.md
* Github: new global code owner
* FuriHal: naming in serial control
* Expansion: check mutex acquire return result

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SkorP <skorpionm@yandex.ru>
Co-authored-by: SG <who.just.the.doctor@gmail.com>
Co-authored-by: Skorpionm <85568270+Skorpionm@users.noreply.github.com>
2024-01-16 18:18:56 +09:00
John Scarfone
f9f67e6d54 Bugfix: Strip last parity bit from decoded FDX-B data (#3199)
* remove last parity bit from buffer
* add unit tests
* zap old debug logging

---------

Co-authored-by: Sergei Gavrilov <who.just.the.doctor@gmail.com>
2024-01-16 18:31:50 +10:00
あく
dd182ab179 FuriHal: interrupt priorities and documentation (#3366)
* FuriHal: interrupt priorities and documentation
* FuriHal: wording
* FuriHal: update interrupt docs
* FuriHal: add more interrupt priority levels
* FuriHal: proper furi_check in interrupts, shift default level to 10

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
2024-01-16 03:17:07 +04:00
あく
fc043da9c6 FuriHal: UART refactoring (#3211)
* FuriHal: UART refactoring
* ApiSymbols: add furi_record_destroy
* FuriHal: cleanup serial API, add logging configuration in RTC
* FuriHal: hide private part in _i header. Toolbox: cleanup value index. SystemSettings: logging device and baudrate.
* FuriHal: RTC logging method documentation
* Synchronize API Symbols
* Furi: mark HEAP_PRINT_DEBUG as broken
* FuriHal: furi_hal_serial, add custom IRQ func
* Fix PR review issues
* FuriHal: UART add reception DMA (#3220)
* FuriHal: add DMA serial rx mode
* usb_uart_bridge: switch to working with DMA
* Sync api symbol versions
* FuriHal: update serial docs and api
* FuriHal: Selial added similar API for simple reception mode as with DMA
* FuriHal: Update API target H18
* API: ver API H7
* FuriHal: Serial error processing
* FuriHal: fix furi_hal_serial set baudrate
* Sync api symbols
* FuriHal: cleanup serial isr and various flag handling procedures
* FuriHal: cleanup and simplify serial API
* Debug: update UART Echo serial related flags
* FuriHal: update serial API symbols naming
* FuriHalSerial: various improvements and PR review fixes
* FuriHal: proper ISR function signatures

---------

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: SkorP <skorpionm@yandex.ru>
Co-authored-by: Skorpionm <85568270+Skorpionm@users.noreply.github.com>
2024-01-16 03:09:37 +04:00
RebornedBrain
f1a972607a Merge commit 'd73d00779788db49d5306f51fb4c789b54568281' 2024-01-15 20:49:10 +03:00
Methodius
4b7b0ad6b9 EMV parser added 2024-01-16 02:43:17 +09:00
RebornedBrain
ba6b56445d Reordered menu items accrding to new spec 2024-01-15 20:29:21 +03:00
RebornedBrain
be15c5ff4a Headers added to Write scenes 2024-01-15 20:02:08 +03:00
RebornedBrain
957a89f2b3 Filename or "Unsaved + CardType" is now showed for saved cards during emulation 2024-01-15 19:38:28 +03:00
Nikita Vostokov
08a5adf18e Fix EMV reading
2 MasterCard were successfully read

Issues: some VISA and Mastercard and all UnionPay can't be read

TODO: currency, country, Application name
TODO: Support multi application mode to read co-branded card.
2024-01-15 19:03:31 +09:00
Methodius
3a82b3aa3c Merge remote-tracking branch 'upstream/dev' into dev 2024-01-15 19:03:15 +09:00
Skorpionm
d73d007797 SubGhz: add subghz tx_from_file CLI cmd, major TX flow refactoring, various improvements and bug fixes (#3302)
* SubGhz: add cmd CLI "subghz tx_from_file"
* SubGhz:  add sending raw.sub files
* SubGhz: add load custom preset
* SubGhz: remove unnecessary files
* SubGhz: change message
* SubGhz: fix printf formatting
* SubGhz: Cli refactoring code
* FuriHal: add furi_hal_subghz Tx Rx IDLE state switching test
* SubGhz: remove debug code, fix ext driver compilation
* SubGhz: cleanup code, move wait status routine to cc1101 driver
* SubGhz: proper pin mode transition in tx stop isr routine, proper DMA and ISR priorities, fix issue with async tx stuck
* SubGhz: simplify async tx stop flow, fix ISR ARR check condition race
* SubGhz: check ARR only when we transmitting
* SubGhz: check ARR only when we transmitting for ext cc1101
* SubGhz: lower ISR priorities to safe level
* SubGhz: proper gpio config, comments update

Co-authored-by: あく <alleteam@gmail.com>
2024-01-15 14:38:43 +09:00
Leptopt1los
3fd5f15e7f Furi_hal_rtc: new function (#3294)
* furi_hal_rtc_timestamp_to_datetime added
* hw targets api version sync
* hw targets api version sync, bump
* FuriHal: update rtc docs
* unit tests added

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-01-14 17:07:42 +09:00
RebornedBrain
1f9fd4c42a [FL-3678] NFC UI refactor (#3361)
* Added new image DolphinSaved_113x58.png for all "saved" pages
* New image DolphinDone_80x58.png added
* Replaced dolphins on all scenes accroding to new UI specs
* New success dolphin image added
* Success scene image replaced
* Changed image and text for update initial scene
* Image and text adjusted for "Original restored" scene
* Removed old DolphinNice_96x59.png image
* New image for LFRFID scene
* Removed unused image
* New UI image added to assets
* Replaced warning dolphin on mf_classic write initial fail scene
* Removed old image
* Changed image on scenes to a new one
* New dolphin mafia image
* Replaced dolphin mafia image to a new one
* Removed DolphinMafia_115x62.png
* New check symbol on completed state for detect_reader
* Adjusted layout elements position
* Removed second switching to popup view in order to achieve control in support callbacks
  In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol
* CardDetected event now also triggers on_event callback
* Now on AuthRequest we throw CardDetected custom event
* Added callback for read_on_event
* Now we show different screen while reading and unlocking
* Fixed missing asstes for some scenes
* Update DolphinMafia_119x62.png
* Adjusted all the scenes with DolphinMafia image
* Scenes with save image adjusted
* Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png
* All common dolphins moved to Dolphin folder
* Moved DolphinReadingSuccess_59x63.png to Dolphin folder
* Set proper led color for detect and read scenes
* Added new notification sequence for semi_success results
* Use new sequence for semi_success nfc reads
* Different events are now throwed depending on read result
* Added handling of incomplete event for ultralight cards
* Replaced image for iButton scene
* Updated API for f18
* Fixed issue with unlock retry sequence
* Fix after review
* Success notification replaced to semi success in case of incomplete mf classic reading
* New text for read scene
* New read result sound notification logic for mf classic cards
* Change MIFARE name accroding to new requirements
* New QR code image for MFKey app
* Update nfc_scene_mf_classic_mfkey_complete.c scene according to new UI requirements
* Update detect_reader.c and check_big_20x17.png
* New nfc save confirm scene added
* Implemented new flow for 'Detect Reader button' after partial mf classic read according to new UI
* UID for 15693 tags now shown on the new line
* Fix nfc unit tests
* Revert "Fix nfc unit tests"
  This reverts commit 685ed6bfad.
* Rolled back all Mifare renamings in library files
* Revert "Change MIFARE name accroding to new requirements"
  This reverts commit cfb974dc1f.
* Now Mifare word is changed only on the app level without changes to lib level

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-14 14:47:38 +09:00
あく
c539cfa5ae Merge branch 'dev' into reborned/nfc_ui_refactor_2 2024-01-14 13:58:59 +09:00
Skorpionm
48e4de1213 [FL-3743] SubGhz: UI update (#3352)
* [FL-3743]SubGhz: screen refactoring
* SubGhz: fix syntax
* SubGhz: gui
* SubGhz: add animation icon ant in read_info scene
* SubGhz: up speed animation icon

Co-authored-by: あく <alleteam@gmail.com>
2024-01-14 13:58:29 +09:00
MX
18ea59051a upd changelog 2024-01-14 00:49:05 +03:00
MX
34517ec43e update honeywell
by Willy-JL

aab879bebf/lib/subghz/protocols/honeywell.c
2024-01-13 15:30:26 +03:00
Methodius
9aae348cae Zolotaya Korona Online parser added 2024-01-13 15:26:18 +03:00
MX
634e841ce8 upd changelog 2024-01-13 03:24:27 +03:00
MX
924520a9a7 Revert "its time to enable this one"
This reverts commit bc1fdabce4.
2024-01-13 03:24:00 +03:00
Methodius
0d40e57cc8 LF RFID: Write with random password added [ci skip] 2024-01-13 02:39:50 +03:00
RebornedBrain
321a56d934 Now Mifare word is changed only on the app level without changes to lib level 2024-01-12 23:33:53 +03:00
RebornedBrain
22aba527b7 Revert "Change MIFARE name accroding to new requirements"
This reverts commit cfb974dc1f.
2024-01-12 18:11:48 +03:00
RebornedBrain
6103de1754 Rolled back all Mifare renamings in library files 2024-01-12 17:39:00 +03:00
RebornedBrain
8799e1112b Revert "Fix nfc unit tests"
This reverts commit 685ed6bfad.
2024-01-12 17:35:45 +03:00
gornekich
01d178a1f3 Merge branch 'dev' into reborned/nfc_ui_refactor_2 2024-01-12 18:28:30 +04:00
RebornedBrain
685ed6bfad Fix nfc unit tests 2024-01-12 17:27:22 +03:00
Methodius
d337222cbe minor fixes 2024-01-12 22:14:21 +09:00
MX
81efe25a6e Merge branch 'ofw_dev' into dev 2024-01-12 15:39:40 +03:00
MX
781794f699 Revert "NFC: Skip system dict bug fixed"
This reverts commit 7de861bb4c.
2024-01-12 15:39:00 +03:00
RebornedBrain
bfffaf5b53 UID for 15693 tags now shown on the new line 2024-01-12 13:12:32 +03:00
hedger
0789cbdefa assets: checking limits on image size; ufbt: cdb target (#3359)
* scripts: assets: checking limits on image size
* ufbt: added "cdb" target for regenerating; also generating cdb on "vscode_dist"
* fbt: now also creating cdb for vscode_dist

Co-authored-by: あく <alleteam@gmail.com>
2024-01-12 17:58:37 +09:00
Leptopt1los
d289545bf8 NFC: system dict skip when user dict is skipped fix (#3356)
* NFC: system dict skip when user dict is skipped fix
* MFC poller allocator fix (by gornekich)

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-12 17:41:19 +09:00
Methodius
e8b468b492 EMV Poller fix 2024-01-12 17:08:34 +09:00
MX
e6db0842d4 upd changelog 2024-01-11 21:47:54 +03:00
MX
4b3d6e7332 Add NFC NDEF parser by Willy-JL
510404efe7/applications/main/nfc/plugins/supported_cards/ndef.c
2024-01-11 21:30:17 +03:00
RebornedBrain
d3c994c403 Implemented new flow for 'Detect Reader button' after partial mf classic read according to new UI 2024-01-11 20:23:13 +03:00
RebornedBrain
4397e2cff5 New nfc save confirm scene added 2024-01-11 20:21:54 +03:00
MX
8a3557bc97 merge FuriHal: fix start duration furi_hal_subghz_async_tx 2024-01-11 17:33:29 +03:00
MX
b757544ede Merge branch 'ofw_dev' into dev 2024-01-11 17:10:11 +03:00
Methodius
e9454b629b NFC fap: EMV protocol added 2024-01-11 18:11:54 +09:00
Skorpionm
34539cda17 FuriHal: fix start duration furi_hal_subghz_async_tx (#3230)
* FuriHal: fix start duration furi_hal_subghz_async_tx
* FuriHal: add check min duration arr for the first level
* FuriHal: fix conflict dev
* SubGhz: fix unit_test
* FuriHal: subghz internal fix start/stop transmit duration
* Drivers: subghz external fix start/stop transmit duration
* FuriHal: subghz optimization
* SubGhz: fix unit_test subghz
* FuriHal: subghz fix end duration if size == size dma buf
* FuriHal: revert enum values order, remove garbage
* FuriHal: revert one more small bit in subghz
* FuriHal: handle various corner cases in subghz transmission
* FuriHal: cleanup subghz code
* FuriHal: add parenthesis around value in subghz defines
* FuriHal: add packer subghz_async_tx
* FuriHal: more reliable subghz transmission end handling, fixes stuck transmission
* FuriHal: add subghz crutch docs, and rename some defines to conform naming standards
* FuriHal: subghz,  the logic of timers has been changed. disabling the shadow register ARR
* FuriHal: fix subghz off dma irq
* SubGhzExt: fun rename
* FuriHal,SubGhz: fix g0 state on reset, fix incorrect async_tx stop sequence, remove dead code.

Co-authored-by: あく <alleteam@gmail.com>
2024-01-11 16:56:14 +09:00
RebornedBrain
85f437ee22 Update detect_reader.c and check_big_20x17.png 2024-01-10 20:24:12 +03:00
RebornedBrain
14af1fe022 Update nfc_scene_mf_classic_mfkey_complete.c scene according to new UI requirements 2024-01-10 19:34:40 +03:00
RebornedBrain
686fd208dc New QR code image for MFKey app 2024-01-10 19:34:07 +03:00
RebornedBrain
cfb974dc1f Change MIFARE name accroding to new requirements 2024-01-10 19:23:34 +03:00
RebornedBrain
1ea99d119b Merge branch 'dev' 2024-01-10 19:21:13 +03:00
RebornedBrain
843fa3eecc Merge branch 'dev' 2024-01-10 19:18:51 +03:00
Methodius
3959827fd4 Merge remote-tracking branch 'upstream/dev' into dev 2024-01-11 00:49:39 +09:00
Methodius
d0c466ccc0 EMV protocol added 2024-01-11 00:48:55 +09:00
Augusto Zanellato
0b15fc3807 Fix MyKey production date parsing (#3332)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-01-10 22:49:30 +09:00
Leptopt1los
4d99a454fd NFC: parsers minor cleanup (#3329)
* WashCity cards parser cleanup
* umarsh includes cleanup

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-01-10 20:55:45 +09:00
RebornedBrain
3452fbc351 [FL-3744] [NFC] Ntag success write freeze when not saved card (#3354)
* New scenes for ultralight poller write mode
* Added new button and transition logic for write operation
  For now write is only possible for NTAG21x cards with default password and no AUTHLIM set
* Poller states extended
* Enums and datatypes extended for new poller mode
* Added mode field to poller instance datatype
* New states for poller added in order to implement write mode
* Added new event type for locked cards in order to simplify state flow
* New logic for poller write commands
* Scenes adjustments
* Scenes renamed
* New field added to poller instance
* Now we write in 'page per call' mode
* Now function takes callback return value into account
* Callback will be called only in write mode
* Event type added
* Log adjusted and start page to write set
* Logs added and check in now false at start, then it moves to true
* Now mf_ultralight_poller_handler_request_write_data halts card in case of check failure and stops poller
* All fail events now returns NfcCommandStop callback
* In case of fail we move back properly
* Remove garbage
* Fix moving to previous screen in case of not saved ultralight

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-01-10 20:46:55 +09:00
hedger
8c04947aa2 ufbt: fixed generated project paths on Windows (#3339) 2024-01-10 20:37:28 +09:00
MX
c85e1305c0 upd changelog 2024-01-08 01:13:22 +03:00
MX
5dfa2fd24c Merge branch 'leptoptilos' into dev 2024-01-08 00:02:55 +03:00
Methodius
71ed7f8e94 NFC parsers false read() positive return fixed pt2 2024-01-08 05:49:58 +09:00
Methodius
4636444464 NFC parsers false read() positive return fixed 2024-01-08 05:39:36 +09:00
MX
e7bf9b4df2 return default update splash screen 2024-01-06 22:35:08 +03:00
MX
f224a8ec57 Merge branch 'leptoptilos' into dev [ci skip] 2024-01-06 21:51:31 +03:00
Methodius
4a47644e64 update ReadMe.md 2024-01-07 03:09:47 +09:00
MX
7af56e8717 upd changelog 2024-01-06 19:39:24 +03:00
MX
526f728f89 Merge branch 'leptoptilos' into dev 2024-01-06 19:35:38 +03:00
Methodius
7de861bb4c NFC: Skip system dict bug fixed 2024-01-06 18:47:35 +09:00
Methodius
4e068ba593 NFC: Set ATQA scene bit numbering changed 2024-01-06 15:38:08 +09:00
MX
0d68fb409c update changelog 2024-01-06 01:47:05 +03:00
MX
b77f41949c Merge branch 'nfc-parsers' into dev 2024-01-06 01:23:48 +03:00
MMX
1d35110a98 Merge pull request #690 from DarkFlippers/leptoptilos
NFC: Add manually MF Classic with custom UID
2024-01-05 22:53:30 +03:00
MMX
e5738ec703 Merge pull request #683 from yaba/nfc-washcity
Added plugin to read WashCity card balance
2024-01-05 22:53:05 +03:00
MMX
942f024db9 Merge pull request #688 from Eczbek/patch-1
Remove weird newline in `applications/ReadMe.md`
2024-01-05 22:52:32 +03:00
MX
a640dfecf8 Merge branch 'dev' into leptoptilos 2024-01-05 22:41:57 +03:00
MX
4fa617b772 Merge branch 'dev' into nfc-parsers 2024-01-05 22:41:47 +03:00
MX
4b95efda49 move hid and snake apps into main repo [ci skip] 2024-01-05 22:41:29 +03:00
Methodius
f6a363e7d2 Fix MyKey production date parsing by augustozanellato (https://github.com/flipperdevices/flipperzero-firmware/pull/3332/files) 2024-01-06 04:36:06 +09:00
Methodius
d2549b3b1a Code cleanup 2024-01-06 03:18:32 +09:00
Methodius
1bae3d19ee Merge remote-tracking branch 'upstream/dev' into nfc-washcity 2024-01-06 03:13:07 +09:00
Methodius
d1df26cc83 NFC: Add manually MF Classic UID desync bug fixed 2024-01-06 00:56:50 +09:00
MX
66756853a6 Merge branch 'dev' into leptoptilos 2024-01-05 18:39:42 +03:00
MX
00d9c60515 subghz use long press to exit transmitter [ci skip]
to avoid unwanted 2 buttons hold condition
holding arrow button and exit causes default button change, which is stays as hidden feature
but this change makes it harder to call it accidentally
2024-01-05 18:39:04 +03:00
MX
e243ca47ba Merge branch 'ofw_dev' into dev 2024-01-05 17:39:24 +03:00
Methodius
941652ec57 NFC App: Generate MF Classic with custom UID added 2024-01-05 22:10:28 +09:00
あく
7eeb60e17e Desktop: fix rpc unlock on pin input screen (#3334) 2024-01-03 17:00:56 +04:00
MX
c8ce5e6ed4 replace icon 2024-01-02 14:10:19 +03:00
MX
1e89197349 Merge branch 'nfc-parsers' into dev 2024-01-02 13:57:17 +03:00
MX
b57f4ce848 Merge branch 'dev' into nfc-parsers 2024-01-02 13:57:06 +03:00
MX
48e80adccc Merge branch 'ofw_dev' into dev 2024-01-02 13:53:42 +03:00
RebornedBrain
d511d76a1b [FL-3678] [FL-3733] [FL-3723] UI refactor (#3323)
* Added new image DolphinSaved_113x58.png for all "saved" pages
* New image DolphinDone_80x58.png added
* Replaced dolphins on all scenes accroding to new UI specs
* New success dolphin image added
* Success scene image replaced
* Changed image and text for update initial scene
* Image and text adjusted for "Original restored" scene
* Removed old DolphinNice_96x59.png image
* New image for LFRFID scene
* Removed unused image
* New UI image added to assets
* Replaced warning dolphin on mf_classic write initial fail scene
* Removed old image
* Changed image on scenes to a new one
* New dolphin mafia image
* Replaced dolphin mafia image to a new one
* Removed DolphinMafia_115x62.png
* New check symbol on completed state for detect_reader
* Adjusted layout elements position
* Removed second switching to popup view in order to achieve control in support callbacks
In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol
* CardDetected event now also triggers on_event callback
* Now on AuthRequest we throw CardDetected custom event
* Added callback for read_on_event
* Now we show different screen while reading and unlocking
* Fixed missing asstes for some scenes
* Update DolphinMafia_119x62.png
* Adjusted all the scenes with DolphinMafia image
* Scenes with save image adjusted
* Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png
* All common dolphins moved to Dolphin folder
* Moved DolphinReadingSuccess_59x63.png to Dolphin folder
* Set proper led color for detect and read scenes
* Added new notification sequence for semi_success results
* Use new sequence for semi_success nfc reads
* Different events are now throwed depending on read result
* Added handling of incomplete event for ultralight cards
* Replaced image for iButton scene
* Updated API for f18
* Fixed issue with unlock retry sequence
* Fix after review
* Success notification replaced to semi success in case of incomplete mf classic reading
* New text for read scene
* New read result sound notification logic for mf classic cards

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-02 15:43:46 +09:00
Eczbek
0049b19994 Remove weird newline in applications/ReadMe.md
>:)
2024-01-01 21:56:58 -05:00
MX
56ad7ece69 add new update image for next builds
happy new year !
2023-12-30 03:11:55 +03:00
MX
b48103196f subghz revert previous "fix" and do proper fix
and thanks to Willy-JL !
2023-12-30 02:43:15 +03:00
Methodius
4d5e096437 parsers cleanup 2023-12-30 00:55:13 +09:00
MX
e5ceef3422 Merge branch 'ofw_dev' into dev 2023-12-29 16:57:23 +03:00
RebornedBrain
18fbe364f2 New read result sound notification logic for mf classic cards 2023-12-29 16:38:00 +03:00
RebornedBrain
c9ffe4ab4d New text for read scene 2023-12-29 16:37:30 +03:00
RebornedBrain
0a44c75b20 Success notification replaced to semi success in case of incomplete mf classic reading 2023-12-29 13:09:46 +03:00
RebornedBrain
82ecc8e73f Fix after review 2023-12-29 12:09:33 +03:00
RebornedBrain
e2a7d5f3f4 Fixed issue with unlock retry sequence 2023-12-29 12:06:43 +03:00
あく
5994c26de3 Merge branch 'dev' into reborned/nfc_ui_refactor_2 2023-12-29 13:32:52 +09:00
gornekich
a7b60bf2a6 MFC emulation fixes (#3324)
* mf classic listener: fix write block
* nfc: go to idle state instead of sleep
* lib nfc: fix documentation
2023-12-29 12:24:20 +09:00
gornekich
f4e738a9ef Merge branch 'dev' into reborned/nfc_ui_refactor_2 2023-12-28 21:41:45 +04:00
RebornedBrain
13fe87259f Merge branch 'dev'
Conflicts:
	targets/f18/api_symbols.csv
2023-12-28 15:30:47 +03:00
RebornedBrain
d55652deff Updated API for f18 2023-12-28 15:24:26 +03:00
RebornedBrain
4b363472dd Replaced image for iButton scene 2023-12-28 15:19:48 +03:00
RebornedBrain
bf78ace9e2 Added handling of incomplete event for ultralight cards 2023-12-28 14:55:47 +03:00
RebornedBrain
cf4b537c37 Different events are now throwed depending on read result 2023-12-28 14:54:57 +03:00
RebornedBrain
305d5bcc83 Use new sequence for semi_success nfc reads 2023-12-28 14:52:18 +03:00
RebornedBrain
d65dfe1958 Added new notification sequence for semi_success results 2023-12-28 14:51:09 +03:00
あく
895694c624 Scripts: fix incorrect handling of storage stress test count option (#3321) 2023-12-28 19:15:07 +09:00
RebornedBrain
3edbf8f538 Set proper led color for detect and read scenes 2023-12-28 12:09:02 +03:00
Arthur Braghetto
2a0a54a224 Add Samsung AC remotes DB93 and AR-EH04 (#3301)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:35:01 +09:00
YaBa
35e74c07d1 Added NFC plugin; parser for WashCity cards. (#3319)
* Added NFC plugin; parser for WashCity cards.
* Fixed file to the correct path
* Added demo file Demo_WC_20E.nfc
* Fixed clang format
* fixed typo (balance_cents)
* Removed demo file as requested.

Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:23:12 +09:00
ry4000
f6a38352e8 Update mf_classic_dict.nfc (#3314)
This Commit proposes the addition of the 33 Bandai Namco Passport / Sega Aime Card static access keys that has been available to Members of the Flipper Devices Discord Server; for convenience, they are listed in Sector Key A/B order.

Sector 0 Key B has two possible access keys;
019761AA8082 [current Bandai Namco Passports]
574343467632 [Sega Aime Cards / early-edition Bandai Namco Passports]

Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:12:13 +09:00
Eric Betts
76ed466eb4 Nfc: HID MFC Plugin (#3312)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:03:50 +09:00
YaBa
f7e0338a75 Added demo file 2023-12-27 00:48:30 +00:00
YaBa
ca62254ee7 Fixed clang format and typo in var balance_cents 2023-12-26 23:19:48 +00:00
YaBa
a6bfc27530 Added plugin to read WashCity card balance 2023-12-26 21:45:36 +00:00
MX
40cc78489a merge ofw dev 2023-12-27 00:13:37 +03:00
MX
5ef6adb9ea upd changelog 2023-12-26 23:29:24 +03:00
MMX
eef8c0ffa7 Merge pull request #677 from amec0e/dev
Updated infrared assets
2023-12-26 23:25:07 +03:00
MX
528d29b82d upd changelog and ac 2023-12-26 23:24:57 +03:00
MX
5c00a403f6 temp fix for subghz keyboard lock
actually - furi timer is broken :(((((
2023-12-26 22:49:38 +03:00
あく
c9e3f20314 [FL-3429] About: cn,tw,mx certification information (#3318) 2023-12-26 15:12:17 +09:00
あく
0084443ed7 [FL-3727] RPC: reverse input (#3304)
* RPC: reverse input
* Assets: sync protobuf
2023-12-26 14:09:10 +09:00
MX
b84f14386c subghz option to delete old signals on full memory 2023-12-24 03:08:24 +03:00
MX
111750c420 Merge branch 'ofw_dev' into dev 2023-12-22 22:14:20 +03:00
MX
2832160891 change log level 2023-12-22 22:13:28 +03:00
あく
531ba24e9a Rollback #3305 and #3297 fix various rendering issues (#3307)
* Revert "[FL-3729, FL-3730] Gui: fix string width calculation (#3305)"
* Revert "Added UTF-8 support to Flipper Zero canvas API (#3297)"
2023-12-22 11:08:46 +00:00
MX
4d56bb4e44 Revert "testing subghz dynamic limit based on freeheap + RPC"
This reverts commit 77f458fb6e.
2023-12-21 21:42:17 +03:00
MX
92bed4a081 Merge branch 'ofw_dev' into dev 2023-12-21 19:48:12 +03:00
MX
bcadbc6353 Revert "fix broken texts due to usage of utf8, add proper api"
This reverts commit 49b2a4da8a.
2023-12-21 19:45:45 +03:00
あく
1543170f4c [FL-3729, FL-3730] Gui: fix string width calculation (#3305) 2023-12-21 16:43:11 +00:00
amec0e
18194b6bb5 Update audio.ir
New additions
2023-12-21 15:41:32 +00:00
amec0e
cdede67f31 Update fans.ir
New additions
2023-12-21 15:41:08 +00:00
amec0e
c5a76af1dd Update projectors.ir
Updated last checked, no new additions
2023-12-21 15:40:44 +00:00
amec0e
1acbd84b7c Update tv.ir
New additions
2023-12-21 15:39:57 +00:00
RebornedBrain
e9e44db964 Merge branch 'reborned/nfc_ui_refactor' of git@github.com:RebornedBrain/flipperzero-firmware.git 2023-12-21 14:56:18 +03:00
MX
271ec6cf97 fix readme 2023-12-21 03:37:44 +03:00
MX
9b156fbdca Merge branch 'nfc-parsers' into dev 2023-12-21 03:36:44 +03:00
MX
de9765fa25 Merge branch 'dev' into nfc-parsers 2023-12-21 03:36:32 +03:00
MMX
abcb9b2f38 Merge pull request #672 from krolchonok/ir-show-number-brute
[IR] change percent on number
2023-12-21 03:35:54 +03:00
MX
eaae5da519 faac rcxt add manually (not tested) 2023-12-21 03:28:53 +03:00
MX
77f458fb6e testing subghz dynamic limit based on freeheap + RPC
by Willy-JL

5cd2d3eabe

e8d9325bec
2023-12-21 03:17:21 +03:00
MX
8fa21c49b2 better subghz history element removal
by Willy-JL

c40755f700
2023-12-21 03:16:16 +03:00
MX
49b2a4da8a fix broken texts due to usage of utf8, add proper api 2023-12-21 03:14:23 +03:00
RebornedBrain
09defbc4d4 Moved DolphinReadingSuccess_59x63.png to Dolphin folder 2023-12-20 21:41:43 +03:00
RebornedBrain
2b3e12fcb6 All common dolphins moved to Dolphin folder 2023-12-20 21:16:20 +03:00
MX
bc1fdabce4 its time to enable this one 2023-12-20 01:25:35 +03:00
MX
fc6e152fd1 Merge branch 'ofw_dev' into dev 2023-12-19 22:23:17 +03:00
RebornedBrain
3ec070313e Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png 2023-12-19 18:51:54 +03:00
RebornedBrain
33136b441c Scenes with save image adjusted 2023-12-19 18:51:01 +03:00
RebornedBrain
5bff5ca40d Adjusted all the scenes with DolphinMafia image 2023-12-19 18:44:00 +03:00
RebornedBrain
d5164c427f Update DolphinMafia_119x62.png 2023-12-19 18:07:20 +03:00
Skorpionm
17b122990f USART Bridge: added support for software control of DE/RE pins (#3280)
* USART Bridge: added support for software control of DE/RE pins
* USART Bridge: fix syntax
* UsbUsartBridge: add TODO ticket
* UsbUsartBridge: add second TODO ticket
* GpioUartBridge: human readable configuration
* GpioUartBridge: rename `Soft DE/RE` to `DE/RE Pin`
* GpioUartBridge: push pull for DE/RE pin

Co-authored-by: あく <alleteam@gmail.com>
2023-12-19 14:13:37 +00:00
MX
78d1507f14 Merge branch 'ofw_dev' into dev 2023-12-19 16:27:23 +03:00
hedger
1e1d9fcb69 ufbt: changed toolchain environment invocation; updated .gitignore for app template (#3300) 2023-12-19 12:43:06 +00:00
gornekich
6f6074dc01 Keys Dict: fix PVS warnings (#3299)
* keys dict: fix PVS warnings
* nfc app: suppress PVS warning
2023-12-19 12:11:35 +00:00
MX
14c6abe4eb Merge branch 'ofw_dev' into dev 2023-12-19 14:01:10 +03:00
Evgeny Stepanischev
25d24f1e4c Added UTF-8 support to Flipper Zero canvas API (#3297)
* Added UTF-8 support to Flipper Zero canvas API
* Add unicode example

Co-authored-by: あく <alleteam@gmail.com>
2023-12-18 18:36:50 +00:00
MX
528d2a7ec3 Merge branch 'ofw_dev' into dev 2023-12-18 21:23:58 +03:00
RebornedBrain
4a77a236b4 Fixed missing asstes for some scenes 2023-12-18 20:04:34 +03:00
あく
cf6829f608 Merge branch 'dev' into reborned/nfc_ui_refactor 2023-12-18 16:39:20 +00:00
Andrea Maugeri
7642d67cae NfcDict Refactoring (#3271)
* toolbox(keys_dict): generalize nfc_dict
* nfc: rework nfc app and tests
* toolbox(keys_dict): improve code readability
2023-12-18 14:30:56 +00:00
ushastoe
238187730c [IR] change percent on number
change percent on number in ir brute
2023-12-18 11:41:54 +03:00
Methodius
c53f5aa5b5 Zolotaya Korona transport card parser added 2023-12-17 04:58:07 +09:00
Methodius
ebe1a8f55f parsers cleanup for new api 2023-12-16 23:57:46 +09:00
MX
510f217cd5 Merge branch 'dev' into nfc-parsers 2023-12-16 02:33:09 +03:00
MX
364b334654 fix dict remove dupes 2023-12-16 02:33:00 +03:00
MX
afc2b14578 Merge branch 'dev' into nfc-parsers 2023-12-16 02:31:39 +03:00
MX
db57ff947b Merge branch 'ofw_dev' into dev 2023-12-16 02:16:46 +03:00
MarcelSchm
8c4716f170 added new TV Philips OLED 934/12 (#3293)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-15 19:07:01 +00:00
Gustavo de León
11ac6240d2 Add AC's Carrier 42QG5A580SC and AUX YKR-H/006E (#3284)
* Add Carrier 42QG5A580SC
* Add AC Model: AUX YKR-H/006E
* Cleanup ac.ir
* Infrared: Move Carrier 42QHB12D8S to the back of universal remote
* Infreared: more universal ac cleanup

Co-authored-by: あく <alleteam@gmail.com>
2023-12-15 18:57:08 +00:00
gornekich
d6680d1f75 [FL-3719] NFC Plugins loading rework (#3295)
* nfc app: rework supported cards
* nfc app: supported cards optimization
* nfc app: remove old nfc support implementation
* nfc app: add documentation for supported cards
* nfc app: format sources
* nfc app: fix PVS warnings
* nfc app: one more PVS fix
* nfc app: PVS please stop
* nfc app: add missing documentation

Co-authored-by: あく <alleteam@gmail.com>
2023-12-15 18:09:52 +00:00
gornekich
09540929c3 [FL-3717] MFC emulation fix (#3291)
* mf classic listener: reset state before sleep and after nack
* Fix PVS warnings
* Fix PVS and compiler disagree on builtins

Co-authored-by: あく <alleteam@gmail.com>
2023-12-15 17:51:20 +00:00
Leptopt1los
36aecfbec9 nfc_util: little endian bytes2num functions added (#3287)
* nfc_util_bytes2num_little_endian function added
* f18 target api version sync
* Bump api version

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-12-15 17:05:16 +00:00
Leptopt1los
0af74fb755 Umarsh transport cards parser (#3277)
* Umarsh transport card parser added
* Volna transport cards keys added

Co-authored-by: あく <alleteam@gmail.com>
2023-12-14 14:02:40 +00:00
Augusto Zanellato
78b7310057 Add MyKey parser (#3262)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-14 13:54:58 +00:00
あく
ccbb3a3498 [FL-3715] Update CLI MOTD (#3292)
* Add Carrier 42QG5A580SC

* Cli: update motd

---------

Co-authored-by: Gustavo de León <alfonso.gus.deleon@gmail.com>
2023-12-14 15:14:21 +04:00
RebornedBrain
69d1d5498e Now we show different screen while reading and unlocking 2023-12-14 13:17:50 +03:00
RebornedBrain
d7b54dfa66 Added callback for read_on_event 2023-12-14 13:17:23 +03:00
RebornedBrain
04e28f3e39 Now on AuthRequest we throw CardDetected custom event 2023-12-14 13:10:37 +03:00
RebornedBrain
1a56ce77e2 CardDetected event now also triggers on_event callback 2023-12-14 13:05:17 +03:00
RebornedBrain
94e8e5d498 Removed second switching to popup view in order to achieve control in support callbacks
In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol
2023-12-14 13:04:42 +03:00
RebornedBrain
f3cbb0363d Adjusted layout elements position 2023-12-14 11:58:59 +03:00
MX
2d860b4a22 fix key display newline 2023-12-14 01:14:08 +03:00
MMX
09a66e2285 Merge pull request #668 from noproto/patch-1
Fix edge case -- 0.5% of UIDs got wrong result
2023-12-14 01:06:03 +03:00
MMX
fb17718a5d Merge pull request #667 from sudoAlphaX/patch-1
Fix typo
2023-12-14 01:05:45 +03:00
gornekich
73145e0beb mf classic listener: reset state before sleep and after nack 2023-12-14 00:35:21 +03:00
MX
55b4f87cd7 Merge branch 'ofw_dev' into dev 2023-12-13 20:24:48 +03:00
Nathan N
3dde112676 Fix edge case -- 0.5% of UIDs got wrong result 2023-12-12 11:17:33 -05:00
gornekich
155e4e9fa4 [FL-3706], [FL-3674] NFC NTAG and ISO14443-3b reading fix (#3285)
* mf ultralight poller: reset field after reading tearing flags
* iso14443-3b poller: change cid comparison in ATTRIB cmd

Co-authored-by: あく <alleteam@gmail.com>
2023-12-12 15:24:06 +00:00
あく
90cb1c4f2e FuriHal: RTC register reset API. New factory reset routine that wipes all RTC backup registers content. (#3288) 2023-12-12 19:12:57 +04:00
あく
e2e3663524 FuriHal: various GPIO improvements (#3260)
* FuriHal: add alternative gpio pulls that covers special cases, extra checks and crash on inalid parameters.
* FuriHal: optimize pwr_XX selection in gpio_init
* FuriHal: cleanup gpio param validation crash routine
2023-12-12 14:39:14 +00:00
Skorpionm
7b85e04462 [FL-3681] SubGhz: changed the name of the button when sending RAW to SubGHz (#3275) 2023-12-12 13:59:22 +00:00
Alpha
96412202ba Fix typo
Change Deafult to Default in line 170
2023-12-12 17:04:08 +05:30
MX
0b356c2d6d update changelog 2023-12-11 01:36:54 +03:00
MX
ee9092c8e5 Merge branch 'nfc-parsers' into dev 2023-12-08 00:18:23 +03:00
Methodius
2e7bb26eef Merge branch 'dev' into nfc-parsers 2023-12-07 22:22:29 +09:00
Methodius
5d28939c28 social_moscow parser verification collisions fix 2023-12-07 21:59:27 +09:00
MX
15a29e1483 format 2023-12-07 08:21:32 +03:00
MX
c22b3b57bd Merge branch 'nfc-parsers' into dev 2023-12-07 08:03:43 +03:00
MX
1daa2fa377 Merge branch 'ofw_dev' into dev 2023-12-07 08:03:18 +03:00
RebornedBrain
59e94566fd New check symbol on completed state for detect_reader 2023-12-06 21:17:36 +03:00
Methodius
1b45b8a17d Kazan parser: adult social tariff added 2023-12-06 18:25:47 +09:00
Methodius
e94beff204 Kazan parser: basic tariffs parsing added 2023-12-06 18:08:20 +09:00
gornekich
82baf1e923 [FL-3701] NFC fixes (#3264)
* nfc app: fix unlock with manual password crash
* nfc app: preserve card detected state
* nfc app: fix mf keys scene switch
* nfc app: fix multiple protocol tag detect notification
* nfc plugin: fix retrun in function body in aime parser
* iso14443-3b poller: rework ATTRIB response check
* nfc app: fix navigation after file load failur
* iso14443-3b poller: fix PVS warning
* mfc listener: add crutch in mfc emulation
2023-12-05 22:40:06 +09:00
RebornedBrain
fa146d8770 Removed DolphinMafia_115x62.png 2023-12-05 14:34:24 +03:00
RebornedBrain
064c60e52e Replaced dolphin mafia image to a new one 2023-12-05 14:34:14 +03:00
RebornedBrain
18ea05edee New dolphin mafia image 2023-12-05 14:33:47 +03:00
MX
c416041379 Fix secplus v1 key display issue 2023-12-05 03:40:12 +03:00
MX
10444b943e Fix keeloq decode logic 2023-12-05 03:34:31 +03:00
MMX
2308a54ada Merge pull request #662 from noproto/dev
Add Saflok and MyKey KDFs
2023-12-05 03:33:37 +03:00
MMX
0ed6738a5b Merge pull request #660 from hnlcory/dev
Add keys to mf_classic_dict.nfc
2023-12-05 03:33:03 +03:00
RebornedBrain
12180ba707 Changed image on scenes to a new one 2023-12-05 00:19:47 +03:00
RebornedBrain
278ae51d73 Removed old image 2023-12-05 00:16:24 +03:00
noproto
dc25bfb831 Add Saflok and MyKey KDFs 2023-12-04 16:03:32 -05:00
RebornedBrain
d113bbf4dd Replaced warning dolphin on mf_classic write initial fail scene 2023-12-05 00:00:03 +03:00
RebornedBrain
38b65fba3b New UI image added to assets 2023-12-04 23:59:25 +03:00
RebornedBrain
7af6a46c8f Removed unused image 2023-12-04 21:17:56 +03:00
RebornedBrain
ff724ce4b5 New image for LFRFID scene 2023-12-04 21:17:45 +03:00
MX
d6fcb04aa8 Merge branch 'ofw_dev' into dev 2023-12-03 18:42:11 +03:00
MX
9bf8f1015d fix keeloq null pointer if unknown 2023-12-03 18:41:28 +03:00
Honghao Zeng
c477d1321a nfc: m1k-based Aime (non-AIC) card support (#3241)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2023-12-03 20:00:46 +09:00
MX
ec99b70b38 upd changelog 2023-12-02 23:55:05 +03:00
MX
06a58ebd53 Merge branch 'ofw_dev' into dev [ci skip] 2023-12-02 23:19:43 +03:00
Skorpionm
eb6fe0a4db SubGhz: fix count bit for detect gate_tx protocol (#3253)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-02 16:34:02 +09:00
pborsutzki
c6a14e1a67 Fixed a zero allocation error when reading an iso15693 nfc tag with no additional blocks. (#3229)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2023-12-02 16:27:58 +09:00
Astra
04cead1fc5 [FL-3620] Add the "remove pairing" button to BLE hid (#3237)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-02 14:03:10 +09:00
Astra
93732865ac [FL-3132] HID app: Add new function key icons (#3236)
* Add new function key icons
* Fix graphical glitches on the buttons

Co-authored-by: あく <alleteam@gmail.com>
2023-12-02 13:52:04 +09:00
RebornedBrain
6a5d63803a [FL-3675] Ntag21x write (#3246)
* New scenes for ultralight poller write mode
* Added new button and transition logic for write operation
   For now write is only possible for NTAG21x cards with default password and no AUTHLIM set
* Poller states extended
* Enums and datatypes extended for new poller mode
* Added mode field to poller instance datatype
* New states for poller added in order to implement write mode
* Added new event type for locked cards in order to simplify state flow
* New logic for poller write commands
* Scenes adjustments
* Scenes renamed
* New field added to poller instance
* Now we write in 'page per call' mode
* Now function takes callback return value into account
* Callback will be called only in write mode
* Event type added
* Log adjusted and start page to write set
* Logs added and check in now false at start, then it moves to true
* Now mf_ultralight_poller_handler_request_write_data halts card in case of check failure and stops poller
* All fail events now returns NfcCommandStop callback
* In case of fail we move back properly
* Remove garbage

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-12-02 13:45:47 +09:00
MX
159aef022b Fix keeloq decoding order 2023-12-01 22:51:21 +03:00
MX
f7c63c675b upd changelog 2023-12-01 20:38:01 +03:00
MX
99d657fcfb merge fixes 2023-12-01 20:33:14 +03:00
MX
00ceb2cd5d Merge branch 'ofw_dev' into dev 2023-12-01 20:29:16 +03:00
RebornedBrain
f151d3be01 Removed old DolphinNice_96x59.png image 2023-12-01 18:13:14 +03:00
RebornedBrain
fa04e36df2 Image and text adjusted for "Original restored" scene 2023-12-01 17:41:08 +03:00
RebornedBrain
7554e7bedb Changed image and text for update initial scene 2023-12-01 17:29:32 +03:00
RebornedBrain
59e797b312 Success scene image replaced 2023-12-01 17:25:00 +03:00
RebornedBrain
94cdaf20a2 New success dolphin image added 2023-12-01 17:24:43 +03:00
Augusto Zanellato
b51a754fd9 Mifare Classic nested auth support (#3238)
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 22:25:53 +09:00
Augusto Zanellato
c1e0d02afc ST25TB poller refining + write support (#3239)
* nfc: st25tb: rework async poller
* nfc: st25tb: introduce sync poller
* nfc: st25tb: add write support
* nfc: st25tb: rewrite poller to use better states
* nfc: st25tb: move to mode request state after success
* nfc: st25tb: minor bug fixes
* type wasn't properly set on ready event
* sending NfcCustomEventPollerFailure on St25tbPollerEventTypeFailure caused poller to being freed and ultimately resulted in a thread crash

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 18:42:00 +09: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
MX
961dd297dd upd changelog 2023-12-01 04:53:11 +03:00
MX
d675563271 sync anims 2023-12-01 04:47:54 +03:00
MX
e027d5c3e8 Add new API function for varitemlist
by Willy-JL

466e1f989f
2023-12-01 04:47:17 +03:00
MX
fdcfd5996b Merge branch 'ofw_dev' into dev 2023-12-01 02:33:41 +03:00
RebornedBrain
f7de65684a Replaced dolphins on all scenes accroding to new UI specs 2023-11-30 22:19:24 +03:00
RebornedBrain
810dfa1b79 New image DolphinDone_80x58.png added 2023-11-30 22:17:06 +03:00
RebornedBrain
f0838dd5fc Added new image DolphinSaved_113x58.png for all "saved" pages 2023-11-30 22:16:10 +03:00
Astra
a849d49c92 [FL-3682] Add the secret door animation (#3233)
Co-authored-by: あく <alleteam@gmail.com>
2023-11-30 18:51:38 +09:00
Evgeny Stepanischev
ff129e524a Allows you to use UCS-2 in canvas_glyph_width (#3226)
* allows you to use UCS-2 in canvas_glyph_width
* Sync API Symbols

Co-authored-by: あく <alleteam@gmail.com>
2023-11-30 18:38:48 +09:00
Cory Parker
05479103a6 Update mf_classic_dict.nfc
Added in new mf classic keys
2023-11-29 21:41:10 -10:00
MX
ff41d262dc add 303.9 frequency 2023-11-29 16:18:20 +03:00
MX
8628a2c6a2 update changelog, release planned for next week 2023-11-29 03:26:05 +03:00
MX
30914678c9 ibutton FIX crash!!!
why??????
2023-11-29 00:20:15 +03:00
MX
c4bf1fe717 use char escaping 2023-11-28 04:39:46 +03:00
MX
1946aaf5e1 upd discord notify 2023-11-28 04:21:43 +03:00
MX
a7b2427007 Merge branch 'ofw_dev' into dev 2023-11-26 19:58:48 +03:00
Astra
f9101d8084 [FL-3686] Mifare Classic fixes (#3221)
* Update Mifare Classic generators to create more accuate data
* Check the transfer buffer validity for NACK
* Fix the AC issues
* CRC errors don't really affect emulation, checking for them isn't worth it
* Make ATQA logic a bit easier to understand
* mf classic: change log level
* mf classic: fix log level

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-11-26 17:20:49 +09:00
RebornedBrain
1c3cbec661 [FL-3640] NFC: Felica UID emulation (#3190)
* Added basic template of Felica listener
* Raw nfc felica listener functions
* Added functions to setup chip for felica listener
* Cleanup function templates from unnecessary parts
* Removed todo comment
* Updated api versions
* Adjusted chip config for felica
* Set proper chip passive target mode for felica
* Added felica function to unit tests
* Update furi_hal_nfc_felica.c
* Removed duplication

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2023-11-26 17:10:33 +09:00
MX
cea423742b Merge remote-tracking branch 'origin/nfc-parsers' into dev 2023-11-24 02:56:39 +03:00
Methodius
8c5f28d6a0 Kazan parser: Type: abonnement fix 2023-11-23 23:59:06 +09:00
Methodius
6c2e332638 Kazan transport cards parser added 2023-11-23 22:19:26 +09:00
Methodius
5f18532a59 Umarsh code cleanup 2023-11-23 22:11:12 +09:00
Methodius
63f072a819 Umarsh header check rework reworked. Thanks J for idea! 2023-11-22 17:26:10 +09:00
Methodius
df1d6503c0 Umarsh header check rework 2023-11-22 16:15:53 +09:00
MMX
972054b377 Merge pull request #655 from DarkFlippers/nfc-parsers
Nfc parsers
2023-11-22 01:50:54 +03:00
MX
e1c89834df no verbose 2023-11-22 01:48:22 +03:00
assasinfil
c145cad653 Verify card bugfix 2023-11-21 22:34:29 +03:00
Methodius
4261063c99 Metromoney transport card parser added 2023-11-22 00:39:23 +09:00
MX
f8546937c0 fix readme and feature name 2023-11-21 15:59:38 +03:00
assasinfil
3daaea6ecf Added new social card 2023-11-21 15:03:46 +03:00
assasinfil
4a84fbc6e3 UI printing bugfix 2023-11-21 13:12:24 +03:00
assasinfil
d8800e9fe3 Merge branch 'nfc-parsers' of https://github.com/DarkFlippers/unleashed-firmware into nfc-parsers 2023-11-21 11:54:11 +03:00
assasinfil
7fd921227c Fixes 2023-11-21 11:54:06 +03:00
Methodius
b6ad07b47c Umarsh parser: kopecks support added 2023-11-21 13:18:18 +09:00
Methodius
1a21f0e3c9 Umarsh transport cards parser added 2023-11-21 12:21:22 +09:00
MX
c666368446 add simple nfc file name display
temp fix for UI
2023-11-21 01:53:20 +03:00
MX
91d614dd25 add subghz honeywell protocol
by htotoo

https://github.com/Flipper-XFW/Xtreme-Firmware/commits?author=htotoo
2023-11-21 01:00:15 +03:00
MMX
baca59927b Merge pull request #653 from DarkFlippers/nfc-parsers
Nfc parsers
2023-11-20 23:25:52 +03:00
MX
4eb40ce948 fix ibutton info display
by @krolchonok
+ added missing furi_string_free
a378db6663/applications/main/ibutton/scenes/ibutton_scene_info.c
2023-11-20 23:25:29 +03:00
assasinfil
00b1018e9e Fixed validating 2023-11-20 20:46:51 +03:00
assasinfil
9c92338ddf Added social card parser 2023-11-20 19:11:30 +03:00
assasinfil
8188b63522 cleanup 2023-11-20 18:43:23 +03:00
assasinfil
0e172b67eb Layout 1c4 fix 2023-11-20 18:22:17 +03:00
assasinfil
156948ec58 All code added to parser 2023-11-20 17:42:19 +03:00
Methodius
bbdda5a3d7 trying to fix previous fix of timestamp_to_datetime() 2023-11-20 22:19:29 +09:00
Methodius
51a2e638ed trying to fix timestamp_to_datetime() 2023-11-20 22:14:49 +09:00
assasinfil
ffd9d3c218 Added msk transport parser 2023-11-20 14:10:50 +03:00
MX
9513ff5307 fix rgb patch 2023-11-17 02:43:47 +03:00
MX
12e736b283 fix ci, temp workaround for manifest 2023-11-17 02:35:27 +03:00
MX
a64c9534e2 Merge branch 'ofw_dev' into dev 2023-11-17 02:20:27 +03:00
Sergey Gavrilov
4b3e8aba29 [FL-3664] 64k does not enough (#3216)
* Unit tests: add "exists" to furi_record tests
* Unit tests: mu_warn, storage 64k test
* Storage: read/write over 64k
* Unit tests: moar tests for storage r/w for >64k cases
* Apps, libs: replace uint16_t with size_t on storage r/w operations
* Unit tests: better data pattern, subghz: warning if transmission is prohibited

Co-authored-by: あく <alleteam@gmail.com>
2023-11-16 01:39:27 +09:00
hedger
98d5718ec9 fbt: improvements (#3217)
* fbt: changed cdefines & lib handling for external apps; added extra checks for app manifest fields; moved around AppsC generator
* fbt: commandline fixes for spaces in paths
* fbt: fixed stringification for FAP_VERSION
* fbt: Removed excessive quoting for gdb
* docs: update for cdefines; fbt: typo fix
* fbt: enforcing at least 2 components in app version=

Co-authored-by: あく <alleteam@gmail.com>
2023-11-16 01:27:35 +09:00
あく
457aa5331f Various Fixes for 0.95 (#3215)
* FuriHal: retry gauge/charger initialization
* FuriHal: lower logging level for flash known errata
* FuriHal: graceful fail if subghz chip is not working
* Furi: issue stop command even if timer is not active, document timer behavior
2023-11-15 20:11:05 +04:00
Flipper Zelebro
a61b5d4b4c Add Mastercode SubGHz Protocol (#3187)
* Add Mastercode SubGHz Protocol
* Add 2 valid raw files and cleanup code
* Add tests to the two Raw Files
* Remove extra test & delete comments
* Fixes pulse length and shows correct Key

Co-authored-by: FlipperZelebro <flipperzelebro [at] gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 18:04:45 +09:00
Georgii Surkov
ba074068b0 [FL-3662] Do not remove file when renaming to itself (#3193)
* Do not allow overwriting a file with dir and support renaming file to itself
* Fix operator precedence error
* Add support for storage-specific path equivalence checks
* Fix typo
* Fix updater compilation
* Update Doxygen comments in storage.h

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-11-15 17:56:13 +09:00
Georgii Surkov
615a147973 [FL-3608] Fix iButton crash on missing file (#3210)
Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 17:45:41 +09:00
gornekich
c00776ca22 [FL-3666] NFC API improvements (#3214)
* drivers: expose st25r3916 driver API
* nfc poller: add start with custom callback
* mf classic: rework sync API with poller custom start
* mf ultralight: rework sync API with poller custom start
* iso14443_3a poller: remove unused col res state
* nfc: rework nfc poller custom start
* mf ultralight: rename sync API
* mf classic: rename sync API
* iso14443-3a: rename sync API
* nfc: remove async prefix in internal functions
* nfc: expose internal API
* nfc: fix sync api include and docs
* targets: fix f18 build
* nfc: rework NfcGenericEventEx type
* nfc poller: add documentation
* iso14443-3a poller: add documentation
* felica poller: add documentation
* iso14443_3b poller: add documentation
* so14443_4a poller: add documentation
* iso14443_4b poller: add documentation
* iso15693 poller: add documentation
* slix poller: add documentation
* mf desfire poller: add documentation
* mf ultralight poller: fix API and add documentation
* mf classic poller: add documentation

Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 17:32:45 +09:00
RebornedBrain
d0b9a3a4ae [NFC] MF Ultralight no pwd polling adjustment (#3207)
* Listener log level changed to Trace
* Show pages count without pwd pages in case of no auth success
* Fixed unit tests

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 17:02:35 +09:00
Tobias Jost
dc246ddb09 Fix limited_credit_value having wrong value in mf_desfire_file_settings_parse (#3204)
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 16:39:29 +09:00
MMX
591a2f2b02 Merge pull request #649 from krolchonok/ibutton_fix
Fix naming in iButton
2023-11-13 20:01:09 +03:00
MX
7aaa847835 Merge branch 'nfcrefactoring' into dev 2023-11-13 20:57:36 +04:00
ushastoe
42101c6594 Revert " applications_user/Flipper-Zero-Privet-Mir-main/"
This reverts commit 3e9ecd2f4f.
2023-11-13 11:27:27 +03:00
ushastoe
3e9ecd2f4f applications_user/Flipper-Zero-Privet-Mir-main/ 2023-11-13 11:26:36 +03:00
ushastoe
725811d7b3 fix [] 2023-11-10 23:29:11 +03:00
ushastoe
a56a52b4bb Fix naming in iButton 2023-11-10 21:15:33 +03:00
1785 changed files with 81104 additions and 25785 deletions

View File

@@ -69,7 +69,7 @@ Min butthurt: 0
Max butthurt: 9
Min level: 1
Max level: 3
Weight: 4
Weight: 3
Name: L1_Painting_128x64
Min butthurt: 0
@@ -85,26 +85,33 @@ Min level: 1
Max level: 3
Weight: 3
Name: L1_Senpai_128x64
Min butthurt: 0
Max butthurt: 5
Min level: 1
Max level: 3
Weight: 3
Name: L1_Kaiju_128x64
Min butthurt: 0
Max butthurt: 10
Min level: 1
Max level: 3
Weight: 4
Weight: 3
Name: L1_My_dude_128x64
Min butthurt: 0
Max butthurt: 8
Min level: 1
Max level: 3
Weight: 4
Weight: 3
Name: L2_Wake_up_128x64
Min butthurt: 0
Max butthurt: 12
Min level: 2
Max level: 3
Weight: 4
Weight: 3
Name: L2_Furippa2_128x64
Min butthurt: 0
@@ -132,7 +139,7 @@ Min butthurt: 0
Max butthurt: 8
Min level: 2
Max level: 3
Weight: 4
Weight: 3
Name: L3_Furippa3_128x64
Min butthurt: 0
@@ -155,23 +162,37 @@ Min level: 3
Max level: 3
Weight: 3
Name: L1_Senpai_128x64
Min butthurt: 0
Max butthurt: 5
Min level: 1
Max level: 3
Weight: 4
Name: L1_Sad_song_128x64
Min butthurt: 8
Max butthurt: 13
Min level: 1
Max level: 3
Weight: 4
Weight: 3
Name: L2_Coding_in_the_shell_128x64
Min butthurt: 0
Max butthurt: 12
Min level: 2
Max level: 3
Weight: 4
Weight: 3
Name: L2_Secret_door_128x64
Min butthurt: 0
Max butthurt: 12
Min level: 2
Max level: 3
Weight: 3
Name: L3_Freedom_2_dolphins_128x64
Min butthurt: 0
Max butthurt: 12
Min level: 3
Max level: 3
Weight: 5
Name: L1_Akira_128x64
Min butthurt: 0
Max butthurt: 8
Min level: 1
Max level: 3
Weight: 5

View File

@@ -1,5 +1,5 @@
diff --git a/applications/services/notification/notification_app.c b/applications/services/notification/notification_app.c
index 5769ced..c5d3088 100644
index 9baa738..91ad7c1 100644
--- a/applications/services/notification/notification_app.c
+++ b/applications/services/notification/notification_app.c
@@ -9,6 +9,7 @@
@@ -19,7 +19,7 @@ index 5769ced..c5d3088 100644
}
diff --git a/applications/settings/notification_settings/notification_settings_app.c b/applications/settings/notification_settings/notification_settings_app.c
index 1955012..19d953d 100644
index 2a1d988..dda86f3 100644
--- a/applications/settings/notification_settings/notification_settings_app.c
+++ b/applications/settings/notification_settings/notification_settings_app.c
@@ -3,6 +3,7 @@
@@ -30,16 +30,16 @@ index 1955012..19d953d 100644
#define MAX_NOTIFICATION_SETTINGS 4
@@ -20,6 +21,8 @@ static const NotificationSequence sequence_note_c = {
NULL,
};
@@ -13,6 +14,8 @@ typedef struct {
VariableItemList* variable_item_list;
} NotificationAppSettings;
+static VariableItem* temp_item;
+
#define CONTRAST_COUNT 11
const char* const contrast_text[CONTRAST_COUNT] = {
"-5",
@@ -156,6 +159,59 @@ static void vibro_changed(VariableItem* item) {
static const NotificationSequence sequence_note_c = {
&message_note_c5,
&message_delay_100,
@@ -168,6 +171,59 @@ static void vibro_changed(VariableItem* item) {
notification_message(app->notification, &sequence_single_vibro);
}
@@ -99,7 +99,7 @@ index 1955012..19d953d 100644
static uint32_t notification_app_settings_exit(void* context) {
UNUSED(context);
return VIEW_NONE;
@@ -180,8 +236,40 @@ static NotificationAppSettings* alloc_settings() {
@@ -192,8 +248,40 @@ static NotificationAppSettings* alloc_settings() {
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, contrast_text[value_index]);
@@ -462,54 +462,6 @@ index 0000000..68dacda
+ */
+const char* rgb_backlight_get_color_text(uint8_t index);
\ No newline at end of file
diff --git a/firmware/targets/f7/furi_hal/furi_hal_light.c b/firmware/targets/f7/furi_hal/furi_hal_light.c
index 83e1603..45798ca 100644
--- a/firmware/targets/f7/furi_hal/furi_hal_light.c
+++ b/firmware/targets/f7/furi_hal/furi_hal_light.c
@@ -3,6 +3,7 @@
#include <furi_hal_light.h>
#include <lp5562.h>
#include <stdint.h>
+#include <applications/settings/notification_settings/rgb_backlight.h>
#define LED_CURRENT_RED 50
#define LED_CURRENT_GREEN 50
@@ -31,22 +32,21 @@ void furi_hal_light_init() {
}
void furi_hal_light_set(Light light, uint8_t value) {
- furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
- if(light & LightRed) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelRed, value);
- }
- if(light & LightGreen) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelGreen, value);
- }
- if(light & LightBlue) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelBlue, value);
- }
if(light & LightBacklight) {
- uint8_t prev = lp5562_get_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelWhite);
- lp5562_execute_ramp(
- &furi_hal_i2c_handle_power, LP5562Engine1, LP5562ChannelWhite, prev, value, 100);
+ rgb_backlight_update(value, false);
+ } else {
+ furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
+ if(light & LightRed) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelRed, value);
+ }
+ if(light & LightGreen) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelGreen, value);
+ }
+ if(light & LightBlue) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelBlue, value);
+ }
+ furi_hal_i2c_release(&furi_hal_i2c_handle_power);
}
- furi_hal_i2c_release(&furi_hal_i2c_handle_power);
}
void furi_hal_light_blink_start(Light light, uint8_t brightness, uint16_t on_time, uint16_t period) {
diff --git a/lib/drivers/SK6805.c b/lib/drivers/SK6805.c
new file mode 100644
index 0000000..572e1df
@@ -575,7 +527,7 @@ index 0000000..572e1df
+
+void SK6805_update(void) {
+ SK6805_init();
+ furi_kernel_lock();
+ FURI_CRITICAL_ENTER();
+ uint32_t end;
+ /* Последовательная отправка цветов светодиодов */
+ for(uint8_t lednumber = 0; lednumber < SK6805_LED_COUNT; lednumber++) {
@@ -615,7 +567,7 @@ index 0000000..572e1df
+ }
+ }
+ }
+ furi_kernel_unlock();
+ FURI_CRITICAL_EXIT();
+}
diff --git a/lib/drivers/SK6805.h b/lib/drivers/SK6805.h
new file mode 100644
@@ -675,3 +627,51 @@ index 0000000..7c58956
+
+#endif /* SK6805_H_ */
\ No newline at end of file
diff --git a/targets/f7/furi_hal/furi_hal_light.c b/targets/f7/furi_hal/furi_hal_light.c
index 83e1603..45798ca 100644
--- a/targets/f7/furi_hal/furi_hal_light.c
+++ b/targets/f7/furi_hal/furi_hal_light.c
@@ -3,6 +3,7 @@
#include <furi_hal_light.h>
#include <lp5562.h>
#include <stdint.h>
+#include <applications/settings/notification_settings/rgb_backlight.h>
#define LED_CURRENT_RED (50u)
#define LED_CURRENT_GREEN (50u)
@@ -31,22 +32,21 @@ void furi_hal_light_init(void) {
}
void furi_hal_light_set(Light light, uint8_t value) {
- furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
- if(light & LightRed) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelRed, value);
- }
- if(light & LightGreen) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelGreen, value);
- }
- if(light & LightBlue) {
- lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelBlue, value);
- }
if(light & LightBacklight) {
- uint8_t prev = lp5562_get_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelWhite);
- lp5562_execute_ramp(
- &furi_hal_i2c_handle_power, LP5562Engine1, LP5562ChannelWhite, prev, value, 100);
+ rgb_backlight_update(value, false);
+ } else {
+ furi_hal_i2c_acquire(&furi_hal_i2c_handle_power);
+ if(light & LightRed) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelRed, value);
+ }
+ if(light & LightGreen) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelGreen, value);
+ }
+ if(light & LightBlue) {
+ lp5562_set_channel_value(&furi_hal_i2c_handle_power, LP5562ChannelBlue, value);
+ }
+ furi_hal_i2c_release(&furi_hal_i2c_handle_power);
}
- furi_hal_i2c_release(&furi_hal_i2c_handle_power);
}
void furi_hal_light_blink_start(Light light, uint8_t brightness, uint16_t on_time, uint16_t period) {

View File

@@ -45,7 +45,9 @@ steps:
- export FORCE_NO_DIRTY=yes
- export FBT_GIT_SUBMODULE_SHALLOW=1
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-base.tgz
- tar zxvf all-the-apps-base.tgz
- tar zxf all-the-apps-base.tgz
- mkdir -p applications/main/clock_app/resources/apps
- mkdir -p applications/main/clock_app/resources/apps_data
- cp -R base_pack_build/artifacts-base/* applications/main/clock_app/resources/apps/
- cp -R base_pack_build/apps_data/* applications/main/clock_app/resources/apps_data/
- rm -rf base_pack_build
@@ -65,7 +67,8 @@ steps:
pull: never
commands:
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-extra.tgz
- tar zxvf all-the-apps-extra.tgz
- tar zxf all-the-apps-extra.tgz
- mkdir -p applications/main/clock_app/resources/apps
- cp -R extra_pack_build/artifacts-extra/* applications/main/clock_app/resources/apps/
- rm -rf extra_pack_build
- export DIST_SUFFIX=${DRONE_TAG}e
@@ -117,7 +120,9 @@ steps:
- rm -f build/f7-firmware-C/toolbox/version.*
- ./fbt COMPACT=1 DEBUG=0 updater_package
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-base.tgz
- tar zxvf all-the-apps-base.tgz
- tar zxf all-the-apps-base.tgz
- mkdir -p applications/main/clock_app/resources/apps
- mkdir -p applications/main/clock_app/resources/apps_data
- cp -R base_pack_build/artifacts-base/* applications/main/clock_app/resources/apps/
- cp -R base_pack_build/apps_data/* applications/main/clock_app/resources/apps_data/
- rm -rf base_pack_build
@@ -336,9 +341,10 @@ steps:
DISCORD_WEBHOOK:
from_secret: dis_release_webhook
commands:
- wget "https://raw.githubusercontent.com/fieu/discord.sh/e1dc1a7595efad2cad8f072f0b3531c470f5b7c8/discord.sh"
- wget "https://raw.githubusercontent.com/fieu/discord.sh/2253303efc0e7211ac2777d2535054cbb872f1e0/discord.sh"
- chmod +x ./discord.sh
- ./discord.sh --text 'New Unleashed firmware released!\n\nVersion - '${DRONE_TAG}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[[Github - Changelog]](https://github.com/DarkFlippers/unleashed-firmware/releases/tag/'${DRONE_TAG}')\n\n[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)\n\n[-Download latest extra apps pack-](https://github.com/xMasterX/all-the-plugins/releases/latest)\n\n[-Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/'${DRONE_TAG}'/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=release-cfw&version='${DRONE_TAG}')\n\n[-Version with only main apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'c.tgz&channel=release-cfw&version='${DRONE_TAG}'c)\n\n[-Version without custom animations - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-'${DRONE_TAG}'n.tgz&channel=release-cfw&version='${DRONE_TAG}'n)\n\n[-Version with RGB patch - only for hardware mod! - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz&channel=release-cfw&version='${DRONE_TAG}'r)\n\n[-Version with RGB patch - only for hardware mod! - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz)\n\n[-Version with Extra apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'e.tgz&channel=release-cfw&version='${DRONE_TAG}'e)'
- echo 'New Unleashed firmware released!\n\nVersion - '${DRONE_TAG}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[[Github - Changelog]](https://github.com/DarkFlippers/unleashed-firmware/releases/tag/'${DRONE_TAG}')\n\n[-How to install firmware-](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)\n\n[-Download latest extra apps pack-](https://github.com/xMasterX/all-the-plugins/releases/latest)\n\n[-Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/'${DRONE_TAG}'/flipper-z-f7-update-'${DRONE_TAG}'.tgz&channel=release-cfw&version='${DRONE_TAG}')\n\n[-Version with only main apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'c.tgz&channel=release-cfw&version='${DRONE_TAG}'c)\n\n[-Version without custom animations - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_no_anim/flipper-z-f7-update-'${DRONE_TAG}'n.tgz&channel=release-cfw&version='${DRONE_TAG}'n)\n\n[-Version with RGB patch - only for hardware mod! - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz&channel=release-cfw&version='${DRONE_TAG}'r)\n\n[-Version with RGB patch - only for hardware mod! - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'r.tgz)\n\n[-Version with Extra apps - Install FW via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_TAG}'e.tgz&channel=release-cfw&version='${DRONE_TAG}'e)' > messagedisc.txt
- ./discord.sh --text "$(jq -Rs . <messagedisc.txt | cut -c 2- | rev | cut -c 2- | rev)"
- name: "Send clean build to telegram"
image: appleboy/drone-telegram
@@ -369,7 +375,7 @@ trigger:
- tag
node:
typ: haupt
typ: dev1
---
kind: pipeline
@@ -420,7 +426,9 @@ steps:
- export FORCE_NO_DIRTY=yes
- export FBT_GIT_SUBMODULE_SHALLOW=1
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-base.tgz
- tar zxvf all-the-apps-base.tgz
- tar zxf all-the-apps-base.tgz
- mkdir -p applications/main/clock_app/resources/apps
- mkdir -p applications/main/clock_app/resources/apps_data
- cp -R base_pack_build/artifacts-base/* applications/main/clock_app/resources/apps/
- cp -R base_pack_build/apps_data/* applications/main/clock_app/resources/apps_data/
- rm -rf base_pack_build
@@ -440,7 +448,8 @@ steps:
pull: never
commands:
- wget https://github.com/xMasterX/all-the-plugins/releases/latest/download/all-the-apps-extra.tgz
- tar zxvf all-the-apps-extra.tgz
- tar zxf all-the-apps-extra.tgz
- mkdir -p applications/main/clock_app/resources/apps
- cp -R extra_pack_build/artifacts-extra/* applications/main/clock_app/resources/apps/
- rm -rf extra_pack_build
- export DIST_SUFFIX=${DRONE_BUILD_NUMBER}e
@@ -657,9 +666,10 @@ steps:
DISCORD_WEBHOOK:
from_secret: dis_dev_webhook
commands:
- wget "https://raw.githubusercontent.com/fieu/discord.sh/e1dc1a7595efad2cad8f072f0b3531c470f5b7c8/discord.sh"
- wget "https://raw.githubusercontent.com/fieu/discord.sh/2253303efc0e7211ac2777d2535054cbb872f1e0/discord.sh"
- chmod +x ./discord.sh
- ./discord.sh --text 'Unleashed firmware dev build successful!\n\nBuild - '${DRONE_BUILD_NUMBER}'\n\nCommit - https://github.com/DarkFlippers/unleashed-firmware/commit/'${DRONE_COMMIT_SHA}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[-Version with Extra apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'e.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'e)\n\n[-Version with only main apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'c.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'c)\n\n[-Version with RGB patch - only for hardware mod! - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'r.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'r)\n\n[-Version with RGB patch - only for hardware mod! - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'r.tgz)\n\n[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/dev/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}')'
- echo 'Unleashed firmware dev build successful!\n\nBuild - '${DRONE_BUILD_NUMBER}'\n\nCommit - https://github.com/DarkFlippers/unleashed-firmware/commit/'${DRONE_COMMIT_SHA}'\n\n[-> Sponsor our project](https://boosty.to/mmxdev)\n\n[-Version with Extra apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'e.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'e)\n\n[-Version with only main apps - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'c.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'c)\n\n[-Version with RGB patch - only for hardware mod! - Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'r.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}'r)\n\n[-Version with RGB patch - only for hardware mod! - Direct download-](https://unleashedflip.com/fw_extra_apps/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'r.tgz)\n\n[-Install via Web Updater-](https://lab.flipper.net/?url=https://unleashedflip.com/fw/dev/flipper-z-f7-update-'${DRONE_BUILD_NUMBER}'.tgz&channel=dev-cfw&version='${DRONE_BUILD_NUMBER}')' > messagedisc.txt
- ./discord.sh --text "$(jq -Rs . <messagedisc.txt | cut -c 2- | rev | cut -c 2- | rev)"
trigger:
branch:
@@ -668,4 +678,4 @@ trigger:
- push
node:
typ: haupt
typ: dev1

View File

@@ -1,10 +1,10 @@
# MLib macros we can't do much about.
//-V:M_LET:1048,1044
//-V:M_EACH:1048,1044
//-V:ARRAY_DEF:760,747,568,776,729,712,654
//-V:LIST_DEF:760,747,568,712,729,654,776
//-V:ARRAY_DEF:760,747,568,776,729,712,654,1103
//-V:LIST_DEF:760,747,568,712,729,654,776,1103
//-V:BPTREE_DEF2:779,1086,557,773,512
//-V:DICT_DEF2:779,524,776,760,1044,1001,729,590,568,747,685
//-V:DICT_DEF2:779,524,776,760,1044,1001,729,590,568,747,685,1103
//-V:ALGO_DEF:1048,747,1044
//-V:TUPLE_DEF2:524,590,1001,760
@@ -42,8 +42,5 @@
# Model-related warnings
//-V:with_view_model:1044,1048
# Functions that always return the same error code
//-V:picopass_device_decrypt:1048
# Examples
//V_EXCLUDE_PATH applications/examples/

View File

@@ -1 +1 @@
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/cmsis_core -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/stm32wb_cmsis -e lib/stm32wb_copro -e lib/stm32wb_hal -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/*
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/cmsis_core -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/microtar -e lib/mlib -e lib/stm32wb_cmsis -e lib/stm32wb_copro -e lib/stm32wb_hal -e lib/u8g2 -e lib/nanopb -e lib/mjs -e */arm-none-eabi/*

2
.vscode/ReadMe.md vendored
View File

@@ -1,4 +1,4 @@
# Visual Studio Code workspace for Flipper Zero
# Visual Studio Code workspace for Flipper Zero {#vscode}
## Setup

View File

@@ -8,7 +8,8 @@
"amiralizadeh9480.cpp-helper",
"marus25.cortex-debug",
"zxh404.vscode-proto3",
"augustocdias.tasks-shell-input"
"augustocdias.tasks-shell-input",
"rioj7.command-variable"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
@@ -16,4 +17,4 @@
"ms-vscode.cpptools",
"ms-vscode.cmake-tools"
]
}
}

View File

@@ -2,30 +2,27 @@
"configurations": [
{
"name": "Win32",
"compilerPath": "${workspaceFolder}/toolchain/x86_64-windows/bin/arm-none-eabi-gcc.exe",
"compilerPath": "${workspaceFolder}/toolchain/current/bin/arm-none-eabi-gcc.exe",
"intelliSenseMode": "gcc-arm",
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json",
"configurationProvider": "ms-vscode.cpptools",
"cStandard": "gnu17",
"cppStandard": "c++17"
"cStandard": "gnu23",
"cppStandard": "c++20"
},
{
"name": "Linux",
"compilerPath": "${workspaceFolder}/toolchain/x86_64-linux/bin/arm-none-eabi-gcc",
"compilerPath": "${workspaceFolder}/toolchain/current/bin/arm-none-eabi-gcc",
"intelliSenseMode": "gcc-arm",
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json",
"configurationProvider": "ms-vscode.cpptools",
"cStandard": "gnu17",
"cppStandard": "c++17"
"cStandard": "gnu23",
"cppStandard": "c++20"
},
{
"name": "Mac",
"compilerPath": "${workspaceFolder}/toolchain/x86_64-darwin/bin/arm-none-eabi-gcc",
"compilerPath": "${workspaceFolder}/toolchain/current/bin/arm-none-eabi-gcc",
"intelliSenseMode": "gcc-arm",
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json",
"configurationProvider": "ms-vscode.cpptools",
"cStandard": "gnu17",
"cppStandard": "c++17"
"cStandard": "gnu23",
"cppStandard": "c++20"
}
],
"version": 4

View File

@@ -1,26 +1,20 @@
{
"C_Cpp.default.cStandard": "gnu17",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.cStandard": "gnu23",
"C_Cpp.default.cppStandard": "c++20",
"python.formatting.provider": "black",
"workbench.tree.indent": 12,
"cortex-debug.enableTelemetry": false,
"cortex-debug.variableUseNaturalFormat": true,
"cortex-debug.showRTOS": true,
"cortex-debug.armToolchainPath.windows": "${workspaceFolder}/toolchain/x86_64-windows/bin",
"cortex-debug.armToolchainPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/bin",
"cortex-debug.armToolchainPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin",
"cortex-debug.openocdPath.windows": "${workspaceFolder}/toolchain/x86_64-windows/openocd/bin/openocd.exe",
"cortex-debug.openocdPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/openocd/bin/openocd",
"cortex-debug.openocdPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/openocd/bin/openocd",
"cortex-debug.gdbPath.windows": "${workspaceFolder}/toolchain/x86_64-windows/bin/arm-none-eabi-gdb-py.bat",
"cortex-debug.gdbPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/bin/arm-none-eabi-gdb-py",
"cortex-debug.gdbPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin/arm-none-eabi-gdb-py",
"cortex-debug.armToolchainPath": "${workspaceFolder}/toolchain/current/bin",
"cortex-debug.openocdPath": "${workspaceFolder}/toolchain/current/bin/openocd",
"cortex-debug.gdbPath": "${workspaceFolder}/toolchain/current/bin/arm-none-eabi-gdb-py3",
"editor.formatOnSave": true,
"files.associations": {
"*.scons": "python",
"SConscript": "python",
"SConstruct": "python",
"*.fam": "python",
"*.fam": "python"
},
"clangd.arguments": [
// We might be able to tighten this a bit more to only include the correct toolchain.

View File

@@ -91,7 +91,7 @@
"label": "[Debug:unit_tests] Flash (USB)",
"group": "build",
"type": "shell",
"command": "./fbt FIRMWARE_APP_SET=unit_tests FORCE=1 flash_usb"
"command": "./fbt FIRMWARE_APP_SET=unit_tests FORCE=1 flash_usb_full"
},
{
"label": "[Debug] Flash (USB, with resources)",

View File

@@ -1,13 +1,75 @@
## New changes
* SubGHz: Add 4 more systems to Add Manually (untested!)
* SubGHz: Add Manually fixes
* SubGHz: Added NiceFlor-S to ignore options, removed colons. (by @G2Dolphin | PR #620)
* Misc code cleanup
* RGB: Fix white color on reboot, move settings, add custom color option
* **BLE Spam app** updated to latest version (Android, Windows support) (by @Willy-JL) -> (app can be found in builds ` `, `e`, `n`, `r`)
* OFW: Fix double arrows and add proper indication
* OFW: SubGHz: add manually fix 12-bits is 0xFFF (or 0xFF0) CAME/NICE 12-bit
* OFW: Fix various crashes if debug libraries used
* LFRFID: **Electra intercom protocol support** (Romania) (by @Leptopt1los | PR #750)
* NFC: Temp fix for `iso14443_4_layer_decode_block` crash
* NFC: CharlieCard parser (by @zacharyweiss)
* SubGHz: FAAC RC XT - add 0xB button code on arrow buttons for programming mode
* SubGHz: Add Manually - Sommer FM fixes
* SubGHz: Enabled tx-rx state on unused gpio pin by default (**external amp option was removed and is enabled by default now**)
* SubGHz: **Status output !TX/RX on the GDO2 CC1101 pin** (by @quen0n | PR #742)
* SubGHz: Reworked saved settings (by @xMasterX and @Willy-JL)
* Desktop: Fixes for animation unload (by @Willy-JL)
* iButton: Updated DS1420 for latest ibutton changes
* Misc: Allow no prefix usage of name_generator_make_detailed_datetime
* Misc: Allow setting view dispatcher callbacks to NULL
* Misc: Added `void` due to `-Wstrict-prototypes`
* Misc: Some code cleanup and proper log levels in nfc parsers
* Infrared: Allow external apps to use infrared settings (by @Willy-JL)
* JS & HAL: Various fixes and FURI_HAL_RANDOM_MAX define added (by @Willy-JL)
* JS: **BadUSB layout support** (by @Willy-JL)
* JS: New Modules `widget`, `vgm` and path globals (by @jamisonderek)
* Apps: Enhance Random Interval and Movement Functionality in HID Mouse Jiggler for Improved Stealth and Human-Like Behavior (by @gushmazuko | PR #746)
* Apps: NFC Magic - **Gen2 writing support, Gen4 NTAG password and PACK fixes** (by @Astrrra)
* Apps: MFKey - **fixed crashes**, add more free ram (by @noproto & @Willy-JL)
* Apps: **Check out Apps updates by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev)
* OFW PR 3616: NFC: Mf Desfire fix reading big files (by gornekich)
* OFW: iButton: fix crash when deleting some keys
* OFW: Desktop: cleanup error popups
* OFW: Troika parser visual fixes
* OFW: Fix the retry/exit confirmation prompts in iButton
* OFW: nfc app: add legacy keys for plantain cards
* OFW: GUI: Fix array out of bounds in menu exit
* OFW: add support for S(WTX) request in iso14443_4a_poller
* OFW: Mosgortrans parser output fixes
* OFW: BLE: Add GapPairingNone support
* OFW: iButton new UI
* OFW: FuriHal: add ADC API
* OFW: Mf Desfire multiple file rights support
* OFW: **Felica poller** (NFC-F)
* OFW: Desktop/Loader: Unload animations before loading FAPs
* OFW: JS Documentation
* OFW: **Update radio stack to v1.19.0**
* OFW: **Move crypto1 to helpers, add it to the public API**
* OFW: Explain RNG differences, add FURI_HAL_RANDOM_MAX
* OFW: Furi: Add "out of memory" and "malloc(0)" crash messages
* OFW: IR: Fix crash on duty_cycle=1
* OFW: **Desktop: ensure that animation is unloaded before app start (fixes some out of memory crashes)**
* OFW: Hide unlock with reader for MFU-C
* OFW: fbt: fixed missing FBT_FAP_DEBUG_ELF_ROOT to dist env
* OFW: fbt: added -Wstrict-prototypes for main firmware
* OFW: Mifare Ultralight naming fix
* OFW: IR: Remember OTG state
* OFW: Bad USB: fix crash when selecting a keyboard layout
* OFW: L1_Mods animation update : adding VGM visual
* OFW: RFID Improvements
* OFW: Fixed plugins and UI
* OFW: **NFC: Fix mf desfire detect**
* OFW: infrared_transmit.h was missing `#pragma once`
* OFW: Show the wrong PIN Attempt count on the login screen
* OFW: SavedStruct: Introduce saved_struct_get_metadata
* OFW: JS CLI command
* OFW: Add ChromeOS Bad USB demo
* OFW: **Configurable Infrared TX output** (previous UL version is replaced with OFW version, new features added "AutoDetect" and saving settings)
* OFW: BadUSB: BLE, media keys, Fn/Globe key commands
* OFW: NFC: Slix privacy password reveal ->(was included in previous UL release) and **Desfire detect fix**
* OFW: github: additional pre-upload checks for doxygen workflow
* OFW: NFC UI fixes
* OFW: Gui: unicode support, new canvas API
* OFW: **Api Symbols: replace asserts with checks**
<br><br>
#### Known NFC post-refactor regressions list:
- Mifare Mini clones reading is broken (original mini working fine) (OFW)
- NFC CLI was removed with refactoring (OFW) (will be back soon)
- Mifare Nested not ported to latest API yet, `unlshd-065` is the latest version on old NFC API that works with "nested app"
----
@@ -23,16 +85,17 @@
|cloudtips|only RU payments accepted|https://pay.cloudtips.ru/p/7b3e9d65|
|YooMoney|only RU payments accepted|https://yoomoney.ru/fundraise/XA49mgQLPA0.221209|
|USDT|(TRC20)|`TSXcitMSnWXUFqiUfEXrTVpVewXy2cYhrs`|
|BCH||`qquxfyzntuqufy2dx0hrfr4sndp0tucvky4sw8qyu3`|
|ETH|(BSC/ERC20-Tokens)|`darkflippers.eth` (or `0xFebF1bBc8229418FF2408C07AF6Afa49152fEc6a`)|
|BTC||`bc1q0np836jk9jwr4dd7p6qv66d04vamtqkxrecck9`|
|SOL|(Solana/Tokens)|`DSgwouAEgu8iP5yr7EHHDqMNYWZxAqXWsTEeqCAXGLj8`|
|DOGE||`D6R6gYgBn5LwTNmPyvAQR6bZ9EtGgFCpvv`|
|LTC||`ltc1q3ex4ejkl0xpx3znwrmth4lyuadr5qgv8tmq8z9`|
|BCH||`qquxfyzntuqufy2dx0hrfr4sndp0tucvky4sw8qyu3`|
|XMR|(Monero)| `41xUz92suUu1u5Mu4qkrcs52gtfpu9rnZRdBpCJ244KRHf6xXSvVFevdf2cnjS7RAeYr5hn9MsEfxKoFDRSctFjG5fv1Mhn`|
|TON||`EQCOqcnYkvzOZUV_9bPE_8oTbOrOF03MnF-VcJyjisTZmpGf`|
|TON||`UQCOqcnYkvzOZUV_9bPE_8oTbOrOF03MnF-VcJyjisTZmsxa`|
#### Thanks to our sponsors:
callmezimbra, Quen0n, MERRON, grvpvl (lvpvrg), art_col, ThurstonWaffles, Moneron, UterGrooll, LUCFER, Northpirate, zloepuzo, T.Rat, Alexey B., ionelife, ...
#### Thanks to our sponsors who supported project in the past and special thanks to sponsors who supports us on regular basis:
ClaraCrazy, Pathfinder [Count Zero cDc], callmezimbra, Quen0n, MERRON, grvpvl (lvpvrg), art_col, ThurstonWaffles, Moneron, UterGrooll, LUCFER, Northpirate, zloepuzo, T.Rat, Alexey B., ionelife, ...
and all other great people who supported our project and me (xMasterX), thanks to you all!
@@ -50,7 +113,7 @@ What build I should download and what this name means - `flipper-z-f7-update-(ve
| `c` | ✅ | | | |
| `n` | | ✅ | | |
| `e` | ✅ | ✅ | ✅ | |
| `r` | ✅ | ✅ | ✅ | |
| `r` | ✅ | ✅ | ✅ | ⚠️ |
This is [hardware mod](https://github.com/quen0n/flipperzero-firmware-rgb#readme), works only on modded flippers! do not install on non modded device!

View File

@@ -1,6 +1,6 @@
<h3 align="center">
<a href="https://github.com/DarkFlippers/unleashed-firmware">
<img src="https://user-images.githubusercontent.com/10697207/186202043-26947e28-b1cc-459a-8f20-ffcc7fc0c71c.png" align="center" alt="fzCUSTOM" border="0">
<img src="https://user-images.githubusercontent.com/10697207/186202043-26947e28-b1cc-459a-8f20-ffcc7fc0c71c.png" align="center" alt="Unleashed Firmware Logo" border="0">
</a>
</h3>
<div align="center" id="badges">
@@ -20,15 +20,15 @@
### Welcome to the Flipper Zero Unleashed Firmware repo!
#### **This firmware is a fork from** [flipperdevices/flipperzero-firmware](https://github.com/flipperdevices/flipperzero-firmware)
#### **This firmware is a fork from original (OFW) firmware** [flipperdevices/flipperzero-firmware](https://github.com/flipperdevices/flipperzero-firmware)
<br>
### Most stable custom firmware focused on new features and improvements of original firmware components, with almost no UI changes
### Most stable custom firmware focused on new features and improvements of original firmware components, keeping compatibility with original firmware API and Apps
<br>
##### This software is for experimental purposes only and is not meant for any illegal activity/purposes. <br> We do not condone illegal activity and strongly encourage keeping transmissions to legal/valid uses allowed by law. <br> Also, this software is made without any support from Flipper Devices and is in no way related to the official devs.
##### This software is for experimental purposes only and is not meant for any illegal activity/purposes. <br> We do not condone illegal activity and strongly encourage keeping transmissions to legal/valid uses allowed by law. <br> Also, this software is made without any support from Flipper Devices and is in no way related to the official team.
<br>
@@ -36,7 +36,7 @@
## FAQ (frequently asked questions)
[Follow this link to find answers to most asked questions](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/FAQ.md)
## Dev builds (unstable)
## Dev builds (unstable) (built automatically from dev branch)
- https://dev.unleashedflip.com/
- https://t.me/kotnehleb
## Releases in Telegram
@@ -45,23 +45,24 @@
# What's changed
- **Sub-GHz** *lib & hal*
- Regional TX restrictions removed
- Extra Sub-GHz frequencies
- Extra Sub-GHz frequencies added
- Frequency range can be extended in settings file (Warning: It can damage Flipper's hardware)
- Many rolling code [protocols](https://github.com/DarkFlippers/unleashed-firmware#current-modified-and-new-sub-ghz-protocols-list) now have the ability to save & send captured signals
- FAAC SLH (Spa) & BFT Mitto (keeloq secure with seed) manual creation
- External CC1101 module support [(by quen0n)](https://github.com/DarkFlippers/unleashed-firmware/pull/307)
- **Sub-GHz** *Main App*
- Save last used frequency [(by derskythe)](https://github.com/DarkFlippers/unleashed-firmware/pull/77)
- Save last used settings [(by derskythe)](https://github.com/DarkFlippers/unleashed-firmware/pull/77)
- New frequency analyzer [(by ClusterM)](https://github.com/DarkFlippers/unleashed-firmware/pull/43)
- Press OK in frequency analyzer to use detected frequency in Read modes [(by derskythe)](https://github.com/DarkFlippers/unleashed-firmware/pull/77)
- Long press OK button in Sub-GHz Frequency analyzer to switch to Read menu [(by derskythe)](https://github.com/DarkFlippers/unleashed-firmware/pull/79)
- New option to use timestamps + protocol name when you saving file, instead of random name - Enable in `Radio Settings -> Time in names = ON`
- New option to use timestamps + protocol name when you saving file, instead of random name or timestamp only - Enable in `Radio Settings -> Protocol Names = ON`
- Read mode UI improvements (shows time when signal was received) (by @wosk)
- External CC1101 module support (Hardware SPI used)
- External CC1101 module amplifier control (or LED control) support (enabled by default)
- **Hold right in received signal list to delete selected signal**
- **Custom buttons for Keeloq / Alutech AT4N / Nice Flor S / Somfy Telis / Security+ 2.0 / CAME Atomo** - now you can use arrow buttons to send signal with different button code
- `Add manually` menu extended with new protocols
- FAAC SLH, BFT Mitto / Somfy Telis / Nice Flor S / CAME Atomo, etc.. manual creation with programming new remote into receiver (use button 0xF for BFT Mitto, 0x8 (Prog) on Somfy Telis)
- FAAC SLH, BFT Mitto / Somfy Telis / Nice Flor S / CAME Atomo, etc.. manual creation with programming new remote into receiver (use button 0xF for BFT Mitto, 0x8 (Prog) on Somfy Telis, (right arrow button for other protocols))
- Debug mode counter increase settings (+1 -> +5, +10, default: +1)
- Debug PIN output settings for protocol development
@@ -75,21 +76,22 @@
- Recompiled IR TV Universal Remote for ALL buttons
- Universal remotes for Projectors, Fans, A/Cs and Audio(soundbars, etc.) -> Also always updated and verified by our team
- Infrared -> `RCA` Protocol
- Infrared -> Debug TX PIN output settings
- Infrared -> External IR modules support (with autodetect by OFW)
- **NFC/RFID/iButton**
* LFRFID/iButton Fuzzer plugins
* Extra Mifare Classic keys
* `Add manually` -> Mifare Classic with custom UID
* Picopass/iClass plugin (now with emulation support!) included in releases
* LFRFID and iButton Fuzzer plugins
* Extra Mifare Classic keys in system dict
* EMV Protocol + Public data parser (by @Leptopt1los and @wosk)
* NFC `Add manually` -> Mifare Classic with custom UID
* NFC parsers: Umarsh, Zolotaya Korona, Kazan, Metromoney, Moscow Social Card, Troika (reworked) and [many others](https://github.com/DarkFlippers/unleashed-firmware/tree/dev/applications/main/nfc/plugins/supported_cards) (by @Leptopt1los and @assasinfil)
- **Quality of life & other features**
- Customizable Flipper name **Update! Now can be changed in Settings->Desktop** (by @xMasterX and @Willy-JL)
- Text Input UI element -> Cursor feature (by @Willy-JL)
- Byte Input Mini editor -> **Press UP** multiple times until the nibble editor appears
- Clock on Desktop -> `Settings -> Desktop -> Show Clock`
- Byte Input Mini editor -> **Press UP** multiple times until the nibble editor appears (by @gid9798)
- Clock on Desktop -> `Settings -> Desktop -> Show Clock` (by @gid9798)
- Battery percentage display with different styles `Settings -> Desktop -> Battery View`
- More games in Dummy Mode -> click or hold any of arrow buttons
- Lock device with pin(or regular lock if pin not set) by holding UP button on main screen [(by an4tur0r)](https://github.com/DarkFlippers/unleashed-firmware/pull/107)
- **BadBT** plugin (BT version of BadKB) [(by Willy-JL, ClaraCrazy, XFW contributors)](https://github.com/ClaraCrazy/Flipper-Xtreme/tree/dev/applications/main/bad_kb) - (See in Applications->Tools) - (aka BadUSB via Bluetooth)
- **BadKB** plugin [(by Willy-JL, ClaraCrazy, XFW contributors)](https://github.com/Flipper-XFW/Xtreme-Firmware/tree/dev/applications/main/bad_kb) - (See in Applications->Tools) - (aka BadUSB via Bluetooth)
- BadUSB -> Keyboard layouts [(by rien > dummy-decoy)](https://github.com/dummy-decoy/flipperzero-firmware/tree/dummy_decoy/bad_usb_keyboard_layout)
- Custom community plugins and games added + all known working apps can be downloaded in extra pack in every release
- Other small fixes and changes throughout
@@ -98,29 +100,16 @@
Also check the [changelog in releases](https://github.com/DarkFlippers/unleashed-firmware/releases) for latest updates!
### Current modified and new Sub-GHz protocols list:
Thanks to Official team (to their SubGHz Developer, Skorp) for implementing decoders for these protocols in OFW.
Thanks to Official team (to their SubGHz Developer, Skorp) for implementing support (decoder + encoder / or decode only) for these protocols in OFW.
Keeloq [Not ALL systems supported for decode or emulation yet!] - [Supported manufacturers list](https://0bin.net/paste/VwR2lNJY#WH9vnPgvcp7w6zVKucFCuNREKAcOij8KsJ6vqLfMn3b)
Keeloq [Not ALL systems supported for decode or emulation!] - [Supported manufacturers list](https://pastes.io/raw/unuj9bhe4m)
Encoders or sending made by @xMasterX:
- Nero Radio 57bit (+ 56bit encoder improvements)
- CAME 12bit/24bit encoder fixes (Fixes now merged in OFW)
- Keeloq: HCS101
- Keeloq: AN-Motors
- Keeloq: JCM Tech
- Keeloq: MHouse
- Keeloq: Nice Smilo
- Keeloq: DTM Neo
- Keeloq: FAAC RC,XT
- Keeloq: Mutancode
- Keeloq: Normstahl
- Keeloq: Beninca + Allmatic
- Keeloq: Stilmatic
- Keeloq: CAME Space
- Keeloq: Aprimatic (model TR and similar)
- Keeloq: Centurion Nova (thanks Carlos !)
Encoders or emulation support made by @xMasterX:
- Nero Radio 57bit (+ 56bit support)
- CAME 12bit/24bit encoder fixes (Fixes are now merged in OFW)
- Keeloq: Dea Mio, Genius Bravo, GSN, HCS101, AN-Motors, JCM Tech, MHouse, Nice Smilo, DTM Neo, FAAC RC,XT, Mutancode, Normstahl, Beninca + Allmatic, Stilmatic, CAME Space, Aprimatic (model TR and similar), Centurion Nova (thanks Carlos !)
Encoders or sending made by @Eng1n33r(first implementation in Q2 2022) & @xMasterX (current version):
Encoders or emulation made by @Eng1n33r(first implementation in Q2 2022) and @xMasterX (current version):
- CAME Atomo -> Update! check out new [instructions](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md)
- Nice Flor S -> How to create new remote - [instructions](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md)
- FAAC SLH (Spa) -> Update!!! Check out new [instructions](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md)
@@ -128,7 +117,7 @@ Encoders or sending made by @Eng1n33r(first implementation in Q2 2022) & @xMaste
- Star Line
- Security+ v1 & v2 (encoders was made in OFW)
Encoders made by @assasinfil & @xMasterX:
Encoders made by @assasinfil and @xMasterX:
- Somfy Telis -> How to create new remote - [instructions](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md)
- Somfy Keytis
- KingGates Stylo 4k
@@ -137,12 +126,12 @@ Encoders made by @assasinfil & @xMasterX:
## Please support development of the project
The majority of this project is developed and maintained by me, @xMasterX.
I'm unemployed, and the only income I receive is from your donations.
Our team is small and the guys are working on this project as much as they can solely based on the enthusiasm they have for this project and the community.
- @gid9798 - SubGHz, Plugins, many other things
- @assasinfil - SubGHz protocols
- @Leptopt1los - NFC, RFID, Plugins, and many other things
- @gid9798 - SubGHz, Plugins, many other things - currently offline :(
- @assasinfil - SubGHz protocols, NFC parsers
- @Svaarich - UI design and animations
- @amec0e & @Leptopt1los - Infrared assets
- @amec0e - Infrared assets
- Community moderators in Telegram, Discord, and Reddit
- And of course our GitHub community. Your PRs are a very important part of this firmware and open-source development.
@@ -156,28 +145,31 @@ You can support us by using links or addresses below:
|cloudtips|only RU payments accepted|https://pay.cloudtips.ru/p/7b3e9d65|
|YooMoney|only RU payments accepted|https://yoomoney.ru/fundraise/XA49mgQLPA0.221209|
|USDT|(TRC20)|`TSXcitMSnWXUFqiUfEXrTVpVewXy2cYhrs`|
|BCH||`qquxfyzntuqufy2dx0hrfr4sndp0tucvky4sw8qyu3`|
|ETH|(BSC/ERC20-Tokens)|`darkflippers.eth` (or `0xFebF1bBc8229418FF2408C07AF6Afa49152fEc6a`)|
|BTC||`bc1q0np836jk9jwr4dd7p6qv66d04vamtqkxrecck9`|
|SOL|(Solana/Tokens)|`DSgwouAEgu8iP5yr7EHHDqMNYWZxAqXWsTEeqCAXGLj8`|
|DOGE||`D6R6gYgBn5LwTNmPyvAQR6bZ9EtGgFCpvv`|
|LTC||`ltc1q3ex4ejkl0xpx3znwrmth4lyuadr5qgv8tmq8z9`|
|BCH||`qquxfyzntuqufy2dx0hrfr4sndp0tucvky4sw8qyu3`|
|XMR|(Monero)| `41xUz92suUu1u5Mu4qkrcs52gtfpu9rnZRdBpCJ244KRHf6xXSvVFevdf2cnjS7RAeYr5hn9MsEfxKoFDRSctFjG5fv1Mhn`|
|TON||`EQCOqcnYkvzOZUV_9bPE_8oTbOrOF03MnF-VcJyjisTZmpGf`|
|TON||`UQCOqcnYkvzOZUV_9bPE_8oTbOrOF03MnF-VcJyjisTZmsxa`|
## Community apps included
### [🎲 Download Extra plugins for Unleashed](https://github.com/xMasterX/all-the-plugins/releases/latest)
### [List of Extra pack](https://github.com/xMasterX/all-the-plugins/tree/dev#extra-pack) | [List of Base *(Deafult)* pack](https://github.com/xMasterX/all-the-plugins/tree/dev#default-pack)
### [List of Extra pack](https://github.com/xMasterX/all-the-plugins/tree/dev#extra-pack) | [List of Base *(Default)* pack](https://github.com/xMasterX/all-the-plugins/tree/dev#default-pack)
See full list and sources here: [xMasterX/all-the-plugins](https://github.com/xMasterX/all-the-plugins/tree/dev)
### Official Flipper Zero Apps Catalog [web version](https://lab.flipper.net/apps) or mobile app
# Instructions
## First lock official docs [docs.flipper.net](https://docs.flipper.net/)
## First look at official docs [docs.flipper.net](https://docs.flipper.net/)
## [How to install](/documentation/HowToInstall.md) - [versions info](/CHANGELOG.md#recommended-update-option---web-updater): `n`,` `,`e`...
## Firmware & Development
### - **Developer Documentation** - [developer.flipper.net](https://developer.flipper.net/flipperzero/doxygen)
### - **[How to build](/documentation/HowToBuild.md#how-to-build-by-yourself) | [Project-structure](#project-structure)**
### - **CLion IDE** - How to setup workspace for flipper firmware development [by Savely Krasovsky](https://krasovs.ky/2022/11/01/flipper-zero-clion.html)
@@ -196,22 +188,20 @@ See full list and sources here: [xMasterX/all-the-plugins](https://github.com/xM
## **Sub-GHz**
### - [How to use Flipper as new remote (Nice FlorS, BFT Mitto, Somfy Telis, Aprimatic, AN-Motors, etc..)](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md)
### - External Radio: [How to connect CC1101 module](https://github.com/quen0n/flipperzero-ext-cc1101)
### - Transmission is blocked? [How to extend Sub-GHz frequency range](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/DangerousSettings.md)
### - [How to add extra Sub-GHz frequencies](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzSettings.md)
### - [How to use Flipper as new remote (Nice FlorS, BFT Mitto, Somfy Telis, Aprimatic, AN-Motors, etc..)](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md)
### - [~~Configure Sub-GHz Remote App~~](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemotePlugin.md) Not recomeded, please use embedded configurator
### - [~~Configure Sub-GHz Remote App~~](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemotePlugin.md) Not recommended, please use embedded configurator
## **Plugins**
### - TOTP (Authenticator): [config description](https://github.com/akopachov/flipper-zero_authenticator/blob/master/docs/conf-file_description.md)
### - Mifare Nested plugin: [How to recover keys](https://github.com/AloneLiberty/FlipperNested#how-to-use-it)
### - Barcode Generator: [How to use](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/BarcodeGenerator.md)
### - Multi Converter: [How to use](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/MultiConverter.md)
@@ -258,6 +248,8 @@ See full list and sources here: [xMasterX/all-the-plugins](https://github.com/xM
* Official Docs: [docs.flipper.net](https://docs.flipper.net/)
* Official Forum: [forum.flipperzero.one](https://forum.flipperzero.one/)
* Update! Developer Documentation [developer.flipper.net](https://developer.flipper.net/flipperzero/doxygen)
# Project structure
- `applications` - Applications and services used in firmware

View File

@@ -7,7 +7,7 @@
# construction of certain targets behind command-line options.
import os
from fbt.util import path_as_posix
from fbt.util import open_browser_action
DefaultEnvironment(tools=[])
@@ -42,6 +42,7 @@ distenv = coreenv.Clone(
"openocd",
"blackmagic",
"jflash",
"doxygen",
],
ENV=os.environ,
UPDATE_BUNDLE_DIR="dist/${DIST_DIR}/f${TARGET_HW}-update-${DIST_SUFFIX}",
@@ -66,6 +67,7 @@ if GetOption("fullenv") or any(
# Target for self-update package
dist_basic_arguments = [
"${ARGS}",
"--bundlever",
"${UPDATE_VERSION_STRING}",
]
@@ -172,17 +174,20 @@ Alias("fap_dist", fap_dist)
fap_deploy = distenv.PhonyTarget(
"fap_deploy",
[
Action(
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/storage.py",
"-p",
"${FLIP_PORT}",
"send",
"${SOURCE}",
"/ext/apps",
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/storage.py",
"-p",
"${FLIP_PORT}",
"send",
"${SOURCE}",
"/ext/apps",
"${ARGS}",
]
]
],
),
source=firmware_env.Dir(("${RESOURCES_ROOT}/apps")),
)
Depends(fap_deploy, firmware_env["FW_RESOURCES_MANIFEST"])
@@ -206,7 +211,7 @@ distenv.Alias("jflash", firmware_jflash)
distenv.PhonyTarget(
"gdb_trace_all",
"$GDB $GDBOPTS $SOURCES $GDBFLASH",
[["${GDB}", "${GDBOPTS}", "${SOURCES}", "${GDBFLASH}"]],
source=firmware_env["FW_ELF"],
GDBOPTS="${GDBOPTS_BASE}",
GDBREMOTE="${OPENOCD_GDB_PIPE}",
@@ -225,7 +230,7 @@ firmware_debug = distenv.PhonyTarget(
source=firmware_env["FW_ELF"],
GDBOPTS="${GDBOPTS_BASE}",
GDBREMOTE="${OPENOCD_GDB_PIPE}",
FBT_FAP_DEBUG_ELF_ROOT=path_as_posix(firmware_env.subst("$FBT_FAP_DEBUG_ELF_ROOT")),
FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"],
)
distenv.Depends(firmware_debug, firmware_flash)
@@ -235,7 +240,7 @@ distenv.PhonyTarget(
source=firmware_env["FW_ELF"],
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
GDBREMOTE="${BLACKMAGIC_ADDR}",
FBT_FAP_DEBUG_ELF_ROOT=path_as_posix(firmware_env.subst("$FBT_FAP_DEBUG_ELF_ROOT")),
FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"],
)
# Debug alien elf
@@ -261,7 +266,7 @@ distenv.PhonyTarget(
distenv.PhonyTarget(
"debug_other_blackmagic",
"${GDBPYCOM}",
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
GDBREMOTE="${BLACKMAGIC_ADDR}",
GDBPYOPTS=debug_other_opts,
)
@@ -270,29 +275,49 @@ distenv.PhonyTarget(
# Just start OpenOCD
distenv.PhonyTarget(
"openocd",
"${OPENOCDCOM}",
[["${OPENOCDCOM}", "${ARGS}"]],
)
# Linter
distenv.PhonyTarget(
"lint",
"${PYTHON3} ${FBT_SCRIPT_DIR}/lint.py check ${LINT_SOURCES}",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/lint.py",
"check",
"${LINT_SOURCES}",
"${ARGS}",
]
],
LINT_SOURCES=[n.srcnode() for n in firmware_env["LINT_SOURCES"]],
)
distenv.PhonyTarget(
"format",
"${PYTHON3} ${FBT_SCRIPT_DIR}/lint.py format ${LINT_SOURCES}",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/lint.py",
"format",
"${LINT_SOURCES}",
"${ARGS}",
]
],
LINT_SOURCES=[n.srcnode() for n in firmware_env["LINT_SOURCES"]],
)
# PY_LINT_SOURCES contains recursively-built modules' SConscript files + application manifests
# PY_LINT_SOURCES contains recursively-built modules' SConscript files
# Here we add additional Python files residing in repo root
firmware_env.Append(
PY_LINT_SOURCES=[
# Py code folders
"site_scons",
"scripts",
"applications",
"applications_user",
"assets",
"targets",
# Extra files
"SConstruct",
"firmware.scons",
@@ -301,8 +326,20 @@ firmware_env.Append(
)
black_commandline = "@${PYTHON3} -m black ${PY_BLACK_ARGS} ${PY_LINT_SOURCES}"
black_base_args = ["--include", '"\\.scons|\\.py|SConscript|SConstruct"']
black_commandline = [
[
"@${PYTHON3}",
"-m",
"black",
"${PY_BLACK_ARGS}",
"${PY_LINT_SOURCES}",
"${ARGS}",
]
]
black_base_args = [
"--include",
'"(\\.scons|\\.py|SConscript|SConstruct|\\.fam)$"',
]
distenv.PhonyTarget(
"lint_py",
@@ -323,10 +360,30 @@ distenv.PhonyTarget(
)
# Start Flipper CLI via PySerial's miniterm
distenv.PhonyTarget("cli", "${PYTHON3} ${FBT_SCRIPT_DIR}/serial_cli.py -p ${FLIP_PORT}")
distenv.PhonyTarget(
"cli",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/serial_cli.py",
"-p",
"${FLIP_PORT}",
"${ARGS}",
]
],
)
# Update WiFi devboard firmware
distenv.PhonyTarget("devboard_flash", "${PYTHON3} ${FBT_SCRIPT_DIR}/wifi_board.py")
# Update WiFi devboard firmware with release channel
distenv.PhonyTarget(
"devboard_flash",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/wifi_board.py",
"${ARGS}",
]
],
)
# Find blackmagic probe
@@ -340,7 +397,7 @@ distenv.PhonyTarget(
distenv.PhonyTarget(
"get_stlink",
distenv.Action(
lambda **kw: distenv.GetDevices(),
lambda **_: distenv.GetDevices(),
None,
),
)
@@ -356,10 +413,25 @@ vscode_dist = distenv.Install(
)
distenv.Precious(vscode_dist)
distenv.NoClean(vscode_dist)
distenv.Alias("vscode_dist", vscode_dist)
distenv.Alias("vscode_dist", (vscode_dist, firmware_env["FW_CDB"]))
# Configure shell with build tools
distenv.PhonyTarget(
"env",
"@echo $( ${FBT_SCRIPT_DIR}/toolchain/fbtenv.sh $)",
"@echo $( ${FBT_SCRIPT_DIR.abspath}/toolchain/fbtenv.sh $)",
)
doxy_build = distenv.DoxyBuild(
"documentation/doxygen/build/html/index.html",
"documentation/doxygen/Doxyfile-awesome.cfg",
doxy_env_variables={
"DOXY_SRC_ROOT": Dir(".").abspath,
"DOXY_BUILD_DIR": Dir("documentation/doxygen/build").abspath,
"DOXY_CONFIG_DIR": "documentation/doxygen",
},
)
distenv.Alias("doxygen", doxy_build)
distenv.AlwaysBuild(doxy_build)
# Open generated documentation in browser
distenv.PhonyTarget("doxy", open_browser_action, source=doxy_build)

View File

@@ -40,7 +40,6 @@ Applications for main Flipper menu.
Background services providing system APIs to applications.
- `applications.h` - Firmware application list header
- `bt` - BLE service and application
- `cli` - Console service and API
- `crypto` - Crypto cli tools
@@ -72,7 +71,10 @@ Small applications providing configuration for basic firmware and its services.
## system
Utility apps not visible in other menus.
Utility apps not visible in other menus, plus few external apps pre-packaged with the firmware.
- `hid_app` - BLE & USB HID remote
- `js_app` - JS engine runner
- `snake_game` - Snake game
- `storage_move_to_sd` - Data migration tool for internal storage
- `updater` - Update service & application

View File

@@ -11,29 +11,29 @@ class AccessorApp {
public:
void run(void);
AccessorApp();
~AccessorApp();
AccessorApp(void);
~AccessorApp(void);
enum class Scene : uint8_t {
Exit,
Start,
};
AccessorAppViewManager* get_view_manager();
AccessorAppViewManager* get_view_manager(void);
void switch_to_next_scene(Scene index);
void search_and_switch_to_previous_scene(std::initializer_list<Scene> scenes_list);
bool switch_to_previous_scene(uint8_t count = 1);
Scene get_previous_scene();
Scene get_previous_scene(void);
void notify_green_blink();
void notify_success();
void notify_green_blink(void);
void notify_success(void);
char* get_text_store();
uint8_t get_text_store_size();
char* get_text_store(void);
uint8_t get_text_store_size(void);
void set_text_store(const char* text...);
WIEGAND* get_wiegand();
OneWireHost* get_one_wire();
WIEGAND* get_wiegand(void);
OneWireHost* get_one_wire(void);
private:
std::list<Scene> previous_scenes_list = {Scene::Exit};

View File

@@ -1,6 +1,6 @@
#include "accessor_view_manager.h"
#include "accessor_event.h"
#include <callback-connector.h>
#include "callback_connector.h"
AccessorAppViewManager::AccessorAppViewManager() {
event_queue = furi_message_queue_alloc(10, sizeof(AccessorEvent));

View File

@@ -15,16 +15,16 @@ public:
FuriMessageQueue* event_queue;
AccessorAppViewManager();
~AccessorAppViewManager();
AccessorAppViewManager(void);
~AccessorAppViewManager(void);
void switch_to(ViewType type);
void receive_event(AccessorEvent* event);
void send_event(AccessorEvent* event);
Submenu* get_submenu();
Popup* get_popup();
Submenu* get_submenu(void);
Popup* get_popup(void);
private:
ViewDispatcher* view_dispatcher;

View File

@@ -4,7 +4,6 @@ App(
apptype=FlipperAppType.DEBUG,
targets=["f7"],
entry_point="accessor_app",
cdefines=["APP_ACCESSOR"],
requires=["gui"],
stack_size=4 * 1024,
order=40,

View File

@@ -1,10 +1,13 @@
#ifndef CALLBACKCONNECTOR_H
#define CALLBACKCONNECTOR_H
#ifdef __cplusplus
#include <functional>
namespace cbc {
namespace Details {
template <std::size_t Tag, typename T, typename Ret, typename... Args> class FuncMemberWrapper {
template <std::size_t Tag, typename T, typename Ret, typename... Args>
class FuncMemberWrapper {
public:
FuncMemberWrapper() = delete;
using member_fun_t = Ret (T::*)(Args...);
@@ -43,7 +46,8 @@ template <std::size_t Tag, typename T, typename Ret, typename... Args>
typename FuncMemberWrapper<Tag, T, Ret, Args...>::const_member_fun_t
FuncMemberWrapper<Tag, T, Ret, Args...>::const_member{};
template <typename Functor, typename Ret, typename... Args> struct FunctorWrapper {
template <typename Functor, typename Ret, typename... Args>
struct FunctorWrapper {
public:
static std::function<Ret(Args...)> functor;
static auto instatiate(Functor fn) {
@@ -75,7 +79,8 @@ auto const_instantiate(T* t, Ret (T::*ptr)(Args...) const) {
return FuncMemberWrapper<tag, T, Ret, Args...>::instantiate(t, ptr);
}
template <std::size_t tag, typename T, typename Func> auto const_instantiate(T* t, Func ptr) {
template <std::size_t tag, typename T, typename Func>
auto const_instantiate(T* t, Func ptr) {
return const_instantiate(t, ptr);
}
@@ -91,9 +96,11 @@ auto obtain_connector(T* t, Ret (T::*ptr)(Args...) const) {
return Details::FuncMemberWrapper<tag, T, Ret, Args...>::instantiate(t, ptr);
}
template <typename Functor> auto obtain_connector(Functor functor) {
template <typename Functor>
auto obtain_connector(Functor functor) {
return Details::deducer(std::move(functor), &Functor::operator());
}
} //end of cbc scope
#endif // __cplusplus
#endif // CALLBACKCONNECTOR_H

View File

@@ -2,12 +2,12 @@
#include <furi.h>
#include <furi_hal.h>
volatile unsigned long WIEGAND::_cardTempHigh = 0;
volatile unsigned long WIEGAND::_cardTemp = 0;
volatile unsigned long WIEGAND::_lastWiegand = 0;
unsigned long WIEGAND::_cardTempHigh = 0;
unsigned long WIEGAND::_cardTemp = 0;
unsigned long WIEGAND::_lastWiegand = 0;
unsigned long WIEGAND::_code = 0;
unsigned long WIEGAND::_codeHigh = 0;
volatile int WIEGAND::_bitCount = 0;
int WIEGAND::_bitCount = 0;
int WIEGAND::_wiegandType = 0;
constexpr uint32_t clocks_in_ms = 64 * 1000;
@@ -98,10 +98,7 @@ void WIEGAND::ReadD1() {
_lastWiegand = DWT->CYCCNT; // Keep track of last wiegand bit received
}
unsigned long WIEGAND::GetCardId(
volatile unsigned long* codehigh,
volatile unsigned long* codelow,
char bitlength) {
unsigned long WIEGAND::GetCardId(unsigned long* codehigh, unsigned long* codelow, char bitlength) {
if(bitlength == 26) // EM tag
return (*codelow & 0x1FFFFFE) >> 1;

View File

@@ -2,28 +2,26 @@
class WIEGAND {
public:
WIEGAND();
void begin();
void end();
bool available();
unsigned long getCode();
unsigned long getCodeHigh();
int getWiegandType();
WIEGAND(void);
void begin(void);
void end(void);
bool available(void);
unsigned long getCode(void);
unsigned long getCodeHigh(void);
int getWiegandType(void);
static void ReadD0();
static void ReadD1();
static void ReadD0(void);
static void ReadD1(void);
private:
static bool DoWiegandConversion();
static unsigned long GetCardId(
volatile unsigned long* codehigh,
volatile unsigned long* codelow,
char bitlength);
static bool DoWiegandConversion(void);
static unsigned long
GetCardId(unsigned long* codehigh, unsigned long* codelow, char bitlength);
static volatile unsigned long _cardTempHigh;
static volatile unsigned long _cardTemp;
static volatile unsigned long _lastWiegand;
static volatile int _bitCount;
static unsigned long _cardTempHigh;
static unsigned long _cardTemp;
static unsigned long _lastWiegand;
static int _bitCount;
static int _wiegandType;
static unsigned long _code;
static unsigned long _codeHigh;

View File

@@ -1,7 +1,7 @@
#include "../accessor_app.h"
#include "../accessor_view_manager.h"
#include "../accessor_event.h"
#include <callback-connector.h>
#include "callback_connector.h"
#include "accessor_scene_start.h"
void AccessorSceneStart::on_enter(AccessorApp* app) {

View File

@@ -3,7 +3,6 @@ App(
name="Battery Test",
apptype=FlipperAppType.DEBUG,
entry_point="battery_test_app",
cdefines=["APP_BATTERY_TEST"],
requires=[
"gui",
"power",

View File

@@ -12,7 +12,8 @@ void battery_test_dialog_callback(DialogExResult result, void* context) {
}
}
uint32_t battery_test_exit_confirm_view() {
uint32_t battery_test_exit_confirm_view(void* context) {
UNUSED(context);
return BatteryTestAppViewExitDialog;
}
@@ -31,7 +32,7 @@ static void battery_test_battery_info_update_model(void* context) {
notification_message(app->notifications, &sequence_display_backlight_on);
}
BatteryTestApp* battery_test_alloc() {
BatteryTestApp* battery_test_alloc(void) {
BatteryTestApp* app = malloc(sizeof(BatteryTestApp));
// Records

View File

@@ -116,7 +116,7 @@ static void battery_info_draw_callback(Canvas* canvas, void* context) {
draw_stat(canvas, 104, 42, &I_Health_16x16, health);
}
BatteryInfo* battery_info_alloc() {
BatteryInfo* battery_info_alloc(void) {
BatteryInfo* battery_info = malloc(sizeof(BatteryInfo));
battery_info->view = view_alloc();
view_set_context(battery_info->view, battery_info);

View File

@@ -14,7 +14,7 @@ typedef struct {
uint8_t health;
} BatteryInfoModel;
BatteryInfo* battery_info_alloc();
BatteryInfo* battery_info_alloc(void);
void battery_info_free(BatteryInfo* battery_info);

View File

@@ -3,7 +3,6 @@ App(
name="Blink Test",
apptype=FlipperAppType.DEBUG,
entry_point="blink_test_app",
cdefines=["APP_BLINK"],
requires=["gui"],
stack_size=1 * 1024,
order=10,

View File

@@ -28,7 +28,7 @@ uint32_t bt_debug_start_view(void* context) {
return BtDebugAppViewSubmenu;
}
BtDebugApp* bt_debug_app_alloc() {
BtDebugApp* bt_debug_app_alloc(void) {
BtDebugApp* app = malloc(sizeof(BtDebugApp));
// Gui

View File

@@ -129,7 +129,7 @@ static void bt_test_carrier_timer_callback(void* context) {
}
}
BtCarrierTest* bt_carrier_test_alloc() {
BtCarrierTest* bt_carrier_test_alloc(void) {
BtCarrierTest* bt_carrier_test = malloc(sizeof(BtCarrierTest));
bt_carrier_test->bt_test = bt_test_alloc();
bt_test_set_context(bt_carrier_test->bt_test, bt_carrier_test);

View File

@@ -3,7 +3,7 @@
typedef struct BtCarrierTest BtCarrierTest;
BtCarrierTest* bt_carrier_test_alloc();
BtCarrierTest* bt_carrier_test_alloc(void);
void bt_carrier_test_free(BtCarrierTest* bt_carrier_test);

View File

@@ -97,7 +97,7 @@ static void bt_test_packet_timer_callback(void* context) {
}
}
BtPacketTest* bt_packet_test_alloc() {
BtPacketTest* bt_packet_test_alloc(void) {
BtPacketTest* bt_packet_test = malloc(sizeof(BtPacketTest));
bt_packet_test->bt_test = bt_test_alloc();
bt_test_set_context(bt_packet_test->bt_test, bt_packet_test);

View File

@@ -3,7 +3,7 @@
typedef struct BtPacketTest BtPacketTest;
BtPacketTest* bt_packet_test_alloc();
BtPacketTest* bt_packet_test_alloc(void);
void bt_packet_test_free(BtPacketTest* bt_packet_test);

View File

@@ -305,7 +305,7 @@ void bt_test_process_back(BtTest* bt_test) {
}
}
BtTest* bt_test_alloc() {
BtTest* bt_test_alloc(void) {
BtTest* bt_test = malloc(sizeof(BtTest));
bt_test->view = view_alloc();
view_set_context(bt_test->view, bt_test);

View File

@@ -12,7 +12,7 @@ typedef void (*BtTestBackCallback)(void* context);
typedef struct BtTestParam BtTestParam;
typedef void (*BtTestParamChangeCallback)(BtTestParam* param);
BtTest* bt_test_alloc();
BtTest* bt_test_alloc(void);
void bt_test_free(BtTest* bt_test);

View File

@@ -3,7 +3,6 @@ App(
name="CCID Debug",
apptype=FlipperAppType.DEBUG,
entry_point="ccid_test_app",
cdefines=["CCID_TEST"],
requires=[
"gui",
],

View File

@@ -90,7 +90,7 @@ uint32_t ccid_test_exit(void* context) {
return VIEW_NONE;
}
CcidTestApp* ccid_test_app_alloc() {
CcidTestApp* ccid_test_app_alloc(void) {
CcidTestApp* app = malloc(sizeof(CcidTestApp));
// Gui

View File

@@ -13,12 +13,12 @@ struct ISO7816_Command_APDU {
//body
uint8_t Lc;
uint8_t Le;
} __attribute__((packed));
} FURI_PACKED;
struct ISO7816_Response_APDU {
uint8_t SW1;
uint8_t SW2;
} __attribute__((packed));
} FURI_PACKED;
void iso7816_answer_to_reset(uint8_t* atrBuffer, uint32_t* atrlen);
void iso7816_read_command_apdu(

View File

@@ -3,7 +3,6 @@ App(
name="Crash Test",
apptype=FlipperAppType.DEBUG,
entry_point="crash_test_app",
cdefines=["APP_CRASH_TEST"],
requires=["gui"],
stack_size=1 * 1024,
fap_category="Debug",

View File

@@ -50,7 +50,7 @@ static void crash_test_submenu_callback(void* context, uint32_t index) {
furi_halt("Crash test: furi_halt");
break;
default:
furi_crash("Programming error");
furi_crash();
}
}
@@ -59,7 +59,7 @@ static uint32_t crash_test_exit_callback(void* context) {
return VIEW_NONE;
}
CrashTest* crash_test_alloc() {
CrashTest* crash_test_alloc(void) {
CrashTest* instance = malloc(sizeof(CrashTest));
View* view = NULL;

View File

@@ -26,7 +26,7 @@ static void gui_input_events_callback(const void* value, void* ctx) {
}
}
static DirectDraw* direct_draw_alloc() {
static DirectDraw* direct_draw_alloc(void) {
DirectDraw* instance = malloc(sizeof(DirectDraw));
instance->input = furi_record_open(RECORD_INPUT_EVENTS);

View File

@@ -3,9 +3,8 @@ App(
name="Display Test",
apptype=FlipperAppType.DEBUG,
entry_point="display_test_app",
cdefines=["APP_DISPLAY_TEST"],
requires=["gui"],
fap_libs=["misc"],
fap_libs=["u8g2"],
stack_size=1 * 1024,
order=120,
fap_category="Debug",

View File

@@ -121,7 +121,7 @@ static void display_config_set_contrast(VariableItem* item) {
display_test_reload_config(instance);
}
DisplayTest* display_test_alloc() {
DisplayTest* display_test_alloc(void) {
DisplayTest* instance = malloc(sizeof(DisplayTest));
View* view = NULL;

View File

@@ -154,7 +154,7 @@ static void view_display_test_timer_callback(void* context) {
instance->view, ViewDisplayTestModel * model, { model->counter++; }, true);
}
ViewDisplayTest* view_display_test_alloc() {
ViewDisplayTest* view_display_test_alloc(void) {
ViewDisplayTest* instance = malloc(sizeof(ViewDisplayTest));
instance->view = view_alloc();

View File

@@ -5,7 +5,7 @@
typedef struct ViewDisplayTest ViewDisplayTest;
ViewDisplayTest* view_display_test_alloc();
ViewDisplayTest* view_display_test_alloc(void);
void view_display_test_free(ViewDisplayTest* instance);

View File

@@ -1,98 +0,0 @@
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <input/input.h>
//This arrays contains the font itself. You can use any u8g2 font you want
/*
Fontname: -Raccoon-Fixed4x6-Medium-R-Normal--6-60-75-75-P-40-ISO10646-1
Copyright:
Glyphs: 95/203
BBX Build Mode: 0
*/
const uint8_t u8g2_font_tom_thumb_4x6_tr[725] =
"_\0\2\2\2\3\3\4\4\3\6\0\377\5\377\5\0\0\352\1\330\2\270 \5\340\315\0!\6\265\310"
"\254\0\42\6\213\313$\25#\10\227\310\244\241\206\12$\10\227\310\215\70b\2%\10\227\310d\324F\1"
"&\10\227\310(\65R\22'\5\251\313\10(\6\266\310\251\62)\10\226\310\304\224\24\0*\6\217\312\244"
"\16+\7\217\311\245\225\0,\6\212\310)\0-\5\207\312\14.\5\245\310\4/\7\227\310Ve\4\60"
"\7\227\310-k\1\61\6\226\310\255\6\62\10\227\310h\220\312\1\63\11\227\310h\220\62X\0\64\10\227"
"\310$\65b\1\65\10\227\310\214\250\301\2\66\10\227\310\315\221F\0\67\10\227\310\314TF\0\70\10\227"
"\310\214\64\324\10\71\10\227\310\214\64\342\2:\6\255\311\244\0;\7\222\310e\240\0<\10\227\310\246\32"
"d\20=\6\217\311l\60>\11\227\310d\220A*\1\77\10\227\310\314\224a\2@\10\227\310UC\3"
"\1A\10\227\310UC\251\0B\10\227\310\250\264\322\2C\7\227\310\315\32\10D\10\227\310\250d-\0"
"E\10\227\310\214\70\342\0F\10\227\310\214\70b\4G\10\227\310\315\221\222\0H\10\227\310$\65\224\12"
"I\7\227\310\254X\15J\7\227\310\226\252\2K\10\227\310$\265\222\12L\7\227\310\304\346\0M\10\227"
"\310\244\61\224\12N\10\227\310\244q\250\0O\7\227\310UV\5P\10\227\310\250\264b\4Q\10\227\310"
"Uj$\1R\10\227\310\250\64V\1S\10\227\310m\220\301\2T\7\227\310\254\330\2U\7\227\310$"
"W\22V\10\227\310$\253L\0W\10\227\310$\65\206\12X\10\227\310$\325R\1Y\10\227\310$U"
"V\0Z\7\227\310\314T\16[\7\227\310\214X\16\134\10\217\311d\220A\0]\7\227\310\314r\4^"
"\5\213\313\65_\5\207\310\14`\6\212\313\304\0a\7\223\310\310\65\2b\10\227\310D\225\324\2c\7"
"\223\310\315\14\4d\10\227\310\246\245\222\0e\6\223\310\235\2f\10\227\310\246\264b\2g\10\227\307\35"
"\61%\0h\10\227\310D\225\254\0i\6\265\310\244\1j\10\233\307f\30U\5k\10\227\310\304\264T"
"\1l\7\227\310\310\326\0m\7\223\310<R\0n\7\223\310\250d\5o\7\223\310U\252\2p\10\227"
"\307\250\244V\4q\10\227\307-\225d\0r\6\223\310\315\22s\10\223\310\215\70\22\0t\10\227\310\245"
"\25\243\0u\7\223\310$+\11v\10\223\310$\65R\2w\7\223\310\244q\4x\7\223\310\244\62\25"
"y\11\227\307$\225dJ\0z\7\223\310\254\221\6{\10\227\310\251\32D\1|\6\265\310(\1}\11"
"\227\310\310\14RR\0~\6\213\313\215\4\0\0\0\4\377\377\0";
// Screen is 128x64 px
static void app_draw_callback(Canvas* canvas, void* ctx) {
UNUSED(ctx);
canvas_clear(canvas);
canvas_set_custom_u8g2_font(canvas, u8g2_font_tom_thumb_4x6_tr);
canvas_draw_str(canvas, 0, 6, "This is a tiny custom font");
canvas_draw_str(canvas, 0, 12, "012345.?! ,:;\"\'@#$%");
}
static void app_input_callback(InputEvent* input_event, void* ctx) {
furi_assert(ctx);
FuriMessageQueue* event_queue = ctx;
furi_message_queue_put(event_queue, input_event, FuriWaitForever);
}
int32_t example_custom_font_main(void* p) {
UNUSED(p);
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(InputEvent));
// Configure view port
ViewPort* view_port = view_port_alloc();
view_port_draw_callback_set(view_port, app_draw_callback, view_port);
view_port_input_callback_set(view_port, app_input_callback, event_queue);
// Register view port in GUI
Gui* gui = furi_record_open(RECORD_GUI);
gui_add_view_port(gui, view_port, GuiLayerFullscreen);
InputEvent event;
bool running = true;
while(running) {
if(furi_message_queue_get(event_queue, &event, 100) == FuriStatusOk) {
if((event.type == InputTypePress) || (event.type == InputTypeRepeat)) {
switch(event.key) {
case InputKeyBack:
running = false;
break;
default:
break;
}
}
}
}
view_port_enabled_set(view_port, false);
gui_remove_view_port(gui, view_port);
view_port_free(view_port);
furi_message_queue_free(event_queue);
furi_record_close(RECORD_GUI);
return 0;
}

View File

@@ -0,0 +1,12 @@
App(
appid="expansion_test",
name="Expansion Module Test",
apptype=FlipperAppType.DEBUG,
entry_point="expansion_test_app",
requires=["expansion_start"],
fap_libs=["assets"],
stack_size=1 * 1024,
order=20,
fap_category="Debug",
fap_file_assets="assets",
)

View File

@@ -0,0 +1,9 @@
"Did you ever hear the tragedy of Darth Plagueis the Wise?"
"No."
"I thought not. It's not a story the Jedi would tell you. It's a Sith legend. Darth Plagueis... was a Dark Lord of the Sith so powerful and so wise, he could use the Force to influence the midi-chlorians... to create... life. He had such a knowledge of the dark side, he could even keep the ones he cared about... from dying."
"He could actually... save people from death?"
"The dark side of the Force is a pathway to many abilities... some consider to be unnatural."
"Wh What happened to him?"
"He became so powerful, the only thing he was afraid of was... losing his power. Which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew. Then his apprentice killed him in his sleep. It's ironic. He could save others from death, but not himself."
"Is it possible to learn this power?"
"Not from a Jedi."

View File

@@ -0,0 +1,457 @@
/**
* @file expansion_test.c
* @brief Expansion module support testing application.
*
* Before running, connect pins using the following scheme:
* 13 -> 16 (USART TX to LPUART RX)
* 14 -> 15 (USART RX to LPUART TX)
*
* What this application does:
*
* - Enables module support and emulates the module on a single device
* (hence the above connection),
* - Connects to the expansion module service, sets baud rate,
* - Starts the RPC session,
* - Creates a directory at `/ext/ExpansionTest` and writes a file
* named `test.txt` under it,
* - Plays an audiovisual alert (sound and blinking display),
* - Waits 10 cycles of idle loop,
* - Stops the RPC session,
* - Waits another 10 cycles of idle loop,
* - Exits (plays a sound if any of the above steps failed).
*/
#include <furi.h>
#include <furi_hal_resources.h>
#include <furi_hal_serial.h>
#include <furi_hal_serial_control.h>
#include <pb.h>
#include <pb_decode.h>
#include <pb_encode.h>
#include <flipper.pb.h>
#include <storage/storage.h>
#include <expansion/expansion.h>
#include <notification/notification_messages.h>
#include <expansion/expansion_protocol.h>
#define TAG "ExpansionTest"
#define TEST_DIR_PATH EXT_PATH(TAG)
#define TEST_FILE_NAME "test.txt"
#define TEST_FILE_PATH EXT_PATH(TAG "/" TEST_FILE_NAME)
#define HOST_SERIAL_ID (FuriHalSerialIdLpuart)
#define MODULE_SERIAL_ID (FuriHalSerialIdUsart)
#define RECEIVE_BUFFER_SIZE (sizeof(ExpansionFrame) + sizeof(ExpansionFrameChecksum))
typedef enum {
ExpansionTestAppFlagData = 1U << 0,
ExpansionTestAppFlagExit = 1U << 1,
} ExpansionTestAppFlag;
#define EXPANSION_TEST_APP_ALL_FLAGS (ExpansionTestAppFlagData | ExpansionTestAppFlagExit)
typedef struct {
FuriThreadId thread_id;
Expansion* expansion;
FuriHalSerialHandle* handle;
FuriStreamBuffer* buf;
ExpansionFrame frame;
PB_Main msg;
Storage* storage;
} ExpansionTestApp;
static void expansion_test_app_serial_rx_callback(
FuriHalSerialHandle* handle,
FuriHalSerialRxEvent event,
void* context) {
furi_assert(handle);
furi_assert(context);
ExpansionTestApp* app = context;
if(event == FuriHalSerialRxEventData) {
const uint8_t data = furi_hal_serial_async_rx(handle);
furi_stream_buffer_send(app->buf, &data, sizeof(data), 0);
furi_thread_flags_set(app->thread_id, ExpansionTestAppFlagData);
}
}
static ExpansionTestApp* expansion_test_app_alloc(void) {
ExpansionTestApp* instance = malloc(sizeof(ExpansionTestApp));
instance->buf = furi_stream_buffer_alloc(RECEIVE_BUFFER_SIZE, 1);
return instance;
}
static void expansion_test_app_free(ExpansionTestApp* instance) {
furi_stream_buffer_free(instance->buf);
free(instance);
}
static void expansion_test_app_start(ExpansionTestApp* instance) {
instance->thread_id = furi_thread_get_current_id();
instance->expansion = furi_record_open(RECORD_EXPANSION);
instance->handle = furi_hal_serial_control_acquire(MODULE_SERIAL_ID);
furi_check(instance->handle);
// Configure the serial port
furi_hal_serial_init(instance->handle, EXPANSION_PROTOCOL_DEFAULT_BAUD_RATE);
// Start waiting for the initial pulse
expansion_set_listen_serial(instance->expansion, HOST_SERIAL_ID);
furi_hal_serial_async_rx_start(
instance->handle, expansion_test_app_serial_rx_callback, instance, false);
}
static void expansion_test_app_stop(ExpansionTestApp* instance) {
// Disable expansion module support
expansion_disable(instance->expansion);
// Give back the module handle
furi_hal_serial_control_release(instance->handle);
// Restore expansion user settings
expansion_enable(instance->expansion);
furi_record_close(RECORD_EXPANSION);
}
static inline bool expansion_test_app_is_success_response(const ExpansionFrame* response) {
return response->header.type == ExpansionFrameTypeStatus &&
response->content.status.error == ExpansionFrameErrorNone;
}
static inline bool expansion_test_app_is_success_rpc_message(const PB_Main* message) {
return (message->command_status == PB_CommandStatus_OK ||
message->command_status == PB_CommandStatus_ERROR_STORAGE_EXIST) &&
(message->which_content == PB_Main_empty_tag);
}
static size_t expansion_test_app_receive_callback(uint8_t* data, size_t data_size, void* context) {
ExpansionTestApp* instance = context;
size_t received_size = 0;
while(true) {
received_size += furi_stream_buffer_receive(
instance->buf, data + received_size, data_size - received_size, 0);
if(received_size == data_size) break;
const uint32_t flags = furi_thread_flags_wait(
EXPANSION_TEST_APP_ALL_FLAGS, FuriFlagWaitAny, EXPANSION_PROTOCOL_TIMEOUT_MS);
// Exit on any error
if(flags & FuriFlagError) break;
}
return received_size;
}
static size_t
expansion_test_app_send_callback(const uint8_t* data, size_t data_size, void* context) {
ExpansionTestApp* instance = context;
furi_hal_serial_tx(instance->handle, data, data_size);
furi_hal_serial_tx_wait_complete(instance->handle);
return data_size;
}
static bool expansion_test_app_receive_frame(ExpansionTestApp* instance, ExpansionFrame* frame) {
return expansion_protocol_decode(frame, expansion_test_app_receive_callback, instance) ==
ExpansionProtocolStatusOk;
}
static bool
expansion_test_app_send_status_response(ExpansionTestApp* instance, ExpansionFrameError error) {
ExpansionFrame frame = {
.header.type = ExpansionFrameTypeStatus,
.content.status.error = error,
};
return expansion_protocol_encode(&frame, expansion_test_app_send_callback, instance) ==
ExpansionProtocolStatusOk;
}
static bool expansion_test_app_send_heartbeat(ExpansionTestApp* instance) {
ExpansionFrame frame = {
.header.type = ExpansionFrameTypeHeartbeat,
.content.heartbeat = {},
};
return expansion_protocol_encode(&frame, expansion_test_app_send_callback, instance) ==
ExpansionProtocolStatusOk;
}
static bool
expansion_test_app_send_baud_rate_request(ExpansionTestApp* instance, uint32_t baud_rate) {
ExpansionFrame frame = {
.header.type = ExpansionFrameTypeBaudRate,
.content.baud_rate.baud = baud_rate,
};
return expansion_protocol_encode(&frame, expansion_test_app_send_callback, instance) ==
ExpansionProtocolStatusOk;
}
static bool expansion_test_app_send_control_request(
ExpansionTestApp* instance,
ExpansionFrameControlCommand command) {
ExpansionFrame frame = {
.header.type = ExpansionFrameTypeControl,
.content.control.command = command,
};
return expansion_protocol_encode(&frame, expansion_test_app_send_callback, instance) ==
ExpansionProtocolStatusOk;
}
static bool expansion_test_app_send_data_request(
ExpansionTestApp* instance,
const uint8_t* data,
size_t data_size) {
furi_assert(data_size <= EXPANSION_PROTOCOL_MAX_DATA_SIZE);
ExpansionFrame frame = {
.header.type = ExpansionFrameTypeData,
.content.data.size = data_size,
};
memcpy(frame.content.data.bytes, data, data_size);
return expansion_protocol_encode(&frame, expansion_test_app_send_callback, instance) ==
ExpansionProtocolStatusOk;
}
static bool expansion_test_app_rpc_encode_callback(
pb_ostream_t* stream,
const pb_byte_t* data,
size_t data_size) {
ExpansionTestApp* instance = stream->state;
size_t size_sent = 0;
while(size_sent < data_size) {
const size_t current_size = MIN(data_size - size_sent, EXPANSION_PROTOCOL_MAX_DATA_SIZE);
if(!expansion_test_app_send_data_request(instance, data + size_sent, current_size)) break;
if(!expansion_test_app_receive_frame(instance, &instance->frame)) break;
if(!expansion_test_app_is_success_response(&instance->frame)) break;
size_sent += current_size;
}
return size_sent == data_size;
}
static bool expansion_test_app_send_rpc_request(ExpansionTestApp* instance, PB_Main* message) {
pb_ostream_t stream = {
.callback = expansion_test_app_rpc_encode_callback,
.state = instance,
.max_size = SIZE_MAX,
.bytes_written = 0,
.errmsg = NULL,
};
const bool success = pb_encode_ex(&stream, &PB_Main_msg, message, PB_ENCODE_DELIMITED);
pb_release(&PB_Main_msg, message);
return success;
}
static bool expansion_test_app_receive_rpc_request(ExpansionTestApp* instance, PB_Main* message) {
bool success = false;
do {
if(!expansion_test_app_receive_frame(instance, &instance->frame)) break;
if(!expansion_test_app_send_status_response(instance, ExpansionFrameErrorNone)) break;
if(instance->frame.header.type != ExpansionFrameTypeData) break;
pb_istream_t stream = pb_istream_from_buffer(
instance->frame.content.data.bytes, instance->frame.content.data.size);
if(!pb_decode_ex(&stream, &PB_Main_msg, message, PB_DECODE_DELIMITED)) break;
success = true;
} while(false);
return success;
}
static bool expansion_test_app_send_presence(ExpansionTestApp* instance) {
// Send pulses to emulate module insertion
const uint8_t init = 0xAA;
furi_hal_serial_tx(instance->handle, &init, sizeof(init));
furi_hal_serial_tx_wait_complete(instance->handle);
return true;
}
static bool expansion_test_app_wait_ready(ExpansionTestApp* instance) {
bool success = false;
do {
if(!expansion_test_app_receive_frame(instance, &instance->frame)) break;
if(instance->frame.header.type != ExpansionFrameTypeHeartbeat) break;
success = true;
} while(false);
return success;
}
static bool expansion_test_app_handshake(ExpansionTestApp* instance) {
bool success = false;
do {
if(!expansion_test_app_send_baud_rate_request(instance, 230400)) break;
if(!expansion_test_app_receive_frame(instance, &instance->frame)) break;
if(!expansion_test_app_is_success_response(&instance->frame)) break;
furi_hal_serial_set_br(instance->handle, 230400);
furi_delay_ms(EXPANSION_PROTOCOL_BAUD_CHANGE_DT_MS);
success = true;
} while(false);
return success;
}
static bool expansion_test_app_start_rpc(ExpansionTestApp* instance) {
bool success = false;
do {
if(!expansion_test_app_send_control_request(instance, ExpansionFrameControlCommandStartRpc))
break;
if(!expansion_test_app_receive_frame(instance, &instance->frame)) break;
if(!expansion_test_app_is_success_response(&instance->frame)) break;
success = true;
} while(false);
return success;
}
static bool expansion_test_app_rpc_mkdir(ExpansionTestApp* instance) {
bool success = false;
instance->msg.command_id++;
instance->msg.command_status = PB_CommandStatus_OK;
instance->msg.which_content = PB_Main_storage_mkdir_request_tag;
instance->msg.has_next = false;
instance->msg.content.storage_mkdir_request.path = TEST_DIR_PATH;
do {
if(!expansion_test_app_send_rpc_request(instance, &instance->msg)) break;
if(!expansion_test_app_receive_rpc_request(instance, &instance->msg)) break;
if(!expansion_test_app_is_success_rpc_message(&instance->msg)) break;
success = true;
} while(false);
return success;
}
static bool expansion_test_app_rpc_write(ExpansionTestApp* instance) {
bool success = false;
Storage* storage = furi_record_open(RECORD_STORAGE);
File* file = storage_file_alloc(storage);
do {
if(!storage_file_open(file, APP_ASSETS_PATH(TEST_FILE_NAME), FSAM_READ, FSOM_OPEN_EXISTING))
break;
const uint64_t file_size = storage_file_size(file);
instance->msg.command_id++;
instance->msg.command_status = PB_CommandStatus_OK;
instance->msg.which_content = PB_Main_storage_write_request_tag;
instance->msg.has_next = false;
instance->msg.content.storage_write_request.path = TEST_FILE_PATH;
instance->msg.content.storage_write_request.has_file = true;
instance->msg.content.storage_write_request.file.data =
malloc(PB_BYTES_ARRAY_T_ALLOCSIZE(file_size));
instance->msg.content.storage_write_request.file.data->size = file_size;
const size_t bytes_read = storage_file_read(
file, instance->msg.content.storage_write_request.file.data->bytes, file_size);
if(bytes_read != file_size) {
pb_release(&PB_Main_msg, &instance->msg);
break;
}
if(!expansion_test_app_send_rpc_request(instance, &instance->msg)) break;
if(!expansion_test_app_receive_rpc_request(instance, &instance->msg)) break;
if(!expansion_test_app_is_success_rpc_message(&instance->msg)) break;
success = true;
} while(false);
storage_file_free(file);
furi_record_close(RECORD_STORAGE);
return success;
}
static bool expansion_test_app_rpc_alert(ExpansionTestApp* instance) {
bool success = false;
instance->msg.command_id++;
instance->msg.command_status = PB_CommandStatus_OK;
instance->msg.which_content = PB_Main_system_play_audiovisual_alert_request_tag;
instance->msg.has_next = false;
do {
if(!expansion_test_app_send_rpc_request(instance, &instance->msg)) break;
if(!expansion_test_app_receive_rpc_request(instance, &instance->msg)) break;
if(instance->msg.which_content != PB_Main_empty_tag) break;
if(instance->msg.command_status != PB_CommandStatus_OK) break;
success = true;
} while(false);
return success;
}
static bool expansion_test_app_idle(ExpansionTestApp* instance, uint32_t num_cycles) {
uint32_t num_cycles_done;
for(num_cycles_done = 0; num_cycles_done < num_cycles; ++num_cycles_done) {
if(!expansion_test_app_send_heartbeat(instance)) break;
if(!expansion_test_app_receive_frame(instance, &instance->frame)) break;
if(instance->frame.header.type != ExpansionFrameTypeHeartbeat) break;
furi_delay_ms(EXPANSION_PROTOCOL_TIMEOUT_MS - 50);
}
return num_cycles_done == num_cycles;
}
static bool expansion_test_app_stop_rpc(ExpansionTestApp* instance) {
bool success = false;
do {
if(!expansion_test_app_send_control_request(instance, ExpansionFrameControlCommandStopRpc))
break;
if(!expansion_test_app_receive_frame(instance, &instance->frame)) break;
if(!expansion_test_app_is_success_response(&instance->frame)) break;
success = true;
} while(false);
return success;
}
int32_t expansion_test_app(void* p) {
UNUSED(p);
ExpansionTestApp* instance = expansion_test_app_alloc();
expansion_test_app_start(instance);
bool success = false;
do {
if(!expansion_test_app_send_presence(instance)) break;
if(!expansion_test_app_wait_ready(instance)) break;
if(!expansion_test_app_handshake(instance)) break;
if(!expansion_test_app_start_rpc(instance)) break;
if(!expansion_test_app_rpc_mkdir(instance)) break;
if(!expansion_test_app_rpc_write(instance)) break;
if(!expansion_test_app_rpc_alert(instance)) break;
if(!expansion_test_app_idle(instance, 10)) break;
if(!expansion_test_app_stop_rpc(instance)) break;
if(!expansion_test_app_idle(instance, 10)) break;
success = true;
} while(false);
expansion_test_app_stop(instance);
expansion_test_app_free(instance);
if(!success) {
NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
notification_message(notification, &sequence_error);
furi_record_close(RECORD_NOTIFICATION);
}
return 0;
}

View File

@@ -3,7 +3,6 @@ App(
name="File Browser Test",
apptype=FlipperAppType.DEBUG,
entry_point="file_browser_app",
cdefines=["APP_FILE_BROWSER_TEST"],
requires=["gui"],
stack_size=2 * 1024,
order=150,

View File

@@ -3,7 +3,6 @@ App(
name="Keypad Test",
apptype=FlipperAppType.DEBUG,
entry_point="keypad_test_app",
cdefines=["APP_KEYPAD_TEST"],
requires=["gui"],
stack_size=1 * 1024,
order=30,

View File

@@ -12,7 +12,7 @@ static bool lfrfid_debug_back_event_callback(void* context) {
return scene_manager_handle_back_event(app->scene_manager);
}
static LfRfidDebug* lfrfid_debug_alloc() {
static LfRfidDebug* lfrfid_debug_alloc(void) {
LfRfidDebug* app = malloc(sizeof(LfRfidDebug));
app->view_dispatcher = view_dispatcher_alloc();

View File

@@ -170,7 +170,7 @@ static bool lfrfid_debug_view_tune_input_callback(InputEvent* event, void* conte
return consumed;
}
LfRfidTuneView* lfrfid_debug_view_tune_alloc() {
LfRfidTuneView* lfrfid_debug_view_tune_alloc(void) {
LfRfidTuneView* tune_view = malloc(sizeof(LfRfidTuneView));
tune_view->view = view_alloc();
view_set_context(tune_view->view, tune_view);

View File

@@ -3,7 +3,7 @@
typedef struct LfRfidTuneView LfRfidTuneView;
LfRfidTuneView* lfrfid_debug_view_tune_alloc();
LfRfidTuneView* lfrfid_debug_view_tune_alloc(void);
void lfrfid_debug_view_tune_free(LfRfidTuneView* tune_view);

View File

@@ -3,7 +3,6 @@ App(
name="Locale Test",
apptype=FlipperAppType.DEBUG,
entry_point="locale_test_app",
cdefines=["APP_LOCALE"],
requires=["gui", "locale"],
stack_size=2 * 1024,
order=70,

View File

@@ -30,7 +30,7 @@ static void locale_test_view_draw_callback(Canvas* canvas, void* _model) {
}
canvas_draw_str(canvas, 0, 10, furi_string_get_cstr(tmp_string));
FuriHalRtcDateTime datetime;
DateTime datetime;
furi_hal_rtc_get_datetime(&datetime);
locale_format_time(tmp_string, &datetime, locale_get_time_format(), false);
@@ -53,7 +53,7 @@ static uint32_t locale_test_exit(void* context) {
return VIEW_NONE;
}
static LocaleTestApp* locale_test_alloc() {
static LocaleTestApp* locale_test_alloc(void) {
LocaleTestApp* app = malloc(sizeof(LocaleTestApp));
// Gui

View File

@@ -83,7 +83,7 @@ static bool rpc_debug_app_rpc_init_rpc(RpcDebugApp* app, const char* args) {
return ret;
}
static RpcDebugApp* rpc_debug_app_alloc() {
static RpcDebugApp* rpc_debug_app_alloc(void) {
RpcDebugApp* app = malloc(sizeof(RpcDebugApp));
app->gui = furi_record_open(RECORD_GUI);

View File

@@ -21,7 +21,7 @@ typedef struct {
Cli* cli;
} SpeakerDebugApp;
static SpeakerDebugApp* speaker_app_alloc() {
static SpeakerDebugApp* speaker_app_alloc(void) {
SpeakerDebugApp* app = (SpeakerDebugApp*)malloc(sizeof(SpeakerDebugApp));
app->music_worker = music_worker_alloc();
app->message_queue = furi_message_queue_alloc(8, sizeof(SpeakerDebugAppMessage));

View File

@@ -38,7 +38,7 @@ typedef enum {
PrincetonDecoderStepCheckDuration,
} PrincetonDecoderStep;
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc() {
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc(void) {
SubGhzEncoderPrinceton* instance = malloc(sizeof(SubGhzEncoderPrinceton));
return instance;
}

View File

@@ -15,7 +15,7 @@ typedef void (*SubGhzDecoderPrincetonCallback)(SubGhzDecoderPrinceton* parser, v
* Allocate SubGhzEncoderPrinceton
* @return pointer to SubGhzEncoderPrinceton instance
*/
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc();
SubGhzEncoderPrinceton* subghz_encoder_princeton_for_testing_alloc(void);
/**
* Free SubGhzEncoderPrinceton instance
@@ -69,7 +69,7 @@ LevelDuration subghz_encoder_princeton_for_testing_yield(void* context);
* Allocate SubGhzDecoderPrinceton
* @return SubGhzDecoderPrinceton*
*/
SubGhzDecoderPrinceton* subghz_decoder_princeton_for_testing_alloc();
SubGhzDecoderPrinceton* subghz_decoder_princeton_for_testing_alloc(void);
/**
* Free SubGhzDecoderPrinceton

View File

@@ -12,7 +12,7 @@ void subghz_test_scene_show_only_rx_on_enter(void* context) {
// Setup view
Popup* popup = app->popup;
const char* header_text = "Transmission is blocked";
const char* header_text = "Transmission is Blocked";
const char* message_text = "Transmission on\nthis frequency is\nrestricted in\nyour region";
if(!furi_hal_region_is_provisioned()) {
header_text = "Firmware update needed";

View File

@@ -21,7 +21,7 @@ static void subghz_test_app_tick_event_callback(void* context) {
scene_manager_handle_tick_event(app->scene_manager);
}
SubGhzTestApp* subghz_test_app_alloc() {
SubGhzTestApp* subghz_test_app_alloc(void) {
SubGhzTestApp* app = malloc(sizeof(SubGhzTestApp));
// GUI

View File

@@ -219,7 +219,7 @@ void subghz_test_carrier_rssi_timer_callback(void* context) {
false);
}
SubGhzTestCarrier* subghz_test_carrier_alloc() {
SubGhzTestCarrier* subghz_test_carrier_alloc(void) {
SubGhzTestCarrier* subghz_test_carrier = malloc(sizeof(SubGhzTestCarrier));
// View allocation and configuration

View File

@@ -16,7 +16,7 @@ void subghz_test_carrier_set_callback(
SubGhzTestCarrierCallback callback,
void* context);
SubGhzTestCarrier* subghz_test_carrier_alloc();
SubGhzTestCarrier* subghz_test_carrier_alloc(void);
void subghz_test_carrier_free(SubGhzTestCarrier* subghz_test_carrier);

View File

@@ -236,7 +236,7 @@ void subghz_test_packet_exit(void* context) {
furi_hal_subghz_sleep();
}
SubGhzTestPacket* subghz_test_packet_alloc() {
SubGhzTestPacket* subghz_test_packet_alloc(void) {
SubGhzTestPacket* instance = malloc(sizeof(SubGhzTestPacket));
// View allocation and configuration

View File

@@ -15,7 +15,7 @@ void subghz_test_packet_set_callback(
SubGhzTestPacketCallback callback,
void* context);
SubGhzTestPacket* subghz_test_packet_alloc();
SubGhzTestPacket* subghz_test_packet_alloc(void);
void subghz_test_packet_free(SubGhzTestPacket* subghz_test_packet);

View File

@@ -164,7 +164,7 @@ void subghz_test_static_exit(void* context) {
furi_hal_subghz_sleep();
}
SubGhzTestStatic* subghz_test_static_alloc() {
SubGhzTestStatic* subghz_test_static_alloc(void) {
SubGhzTestStatic* instance = malloc(sizeof(SubGhzTestStatic));
// View allocation and configuration

View File

@@ -15,7 +15,7 @@ void subghz_test_static_set_callback(
SubGhzTestStaticCallback callback,
void* context);
SubGhzTestStatic* subghz_test_static_alloc();
SubGhzTestStatic* subghz_test_static_alloc(void);
void subghz_test_static_free(SubGhzTestStatic* subghz_static);

View File

@@ -1,9 +1,8 @@
App(
appid="text_box_test",
name="Text Box Test",
appid="text_box_element_test",
name="Text Box Element Test",
apptype=FlipperAppType.DEBUG,
entry_point="text_box_test_app",
cdefines=["APP_TEXT_BOX_TEST"],
entry_point="text_box_element_test_app",
requires=["gui"],
stack_size=1 * 1024,
order=140,

View File

@@ -71,7 +71,7 @@ static void text_box_test_input_callback(InputEvent* input_event, void* ctx) {
furi_message_queue_put(event_queue, input_event, FuriWaitForever);
}
int32_t text_box_test_app(void* p) {
int32_t text_box_element_test_app(void* p) {
UNUSED(p);
FuriMessageQueue* event_queue = furi_message_queue_alloc(32, sizeof(InputEvent));
furi_check(event_queue);

View File

@@ -0,0 +1,10 @@
App(
appid="text_box_view_test",
name="Text Box View Test",
apptype=FlipperAppType.DEBUG,
entry_point="text_box_view_test_app",
requires=["gui"],
stack_size=1 * 1024,
order=140,
fap_category="Debug",
)

View File

@@ -0,0 +1,161 @@
#include <furi.h>
#include <gui/gui.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/text_box.h>
#include <gui/view_stack.h>
#define TAG "TextBoxViewTest"
typedef struct {
TextBoxFont font;
TextBoxFocus focus;
const char* text;
} TextBoxViewTestContent;
static const TextBoxViewTestContent text_box_view_test_content_arr[] = {
{
.font = TextBoxFontText,
.focus = TextBoxFocusStart,
.text = "Hello, let's test text box. Press Right and Left to switch content",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text = "First test to add dynamically lines with EndFocus set\nLine 0",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text = "First test to add dynamically lines with EndFocus set\nLine 0\nLine 1",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text = "First test to add dynamically lines with EndFocus set\nLine 0\nLine 1\nLine 2",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text =
"First test to add dynamically lines with EndFocus set\nLine 0\nLine 1\nLine 2\nLine 3",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text =
"First test to add dynamically lines with EndFocus set\nLine 0\nLine 1\nLine 2\nLine 3\nLine 4",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusStart,
.text =
"Verify that symbols don't overlap borders: llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllend",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusStart,
.text =
"\n\n\n Start from several newline chars. Verify that scrolling doesn't break.\n\n\n\n\nThe end",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusStart,
.text =
"Let's test big text.\n\n The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by ARM Limited. These cores are optimized for low-cost and energy-efficient integrated circuits, which have been embedded in tens of billions of consumer devices.[1] Though they are most often the main component of microcontroller chips, sometimes they are embedded inside other types of chips too. The Cortex-M family consists of Cortex-M0,[2] Cortex-M0+,[3] Cortex-M1,[4] Cortex-M3,[5] Cortex-M4,[6] Cortex-M7,[7] Cortex-M23,[8] Cortex-M33,[9] Cortex-M35P,[10] Cortex-M52,[11] Cortex-M55,[12] Cortex-M85.[13] A floating-point unit (FPU) option is available for Cortex-M4 / M7 / M33 / M35P / M52 / M55 / M85 cores, and when included in the silicon these cores are sometimes known as \"Cortex-MxF\", where 'x' is the core variant.\n\nThe ARM Cortex-M family are ARM microprocessor cores that are designed for use in microcontrollers, ASICs, ASSPs, FPGAs, and SoCs. Cortex-M cores are commonly used as dedicated microcontroller chips, but also are hidden inside of SoC chips as power management controllers, I/O controllers, system controllers, touch screen controllers, smart battery controllers, and sensor controllers. The main difference from Cortex-A cores is that Cortex-M cores have no memory management unit (MMU) for virtual memory, considered essential for full-fledged operating systems. Cortex-M programs instead run bare metal or on one of the many real-time operating systems which support a Cortex-M.Though 8-bit microcontrollers were very popular in the past, Cortex-M has slowly been chipping away at the 8-bit market as the prices of low-end Cortex-M chips have moved downward. Cortex-M have become a popular replacements for 8-bit chips in applications that benefit from 32-bit math operations, and replacing older legacy ARM cores such as ARM7 and ARM9.",
},
{
.font = TextBoxFontText,
.focus = TextBoxFocusEnd,
.text =
"The same but with EndFocus\n\n The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by ARM Limited. These cores are optimized for low-cost and energy-efficient integrated circuits, which have been embedded in tens of billions of consumer devices.[1] Though they are most often the main component of microcontroller chips, sometimes they are embedded inside other types of chips too. The Cortex-M family consists of Cortex-M0,[2] Cortex-M0+,[3] Cortex-M1,[4] Cortex-M3,[5] Cortex-M4,[6] Cortex-M7,[7] Cortex-M23,[8] Cortex-M33,[9] Cortex-M35P,[10] Cortex-M52,[11] Cortex-M55,[12] Cortex-M85.[13] A floating-point unit (FPU) option is available for Cortex-M4 / M7 / M33 / M35P / M52 / M55 / M85 cores, and when included in the silicon these cores are sometimes known as \"Cortex-MxF\", where 'x' is the core variant.\n\nThe ARM Cortex-M family are ARM microprocessor cores that are designed for use in microcontrollers, ASICs, ASSPs, FPGAs, and SoCs. Cortex-M cores are commonly used as dedicated microcontroller chips, but also are hidden inside of SoC chips as power management controllers, I/O controllers, system controllers, touch screen controllers, smart battery controllers, and sensor controllers. The main difference from Cortex-A cores is that Cortex-M cores have no memory management unit (MMU) for virtual memory, considered essential for full-fledged operating systems. Cortex-M programs instead run bare metal or on one of the many real-time operating systems which support a Cortex-M.Though 8-bit microcontrollers were very popular in the past, Cortex-M has slowly been chipping away at the 8-bit market as the prices of low-end Cortex-M chips have moved downward. Cortex-M have become a popular replacements for 8-bit chips in applications that benefit from 32-bit math operations, and replacing older legacy ARM cores such as ARM7 and ARM9.",
},
{
.font = TextBoxFontHex,
.focus = TextBoxFocusEnd,
.text =
"0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999\n0000 0000 0000 0000\n1111 1111 1111 1111\n2222 2222 2222 2222\n3333 3333 3333 3333\n4444 4444 4444 4444\n5555 5555 5555 5555\n6666 6666 6666 6666\n7777 7777 7777 7777\n8888 8888 8888 8888\n9999 9999 9999 9999",
},
};
typedef struct {
TextBox* text_box;
ViewDispatcher* view_dispatcher;
size_t current_content_i;
} TextBoxViewTest;
static void text_box_update_view(TextBoxViewTest* instance) {
// Intentional incorrect way to reset text box to verify that state resets if text changes
text_box_set_text(instance->text_box, "");
const TextBoxViewTestContent* content =
&text_box_view_test_content_arr[instance->current_content_i];
text_box_set_font(instance->text_box, content->font);
text_box_set_focus(instance->text_box, content->focus);
text_box_set_text(instance->text_box, content->text);
}
static bool text_box_switch_view_input_callback(InputEvent* event, void* context) {
bool consumed = false;
TextBoxViewTest* instance = context;
size_t contents_cnt = COUNT_OF(text_box_view_test_content_arr);
if(event->type == InputTypeShort) {
if(event->key == InputKeyRight) {
if(instance->current_content_i < contents_cnt - 1) {
instance->current_content_i++;
text_box_update_view(instance);
consumed = true;
}
} else if(event->key == InputKeyLeft) {
if(instance->current_content_i > 0) {
instance->current_content_i--;
text_box_update_view(instance);
consumed = true;
}
} else if(event->key == InputKeyBack) {
view_dispatcher_stop(instance->view_dispatcher);
}
}
return consumed;
}
int32_t text_box_view_test_app(void* p) {
UNUSED(p);
Gui* gui = furi_record_open(RECORD_GUI);
ViewDispatcher* view_dispatcher = view_dispatcher_alloc();
view_dispatcher_attach_to_gui(view_dispatcher, gui, ViewDispatcherTypeFullscreen);
view_dispatcher_enable_queue(view_dispatcher);
TextBoxViewTest instance = {
.text_box = text_box_alloc(),
.current_content_i = 0,
.view_dispatcher = view_dispatcher,
};
text_box_update_view(&instance);
View* text_box_switch_view = view_alloc();
view_set_input_callback(text_box_switch_view, text_box_switch_view_input_callback);
view_set_context(text_box_switch_view, &instance);
ViewStack* view_stack = view_stack_alloc();
view_stack_add_view(view_stack, text_box_switch_view);
view_stack_add_view(view_stack, text_box_get_view(instance.text_box));
view_dispatcher_add_view(view_dispatcher, 0, view_stack_get_view(view_stack));
view_dispatcher_switch_to_view(view_dispatcher, 0);
view_dispatcher_run(view_dispatcher);
view_dispatcher_remove_view(view_dispatcher, 0);
view_dispatcher_free(view_dispatcher);
view_stack_free(view_stack);
view_free(text_box_switch_view);
text_box_free(instance.text_box);
furi_record_close(RECORD_GUI);
return 0;
}

View File

@@ -3,7 +3,6 @@ App(
name="UART Echo",
apptype=FlipperAppType.DEBUG,
entry_point="uart_echo_app",
cdefines=["APP_UART_ECHO"],
requires=["gui"],
stack_size=2 * 1024,
order=70,

View File

@@ -1,13 +1,14 @@
#include <furi.h>
#include <furi_hal.h>
#include <gui/gui.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
#include <gui/elements.h>
#include <furi_hal_uart.h>
#include <furi_hal_console.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/dialog_ex.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
#define LINES_ON_SCREEN 6
#define COLUMNS_ON_SCREEN 21
#define TAG "UartEcho"
@@ -22,6 +23,7 @@ typedef struct {
View* view;
FuriThread* worker_thread;
FuriStreamBuffer* rx_stream;
FuriHalSerialHandle* serial_handle;
} UartEchoApp;
typedef struct {
@@ -39,10 +41,16 @@ struct UartDumpModel {
typedef enum {
WorkerEventReserved = (1 << 0), // Reserved for StreamBuffer internal event
WorkerEventStop = (1 << 1),
WorkerEventRx = (1 << 2),
WorkerEventRxData = (1 << 2),
WorkerEventRxIdle = (1 << 3),
WorkerEventRxOverrunError = (1 << 4),
WorkerEventRxFramingError = (1 << 5),
WorkerEventRxNoiseError = (1 << 6),
} WorkerEventFlags;
#define WORKER_EVENTS_MASK (WorkerEventStop | WorkerEventRx)
#define WORKER_EVENTS_MASK \
(WorkerEventStop | WorkerEventRxData | WorkerEventRxIdle | WorkerEventRxOverrunError | \
WorkerEventRxFramingError | WorkerEventRxNoiseError)
const NotificationSequence sequence_notification = {
&message_display_backlight_on,
@@ -91,14 +99,39 @@ static uint32_t uart_echo_exit(void* context) {
return VIEW_NONE;
}
static void uart_echo_on_irq_cb(UartIrqEvent ev, uint8_t data, void* context) {
static void
uart_echo_on_irq_cb(FuriHalSerialHandle* handle, FuriHalSerialRxEvent event, void* context) {
furi_assert(context);
UNUSED(handle);
UartEchoApp* app = context;
volatile FuriHalSerialRxEvent event_copy = event;
UNUSED(event_copy);
if(ev == UartIrqEventRXNE) {
WorkerEventFlags flag = 0;
if(event & FuriHalSerialRxEventData) {
uint8_t data = furi_hal_serial_async_rx(handle);
furi_stream_buffer_send(app->rx_stream, &data, 1, 0);
furi_thread_flags_set(furi_thread_get_id(app->worker_thread), WorkerEventRx);
flag |= WorkerEventRxData;
}
if(event & FuriHalSerialRxEventIdle) {
//idle line detected, packet transmission may have ended
flag |= WorkerEventRxIdle;
}
//error detected
if(event & FuriHalSerialRxEventFrameError) {
flag |= WorkerEventRxFramingError;
}
if(event & FuriHalSerialRxEventNoiseError) {
flag |= WorkerEventRxNoiseError;
}
if(event & FuriHalSerialRxEventOverrunError) {
flag |= WorkerEventRxOverrunError;
}
furi_thread_flags_set(furi_thread_get_id(app->worker_thread), flag);
}
static void uart_echo_push_to_list(UartDumpModel* model, const char data) {
@@ -153,13 +186,13 @@ static int32_t uart_echo_worker(void* context) {
furi_check((events & FuriFlagError) == 0);
if(events & WorkerEventStop) break;
if(events & WorkerEventRx) {
if(events & WorkerEventRxData) {
size_t length = 0;
do {
uint8_t data[64];
length = furi_stream_buffer_receive(app->rx_stream, data, 64, 0);
if(length > 0) {
furi_hal_uart_tx(FuriHalUartIdUSART1, data, length);
furi_hal_serial_tx(app->serial_handle, data, length);
with_view_model(
app->view,
UartDumpModel * model,
@@ -176,6 +209,23 @@ static int32_t uart_echo_worker(void* context) {
with_view_model(
app->view, UartDumpModel * model, { UNUSED(model); }, true);
}
if(events & WorkerEventRxIdle) {
furi_hal_serial_tx(app->serial_handle, (uint8_t*)"\r\nDetect IDLE\r\n", 15);
}
if(events &
(WorkerEventRxOverrunError | WorkerEventRxFramingError | WorkerEventRxNoiseError)) {
if(events & WorkerEventRxOverrunError) {
furi_hal_serial_tx(app->serial_handle, (uint8_t*)"\r\nDetect ORE\r\n", 14);
}
if(events & WorkerEventRxFramingError) {
furi_hal_serial_tx(app->serial_handle, (uint8_t*)"\r\nDetect FE\r\n", 13);
}
if(events & WorkerEventRxNoiseError) {
furi_hal_serial_tx(app->serial_handle, (uint8_t*)"\r\nDetect NE\r\n", 13);
}
}
}
return 0;
@@ -221,9 +271,11 @@ static UartEchoApp* uart_echo_app_alloc(uint32_t baudrate) {
furi_thread_start(app->worker_thread);
// Enable uart listener
furi_hal_console_disable();
furi_hal_uart_set_br(FuriHalUartIdUSART1, baudrate);
furi_hal_uart_set_irq_cb(FuriHalUartIdUSART1, uart_echo_on_irq_cb, app);
app->serial_handle = furi_hal_serial_control_acquire(FuriHalSerialIdUsart);
furi_check(app->serial_handle);
furi_hal_serial_init(app->serial_handle, baudrate);
furi_hal_serial_async_rx_start(app->serial_handle, uart_echo_on_irq_cb, app, true);
return app;
}
@@ -231,7 +283,9 @@ static UartEchoApp* uart_echo_app_alloc(uint32_t baudrate) {
static void uart_echo_app_free(UartEchoApp* app) {
furi_assert(app);
furi_hal_console_enable(); // this will also clear IRQ callback so thread is no longer referenced
furi_hal_serial_async_rx_stop(app->serial_handle);
furi_hal_serial_deinit(app->serial_handle);
furi_hal_serial_control_release(app->serial_handle);
furi_thread_flags_set(furi_thread_get_id(app->worker_thread), WorkerEventStop);
furi_thread_join(app->worker_thread);

View File

@@ -2,8 +2,9 @@ App(
appid="unit_tests",
apptype=FlipperAppType.STARTUP,
entry_point="unit_tests_on_system_start",
sources=["unit_tests.c", "test_runner.c", "unit_test_api_table.cpp"],
cdefines=["APP_UNIT_TESTS"],
requires=["system_settings"],
requires=["system_settings", "subghz_start"],
provides=["delay_test"],
resources="resources",
order=100,
@@ -12,9 +13,210 @@ App(
App(
appid="delay_test",
name="Delay Test",
sources=["tests/common/*.c", "tests/rpc/*.c"],
apptype=FlipperAppType.SYSTEM,
entry_point="delay_test_app",
stack_size=1 * 1024,
requires=["unit_tests"],
order=110,
)
App(
appid="test_varint",
sources=["tests/common/*.c", "tests/varint/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_furi",
sources=["tests/common/*.c", "tests/furi/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_furi_hal",
sources=["tests/common/*.c", "tests/furi_hal/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_furi_hal_crypto",
sources=["tests/common/*.c", "tests/furi_hal_crypto/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_furi_string",
sources=["tests/common/*.c", "tests/furi_string/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_storage",
sources=["tests/common/*.c", "tests/storage/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_stream",
sources=["tests/common/*.c", "tests/stream/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_dirwalk",
sources=["tests/common/*.c", "tests/dirwalk/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_manifest",
sources=["tests/common/*.c", "tests/manifest/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_flipper_format",
sources=["tests/common/*.c", "tests/flipper_format/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_flipper_format_string",
sources=["tests/common/*.c", "tests/flipper_format_string/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_rpc",
sources=["tests/common/*.c", "tests/rpc/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_subghz",
sources=["tests/common/*.c", "tests/subghz/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_infrared",
sources=["tests/common/*.c", "tests/infrared/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_nfc",
sources=["tests/common/*.c", "tests/nfc/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_power",
sources=["tests/common/*.c", "tests/power/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_protocol_dict",
sources=["tests/common/*.c", "tests/protocol_dict/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_lfrfid",
sources=["tests/common/*.c", "tests/lfrfid/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_bit_lib",
sources=["tests/common/*.c", "tests/bit_lib/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_datetime",
sources=["tests/common/*.c", "tests/datetime/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_float_tools",
sources=["tests/common/*.c", "tests/float_tools/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_bt",
sources=["tests/common/*.c", "tests/bt/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_dialogs_file_browser_options",
sources=["tests/common/*.c", "tests/dialogs_file_browser_options/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_expansion",
sources=["tests/common/*.c", "tests/expansion/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)
App(
appid="test_compress",
sources=["tests/common/*.c", "tests/compress/*.c"],
apptype=FlipperAppType.PLUGIN,
entry_point="get_api",
requires=["unit_tests"],
)

View File

@@ -1,20 +0,0 @@
#include <stdio.h>
#include <string.h>
#include <furi.h>
#include "../minunit.h"
void test_furi_create_open() {
// 1. Create record
uint8_t test_data = 0;
furi_record_create("test/holding", (void*)&test_data);
// 2. Open it
void* record = furi_record_open("test/holding");
mu_assert_pointers_eq(record, &test_data);
// 3. Close it
furi_record_close("test/holding");
// 4. Clean up
furi_record_destroy("test/holding");
}

View File

@@ -0,0 +1,205 @@
Filetype: IR tests file
Version: 1
#
name: decoder_input1
type: raw
data: 25557 8437 4188 571 1538 595 1514 567 1542 570 1539 573 501 565 1544 568 506 571 1539 573 501 565 509 568 508 569 506 571 1538 574 501 565 1543 569 506 571 504 573 1536 566 1544 568 506 592 1517 574 1535 567 507 570 505 572 1537 575 500 566 508 600 1509 572 503 574 501 565 1544 568 1540 593
#
name: decoder_expected1
type: parsed_array
count: 1
#
protocol: Pioneer
address: AF 00 00 00
command: 36 00 00 00
repeat: false
#
name: decoder_input2
type: raw
data: 25609 8444 4152 564 1568 544 1565 547 1561 541 1568 544 530 547 1536 566 510 567 1567 545 529 548 526 540 535 542 508 569 1539 573 527 539 1543 569 506 571 504 573 1561 541 508 569 507 570 1538 564 1545 567 507 570 505 572 1537 565 509 568 1541 571 1538 564 511 566 509 568 1539 573 1537 596
#
name: decoder_expected2
type: parsed_array
count: 1
#
protocol: Pioneer
address: AF 00 00 00
command: 32 00 00 00
repeat: false
#
name: decoder_input3
type: raw
data: 25582 8448 4176 571 1537 565 1544 568 1540 572 1537 575 500 566 1542 570 505 572 1537 575 500 566 508 569 506 571 504 573 1536 565 510 567 1542 570 504 573 1536 566 1543 569 506 571 504 573 1536 566 1543 569 506 571 504 573 502 575 500 566 1542 570 1539 573 502 575 500 566 1542 570 1540 572
#
name: decoder_expected3
type: parsed_array
count: 1
#
protocol: Pioneer
address: AF 00 00 00
command: 33 00 00 00
repeat: false
#
name: decoder_input4
type: raw
data: 25594 8443 4181 568 1542 570 505 572 1538 564 1545 567 508 569 1540 572 504 573 1536 566 510 567 1542 571 505 572 504 573 1562 540 510 567 1543 570 506 571 504 573 503 574 501 565 510 567 509 568 507 570 1539 573 502 565 1545 568 1542 571 1539 573 1536 566 1544 569 1541 572 503 574 1537 565
#
name: decoder_expected4
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 40 00 00 00
repeat: false
#
name: decoder_input5
type: raw
data: 25556 8475 4150 597 1512 600 476 601 1509 603 1506 595 480 597 1512 600 476 601 1508 594 482 595 1515 597 478 599 477 600 1510 602 473 604 1506 595 480 597 1513 599 476 601 475 602 474 603 472 594 482 595 1514 598 477 600 476 601 1508 594 1516 596 1513 599 1510 602 1507 595 480 597 1513 599
#
name: decoder_expected5
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 41 00 00 00
repeat: false
#
name: decoder_input6
type: raw
data: 25567 8471 4155 604 1506 596 480 597 1513 599 1510 603 473 594 1515 597 478 599 1511 602 474 603 1507 595 480 597 479 598 1511 602 474 603 1506 596 480 597 478 599 1511 602 474 603 472 594 481 596 479 598 1512 601 474 603 1506 596 479 598 1511 602 1508 594 1515 598 1512 600 475 602 1507 595
#
name: decoder_expected6
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 42 00 00 00
repeat: false
#
name: decoder_input7
type: raw
data: 25584 8444 4180 569 1541 572 504 573 1536 566 1544 569 507 570 1539 574 501 566 1569 596 455 570 1540 573 502 575 501 565 1544 569 507 570 1565 548 503 574 1535 567 1543 570 506 571 529 548 502 565 511 566 1543 601 475 571 504 573 503 574 1536 566 1543 570 1539 574 1536 566 509 568 1541 572
#
name: decoder_expected7
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 43 00 00 00
repeat: false
#
name: decoder_input8
type: raw
data: 25562 8445 4181 568 1543 570 505 572 1538 575 1535 567 508 569 1539 573 503 595 1514 567 508 600 1509 572 503 595 481 596 1513 568 507 601 1508 573 502 575 501 566 1543 570 506 571 504 573 1536 566 510 567 508 600 475 571 1539 573 502 575 1534 568 1542 571 505 572 1537 575 1534 568 1542 571
#
name: decoder_expected8
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 12 00 00 00
repeat: false
#
name: decoder_input9
type: raw
data: 25558 8470 4152 597 1513 600 476 601 1508 594 1515 598 478 599 1509 593 483 594 1515 598 478 599 1510 603 474 592 482 595 1514 599 477 600 1509 593 483 594 481 596 1513 600 476 601 1508 594 1515 598 478 599 476 601 474 593 1517 596 479 598 1512 601 474 603 472 594 1515 598 1511 602 1508 594
#
name: decoder_expected9
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 1A 00 00 00
repeat: false
#
name: decoder_input10
type: raw
data: 25587 8442 4179 601 1507 595 481 565 1544 600 1509 593 482 595 1513 568 507 570 1539 594 481 565 1544 600 476 570 505 593 1516 597 479 598 1511 591 484 593 481 575 1534 600 476 570 1539 595 480 597 478 599 476 570 505 593 1517 564 511 597 1511 602 474 572 1537 597 1513 600 1509 572 1537 565
#
name: decoder_expected10
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 0A 00 00 00
repeat: false
#
name: decoder_input11
type: raw
data: 25554 8474 4149 600 1510 603 472 594 1515 597 1512 601 475 602 1507 595 480 597 1513 599 475 602 1508 594 481 596 479 598 1512 601 474 603 1506 596 479 598 1512 601 1508 594 481 596 1513 599 476 601 474 603 472 594 481 596 480 597 478 599 1510 603 473 593 1515 597 1512 601 1509 603 1506 596
#
name: decoder_expected11
type: parsed_array
count: 1
#
protocol: Pioneer
address: AD 00 00 00
command: 0B 00 00 00
repeat: false
#
name: encoder_decoder_input1
type: parsed_array
count: 11
#
protocol: Pioneer
address: AF 00 00 00
command: 36 00 00 00
repeat: false
#
protocol: Pioneer
address: AF 00 00 00
command: 32 00 00 00
repeat: false
#
protocol: Pioneer
address: AF 00 00 00
command: 33 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 40 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 41 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 42 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 43 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 12 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 1A 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 0A 00 00 00
repeat: false
#
protocol: Pioneer
address: AD 00 00 00
command: 0B 00 00 00
repeat: false
#

View File

@@ -0,0 +1,41 @@
Filetype: Flipper NFC device
Version: 4
# Device type can be ISO14443-3A, ISO14443-3B, ISO14443-4A, ISO14443-4B, ISO15693-3, FeliCa, NTAG/Ultralight, Mifare Classic, Mifare DESFire, SLIX, ST25TB
Device type: SLIX
# UID is common for all formats
UID: E0 04 01 08 49 D0 DC 81
# ISO15693-3 specific data
# Data Storage Format Identifier
DSFID: 01
# Application Family Identifier
AFI: 3D
# IC Reference - Vendor specific meaning
IC Reference: 01
# Lock Bits
Lock DSFID: true
Lock AFI: true
# Number of memory blocks, valid range = 1..256
Block Count: 80
# Size of a single memory block, valid range = 01...20 (hex)
Block Size: 04
Data Content: 03 0A 82 ED 86 39 61 D2 03 14 1E 32 B6 CA 00 3C 36 42 0C 33 53 30 37 32 32 34 30 30 00 00 00 00 00 FF 04 01 01 00 00 00 A3 03 1E 00 26 00 00 00 00 00 0F 00 76 03 65 01 00 00 00 00 85 01 34 00 75 09 05 00 01 00 00 00 00 00 00 00 00 00 00 00 D7 FA 00 1C 9E 1C 67 27 00 30 30 30 30 30 30 30 30 30 30 00 00 00 97 25 55 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 32 8C 00 30 53 48 80 DE 00 00 00 00 F4 C3 58 2B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 F3 00 2C DD C3 3E 91 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E5 FF 00 01
# Block Security Status: 01 = locked, 00 = not locked
Security Status: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
# SLIX specific data
# SLIX capabilities field affects emulation modes. Possible options: Default, AcceptAllPasswords
Capabilities: AcceptAllPasswords
# Passwords are optional. If a password is omitted, a default value will be used
Password Read: 00 00 00 00
Password Write: 00 00 00 00
Password Privacy: 0F 0F 0F 0F
Password Destroy: 0F 0F 0F 0F
Password EAS: 00 00 00 00
# This is the card's secp128r1 elliptic curve signature. It can not be calculated without knowing NXP's private key.
Signature: A6 25 54 03 74 24 C4 38 36 F4 89 70 76 1A 72 27 54 D9 E7 3D 38 CB 4C 1B 3E FD 0E DF 8A F6 7E 3D
Privacy Mode: false
# Protection pointer configuration
Protection Pointer: 32
Protection Condition: 02
# SLIX Lock Bits
Lock EAS: true
Lock PPL: true

View File

@@ -0,0 +1,41 @@
Filetype: Flipper NFC device
Version: 4
# Device type can be ISO14443-3A, ISO14443-3B, ISO14443-4A, ISO14443-4B, ISO15693-3, FeliCa, NTAG/Ultralight, Mifare Classic, Mifare DESFire, SLIX, ST25TB
Device type: SLIX
# UID is common for all formats
UID: E0 04 01 08 49 D0 DC 81
# ISO15693-3 specific data
# Data Storage Format Identifier
DSFID: 01
# Application Family Identifier
AFI: 3D
# IC Reference - Vendor specific meaning
IC Reference: 01
# Lock Bits
Lock DSFID: true
Lock AFI: true
# Number of memory blocks, valid range = 1..256
Block Count: 80
# Size of a single memory block, valid range = 01...20 (hex)
Block Size: 04
Data Content: 03 0A 82 ED 86 39 61 D2 03 14 1E 32 B6 CA 00 3C 36 42 0C 33 53 30 37 32 32 34 30 30 00 00 00 00 00 FF 04 01 01 00 00 00 A3 03 1E 00 26 00 00 00 00 00 0F 00 76 03 65 01 00 00 00 00 85 01 34 00 75 09 05 00 01 00 00 00 00 00 00 00 00 00 00 00 D7 FA 00 1C 9E 1C 67 27 00 30 30 30 30 30 30 30 30 30 30 00 00 00 97 25 55 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 32 8C 00 30 53 48 80 DE 00 00 00 00 F4 C3 58 2B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 F3 00 2C DD C3 3E 91 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E5 FF 00 01
# Block Security Status: 01 = locked, 00 = not locked
Security Status: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
# SLIX specific data
# SLIX capabilities field affects emulation modes. Possible options: Default, AcceptAllPasswords
Capabilities: Default
# Passwords are optional. If a password is omitted, a default value will be used
Password Read: 00 00 00 00
Password Write: 00 00 00 00
Password Privacy: 0F 0F 0F 0F
Password Destroy: 0F 0F 0F 0F
Password EAS: 00 00 00 00
# This is the card's secp128r1 elliptic curve signature. It can not be calculated without knowing NXP's private key.
Signature: A6 25 54 03 74 24 C4 38 36 F4 89 70 76 1A 72 27 54 D9 E7 3D 38 CB 4C 1B 3E FD 0E DF 8A F6 7E 3D
Privacy Mode: false
# Protection pointer configuration
Protection Pointer: 32
Protection Condition: 02
# SLIX Lock Bits
Lock EAS: true
Lock PPL: true

View File

@@ -0,0 +1,39 @@
Filetype: Flipper NFC device
Version: 4
# Device type can be ISO14443-3A, ISO14443-3B, ISO14443-4A, ISO14443-4B, ISO15693-3, FeliCa, NTAG/Ultralight, Mifare Classic, Mifare DESFire, SLIX, ST25TB
Device type: SLIX
# UID is common for all formats
UID: E0 04 01 08 49 D0 DC 81
# ISO15693-3 specific data
# Data Storage Format Identifier
DSFID: 01
# Application Family Identifier
AFI: 3D
# IC Reference - Vendor specific meaning
IC Reference: 01
# Lock Bits
Lock DSFID: true
Lock AFI: true
# Number of memory blocks, valid range = 1..256
Block Count: 80
# Size of a single memory block, valid range = 01...20 (hex)
Block Size: 04
Data Content: 03 0A 82 ED 86 39 61 D2 03 14 1E 32 B6 CA 00 3C 36 42 0C 33 53 30 37 32 32 34 30 30 00 00 00 00 00 FF 04 01 01 00 00 00 A3 03 1E 00 26 00 00 00 00 00 0F 00 76 03 65 01 00 00 00 00 85 01 34 00 75 09 05 00 01 00 00 00 00 00 00 00 00 00 00 00 D7 FA 00 1C 9E 1C 67 27 00 30 30 30 30 30 30 30 30 30 30 00 00 00 97 25 55 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 32 8C 00 30 53 48 80 DE 00 00 00 00 F4 C3 58 2B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 F3 00 2C DD C3 3E 91 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E5 FF 00 01
# Block Security Status: 01 = locked, 00 = not locked
Security Status: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
# SLIX specific data
# Passwords are optional. If a password is omitted, a default value will be used
Password Read: 00 00 00 00
Password Write: 00 00 00 00
Password Privacy: 0F 0F 0F 0F
Password Destroy: 0F 0F 0F 0F
Password EAS: 00 00 00 00
# This is the card's secp128r1 elliptic curve signature. It can not be calculated without knowing NXP's private key.
Signature: A6 25 54 03 74 24 C4 38 36 F4 89 70 76 1A 72 27 54 D9 E7 3D 38 CB 4C 1B 3E FD 0E DF 8A F6 7E 3D
Privacy Mode: false
# Protection pointer configuration
Protection Pointer: 32
Protection Condition: 02
# SLIX Lock Bits
Lock EAS: true
Lock PPL: true

View File

@@ -0,0 +1,7 @@
Filetype: Flipper SubGhz Key File
Version: 1
Frequency: 433920000
Preset: FuriHalSubGhzPresetOok270Async
Protocol: Mastercode
Bit: 36
Key: 00 00 00 0B 7E 00 3C 08

View File

@@ -0,0 +1,6 @@
Filetype: Flipper SubGhz RAW File
Version: 1
Frequency: 433920000
Preset: FuriHalSubGhzPresetOok270Async
Protocol: RAW
RAW_Data: 10389 -66 405095 -102 207 -106 1165 -130 963739 -1232 899 -2250 2003 -1190 2017 -1202 911 -2256 2021 -1162 2045 -1134 2047 -1164 2047 -1138 2031 -1180 2039 -1182 949 -2190 995 -2214 961 -2228 963 -2198 963 -2214 977 -2212 975 -2210 975 -2208 971 -2200 963 -2210 993 -2184 2075 -1130 2051 -1142 2055 -1136 2047 -1178 965 -2236 933 -2220 975 -2184 999 -2222 967 -2208 969 -2214 979 -2202 2027 -1156 975 -2242 943 -16080 2023 -1162 967 -2220 2057 -1114 2061 -1124 1007 -2242 2025 -1134 2055 -1168 2017 -1138 2075 -1134 2053 -1136 2075 -1130 979 -2214 979 -2174 999 -2182 1001 -2204 977 -2206 1003 -2188 979 -2176 999 -2182 1009 -2176 1009 -2176 1001 -2212 2029 -1116 2091 -1102 2109 -1092 2095 -1126 1001 -2150 1011 -2180 1011 -2180 1009 -2178 1009 -2172 1009 -2166 1001 -2198 2065 -1136 975 -2220 971 -16018 2097 -1166 951 -2240 2009 -1186 2011 -1160 979 -2208 2035 -1134 2053 -1138 2061 -1158 2045 -1152 2029 -1152 2051 -1166 963 -2188 993 -2222 951 -2214 963 -2220 965 -2212 979 -2212 977 -2180 1003 -2202 965 -2218 975 -2216 967 -2188 2061 -1124 2083 -1126 2071 -1130 2059 -1134 993 -2188 979 -2240 947 -2204 979 -2214 971 -2214 973 -2210 971 -2206 2053 -1130 979 -2216 969 -16056 2053 -1134 1001 -2224 2021 -1150 2051 -1154 953 -2240 2045 -1146 2023 -1168 2033 -1144 2065 -1146 2055 -1130 2071 -1160 961 -2192 973 -2190 1005 -2214 975 -2206 967 -2206 975 -2206 967 -2208 975 -2212 967 -2212 979 -2218 977 -2178 2063 -1156 2035 -1160 2061 -1126 2065 -1130 981 -2186 1003 -2210 977 -2208 973 -2202 977 -2200 965 -2248 943 -2206 2039 -1190 941 -48536 65 -7254 263 -68 363 -102 131 -232 263 -264 751 -230 225 -822 397 -634 231 -268 263 -134 267 -64 867 -132 305 -138 67 -100 331 -98 891 -66 455 -66 531 -100 299 -134 897 -98 693 -132 291 -132 333 -98 337 -68 331

View File

@@ -1,154 +0,0 @@
#include <stdio.h>
#include <furi.h>
#include <furi_hal.h>
#include "minunit_vars.h"
#include <notification/notification_messages.h>
#include <cli/cli.h>
#include <loader/loader.h>
#define TAG "UnitTests"
int run_minunit_test_furi();
int run_minunit_test_furi_hal();
int run_minunit_test_furi_hal_crypto();
int run_minunit_test_furi_string();
int run_minunit_test_infrared();
int run_minunit_test_rpc();
int run_minunit_test_manifest();
int run_minunit_test_flipper_format();
int run_minunit_test_flipper_format_string();
int run_minunit_test_stream();
int run_minunit_test_storage();
int run_minunit_test_subghz();
int run_minunit_test_dirwalk();
int run_minunit_test_power();
int run_minunit_test_protocol_dict();
int run_minunit_test_lfrfid_protocols();
int run_minunit_test_nfc();
int run_minunit_test_bit_lib();
int run_minunit_test_float_tools();
int run_minunit_test_bt();
int run_minunit_test_dialogs_file_browser_options();
typedef int (*UnitTestEntry)();
typedef struct {
const char* name;
const UnitTestEntry entry;
} UnitTest;
const UnitTest unit_tests[] = {
{.name = "furi", .entry = run_minunit_test_furi},
{.name = "furi_hal", .entry = run_minunit_test_furi_hal},
{.name = "furi_hal_crypto", .entry = run_minunit_test_furi_hal_crypto},
{.name = "furi_string", .entry = run_minunit_test_furi_string},
{.name = "storage", .entry = run_minunit_test_storage},
{.name = "stream", .entry = run_minunit_test_stream},
{.name = "dirwalk", .entry = run_minunit_test_dirwalk},
{.name = "manifest", .entry = run_minunit_test_manifest},
{.name = "flipper_format", .entry = run_minunit_test_flipper_format},
{.name = "flipper_format_string", .entry = run_minunit_test_flipper_format_string},
{.name = "rpc", .entry = run_minunit_test_rpc},
{.name = "subghz", .entry = run_minunit_test_subghz},
{.name = "infrared", .entry = run_minunit_test_infrared},
{.name = "nfc", .entry = run_minunit_test_nfc},
{.name = "power", .entry = run_minunit_test_power},
{.name = "protocol_dict", .entry = run_minunit_test_protocol_dict},
{.name = "lfrfid", .entry = run_minunit_test_lfrfid_protocols},
{.name = "bit_lib", .entry = run_minunit_test_bit_lib},
{.name = "float_tools", .entry = run_minunit_test_float_tools},
{.name = "bt", .entry = run_minunit_test_bt},
{.name = "dialogs_file_browser_options",
.entry = run_minunit_test_dialogs_file_browser_options},
};
void minunit_print_progress() {
static const char progress[] = {'\\', '|', '/', '-'};
static uint8_t progress_counter = 0;
static uint32_t last_tick = 0;
uint32_t current_tick = furi_get_tick();
if(current_tick - last_tick > 20) {
last_tick = current_tick;
printf("[%c]\033[3D", progress[++progress_counter % COUNT_OF(progress)]);
fflush(stdout);
}
}
void minunit_print_fail(const char* str) {
printf(_FURI_LOG_CLR_E "%s\r\n" _FURI_LOG_CLR_RESET, str);
}
void unit_tests_cli(Cli* cli, FuriString* args, void* context) {
UNUSED(cli);
UNUSED(args);
UNUSED(context);
minunit_run = 0;
minunit_assert = 0;
minunit_fail = 0;
minunit_status = 0;
Loader* loader = furi_record_open(RECORD_LOADER);
NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
// TODO FL-3491: lock device while test running
if(loader_is_locked(loader)) {
printf("RPC: stop all applications to run tests\r\n");
notification_message(notification, &sequence_blink_magenta_100);
} else {
notification_message_block(notification, &sequence_set_only_blue_255);
uint32_t heap_before = memmgr_get_free_heap();
uint32_t cycle_counter = furi_get_tick();
for(size_t i = 0; i < COUNT_OF(unit_tests); i++) {
if(cli_cmd_interrupt_received(cli)) {
break;
}
if(furi_string_size(args)) {
if(furi_string_cmp_str(args, unit_tests[i].name) == 0) {
unit_tests[i].entry();
} else {
printf("Skipping %s\r\n", unit_tests[i].name);
}
} else {
unit_tests[i].entry();
}
}
if(minunit_run != 0) {
printf("\r\nFailed tests: %u\r\n", minunit_fail);
// Time report
cycle_counter = (furi_get_tick() - cycle_counter);
printf("Consumed: %lu ms\r\n", cycle_counter);
// Wait for tested services and apps to deallocate memory
furi_delay_ms(200);
uint32_t heap_after = memmgr_get_free_heap();
printf("Leaked: %ld\r\n", heap_before - heap_after);
// Final Report
if(minunit_fail == 0) {
notification_message(notification, &sequence_success);
printf("Status: PASSED\r\n");
} else {
notification_message(notification, &sequence_error);
printf("Status: FAILED\r\n");
}
}
}
furi_record_close(RECORD_NOTIFICATION);
furi_record_close(RECORD_LOADER);
}
void unit_tests_on_system_start() {
#ifdef SRV_CLI
Cli* cli = furi_record_open(RECORD_CLI);
// We need to launch apps from tests, so we cannot lock loader
cli_add_command(cli, "unit_tests", CliCommandFlagParallelSafe, unit_tests_cli, NULL);
furi_record_close(RECORD_CLI);
#endif
}

View File

@@ -0,0 +1,216 @@
#include "test_runner.h"
#include "tests/test_api.h"
#include <cli/cli.h>
#include <toolbox/path.h>
#include <loader/loader.h>
#include <storage/storage.h>
#include <notification/notification_messages.h>
#include <loader/firmware_api/firmware_api.h>
#include <flipper_application/flipper_application.h>
#include <flipper_application/api_hashtable/api_hashtable.h>
#include <flipper_application/plugins/composite_resolver.h>
extern const ElfApiInterface* const unit_tests_api_interface;
#define TAG "TestRunner"
#define PLUGINS_PATH "/ext/apps_data/unit_tests/plugins"
struct TestRunner {
Storage* storage;
Loader* loader;
NotificationApp* notification;
// Temporary used things
Cli* cli;
FuriString* args;
// ELF related stuff
CompositeApiResolver* composite_resolver;
// Report data
int minunit_run;
int minunit_assert;
int minunit_fail;
int minunit_status;
};
TestRunner* test_runner_alloc(Cli* cli, FuriString* args) {
TestRunner* instance = malloc(sizeof(TestRunner));
instance->storage = furi_record_open(RECORD_STORAGE);
instance->loader = furi_record_open(RECORD_LOADER);
instance->notification = furi_record_open(RECORD_NOTIFICATION);
instance->cli = cli;
instance->args = args;
instance->composite_resolver = composite_api_resolver_alloc();
composite_api_resolver_add(instance->composite_resolver, firmware_api_interface);
composite_api_resolver_add(instance->composite_resolver, unit_tests_api_interface);
return instance;
}
void test_runner_free(TestRunner* instance) {
furi_assert(instance);
composite_api_resolver_free(instance->composite_resolver);
furi_record_close(RECORD_NOTIFICATION);
instance->notification = NULL;
furi_record_close(RECORD_LOADER);
instance->loader = NULL;
furi_record_close(RECORD_STORAGE);
instance->storage = NULL;
free(instance);
}
static bool test_runner_run_plugin(TestRunner* instance, const char* path) {
furi_assert(instance);
FURI_LOG_D(TAG, "Loading %s", path);
FlipperApplication* lib = flipper_application_alloc(
instance->storage, composite_api_resolver_get(instance->composite_resolver));
bool result = false;
instance->minunit_fail = -1;
do {
FlipperApplicationPreloadStatus preload_res = flipper_application_preload(lib, path);
if(preload_res != FlipperApplicationPreloadStatusSuccess) {
FURI_LOG_E(TAG, "Failed to preload %s, %d", path, preload_res);
break;
}
if(!flipper_application_is_plugin(lib)) {
FURI_LOG_E(TAG, "Not a plugin %s", path);
break;
}
FlipperApplicationLoadStatus load_status = flipper_application_map_to_memory(lib);
if(load_status != FlipperApplicationLoadStatusSuccess) {
FURI_LOG_E(TAG, "Failed to load %s", path);
break;
}
const FlipperAppPluginDescriptor* app_descriptor =
flipper_application_plugin_get_descriptor(lib);
const TestApi* test = app_descriptor->entry_point;
instance->minunit_fail = test->run();
instance->minunit_run += test->get_minunit_run();
instance->minunit_assert += test->get_minunit_assert();
instance->minunit_status += test->get_minunit_status();
result = (instance->minunit_fail == 0);
} while(false);
flipper_application_free(lib);
return result;
}
static void test_runner_run_internal(TestRunner* instance) {
furi_assert(instance);
char file_name_buffer[256];
FuriString* file_name = furi_string_alloc();
FuriString* file_basename = furi_string_alloc();
File* directory = storage_file_alloc(instance->storage);
do {
if(!storage_dir_open(directory, PLUGINS_PATH)) {
FURI_LOG_E(TAG, "Failed to open directory %s", PLUGINS_PATH);
break;
}
while(true) {
if(cli_cmd_interrupt_received(instance->cli)) {
break;
}
if(!storage_dir_read(directory, NULL, file_name_buffer, sizeof(file_name_buffer))) {
break;
}
furi_string_set(file_name, file_name_buffer);
if(!furi_string_end_with_str(file_name, ".fal")) {
continue;
}
path_concat(PLUGINS_PATH, file_name_buffer, file_name);
path_extract_filename(file_name, file_basename, true);
const char* file_basename_cstr = furi_string_get_cstr(file_basename);
bool result = true;
if(furi_string_size(instance->args)) {
if(furi_string_cmp_str(instance->args, file_basename_cstr) == 0) {
result = test_runner_run_plugin(instance, furi_string_get_cstr(file_name));
} else {
printf("Skipping %s\r\n", file_basename_cstr);
}
} else {
result = test_runner_run_plugin(instance, furi_string_get_cstr(file_name));
}
if(!result) {
printf("Failed to execute test: %s\r\n", file_basename_cstr);
break;
}
}
} while(false);
storage_dir_close(directory);
storage_file_free(directory);
furi_string_free(file_name);
furi_string_free(file_basename);
}
void test_runner_run(TestRunner* instance) {
furi_assert(instance);
// TODO FL-3491: lock device while test running
if(loader_is_locked(instance->loader)) {
printf("RPC: stop all applications to run tests\r\n");
notification_message(instance->notification, &sequence_blink_magenta_100);
} else {
notification_message_block(instance->notification, &sequence_set_only_blue_255);
uint32_t heap_before = memmgr_get_free_heap();
uint32_t cycle_counter = furi_get_tick();
test_runner_run_internal(instance);
if(instance->minunit_run != 0) {
printf("\r\nFailed tests: %d\r\n", instance->minunit_fail);
// Time report
cycle_counter = (furi_get_tick() - cycle_counter);
printf("Consumed: %lu ms\r\n", cycle_counter);
// Wait for tested services and apps to deallocate memory
furi_delay_ms(200);
uint32_t heap_after = memmgr_get_free_heap();
printf("Leaked: %ld\r\n", heap_before - heap_after);
// Final Report
if(instance->minunit_fail == 0) {
notification_message(instance->notification, &sequence_success);
printf("Status: PASSED\r\n");
} else {
notification_message(instance->notification, &sequence_error);
printf("Status: FAILED\r\n");
}
}
}
}

View File

@@ -0,0 +1,12 @@
#pragma once
#include <furi.h>
typedef struct TestRunner TestRunner;
typedef struct Cli Cli;
TestRunner* test_runner_alloc(Cli* cli, FuriString* args);
void test_runner_free(TestRunner* isntance);
void test_runner_run(TestRunner* isntance);

View File

@@ -1,6 +1,6 @@
#include <furi.h>
#include "../minunit.h"
#include <lfrfid/tools/bit_lib.h>
#include "../test.h"
#include <bit_lib/bit_lib.h>
MU_TEST(test_bit_lib_increment_index) {
uint32_t index = 0;
@@ -218,6 +218,178 @@ MU_TEST(test_bit_lib_get_bits_32) {
mu_assert_int_eq(0b00001001101100011000110001100010, bit_lib_get_bits_32(value, 0, 32));
}
MU_TEST(test_bit_lib_get_bits_64) {
uint8_t value[8] = {
0b00001001,
0b10110001,
0b10001100,
0b01100010,
0b00001001,
0b10110001,
0b10001100,
0b01100010};
mu_assert_int_eq(0b0, bit_lib_get_bits_64(value, 0, 1));
mu_assert_int_eq(0b00, bit_lib_get_bits_64(value, 0, 2));
mu_assert_int_eq(0b000, bit_lib_get_bits_64(value, 0, 3));
mu_assert_int_eq(0b0000, bit_lib_get_bits_64(value, 0, 4));
mu_assert_int_eq(0b00001, bit_lib_get_bits_64(value, 0, 5));
mu_assert_int_eq(0b000010, bit_lib_get_bits_64(value, 0, 6));
mu_assert_int_eq(0b0000100, bit_lib_get_bits_64(value, 0, 7));
mu_assert_int_eq(0b00001001, bit_lib_get_bits_64(value, 0, 8));
mu_assert_int_eq(0b000010011, bit_lib_get_bits_64(value, 0, 9));
mu_assert_int_eq(0b0000100110, bit_lib_get_bits_64(value, 0, 10));
mu_assert_int_eq(0b00001001101, bit_lib_get_bits_64(value, 0, 11));
mu_assert_int_eq(0b000010011011, bit_lib_get_bits_64(value, 0, 12));
mu_assert_int_eq(0b0000100110110, bit_lib_get_bits_64(value, 0, 13));
mu_assert_int_eq(0b00001001101100, bit_lib_get_bits_64(value, 0, 14));
mu_assert_int_eq(0b000010011011000, bit_lib_get_bits_64(value, 0, 15));
mu_assert_int_eq(0b0000100110110001, bit_lib_get_bits_64(value, 0, 16));
mu_assert_int_eq(0b00001001101100011, bit_lib_get_bits_64(value, 0, 17));
mu_assert_int_eq(0b000010011011000110, bit_lib_get_bits_64(value, 0, 18));
mu_assert_int_eq(0b0000100110110001100, bit_lib_get_bits_64(value, 0, 19));
mu_assert_int_eq(0b00001001101100011000, bit_lib_get_bits_64(value, 0, 20));
mu_assert_int_eq(0b000010011011000110001, bit_lib_get_bits_64(value, 0, 21));
mu_assert_int_eq(0b0000100110110001100011, bit_lib_get_bits_64(value, 0, 22));
mu_assert_int_eq(0b00001001101100011000110, bit_lib_get_bits_64(value, 0, 23));
mu_assert_int_eq(0b000010011011000110001100, bit_lib_get_bits_64(value, 0, 24));
mu_assert_int_eq(0b0000100110110001100011000, bit_lib_get_bits_64(value, 0, 25));
mu_assert_int_eq(0b00001001101100011000110001, bit_lib_get_bits_64(value, 0, 26));
mu_assert_int_eq(0b000010011011000110001100011, bit_lib_get_bits_64(value, 0, 27));
mu_assert_int_eq(0b0000100110110001100011000110, bit_lib_get_bits_64(value, 0, 28));
mu_assert_int_eq(0b00001001101100011000110001100, bit_lib_get_bits_64(value, 0, 29));
mu_assert_int_eq(0b000010011011000110001100011000, bit_lib_get_bits_64(value, 0, 30));
mu_assert_int_eq(0b0000100110110001100011000110001, bit_lib_get_bits_64(value, 0, 31));
mu_assert_int_eq(0b00001001101100011000110001100010, bit_lib_get_bits_64(value, 0, 32));
uint64_t res = bit_lib_get_bits_64(value, 0, 33);
uint64_t expected = 0b000010011011000110001100011000100;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 34);
expected = 0b0000100110110001100011000110001000;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 35);
expected = 0b00001001101100011000110001100010000;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 36);
expected = 0b000010011011000110001100011000100000;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 37);
expected = 0b0000100110110001100011000110001000001;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 38);
expected = 0b00001001101100011000110001100010000010;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 39);
expected = 0b000010011011000110001100011000100000100;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 40);
expected = 0b0000100110110001100011000110001000001001;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 41);
expected = 0b00001001101100011000110001100010000010011;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 42);
expected = 0b000010011011000110001100011000100000100110;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 43);
expected = 0b0000100110110001100011000110001000001001101;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 44);
expected = 0b00001001101100011000110001100010000010011011;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 45);
expected = 0b000010011011000110001100011000100000100110110;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 46);
expected = 0b0000100110110001100011000110001000001001101100;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 47);
expected = 0b00001001101100011000110001100010000010011011000;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 48);
expected = 0b000010011011000110001100011000100000100110110001;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 49);
expected = 0b0000100110110001100011000110001000001001101100011;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 50);
expected = 0b00001001101100011000110001100010000010011011000110;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 51);
expected = 0b000010011011000110001100011000100000100110110001100;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 52);
expected = 0b0000100110110001100011000110001000001001101100011000;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 53);
expected = 0b00001001101100011000110001100010000010011011000110001;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 54);
expected = 0b000010011011000110001100011000100000100110110001100011;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 55);
expected = 0b0000100110110001100011000110001000001001101100011000110;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 56);
expected = 0b00001001101100011000110001100010000010011011000110001100;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 57);
expected = 0b000010011011000110001100011000100000100110110001100011000;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 58);
expected = 0b0000100110110001100011000110001000001001101100011000110001;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 59);
expected = 0b00001001101100011000110001100010000010011011000110001100011;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 60);
expected = 0b000010011011000110001100011000100000100110110001100011000110;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 61);
expected = 0b0000100110110001100011000110001000001001101100011000110001100;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 62);
expected = 0b00001001101100011000110001100010000010011011000110001100011000;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 63);
expected = 0b000010011011000110001100011000100000100110110001100011000110001;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
res = bit_lib_get_bits_64(value, 0, 64);
expected = 0b0000100110110001100011000110001000001001101100011000110001100010;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
}
MU_TEST(test_bit_lib_test_parity_u32) {
// test even parity
mu_assert_int_eq(bit_lib_test_parity_32(0b00000000, BitLibParityEven), 0);
@@ -447,6 +619,95 @@ MU_TEST(test_bit_lib_crc16) {
mu_assert_int_eq(0x31C3, bit_lib_crc16(data, data_size, 0x1021, 0x0000, false, false, 0x0000));
}
MU_TEST(test_bit_lib_num_to_bytes_be) {
uint8_t src[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
uint8_t dest[8];
bit_lib_num_to_bytes_be(0x01, 1, dest);
mu_assert_mem_eq(src, dest, sizeof(src[0]));
bit_lib_num_to_bytes_be(0x0123456789ABCDEF, 4, dest);
mu_assert_mem_eq(src + 4, dest, 4 * sizeof(src[0]));
bit_lib_num_to_bytes_be(0x0123456789ABCDEF, 8, dest);
mu_assert_mem_eq(src, dest, 8 * sizeof(src[0]));
bit_lib_num_to_bytes_be(bit_lib_bytes_to_num_be(src, 8), 8, dest);
mu_assert_mem_eq(src, dest, 8 * sizeof(src[0]));
}
MU_TEST(test_bit_lib_num_to_bytes_le) {
uint8_t dest[8];
uint8_t n2b_le_expected_1[] = {0x01};
bit_lib_num_to_bytes_le(0x01, 1, dest);
mu_assert_mem_eq(n2b_le_expected_1, dest, sizeof(n2b_le_expected_1[0]));
uint8_t n2b_le_expected_2[] = {0xEF, 0xCD, 0xAB, 0x89};
bit_lib_num_to_bytes_le(0x0123456789ABCDEF, 4, dest);
mu_assert_mem_eq(n2b_le_expected_2, dest, 4 * sizeof(n2b_le_expected_2[0]));
uint8_t n2b_le_expected_3[] = {0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01};
bit_lib_num_to_bytes_le(0x0123456789ABCDEF, 8, dest);
mu_assert_mem_eq(n2b_le_expected_3, dest, 8 * sizeof(n2b_le_expected_3[0]));
bit_lib_num_to_bytes_le(bit_lib_bytes_to_num_le(n2b_le_expected_3, 8), 8, dest);
mu_assert_mem_eq(n2b_le_expected_3, dest, 8 * sizeof(n2b_le_expected_3[0]));
}
MU_TEST(test_bit_lib_bytes_to_num_be) {
uint8_t src[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
uint64_t res;
res = bit_lib_bytes_to_num_be(src, 1);
mu_assert_int_eq(0x01, res);
res = bit_lib_bytes_to_num_be(src, 4);
mu_assert_int_eq(0x01234567, res);
res = bit_lib_bytes_to_num_be(src, 8);
uint64_t expected = 0x0123456789ABCDEF;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
}
MU_TEST(test_bit_lib_bytes_to_num_le) {
uint8_t src[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
uint64_t res;
res = bit_lib_bytes_to_num_le(src, 1);
mu_assert_int_eq(0x01, res);
res = bit_lib_bytes_to_num_le(src, 4);
mu_assert_int_eq(0x67452301, res);
res = bit_lib_bytes_to_num_le(src, 8);
uint64_t expected = 0xEFCDAB8967452301;
mu_assert_mem_eq(&expected, &res, sizeof(expected));
}
MU_TEST(test_bit_lib_bytes_to_num_bcd) {
uint8_t src[8] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
uint64_t res;
bool is_bcd_res;
res = bit_lib_bytes_to_num_bcd(src, 1, &is_bcd_res);
mu_assert_int_eq(01, res);
mu_assert_int_eq(true, is_bcd_res);
res = bit_lib_bytes_to_num_bcd(src, 4, &is_bcd_res);
mu_assert_int_eq(1234567, res);
mu_assert_int_eq(true, is_bcd_res);
uint8_t digits[5] = {0x98, 0x76, 0x54, 0x32, 0x10};
uint64_t expected = 9876543210;
res = bit_lib_bytes_to_num_bcd(digits, 5, &is_bcd_res);
mu_assert_mem_eq(&expected, &res, sizeof(expected));
mu_assert_int_eq(true, is_bcd_res);
res = bit_lib_bytes_to_num_bcd(src, 8, &is_bcd_res);
mu_assert_int_eq(false, is_bcd_res);
}
MU_TEST_SUITE(test_bit_lib) {
MU_RUN_TEST(test_bit_lib_increment_index);
MU_RUN_TEST(test_bit_lib_is_set);
@@ -457,6 +718,7 @@ MU_TEST_SUITE(test_bit_lib) {
MU_RUN_TEST(test_bit_lib_get_bits);
MU_RUN_TEST(test_bit_lib_get_bits_16);
MU_RUN_TEST(test_bit_lib_get_bits_32);
MU_RUN_TEST(test_bit_lib_get_bits_64);
MU_RUN_TEST(test_bit_lib_test_parity_u32);
MU_RUN_TEST(test_bit_lib_test_parity);
MU_RUN_TEST(test_bit_lib_remove_bit_every_nth);
@@ -465,9 +727,16 @@ MU_TEST_SUITE(test_bit_lib) {
MU_RUN_TEST(test_bit_lib_get_bit_count);
MU_RUN_TEST(test_bit_lib_reverse_16_fast);
MU_RUN_TEST(test_bit_lib_crc16);
MU_RUN_TEST(test_bit_lib_num_to_bytes_be);
MU_RUN_TEST(test_bit_lib_num_to_bytes_le);
MU_RUN_TEST(test_bit_lib_bytes_to_num_be);
MU_RUN_TEST(test_bit_lib_bytes_to_num_le);
MU_RUN_TEST(test_bit_lib_bytes_to_num_bcd);
}
int run_minunit_test_bit_lib() {
int run_minunit_test_bit_lib(void) {
MU_RUN_SUITE(test_bit_lib);
return MU_EXIT_CODE;
}
}
TEST_API_DEFINE(run_minunit_test_bit_lib)

View File

@@ -1,6 +1,6 @@
#include <furi.h>
#include <furi_hal.h>
#include "../minunit.h"
#include "../test.h"
#include <bt/bt_service/bt_keys_storage.h>
#include <storage/storage.h>
@@ -17,7 +17,7 @@ typedef struct {
BtTest* bt_test = NULL;
void bt_test_alloc() {
void bt_test_alloc(void) {
bt_test = malloc(sizeof(BtTest));
bt_test->storage = furi_record_open(RECORD_STORAGE);
bt_test->nvm_ram_buff_dut = malloc(BT_TEST_NVM_RAM_BUFF_SIZE);
@@ -27,7 +27,7 @@ void bt_test_alloc() {
bt_test->bt_keys_storage, bt_test->nvm_ram_buff_dut, BT_TEST_NVM_RAM_BUFF_SIZE);
}
void bt_test_free() {
void bt_test_free(void) {
furi_check(bt_test);
free(bt_test->nvm_ram_buff_ref);
free(bt_test->nvm_ram_buff_dut);
@@ -37,7 +37,7 @@ void bt_test_free() {
bt_test = NULL;
}
static void bt_test_keys_storage_profile() {
static void bt_test_keys_storage_profile(void) {
// Emulate nvm change on initial connection
const int nvm_change_size_on_connection = 88;
for(size_t i = 0; i < nvm_change_size_on_connection; i++) {
@@ -82,7 +82,7 @@ static void bt_test_keys_storage_profile() {
"Wrong buffer loaded");
}
static void bt_test_keys_remove_test_file() {
static void bt_test_keys_remove_test_file(void) {
mu_assert(
storage_simply_remove(bt_test->storage, BT_TEST_KEY_STORAGE_FILE_PATH),
"Can't remove test file");
@@ -104,7 +104,9 @@ MU_TEST_SUITE(test_bt) {
bt_test_free();
}
int run_minunit_test_bt() {
int run_minunit_test_bt(void) {
MU_RUN_SUITE(test_bt);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_bt)

View File

@@ -0,0 +1,42 @@
#include "../test.h"
#include "../minunit_vars.h"
#include <furi.h>
void minunit_print_progress(void) {
static const char progress[] = {'\\', '|', '/', '-'};
static uint8_t progress_counter = 0;
static uint32_t last_tick = 0;
uint32_t current_tick = furi_get_tick();
if(current_tick - last_tick > 20) {
last_tick = current_tick;
printf("[%c]\033[3D", progress[++progress_counter % COUNT_OF(progress)]);
fflush(stdout);
}
}
void minunit_print_fail(const char* str) {
printf(_FURI_LOG_CLR_E "%s\r\n" _FURI_LOG_CLR_RESET, str);
}
void minunit_printf_warning(const char* format, ...) {
FuriString* str = furi_string_alloc();
va_list args;
va_start(args, format);
furi_string_vprintf(str, format, args);
va_end(args);
printf(_FURI_LOG_CLR_W "%s\r\n" _FURI_LOG_CLR_RESET, furi_string_get_cstr(str));
furi_string_free(str);
}
int get_minunit_run(void) {
return minunit_run;
}
int get_minunit_assert(void) {
return minunit_assert;
}
int get_minunit_status(void) {
return minunit_status;
}

View File

@@ -0,0 +1,159 @@
#include "../test.h"
#include <toolbox/compress.h>
#include <furi.h>
#include <furi_hal.h>
#include <furi_hal_random.h>
#include <storage/storage.h>
#include <stdint.h>
#define COMPRESS_UNIT_TESTS_PATH(path) EXT_PATH("unit_tests/compress/" path)
static void compress_test_reference_comp_decomp() {
Storage* storage = furi_record_open(RECORD_STORAGE);
File* compressed_file = storage_file_alloc(storage);
File* decompressed_file = storage_file_alloc(storage);
mu_assert(
storage_file_open(
compressed_file,
COMPRESS_UNIT_TESTS_PATH("compressed.bin"),
FSAM_READ,
FSOM_OPEN_EXISTING),
"Failed to open compressed file");
mu_assert(
storage_file_open(
decompressed_file,
COMPRESS_UNIT_TESTS_PATH("uncompressed.bin"),
FSAM_READ,
FSOM_OPEN_EXISTING),
"Failed to open decompressed file");
uint64_t compressed_ref_size = storage_file_size(compressed_file);
uint64_t decompressed_ref_size = storage_file_size(decompressed_file);
mu_assert(compressed_ref_size > 0 && decompressed_ref_size > 0, "Invalid file sizes");
uint8_t* compressed_ref_buff = malloc(compressed_ref_size);
uint8_t* decompressed_ref_buff = malloc(decompressed_ref_size);
mu_assert(
storage_file_read(compressed_file, compressed_ref_buff, compressed_ref_size) ==
compressed_ref_size,
"Failed to read compressed file");
mu_assert(
storage_file_read(decompressed_file, decompressed_ref_buff, decompressed_ref_size) ==
decompressed_ref_size,
"Failed to read decompressed file");
storage_file_free(compressed_file);
storage_file_free(decompressed_file);
furi_record_close(RECORD_STORAGE);
uint8_t* temp_buffer = malloc(1024);
Compress* comp = compress_alloc(1024);
size_t encoded_size = 0;
mu_assert(
compress_encode(
comp, decompressed_ref_buff, decompressed_ref_size, temp_buffer, 1024, &encoded_size),
"Compress failed");
mu_assert(encoded_size == compressed_ref_size, "Encoded size is not equal to reference size");
mu_assert(
memcmp(temp_buffer, compressed_ref_buff, compressed_ref_size) == 0,
"Encoded buffer is not equal to reference");
size_t decoded_size = 0;
mu_assert(
compress_decode(
comp, compressed_ref_buff, compressed_ref_size, temp_buffer, 1024, &decoded_size),
"Decompress failed");
mu_assert(
decoded_size == decompressed_ref_size, "Decoded size is not equal to reference size");
mu_assert(
memcmp(temp_buffer, decompressed_ref_buff, decompressed_ref_size) == 0,
"Decoded buffer is not equal to reference");
compress_free(comp);
free(temp_buffer);
free(compressed_ref_buff);
free(decompressed_ref_buff);
}
static void compress_test_random_comp_decomp() {
static const size_t src_buffer_size = 1024;
static const size_t encoded_buffer_size = 1024;
static const size_t small_buffer_size = src_buffer_size / 32;
// We only fill half of the buffer with random data, so if anything goes wrong, there's no overflow
static const size_t src_data_size = src_buffer_size / 2;
Compress* comp = compress_alloc(src_buffer_size);
uint8_t* src_buff = malloc(src_buffer_size);
uint8_t* encoded_buff = malloc(encoded_buffer_size);
uint8_t* decoded_buff = malloc(src_buffer_size);
uint8_t* small_buff = malloc(small_buffer_size);
furi_hal_random_fill_buf(src_buff, src_data_size);
size_t encoded_size = 0;
mu_assert(
compress_encode(
comp, src_buff, src_data_size, encoded_buff, encoded_buffer_size, &encoded_size),
"Compress failed");
mu_assert(encoded_size > 0, "Encoded size is zero");
size_t small_enc_dec_size = 0;
mu_assert(
compress_encode(
comp, src_buff, src_data_size, small_buff, small_buffer_size, &small_enc_dec_size) ==
false,
"Compress to small buffer failed");
size_t decoded_size = 0;
mu_assert(
compress_decode(
comp, encoded_buff, encoded_size, decoded_buff, src_buffer_size, &decoded_size),
"Decompress failed");
mu_assert(decoded_size == src_data_size, "Decoded size is not equal to source size");
mu_assert(
memcmp(src_buff, decoded_buff, src_data_size) == 0,
"Decoded buffer is not equal to source");
mu_assert(
compress_decode(
comp, encoded_buff, encoded_size, small_buff, small_buffer_size, &small_enc_dec_size) ==
false,
"Decompress to small buffer failed");
free(small_buff);
free(src_buff);
free(encoded_buff);
free(decoded_buff);
compress_free(comp);
}
MU_TEST_SUITE(test_compress) {
MU_RUN_TEST(compress_test_random_comp_decomp);
MU_RUN_TEST(compress_test_reference_comp_decomp);
}
int run_minunit_test_compress(void) {
MU_RUN_SUITE(test_compress);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_compress)

View File

@@ -0,0 +1,193 @@
#include <furi.h>
#include "../test.h"
#include <datetime/datetime.h>
MU_TEST(test_datetime_validate_datetime_correct_min) {
DateTime correct_min = {0, 0, 0, 1, 1, 2000, 1};
bool result = datetime_validate_datetime(&correct_min);
mu_assert_int_eq(true, result);
}
MU_TEST(test_datetime_validate_datetime_correct_max) {
DateTime correct_max = {23, 59, 59, 31, 12, 2099, 7};
bool result = datetime_validate_datetime(&correct_max);
mu_assert_int_eq(true, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_second) {
DateTime incorrect_sec = {0, 0, 60, 1, 1, 2000, 1};
bool result = datetime_validate_datetime(&incorrect_sec);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_minute) {
DateTime incorrect_min = {0, 60, 0, 1, 1, 2000, 1};
bool result = datetime_validate_datetime(&incorrect_min);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_hour) {
DateTime incorrect_hour = {24, 0, 0, 1, 1, 2000, 1};
bool result = datetime_validate_datetime(&incorrect_hour);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_day_min) {
DateTime incorrect_day_min = {0, 0, 0, 0, 1, 2000, 1};
bool result = datetime_validate_datetime(&incorrect_day_min);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_day_max) {
DateTime incorrect_day_max = {0, 0, 0, 32, 1, 2000, 1};
bool result = datetime_validate_datetime(&incorrect_day_max);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_month_min) {
DateTime incorrect_month_min = {0, 0, 0, 1, 0, 2000, 1};
bool result = datetime_validate_datetime(&incorrect_month_min);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_month_max) {
DateTime incorrect_month_max = {0, 0, 0, 1, 13, 2000, 1};
bool result = datetime_validate_datetime(&incorrect_month_max);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_year_min) {
DateTime incorrect_year_min = {0, 0, 0, 1, 1, 1999, 1};
bool result = datetime_validate_datetime(&incorrect_year_min);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_year_max) {
DateTime incorrect_year_max = {0, 0, 0, 1, 1, 2100, 1};
bool result = datetime_validate_datetime(&incorrect_year_max);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_weekday_min) {
DateTime incorrect_weekday_min = {0, 0, 0, 1, 1, 2000, 0};
bool result = datetime_validate_datetime(&incorrect_weekday_min);
mu_assert_int_eq(false, result);
}
MU_TEST(test_datetime_validate_datetime_incorrect_weekday_max) {
DateTime incorrect_weekday_max = {0, 0, 0, 1, 1, 2000, 8};
bool result = datetime_validate_datetime(&incorrect_weekday_max);
mu_assert_int_eq(false, result);
}
MU_TEST_SUITE(test_datetime_validate_datetime) {
MU_RUN_TEST(test_datetime_validate_datetime_correct_min);
MU_RUN_TEST(test_datetime_validate_datetime_correct_max);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_second);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_minute);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_hour);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_day_min);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_day_max);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_month_min);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_month_max);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_year_min);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_year_max);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_weekday_min);
MU_RUN_TEST(test_datetime_validate_datetime_incorrect_weekday_max);
}
MU_TEST(test_datetime_timestamp_to_datetime_min) {
uint32_t test_value = 0;
DateTime min_datetime_expected = {0, 0, 0, 1, 1, 1970, 4};
DateTime result = {0};
datetime_timestamp_to_datetime(test_value, &result);
mu_assert_mem_eq(&min_datetime_expected, &result, sizeof(result));
}
MU_TEST(test_datetime_timestamp_to_datetime_max) {
uint32_t test_value = UINT32_MAX;
DateTime max_datetime_expected = {6, 28, 15, 7, 2, 2106, 7};
DateTime result = {0};
datetime_timestamp_to_datetime(test_value, &result);
mu_assert_mem_eq(&max_datetime_expected, &result, sizeof(result));
}
MU_TEST(test_datetime_timestamp_to_datetime_to_timestamp) {
uint32_t test_value = random();
DateTime datetime = {0};
datetime_timestamp_to_datetime(test_value, &datetime);
uint32_t result = datetime_datetime_to_timestamp(&datetime);
mu_assert_int_eq(test_value, result);
}
MU_TEST(test_datetime_timestamp_to_datetime_weekday) {
uint32_t test_value = 1709748421; // Wed Mar 06 18:07:01 2024 UTC
DateTime datetime = {0};
datetime_timestamp_to_datetime(test_value, &datetime);
mu_assert_int_eq(datetime.hour, 18);
mu_assert_int_eq(datetime.minute, 7);
mu_assert_int_eq(datetime.second, 1);
mu_assert_int_eq(datetime.day, 6);
mu_assert_int_eq(datetime.month, 3);
mu_assert_int_eq(datetime.weekday, 3);
mu_assert_int_eq(datetime.year, 2024);
}
MU_TEST_SUITE(test_datetime_timestamp_to_datetime_suite) {
MU_RUN_TEST(test_datetime_timestamp_to_datetime_min);
MU_RUN_TEST(test_datetime_timestamp_to_datetime_max);
MU_RUN_TEST(test_datetime_timestamp_to_datetime_to_timestamp);
MU_RUN_TEST(test_datetime_timestamp_to_datetime_weekday);
}
MU_TEST(test_datetime_datetime_to_timestamp_min) {
DateTime min_datetime = {0, 0, 0, 1, 1, 1970, 0};
uint32_t result = datetime_datetime_to_timestamp(&min_datetime);
mu_assert_int_eq(0, result);
}
MU_TEST(test_datetime_datetime_to_timestamp_max) {
DateTime max_datetime = {6, 28, 15, 7, 2, 2106, 0};
uint32_t result = datetime_datetime_to_timestamp(&max_datetime);
mu_assert_int_eq(UINT32_MAX, result);
}
MU_TEST_SUITE(test_datetime_datetime_to_timestamp_suite) {
MU_RUN_TEST(test_datetime_datetime_to_timestamp_min);
MU_RUN_TEST(test_datetime_datetime_to_timestamp_max);
}
int run_minunit_test_datetime(void) {
MU_RUN_SUITE(test_datetime_timestamp_to_datetime_suite);
MU_RUN_SUITE(test_datetime_datetime_to_timestamp_suite);
MU_RUN_SUITE(test_datetime_validate_datetime);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_datetime)

View File

@@ -1,6 +1,6 @@
#include <dialogs/dialogs.h>
#include "../minunit.h"
#include "../test.h"
MU_TEST(test_dialog_file_browser_set_basic_options_should_init_all_fields) {
mu_assert(
@@ -25,8 +25,10 @@ MU_TEST_SUITE(dialogs_file_browser_options) {
MU_RUN_TEST(test_dialog_file_browser_set_basic_options_should_init_all_fields);
}
int run_minunit_test_dialogs_file_browser_options() {
int run_minunit_test_dialogs_file_browser_options(void) {
MU_RUN_SUITE(dialogs_file_browser_options);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_dialogs_file_browser_options)

View File

@@ -1,4 +1,4 @@
#include "../minunit.h"
#include "../test.h"
#include <furi.h>
#include <m-dict.h>
#include <toolbox/dir_walk.h>
@@ -139,7 +139,7 @@ static bool write_file_13DA(Storage* storage, const char* path) {
File* file = storage_file_alloc(storage);
bool result = false;
if(storage_file_open(file, path, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
result = storage_file_write(file, "13DA", 4) == 4;
result = (storage_file_write(file, "13DA", 4) == 4);
}
storage_file_close(file);
storage_file_free(file);
@@ -266,7 +266,9 @@ MU_TEST_SUITE(test_dirwalk_suite) {
furi_record_close(RECORD_STORAGE);
}
int run_minunit_test_dirwalk() {
int run_minunit_test_dirwalk(void) {
MU_RUN_SUITE(test_dirwalk_suite);
return MU_EXIT_CODE;
}
}
TEST_API_DEFINE(run_minunit_test_dirwalk)

View File

@@ -0,0 +1,202 @@
#include "../test.h"
#include <furi.h>
#include <furi_hal_random.h>
#include <expansion/expansion_protocol.h>
#define EXPANSION_TEST_GARBAGE_MAGIC (0xB19AF)
#define EXPANSION_TEST_GARBAGE_BUF_SIZE (0x100U)
#define EXPANSION_TEST_GARBAGE_ITERATIONS (100U)
MU_TEST(test_expansion_encoded_size) {
ExpansionFrame frame = {};
frame.header.type = ExpansionFrameTypeHeartbeat;
mu_assert_int_eq(1, expansion_frame_get_encoded_size(&frame));
frame.header.type = ExpansionFrameTypeStatus;
mu_assert_int_eq(2, expansion_frame_get_encoded_size(&frame));
frame.header.type = ExpansionFrameTypeBaudRate;
mu_assert_int_eq(5, expansion_frame_get_encoded_size(&frame));
frame.header.type = ExpansionFrameTypeControl;
mu_assert_int_eq(2, expansion_frame_get_encoded_size(&frame));
frame.header.type = ExpansionFrameTypeData;
for(size_t i = 0; i <= EXPANSION_PROTOCOL_MAX_DATA_SIZE; ++i) {
frame.content.data.size = i;
mu_assert_int_eq(i + 2, expansion_frame_get_encoded_size(&frame));
}
}
MU_TEST(test_expansion_remaining_size) {
ExpansionFrame frame = {};
size_t remaining_size;
mu_check(expansion_frame_get_remaining_size(&frame, 0, &remaining_size));
mu_assert_int_eq(1, remaining_size);
frame.header.type = ExpansionFrameTypeHeartbeat;
mu_check(expansion_frame_get_remaining_size(&frame, 0, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 1, &remaining_size));
mu_assert_int_eq(0, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 100, &remaining_size));
mu_assert_int_eq(0, remaining_size);
frame.header.type = ExpansionFrameTypeStatus;
mu_check(expansion_frame_get_remaining_size(&frame, 0, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 1, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 2, &remaining_size));
mu_assert_int_eq(0, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 100, &remaining_size));
mu_assert_int_eq(0, remaining_size);
frame.header.type = ExpansionFrameTypeBaudRate;
mu_check(expansion_frame_get_remaining_size(&frame, 0, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 1, &remaining_size));
mu_assert_int_eq(4, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 5, &remaining_size));
mu_assert_int_eq(0, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 100, &remaining_size));
mu_assert_int_eq(0, remaining_size);
frame.header.type = ExpansionFrameTypeControl;
mu_check(expansion_frame_get_remaining_size(&frame, 0, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 1, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 2, &remaining_size));
mu_assert_int_eq(0, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 100, &remaining_size));
mu_assert_int_eq(0, remaining_size);
frame.header.type = ExpansionFrameTypeData;
frame.content.data.size = EXPANSION_PROTOCOL_MAX_DATA_SIZE;
mu_check(expansion_frame_get_remaining_size(&frame, 0, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 1, &remaining_size));
mu_assert_int_eq(1, remaining_size);
mu_check(expansion_frame_get_remaining_size(&frame, 2, &remaining_size));
mu_assert_int_eq(EXPANSION_PROTOCOL_MAX_DATA_SIZE, remaining_size);
for(size_t i = 0; i <= EXPANSION_PROTOCOL_MAX_DATA_SIZE; ++i) {
mu_check(expansion_frame_get_remaining_size(&frame, i + 2, &remaining_size));
mu_assert_int_eq(EXPANSION_PROTOCOL_MAX_DATA_SIZE - i, remaining_size);
}
mu_check(expansion_frame_get_remaining_size(&frame, 100, &remaining_size));
mu_assert_int_eq(0, remaining_size);
}
typedef struct {
void* data_out;
size_t size_available;
size_t size_sent;
} TestExpansionSendStream;
static size_t test_expansion_send_callback(const uint8_t* data, size_t data_size, void* context) {
TestExpansionSendStream* stream = context;
const size_t size_sent = MIN(data_size, stream->size_available);
memcpy(stream->data_out + stream->size_sent, data, size_sent);
stream->size_available -= size_sent;
stream->size_sent += size_sent;
return size_sent;
}
typedef struct {
const void* data_in;
size_t size_available;
size_t size_received;
} TestExpansionReceiveStream;
static size_t test_expansion_receive_callback(uint8_t* data, size_t data_size, void* context) {
TestExpansionReceiveStream* stream = context;
const size_t size_received = MIN(data_size, stream->size_available);
memcpy(data, stream->data_in + stream->size_received, size_received);
stream->size_available -= size_received;
stream->size_received += size_received;
return size_received;
}
MU_TEST(test_expansion_encode_decode_frame) {
const ExpansionFrame frame_in = {
.header.type = ExpansionFrameTypeData,
.content.data.size = 8,
.content.data.bytes = {0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed, 0xca, 0xfe},
};
uint8_t encoded_data[sizeof(ExpansionFrame) + sizeof(ExpansionFrameChecksum)];
memset(encoded_data, 0, sizeof(encoded_data));
TestExpansionSendStream send_stream = {
.data_out = &encoded_data,
.size_available = sizeof(encoded_data),
.size_sent = 0,
};
const size_t encoded_size = expansion_frame_get_encoded_size(&frame_in);
mu_assert_int_eq(
expansion_protocol_encode(&frame_in, test_expansion_send_callback, &send_stream),
ExpansionProtocolStatusOk);
mu_assert_int_eq(encoded_size + sizeof(ExpansionFrameChecksum), send_stream.size_sent);
mu_assert_int_eq(
expansion_protocol_get_checksum((const uint8_t*)&frame_in, encoded_size),
encoded_data[encoded_size]);
mu_assert_mem_eq(&frame_in, &encoded_data, encoded_size);
TestExpansionReceiveStream stream = {
.data_in = encoded_data,
.size_available = send_stream.size_sent,
.size_received = 0,
};
ExpansionFrame frame_out;
mu_assert_int_eq(
expansion_protocol_decode(&frame_out, test_expansion_receive_callback, &stream),
ExpansionProtocolStatusOk);
mu_assert_int_eq(encoded_size + sizeof(ExpansionFrameChecksum), stream.size_received);
mu_assert_mem_eq(&frame_in, &frame_out, encoded_size);
}
MU_TEST(test_expansion_garbage_input) {
uint8_t garbage_data[EXPANSION_TEST_GARBAGE_BUF_SIZE];
for(uint32_t i = 0; i < EXPANSION_TEST_GARBAGE_ITERATIONS; ++i) {
furi_hal_random_fill_buf(garbage_data, sizeof(garbage_data));
size_t remaining_size = EXPANSION_TEST_GARBAGE_MAGIC;
if(expansion_frame_get_remaining_size(
(ExpansionFrame*)garbage_data, sizeof(garbage_data), &remaining_size)) {
// If by chance the garbage data is a valid frame, then the result
// must be 0 because the amount of data provided is more than enough
mu_assert_int_eq(0, remaining_size);
} else {
// If the frame is invalid, the remaining_size parameter should be untouched
mu_assert_int_eq(EXPANSION_TEST_GARBAGE_MAGIC, remaining_size);
}
}
}
MU_TEST_SUITE(test_expansion_suite) {
MU_RUN_TEST(test_expansion_encoded_size);
MU_RUN_TEST(test_expansion_remaining_size);
MU_RUN_TEST(test_expansion_encode_decode_frame);
MU_RUN_TEST(test_expansion_garbage_input);
}
int run_minunit_test_expansion(void) {
MU_RUN_SUITE(test_expansion_suite);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_expansion)

View File

@@ -2,7 +2,7 @@
#include <flipper_format/flipper_format.h>
#include <flipper_format/flipper_format_i.h>
#include <toolbox/stream/stream.h>
#include "../minunit.h"
#include "../test.h"
#define TEST_DIR TEST_DIR_NAME "/"
#define TEST_DIR_NAME EXT_PATH("unit_tests_tmp")
@@ -103,14 +103,14 @@ static bool storage_write_string(const char* path, const char* data) {
return result;
}
static void tests_setup() {
static void tests_setup(void) {
Storage* storage = furi_record_open(RECORD_STORAGE);
mu_assert(storage_simply_remove_recursive(storage, TEST_DIR_NAME), "Cannot clean data");
mu_assert(storage_simply_mkdir(storage, TEST_DIR_NAME), "Cannot create dir");
furi_record_close(RECORD_STORAGE);
}
static void tests_teardown() {
static void tests_teardown(void) {
Storage* storage = furi_record_open(RECORD_STORAGE);
mu_assert(storage_simply_remove_recursive(storage, TEST_DIR_NAME), "Cannot clean data");
furi_record_close(RECORD_STORAGE);
@@ -545,7 +545,9 @@ MU_TEST_SUITE(flipper_format) {
tests_teardown();
}
int run_minunit_test_flipper_format() {
int run_minunit_test_flipper_format(void) {
MU_RUN_SUITE(flipper_format);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_flipper_format)

View File

@@ -3,7 +3,7 @@
#include <flipper_format/flipper_format_i.h>
#include <toolbox/stream/stream.h>
#include <storage/storage.h>
#include "../minunit.h"
#include "../test.h"
static const char* test_filetype = "Flipper Format test";
static const uint32_t test_version = 666;
@@ -331,7 +331,9 @@ MU_TEST_SUITE(flipper_format_string_suite) {
MU_RUN_TEST(flipper_format_file_test);
}
int run_minunit_test_flipper_format_string() {
int run_minunit_test_flipper_format_string(void) {
MU_RUN_SUITE(flipper_format_string_suite);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_flipper_format_string)

View File

@@ -1,7 +1,7 @@
#include <float.h>
#include <float_tools.h>
#include "../minunit.h"
#include "../test.h"
MU_TEST(float_tools_equal_test) {
mu_check(float_is_equal(FLT_MAX, FLT_MAX));
@@ -54,7 +54,9 @@ MU_TEST_SUITE(float_tools_suite) {
MU_RUN_TEST(float_tools_equal_test);
}
int run_minunit_test_float_tools() {
int run_minunit_test_float_tools(void) {
MU_RUN_SUITE(float_tools_suite);
return MU_EXIT_CODE;
}
TEST_API_DEFINE(run_minunit_test_float_tools)

View File

@@ -1,9 +1,10 @@
#include "../minunit.h"
#include "../test.h"
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
void test_furi_memmgr() {
void test_furi_memmgr(void) {
void* ptr;
// allocate memory case

View File

@@ -1,7 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <furi.h>
#include "../minunit.h"
#include "../test.h"
const uint32_t context_value = 0xdeadbeef;
const uint32_t notify_value_0 = 0x12345678;
@@ -15,7 +15,7 @@ void test_pubsub_handler(const void* arg, void* ctx) {
pubsub_context_value = *(uint32_t*)ctx;
}
void test_furi_pubsub() {
void test_furi_pubsub(void) {
FuriPubSub* test_pubsub = NULL;
FuriPubSubSubscription* test_pubsub_subscription = NULL;

View File

@@ -0,0 +1,31 @@
#include <stdio.h>
#include <string.h>
#include <furi.h>
#include "../test.h"
#define TEST_RECORD_NAME "test/holding"
void test_furi_create_open(void) {
// Test that record does not exist
mu_check(furi_record_exists(TEST_RECORD_NAME) == false);
// Create record
uint8_t test_data = 0;
furi_record_create(TEST_RECORD_NAME, (void*)&test_data);
// Test that record exists
mu_check(furi_record_exists(TEST_RECORD_NAME) == true);
// Open it
void* record = furi_record_open(TEST_RECORD_NAME);
mu_assert_pointers_eq(record, &test_data);
// Close it
furi_record_close(TEST_RECORD_NAME);
// Clean up
furi_record_destroy(TEST_RECORD_NAME);
// Test that record does not exist
mu_check(furi_record_exists(TEST_RECORD_NAME) == false);
}

Some files were not shown because too many files have changed in this diff Show More