danielweidman / pixmob-ir-reverse-engineering

Hacking the PixMob infrared (and now also RF!) protocol to enable control of PixMob wristbands at home.
MIT License
746 stars 49 forks source link

Fix empty list bug and refactor arduino sending code #25

Closed zacharesmer closed 1 year ago

zacharesmer commented 1 year ago

If a flipper file capture ends with a long run of zeros, there was a bug where the converter returned an empty list in its list of codes. This situation doesn't seem like it ever happens in recordings directly from the flipper, but it comes up in an edited file. The empty list causes a problem in another conversion function that is coincidentally caught, but probably just shouldn't exist.

Also, I moved some arduino sending code into its own file. This might be useful in the future for rewriting other things that send to the arduino to be more testable, but doesn't actually change anything major yet.

sean1983 commented 1 year ago

Awesome! Thanks for the quick fix @zacharesmer