Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FL-3890] Infrared button operation fails now shows more informative messages #3859

Merged

Conversation

RebornedBrain
Copy link
Contributor

@RebornedBrain RebornedBrain commented Aug 29, 2024

What's new

Related issue: #3845

  • Introduced infrared error code enum with possible errors
  • Most of the infrared remote and signal functions which previously returned bool now return InfraredErrorCode
  • When button operation (delete/move) fails "tmp.swp" is now deleted
  • More informative error messages are now shown when button operation fails
  • Fixed navigation issue while openning broken files from Favorites or File browser

Verification

  • Open .ir file with raw signals, where one signal has more than 1024 samples

  • Try to delete ANY button. Result: such message with name of a bad signal will be displayed
    delete
    File remains unchanged and no .swp files will be present on the sd card.

  • Try to move ANY button. Result: such message with name of a bad signal will be displayed
    move
    File remains unchanged and no .swp files will be present on the sd card.

  • Try to rename ANY button. Result:* such message with name of a bad signal will be displayed
    rename
    File remains unchanged and no .swp files will be present on the sd card.

  • Open .ir file with raw signals, where one signal has more than 1024 samples from Favorites or Browser. Try to delete, move, rename any signal, it will show same error message. Previously after pressing "Back" a screen with sandwatch was shown and flipper stucked on it, now it will move back to the remote scene.

Regarding issue #3845

  • Copy any library file from assets folder to any other place
  • Try to open this file. Result: such message will be displayed
    library

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@RebornedBrain RebornedBrain changed the title [FL-3890] Fixing button operation fails on very long signals [FL-3890] Infrared button operation fails now shows more informative messages Aug 29, 2024
@RebornedBrain RebornedBrain marked this pull request as ready for review September 3, 2024 09:32
@skotopes skotopes merged commit e0654fe into flipperdevices:dev Sep 6, 2024
11 checks passed
ofabel pushed a commit to ofabel/flipperzero-firmware that referenced this pull request Sep 26, 2024
…messages (flipperdevices#3859)

* Error codes enum added
* Adjusted signal api to return error codes instead of bool
* Remote api adjusted to work with error codes
* Brute force logic adjusted to work with error codes
* Other application functions adjust to work with error codes
* All task callbacks now return ErrorCode through int32t, which belongs to thread
* All scenes now work with error codes
* More api functions now return error code
* Now signal names are buffered and restored in case of error.
* New error code enumeration added. Now least significant byte is left for the button index
* Some macro to simplify error setup and error check
* Error code checks replaced by macro
* Different message is now shown when move failed
* Comments updated
* Fixed error check
* Fixed navigation issue while openning broken files from Favorites
* Now search by index also returns index in addition to error code
* Remote loading logic adjusted
* New error codes added and numbers adjusted
* New error message when loading library file instead of signal one
* Some more remote loading logic adjusted
* New error message on rename fail
* Grammar mistake fix
* Function signature changed
* Function usage adjusted according to new signature

Co-authored-by: あく <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants