Commit graph

1486 commits

Author SHA1 Message Date
あく
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
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
WillyJL
de4b086083
Fix calling both view_free_model() and view_free() (#3655) 2024-05-18 19:40:01 +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
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
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
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
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
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
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
あく
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
あく
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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