Re: print gcode files to miniMaker
I'm seriously considering gutting the underlying XYZv3 library and completely rewiring it.
I wrote it in a call/response style assuming one call would result in one action being performed and that the caller would want to wait (block) on the action. This is a logical way to look at it, and great for command line utilities, but not so good for interactive programs.
My new model would basically have the caller queue up a series of actions and then poll for the response. That would allow us to track temps, react to abort messages and other small benefits, all while never blocking for more than a few milliseconds. I'm a little hesitant to go down this path because the benefits are relatively small compared to the work needed, but it is the only way to move to a truly responsive UI that can never block. And it is the cleanest way to make nozzle cleaning and filament unloading seamless.
The one hiccup in the equation is file conversion. I either need to break conversion into pieces, not an easy task to do, or speed it up, or run it in its own thread. Right now conversions can take up to 13 seconds! That is way too long to block the UI. Most conversions are under a second, livable but not wonderful.
The big killer on conversions is my AES algorithm. I picked it because it was small and simple, but I may start looking into a more mature api, even if it clutters up the code.