Closed paukstelis closed 1 year ago
I'm out of town for a couple days. Will get on this once back home mid next week.
I'm going to merge this and clean up the .vscode stuff
Weird, it should have been in .gitignore...
nbd... looks like I've got some post merge cleanup to do. my devel machine is not happy.
Error instantiating bettergrblsupportViewModel : TypeError: self.settings.hasA is not a function
at new BettergrblsupportViewModel (http://octopi-laser/static/webassets/packed_plugins.js?1b3c85b6:430:35)
at _createViewModelInstance (http://octopi-laser/static/webassets/packed_core.js?d44a1aa2:1117:213)
at HTMLDocument.
weird.. this may be an nfs sync issue on my end.
That was stuff I was messing with after PR submission. I did not realize that would get pulled along. I was trying to figure out how to add the origin_axes conditionally based on the settings.
I'll take care of this... but yeah, everything you do in the PR branch amends the PR. I'm still not sure we have an actual problem. I see these settings defined in init.py
ah... yeah, it's broke.
should be:
self.settings.settings.plugins.bettergrblsupport.hasA and self.settings.settings.plugins.bettergrblsupport.hasB
ah... yeah, it's broke.
should be:
self.settings.settings.plugins.bettergrblsupport.hasA and self.settings.settings.plugins.bettergrblsupport.hasB
I tried that, still didn't work for me.
it's because the view model isn't fully built in its constructor. settings gets wired up right before onBeforeBinding.
All better now. I have no way to test this as I don't have 5 axes machine, but it's binding properly now.
ok, maybe I can test a little. I love the look here
I think we can do this a little more cleanly. Pretty sure there is a way to push within a list in js. I'm even tempted to push them to index 0... that way they'd show up before Z.
hmm... do we even need them? It doesn't look like they are tied to setting or traveling to an origin. Selecting "A" and hitting home, generated the following GCODE:
Send: G0 G90 X0 Y0 Z0
I half expected to see "G0 G90 A0"
you can find this logic here: https://github.com/synman/Octoprint-Bettergrblsupport/blob/devel/octoprint_bettergrblsupport/__init__.py#L1341
It gets set on the other side here: https://github.com/synman/Octoprint-Bettergrblsupport/blob/devel/octoprint_bettergrblsupport/__init__.py#L1425
hmm... do we even need them? It doesn't look like they are tied to setting or traveling to an origin. Selecting "A" and hitting home, generated the following GCODE:
Send: G0 G90 X0 Y0 Z0
I half expected to see "G0 G90 A0"
you can find this logic here: https://github.com/synman/Octoprint-Bettergrblsupport/blob/devel/octoprint_bettergrblsupport/__init__.py#L1341
I debated if it was necessary, but I think it would be useful for zeroing work space coordinates for all axes with a single click.
Once you have it squared away, feel free to submit another PR. Let's get A/B cleaned up in the axes bar too. I think they'll look best to the left of Z.
Basic functionality for A and B axes. Settings enable jog and status. Messages may need another couple of conditions (A, no B; B, no A) but maybe there is a more clever way to do it.