Closed oskay closed 11 years ago
Not to open the can of worms... but this kinda opens the can of worms I'd been avoiding for a bit.
The proper way to manage this:
The cheap hack for managing this:
Cheaper-yet hack: Do not modify CNCserver.
Use existing functionality of CNCserver to change pen-up and pen-down position when needed. With the present design of CNCserver, these are configured in the settings; so it should be possible to change the setpoints when needed.
Basic idea: When wash cycle initiates, set pen-down height to WASH level. When wash cycle completes, set pen-down height back to PAINT level.
Yes, yes.. that would work. I think I had that in my brain at some point, just got stuck on thinking of it as a CNCserver thing.
I am hesitant to implement this, (though less hesitant if it only touches Robopaint), for the following reasons:
One benefit of doing it this way, is retaining simplicity. Adding full height range and named positions adds complexity, but far more control. Though in theory would could operate the API in the exact same v1 spec definition.
Two options moving forward:
For washing, we want to be able to lower the brush as much as possible, so it's probably a good idea, to at least implement it as a quick hack.
I do not think that we need CNCserver to be aware of multiple named positions at this time. Suggested future modification at techninja/cncserver#40
Alright, alright. Issue to manage the "future" modification should be at https://github.com/techninja/cncserver/issues/18 , and the settings API access at https://github.com/techninja/cncserver/issues/40 should be implemented "along with" this hack. Should be very straightforward anyways, thanks to nconf.
One side issue is retained here: When actively setting the height, it helps to see what the height is by changing it on the bot, but there's currently no reset of the pen back to its original state once complete. This actually messes up assumed state in Robopaint as well. Should this be stored on settings entry and reset on settings exit? If so, should be filed under a new issue.
I suggest resetting the pen height back to "up" when closing the settings dialog.
Settings modal dialog currently does not pause progress or spooling/printing, therefore forcing the pen up on settings close willy nilly may be a bad idea. Perhaps only after height adjustment?
So... currently, you can adjust the pen heights while printing? Sounds pretty iffy!
Yes, among other things. It's actually somewhat handy for some things. That one specifically sounds like a recipe for disaster.