Commit Graph

1034 Commits

Author SHA1 Message Date
MX
741ad34b2c
WS: Oregon2 - add support for temp sensor RTHN129 (#2088)
Co-authored-by: あく <alleteam@gmail.com>
2022-12-07 22:28:18 +09:00
0xchocolate
e42dda7cfb
UART echo: fix race conditions causing null pointer dereference (#2092)
Co-authored-by: 0xchocolate <0xchocolate@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-12-07 20:46:50 +09:00
gornekich
9a21dae29c
[FL-3008], [FL-2734], [FL-2766], [FL-2898] NFC bug fixes (#2098)
* nfc: rework mf classic update
* nfc: rename cache folder to .cache
* nfc: fix ATQA order bytes in nfc files
* file browser: add hide dot files option
* nfc: fix iso-14443-4 uid cards emulation
* nfc: fix unit tests

Co-authored-by: あく <alleteam@gmail.com>
2022-12-07 19:52:44 +09:00
あく
c43ec414bb
FuriHal: add i2c unit tests (#2089)
* FuriHal: add i2c unit tests
* FuriHal: restructure unit tests

Co-authored-by: Sergey Gavrilov <who.just.the.doctor@gmail.com>
2022-12-07 19:43:40 +09:00
gornekich
e40376bc63
NFC: fix NTAG203 info scene #2078 2022-12-02 21:41:34 +09:00
Skorpionm
2a6a3a1bf7
[FL-2955], [FL-2953] SubGhz: fix RAW "Send never ends" (#1979)
* SubGhz: fix RAW "Send never ends"
* SubGhz: delete comments
* SubGhz: RAW file parsing speed increase
* SubGhz: fix level_duration_is_wait
* SubGhz: modification furi_hal_subghz_async_tx_refill
* SubGhz: furi_hal_subghz_stop_async_rx
* SubGhz: hal unit test and better async tx yield handling
* FuriHal: proper async tx end in subghz, vibro on power off
* FuriHal: variable naming in subghz
* SubGhz,FuriHal: extreme timings in subghz hal unit tests, remove memset in async tx buffer fill routine
* FuriHal: small refinements in subghz

Co-authored-by: あく <alleteam@gmail.com>
2022-11-30 20:41:23 +09:00
Никита Тимофеев
b70395eba9
Allow "Detect reader" for unsaved card (#2045)
* Allow "Detect reader" for unsaved card
* Add missed detect reader deed

Co-authored-by: あく <alleteam@gmail.com>
2022-11-29 22:10:02 +09:00
Sergey Gavrilov
297f185ef4
Blocking USB driver API (#2009)
* invalidate memmgt thread dict
* Core: rollback memmgt thread dict invalidation
* Dialogs: move api lock to toolbox
* HAL: blocking usb API
* HAL usb: fix api return data
* HAL usb: api optimization
* api lock: test results
* Fix build errors
* DAP Link: fix imports
* Crash when malloc in ISR
* Fix dap-link copypaste error
* Moar memory management crashes.
* Crash when malloc in IRQ, not ISR
* USB-UART: Blocking VCP mode switch

Co-authored-by: nminaylov <nm29719@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-11-29 21:50:55 +09:00
Georgii Surkov
0261dc3075
[FL-2957] Unified Info API, App Error, Data Xchange (#1998)
* Update protobuf definitions
* Add Property subsystem entry point function
* Key-based system info and power info function stubs
* Remove unneeded functions
* Working power info
* Working system info
* Replace #defines with string literals
* Remove unneeded field
* Simplify system info formatting
* Refactor output callback handling
* Handle the last info element correctly
* Optimise power info, rename methods
* Add comments
* Add power debug
* Remove unneeded definitions
* Rename some files and functions
* Update protobuf definitions
* Implement App GetError and DataExchange APIs
* Send GetErrorReply with correct command_id
* Add RPC debug app stub
* Add more scenes
* Add warning, increase stack size
* Add receive data exchange scene
* Improve data exchange
* Add notifications
* Update application requirements
* Bump format version for property-based infos
* Correctly reset error text
* RCP: sync protobuf repo to latest release tag

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-11-29 18:08:08 +09:00
Georgii Surkov
849afc8798
[FL-2998] IR TV Universal Remote refactor and docs (#2052)
* Rename signals for IR TV universal remote
* Update UniversalRemotes.md

Co-authored-by: あく <alleteam@gmail.com>
2022-11-29 04:49:51 +09:00
MX
97e8da7a7b
Weather Station: Add protocol - Auriol HG0601A (#2056)
* Add protocol Auriol hg0601a: Made by @LY2NEO
* Improve readability of code: fix protocol name

Co-authored-by: あく <alleteam@gmail.com>
2022-11-29 04:08:28 +09:00
あく
769c53b6da
[FL-2977] Gui: better navigation in file browser dialog (#2014)
* Gui: proper navigation in file browser dialog
* Trim file name from start path
* File list loading fix
* File list offset fix

Co-authored-by: nminaylov <nm29719@gmail.com>
Co-authored-by: Sergey Gavrilov <who.just.the.doctor@gmail.com>
2022-11-29 03:59:24 +09:00
Yukai Li
6b47bc1af4
Nfc: NTAG password auto capture (and other password-related changes) (#1843)
* nfc: MFUL minor cleanup
* nfc: Add mechanism to pass event data
* nfc: Add NTAG authentication event to emulation
* nfc: Rename enum member to align with existing convention
* nfc: Add function to determine whether MFUL is fully captured
* nfc: Fix emulation of incompletely-read password-protected MFUL
* nfc: Add reader password capture scene
* nfc: Set default MFUL password input to 0xFFFFFFFF
* nfc: Fix MFUL auth counter loading
* nfc: Be explicit about using manual auth method when using auto unlock
* nfc: Fill in MFUL has_auth when loading file
* nfc: Fix MFUL auth success usage, remove unused variable
* nfc: Display PWD and PACK in MFUL info if available
* nfc: Remove unnecessary include
* nfc: Add unlock options to loaded MFUL menu
* nfc: Move set default MFUL password. This way it can be edited if needed instead of reentered
* nfc: Fix unlock menu not maintaining selection index
* nfc: Move captured MFUL auth data from worker to device data
* nfc: Attempt to authenticate with default PWD when possible when reading NTAG
* nfc: Don't try to auth NTAG on read if we already authed
* nfc: Add title for all pages read but failed auth for NTAG auth
* nfc: Add faster auth callback patch
* lib: Remove scons submodule from index
* nfc: Revise MFUL unlock UI flow
* nfc: Disallow MFUL unlock with reader if card not read yet. Trying to read first results in either needing to make a new scene or badly jury rigging other scenes, so let's just not do that
* f7: Bump API symbols
* Format code

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-11-29 03:16:22 +09:00
Stephen Kent
a82c3ccc22
NFC: Fix MIFARE DESfire info action to open app menu (#2058)
When examining a MIFARE DESfire card, selecting "More >" currently leads
to the file menu for a single application even if the scanned card
contains multiple applications.

On examining the source code, a MIFARE DESfire application selection
menu is present as `NfcSceneMfDesfireData`. This change updates the
MIFARE DESfire Info "More >" action to open the application selection
menu. That menu may then be used to open the file selection menu for any
application in the read MIFARE DESfire card data.

Tested interactively with
c4cbdcd947/nfc/Desfire.nfc

Co-authored-by: あく <alleteam@gmail.com>
2022-11-29 02:05:24 +09:00
Maksim Derbasov
e121e6a287
Fix for spelling (#2051)
* Fix for spelling
* Review iteration

Co-authored-by: あく <alleteam@gmail.com>
2022-11-29 01:51:51 +09:00
Smooklu
03140e4349
Bluetooth Remote to HID Remote (#2039)
* WIP BT + USB Hid
* Refactoring Submenus/Views
* Changed to bool instead of enum
* Revamp finished
* Removed usb_keyboard
* Renaming device_types that can do USB+BT
* Removed error view
* Renaming folder structure and file names
* Fixed views.h
* Fixed hid.h
* Fixed hid_mouse.c
* Fixed a accidetnal renaming
* Apps: add missing view remove call in hid app destructor
* Hid app: hal abstraction, split into bluetooth and usb remotes. Fbt: customizable icon symbol name.
* Hid app: update usb remote icon
* Hid: single status change routine
* HID App: final touches
* HID App: rename BtHidTikTok to HidTikTok, format sources
* HID App: fix comma in keyboard

Co-authored-by: あく <alleteam@gmail.com>
2022-11-29 01:27:16 +09:00
Nikolay Minaylov
ffa6249b64
[FL-2985] Fix U2F HID vulnerability #2042
Co-authored-by: あく <alleteam@gmail.com>
2022-11-24 03:12:53 +09:00
Skorpionm
9bb0dbaa3e
SubGhz: frequency analyzer. 2dbi desensitization, rssi averaging to reduce jitter, new rssi indicators in log_mode, GUI fix (#2020)
Co-authored-by: あく <alleteam@gmail.com>
2022-11-23 22:31:39 +09:00
Kyhwana Pardus
1c8451fad4
Fix typos in subghz_cli.c (#2030)
Fix up the "receive" typos

Co-authored-by: あく <alleteam@gmail.com>
2022-11-23 22:23:11 +09:00
MangoTornado
669822cdd2
Fix typos in various outputs (#2032)
* Fix typos in various outputs
* Update u2f_view.c

Co-authored-by: あく <alleteam@gmail.com>
2022-11-23 22:15:08 +09:00
Sergey Gavrilov
c511c67e71
Core: thread allocation shortcut (#2007)
* Core: thread alloc+set shortcut
* Apps: use thread allocation shortcut
* Mark some service threads as services
* Init BT as soon as possible

Co-authored-by: あく <alleteam@gmail.com>
2022-11-23 21:49:17 +09:00
Skorpionm
b9c483fbf8
[FL-2975] WS: add protocol GT-WT02 (#2001)
* WS: add protocol GT-WT02
* WS: fix text "About" scene

Co-authored-by: あく <alleteam@gmail.com>
2022-11-23 18:44:49 +09:00
Skorpionm
00fcd9cfcd
[FL-2976] SubGhz: add protocol "Ansonic" (#2000)
* SubGhz: add protocol "Ansonic"
* SubGhz: fix encoder "Ansonic"
* SubGhz: add unit_test "Ansonic"
* SubGhz: fix flag
* SubGhz: protocol "Ansonic" fix timing

Co-authored-by: あく <alleteam@gmail.com>
2022-11-23 18:29:30 +09:00
Nikolay Minaylov
73441af9c6
BadUSB and Archive fixes (#2005)
* BsdUsb: fix empty lines handling
* Archive: folders and unknown files rename fix

Co-authored-by: あく <alleteam@gmail.com>
2022-11-12 20:55:42 +09:00
MX
3c7a4eeaed
iButton: Fix header "Saved!" message stays on other screens (#2003)
* iButton: Fix header "Saved!" message stays on other screens
* SubGhz,iButton: proper popup reset

Co-authored-by: あく <alleteam@gmail.com>
2022-11-12 18:45:19 +09:00
あく
90cefe7c71
[FL-2975] Bug fixes and improvements: Furi, Input, Cli (#2004)
* Furi: configurable heap allocation tracking
* Furi: relax restriction in thread heap setter asserts, apply heap tracking setting on app start instead of thread allocation
* Furi: hide dangerous heap tracking levels in release build
* Input: fix non-working debounce
2022-11-12 12:46:04 +04:00
Skorpionm
721ab717d7
[FL-2961] SubGhz: properly handle storage loss (#1990)
Co-authored-by: あく <alleteam@gmail.com>
2022-11-11 02:14:44 +09:00
Astra
e7c4b40dbe
Force card types in extra actions (#1961)
* Mifare Classic forced read
* Add all the needed card types
* nfc: remove unused scene
* nfc: remove unused worker state
* nfc: fix read card type scene state usage
* nfc: move NfcReadMode to NfcDevData struct
* nfc: fix bank card reading and scene navigation
* nfc magic: fix magic deactifate function

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-11-11 01:29:57 +09:00
Astra
820afd2aec
NFC Unit tests part 1.1 (#1927)
* Mifare Classic 1/4K, 4/7b uid, NFC-A: NFC-A is not complete yet, as there are no 4b uid tests. Also, Mifare Classic tests don't cover the key cache yet.
* NFC unit tests require access to the NFC app
* Made nfc_device_save accept full path as an argument
* Move from cstrs to furi strings and fix logic
* nfc tests: fix memory leak
* nfc: add mf_classic_get_total_blocks() to API
* nfc tests: simplify nfc tests
* nfc: fix memory leak in shadow file saving
* nfc: fix set uid scene
* nfc: fix saving files
* nfc: fix preload nfc file path
* nfc: remove comments

Co-authored-by: Sergey Gavrilov <who.just.the.doctor@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2022-11-11 01:20:35 +09:00
あく
f94e8f4ac8
Rpc: increase stack size, fix stack overflow (#1997) 2022-11-10 23:56:08 +10:00
あく
c89e5e11a4
Furi: show thread allocation balance for child threads (#1992) 2022-11-09 21:33:09 +04:00
Samuel Stauffer
328d049b6a
Add Acurite 609TXC protocol to weather station (#1987)
Co-authored-by: あく <alleteam@gmail.com>
2022-11-09 02:07:55 +09:00
Sergey Gavrilov
4d11213494
DAP-Link: show error if usb is locked (#1982) 2022-11-08 01:15:58 +09:00
Samuel Stauffer
aa2ecbe80f
infrared: add Kaseikyo IR protocol (#1965)
* infrared: add Kaseikyo IR protocol

Add Kaseikyo IR protocol support. This protocol is also called the Panasonic protocol and is used by a number of manufacturers including Denon.

The protocol includes a vendor field and a number of fields that are vendor specific. To support the format of address+command used by flipper the vendor+genre1+genre2+id fields are encoded into the address while the data is used for the command.

There are older versions of the protocol that used a reverse bit order that are not supported.

Protocol information:
- https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/ir_Kaseikyo.hpp
- http://www.hifi-remote.com/johnsfine/DecodeIR.html#Kaseikyo
- https://www.denon.com/-/media/files/documentmaster/denonna/avr-x3700h_avc-x3700h_ir_code_v01_04062020.doc

* Format and add unit test to Kaseikyo IR codec.

Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
2022-11-07 18:38:04 +04:00
Skorpionm
65005e71d2
WS: fix show negative temperature (#1980) 2022-11-07 02:30:02 +09:00
あく
e8913f2e33
Code cleanup: srand, PVS warnings (#1974)
* Remove srand invocation

* PVS High priority fixes

* PVS High errors part 2

* Furi: heap tracing inheritance

* Furi add __builtin_unreachable to furi_thread_catch
2022-11-05 18:07:24 +03:00
hedger
04e50c9f89
fbt: fixes for ufbt pt3 (#1970)
* fbt: replaced debug dir paths with FBT_DEBUG_DIR
* scripts: updated requirements.txt
* fbt: fixed wrong import
* fbt: removed delayed import for file2image
* fbt: added UPDATE_BUNDLE_DIR internal var
* fbt: cleaner internal management of extapps
* applications: added fap_libs for core apps to link with resources when building with --extra-ext-apps
* fbt: removed deprecation stub for faps
* fbt: added quotation for icons build cmd
* fbt: reworked BUILD_DIR & fap work dir handling; fap debug: using debug elf path from fbt
* fbt: explicit LIB_DIST_DIR
2022-11-05 20:47:59 +09:00
gornekich
bf8fd71c00
NFC magic cards support (#1966)
* nfc magic: introduce nfc app to work with magic cards
* nfc: add nfc device functions to API
* nfc magic: add bacis scenes
* nfc magic: add wrong card and write confirm scenes
* nfc magic: introduce magic lib
* nfc magic: write magic lib
* nfc magic: add write commands to magic lib
* nfc magic: work on worker
* furi_hal_nfc: add bits data exchage method to API
* nfc magic: rework with new API
* nfc magic: add check and wipe scenes
* nfc magic: add icons, gui fixes
* nfc: format python src

Co-authored-by: あく <alleteam@gmail.com>
2022-11-04 16:01:44 +09:00
Sergey Monchenko
3bd74b7f01
SubGhz: fix incorrect response in rpc mode. Code cleanup. (#1964)
* Code cleanup
* SubGhz: correct logic in RPC
* SubGhz: do not blink on app rpc fail

Co-authored-by: あく <alleteam@gmail.com>
2022-11-04 15:08:51 +09:00
あく
d68ac50efd
Storage: tree timestamps (#1971)
* Storage: tree timestamps
* Rpc: add storage timestamp
* Storage: correct timestamp owner
* Storage: update timestamp at sd mount

Co-authored-by: SG <who.just.the.doctor@gmail.com>
2022-11-04 15:26:04 +10:00
Alexandre Díaz
60d125e72a
subghz: add analyzer frequency logs (#1914)
* subghz: add analyzer frequency logs
* SubGhz: switch to change on short press
* SubGhz: use full RSSI bar for history view

Co-authored-by: あく <alleteam@gmail.com>
2022-11-03 16:57:56 +09:00
head47
eee90c6c40
Run Bad USB immediately after connection (#1955)
Co-authored-by: あく <alleteam@gmail.com>
2022-11-03 14:21:44 +09:00
Nikolay Minaylov
95182b266c
BadUSB scrolllock typo fix (#1968)
Co-authored-by: あく <alleteam@gmail.com>
2022-11-03 13:42:54 +09:00
Skorpionm
0652830c51
[FL-2940] WS: add protocol Ambient_Weather (#1960)
* WS: add protocol Ambient_Weather
* WS: fix link
* WS: removing unused code

Co-authored-by: あく <alleteam@gmail.com>
2022-11-03 01:24:07 +09:00
Georgii Surkov
c417d467f7
Handle storage full error (#1958)
Co-authored-by: あく <alleteam@gmail.com>
2022-11-03 01:13:06 +09:00
hedger
ebc2b66372
fbt fixes for mfbt pt2 (#1951)
* fbt: split sdk management code
* scripts: fixed import handling
* fbt: sdk: reformatted paths
* scrips: dist: bundling libs as a build artifact
* fbt: sdk: better path management
* typo fix
* fbt: sdk: minor path handling fixes
* toolchain: fixed windows toolchain download
* fbt: minor refactorin
* fbt: moved sdk management code to extapps.scons
* fbt: fixed sdk symbols header path; disabled -fstack-usage
* fbt: changed pathing for .py scripts
* fbt: changed SDK_HEADERS pathing; added libusb to SDK; added icon_i.h to SDK; added hw target to SDK meta
* fbt: added libusb headers to SDK
* picopass: include cleanup; api: added subghz/registry.h; api: added mbedtls to exported headers
* picopass: fixed formatting
* fbt: fixed COPRO_ASSETS_SCRIPT
* sdk: added basic infrared apis
* toolchain: added ufbt to list of legal fbtenv callers; updated error messages
* fbt: changed manifest collection & icon processing code
* fbt: simpler srcdir lookup
* toolchain: path management fixes; fbt: fixes for fap private libs paths
* scripts: toolchain: reworked download on Windows
* toolchain: v17
* scripts: added colorlog for logging
* Github: fix unit tests

Co-authored-by: あく <alleteam@gmail.com>
2022-11-03 00:15:40 +09:00
Vasyl "vk" Kaigorodov
abfa804ae0
Gui: refactor buttons remapping (#1949)
* Gui: refactor buttons remapping
  Instead of calling 3 separate functions with a ton of switch/case statements,
  use a 2-dimensional lookup table to remap buttons based on the orientation.
* Gui: cleanup input mapping and fix incorrect asserts
* SnakeGame: handle input special case

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-11-02 23:36:17 +09:00
Georgii Surkov
d5f791b1fa
[FL-2911] IR Universal Audio Remote (#1942)
* Add Audio universal remote
* Add signal library for Audio Universal Remote
* Update UniversalRemotes.md
* Added IR profile for Samsung K450 soundbar (#1892)
* Add symbols to API file
* Rearrange Audio remote buttons
* Add new icons, remove old ones
* Remove old signals, add new ones
* Add universal audio remote to CLI, refactor code
* Improve help text
* Correct formatting
* Update UniversalRemotes.md
* Furi: restore correct api_symbols.csv version

Co-authored-by: Alexei Humeniy <yo@ahumeniy.net>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-10-29 01:43:54 +09:00
gornekich
93a6e17ce5
[FL-2933] Mf Classic initial write, update, detect reader (#1941)
* nfc: introduce nfc write
* nfc: add write logic
* nfc worker: add write state
* nfc: add mfc update logic
* nfc: add update success logic
* nfc: add custom card for detect reader
* nfc: update write logic
* nfc: add halt command, add notifications
* nfc: add write fail scene
* nfc: fixes and clean up
* nfc: fix navigation ad notifications
* nfc: fix detect reader nfc data setter

Co-authored-by: あく <alleteam@gmail.com>
2022-10-29 01:10:16 +09:00
Sergey Gavrilov
3434305630
[FL-2937] Remove resources from API to prevent frequent API version increase (#1935)
* Remove all icons from API
* Music player: icons
* Signal generator: icons
* Bt hid: icons
* Weather station: icons
* Picopass: icons
* File browser test: icons
* Example images: documentation
* Remove global assets header
* Fix picopass

Co-authored-by: あく <alleteam@gmail.com>
2022-10-28 23:08:50 +09:00