ysard / mi_remote_database

Proof of concept aiming to reproduce and query the infrared code database (IRDB) used by the Xiaomi *Mi Remote* application.
GNU Affero General Public License v3.0
47 stars 8 forks source link

Add export to Flipper Zero #3

Closed LionZXY closed 1 year ago

LionZXY commented 1 year ago

Main goal of this pr is add new export type - flipper for Flipper Zero

But I have some problem with passing other keys from load_brand_codes - right now parser ignore the button which does not just power on/off the device

Changes

How to test

I tested:

LionZXY commented 1 year ago

Fix for #2

ysard commented 1 year ago

Hi, thank you for your interest in the project.

I will analyze your code and take note of the changes you have made. I need some time to get back into this 2 years old project.

Just a 1st remark, next time, try to use more the git add --patch command (I never use add alone). It allows you to make minimalist commits focused on a specific change. It allows you to work on many things in a file without having to commit all the changes. And it would have allowed me to cherry-pick the validated commits that don't need any changes, while reducing the code base that I really have to spend time on. Here I'm almost forced to do a squash and work on it :p

Example: the removal of the code duplication was justified in the xiaomi_query file: https://github.com/ysard/mi_remote_database/pull/3/commits/d576b005ee1d4220f9c72f51889561b9d97ac816

but the other changes are not because you had to undo them in: https://github.com/ysard/mi_remote_database/pull/3/commits/eb907fafd0bc4744657f34b0587ef7320d1a2c83 and https://github.com/ysard/mi_remote_database/pull/3/commits/736499b08b49a3f2a8e0e30d8729fa2570db802a

Same for the deleted prints in main: https://github.com/ysard/mi_remote_database/pull/3/commits/440309e9918beb929c540ce6ad296335077e4d9d and restored: https://github.com/ysard/mi_remote_database/pull/3/commits/736499b08b49a3f2a8e0e30d8729fa2570db802a

The migration of tvkill_export in a separated file is ok but should have been the subject of an independent commit.

Anyway it's too late and I think you got the idea.

Note: remarks are not meant to be harsh :D

ysard commented 1 year ago

I close this issue, the functionality seems to be implemented now. Thanks for the implementation example :)