Skip to content

Conversation

RebornedBrain
Copy link
Contributor

@RebornedBrain RebornedBrain commented Sep 23, 2024

What's new

  • Added one new function for drawing mirrored xbm bitmaps.
  • Now 4a listener throws Halt and FieldOff events to the upper levels
  • iso14443_4a poller logic is now enhanced and supports more blocks according to standard

Verification

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 Reborned/some api adjustments Some api adjustments Sep 23, 2024
@CookiePLMonster
Copy link
Contributor

  1. Why not simply expose the IconRotation rotation argument in draw_xbm?
  2. It's upside down - is it correct to call it mirrored then? Entering the PR, I expected a draw that would be mirrored horizontally, not rotated 180deg.

@RebornedBrain
Copy link
Contributor Author

RebornedBrain commented Sep 25, 2024

  1. Why not simply expose the IconRotation rotation argument in draw_xbm?

It was done in order not to break api backward compatibility.

  1. It's upside down - is it correct to call it mirrored then? Entering the PR, I expected a draw that would be mirrored horizontally, not rotated 180deg.

If you take a look into canvas_draw_u8g2_bitmap which is called under the hood, there will be such code:
image
In the switch there is a call to canvas_draw_u8g2_bitmap_int which has bool parameter mirror, and this parameter is true in case of IconRotation180. Here is the reason why I called this function mirror.

@RebornedBrain
Copy link
Contributor Author

Also this PR solves the same problem described here
In addition it provides possiblity to send also S-block and R-block

@CookiePLMonster
Copy link
Contributor

It was done in order not to break api backward compatibility.

You can make IconRotation0 a default parameter and break ABI, but not sources.

@skotopes skotopes marked this pull request as draft October 14, 2024 13:59
@RebornedBrain RebornedBrain marked this pull request as ready for review October 14, 2024 15:41
@skotopes skotopes changed the title Some api adjustments NFC: iso14443_4a improvements. Canvas: extended icon draw. Oct 14, 2024
@skotopes skotopes merged commit 0902fd4 into flipperdevices:dev Oct 14, 2024
11 checks passed
@RebornedBrain RebornedBrain deleted the reborned/some_api_adjustments branch February 14, 2025 13:47
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.

3 participants