Add support for reading OpenTag3D tags - #80
Conversation
Co-Authored-By: GitHub Copilot <copilot@github.com>
Co-Authored-By: GitHub Copilot <copilot@github.com>
Co-Authored-By: GitHub Copilot <copilot@github.com>
|
This is great, thanks for submitting this PR. AI is fine. I'll just need to figure out a way to leverage AI to help review it. When I originally wrote it, it took a lot of trial and error to avoid overrunning the available heap on the esp32. Optimizations like that are hard for AI to catch since they only really show up in the real world. Has this been tested on real hardware yet? |
Review of
|
|
And now we just need the AI to review what the review AI says! 😛 It has been partially reviewed on real hardware, but not the complete process. I did a visual inspection of the logs and the generated MQTT messages to see if they respond to the tags I scanned (specifically referencing the color), and they did. Now that my print is done and I've taken my printer fully offline/in LAN mode, I can test it from start to finish and make sure it's all functional! (I'll also make those suggested tweaks, as well as dig in and try to clean up some of the AI slop...!) |
|
Alright, just made the updates, and made a few other small tweaks as well! I'm not home at the moment so I haven't tested this on my OpenSpool hardware yet, but I've at least checked to make sure that it compiles. My personal next steps are:
|
This PR fixes #67 by adding support for reading OpenTag3D tags. This also paves the way for adding support for other tag formats, separating the OpenSpool pieces into their own namespace and de-duplicating some code. To ensure the maximum amount of compatibility, this adds support for reading both v1 and v2 tags.
Tag Reading
The updates will allow users who have either v1 or v2 OpenTag3D tags to scan their tag and have it parsed for the Bambu Lab printer to recognize.
Tag Writing
Tag writing support was not implemented for a few reasons:
Additional Testing Recommended
I have not been able to test the MQTT connection to the printer because I am currently in the process of a multi-day print. I strongly recommend testing this in full before merging!
Disclaimer: Use of AI
As much as I hate to admit it, this PR was almost entirely written by GitHub Copilot. I despise AI and would have definitely preferred to write the code myself, but even I will have to admit, it was much quicker having it write the code and me telling it what changes to make than it would have to write it myself...