flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

LFRFID: Show ISO-3166 Country Names For Pet Chips

Open zinongli opened this issue 10 months ago • 6 comments

What's new

  • In response to #4044
  • Check this out Screenshot-20250130-225322 Screenshot-20250130-225338

Verification

  1. Read a cute pet and ask them to verify if that indeed is where they come from.
  2. Give them a treat if they said yes.

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

zinongli avatar Jan 31 '25 03:01 zinongli

This is quite expensive in terms of flash memory consumption. Maybe you could store that data in SD card assets and load on demand?

hedger avatar Feb 03 '25 18:02 hedger

Sure. I'll get back to this.

zinongli avatar Feb 03 '25 18:02 zinongli

While looking for ways to assign assets to main apps, I stumbled upon NFC's resource/assets. This country code file seems identical to the look up table we are trying to use here. Is there a way to assign an asset on SD card that can be used by both apps?

I'm fine with mimicing the NFC's process into LFRFID. Just thought maybe I don't have to build the wheel twice.

zinongli avatar Feb 03 '25 19:02 zinongli

Alright. Now it offloads the country list to a .lfrfid resource file. Actually, since it's loading from EXT_PATH, a more unified way to implement this and EMV's country code search would be a single file in a folder in the firmware's ext/asset/ . But since EMV is deprecated for now, it's yor call where to put it. At least this PR works.

zinongli avatar Feb 03 '25 22:02 zinongli

Un-draft when ready

skotopes avatar Feb 20 '25 00:02 skotopes

I agree. I was overcomplicating things. This version should be much more straighforward. And all using FuriString*, freed within functions.

zinongli avatar Feb 20 '25 01:02 zinongli