Closed MartyMacGyver closed 5 years ago
Thanks for these suggestions! I appreciate the effort that you are putting in here.
About this topic in general: I can see a reasonable argument for having a few extra top-level commands of this nature, however, there's a solid argument for not adding them as well. For the vast majority of AxiDraw users, having to look through the list and pick which AxiDraw item to select is a bit of added user-interface friction, and one would need to argue that the added utility of these items is worth that cost. The way that we've handled this need for additional "utility" extensions in other contexts (such on the EggBot) is to put them into an additional submenu in extensions, that might be called "AxiDraw Utilities" for example. One of the ways that this kind of thing can get super-useful is that you can actually custom assign keyboard shortcuts to each extension.
Is there already quite a bit of UI friction on these particular commands? Yes indeed. However, it is my view that this is reasonable and appropriate for infrequently accessed menu items like these; that's why they're hidden away in the manual tab. One alternative idea might be to almost entirely eliminate the manual tab, in favor of independent utility functions. However, the pen lift and lower commands really should stay in the main extension, for reasons that we'll get to shortly.
I'll also note that we have occasionally built custom extensions of this type for end users-- a separate menu item to do a particular command (for example, manual move X 1 cm right or left) that they would use every day. However, none of them yet has risen to the level of utility that we thought justified the additional UI friction.
About the individual extensions:
Axidraw: Get version (firmware) and Axidraw: Get version (plugin): What's the reason for these? Neither checking the EBB version nor the extension version would seem (to me) to be one of the top few most common activities, at the level that it should have a "top level" menu item command dedicated for it.
Axidraw: Motors (disable): The "Raise pen, turn off motors" setup command is very frequently used, and of these extensions that you're proposing, the "Motors (disable)" one is the one that makes the most sense to me in every day use. (Again: any commands that we add should be common and useful enough to override the UI friction that we're adding.)
Axidraw: Motors (enable): I am not sure that I can see "Motors (enable)" in the same light; it's not one of the extensions that we use on a regular basis. What's the suggested or expected use case for this? (Thinking about it a little more, I'm not even sure that it belongs in the Manual commands tab -- it's quite infrequently used. If we did end up adding this extension, we might even take it out of the manual tab.)
Axidraw: Pen (lower) and Axidraw: Pen (raise): I'm afraid that these two, as you have suggested adding them here, will not work as intended. Inkscape internally stores a separate set of control parameters for each extension (inx file with an independent id), and does not provide access between two different extensions. Accordingly, these two extensions do not have access to the pen-up an pen-down settings in AxiDraw control. If a users uses these to set up their pen height, they'll have things go quite wrong when they start to plot. I'm afraid that I don't know a good way around this, which is one of the reasons that we don't already have this functionality.
On the coding of these extensions: It appears to me that each of these extensions can be written without changes to axidraw.py, simply making use of using existing functionality. I'm attaching two example extensions that show how one can do this. Nothing in this issue description suggests that any changes to axidraw.py are likely to be required, even if the full proposal were to be accepted.
Except for conditions that would have an actual need for specific options being set I see all these and more as top-level menu items. Clicking twice to open the control, then finding the tab, then selecting from a dropdown, and finally clicking apply should not be necessary for trivial operations. Indeed, I'd remove the dropdown entirely and replace it with single commands such as these (except for walking the carriage).
Enabling motors: complementary commands aren't a bad thing - if you disable motors to position the pen holder, you may wish to re-enable them so you don't lose your place as you, say, replace a pen. I'd suggest toggle pen/toggle motor state buttons instead, but as they may not be aware of the current state they'd only work right some of the time on the first click.
I didn't know that about the pens and the extension settings - as I find myself doing that frequently, it seemed useful, but obviously it could be tricky for custom settings.
The ones I'd add to this list include starting a plot, resuming an interrupted plot, and returning to home after interruption. (Edit: but if Inkscape's settings are as inflexible and limited as they apparently are, then perhaps that won't work...)
If the extensions work fine as-is, then indeed the code may not need updating for this. I see from the attached examples how this ought to work. However, if the changes are undesirable on the main then I'll just keep using them on my own branch.
Again, I have built extensions like this quite a few times in the past; these do occasionally come in handy for folks. Accordingly, it may make sense to add the ones that will consistently work as expected to the repository and keep them up to date as optional add-ons for people who want them.
I'm not certain that there's no way to access the preferences from out of scope. They are stored in an accessible location on the computer, and one might possibly be able to "cheat" and just read them anyway: http://wiki.inkscape.org/wiki/index.php/Preferences_subsystem
Of the ones under discussion, I've added a "disable motors" extension in the repository and it will be making its way into the installers and documentation this week.
The others are more challenging for the reasons noted above; I am closing this for now but please feel free to revisit if you are so inclined.
Manual AxiDraw commands require up to five clicks to access in Inkscape. This could be made much easier by having certain commands activate directly from the cascading extension menus (e.g., pen control, motor control, and version info). PR #46 illustrates this.