Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Continuous Jogging via Keyboard #545

Open
slynn1324 opened this issue Sep 9, 2024 · 1 comment
Open

No Continuous Jogging via Keyboard #545

slynn1324 opened this issue Sep 9, 2024 · 1 comment

Comments

@slynn1324
Copy link

I'm not sure if this is expected behavior, but from what I can tell in the code and documentation it is not. I can't get continuous jogging to work via the keyboard shortcuts. I get individual step moves, but holding the key combination (e.g., shift+right_arrow), it won't start a continuous jog. When using the jog controls via the mouse on the UI, continuous jogging works as expected. I also tried to change the shortcut a single key, but there was no change.

I am running Linux x64 - Debian 12 with XFCE.

@slynn1324
Copy link
Author

slynn1324 commented Sep 11, 2024

I did some more digging here, and while I'm pretty unfamiliar with the code overall I was able to get some additional logging added and found what may be the culprit.

I found that by the time the jog command gets into the GrblController.js "jog:start" handler, the axis character received when using the keyboard shortcuts is lowercase 'x', where the axis character when jogging from the UI button is uppercase 'X'. Looking further below in this handler, all of the math appears to only look for the uppercase versions of the axis characters. By adding a bit of code here to convert 'x' to 'X', 'y' to 'Y', and 'z' to 'Z', the keyboard shortcuts appear to be working as I would expect.

There is almost certainly a better place and way to address this so I'm not submitting a proper PR at this time. I'd be happy to help more where I can to get this into a proper fix release, but will need some guidance.

@@ -1886,6 +1887,22 @@ class GrblController {
                 let unitModal = (units === METRIC_UNITS) ? 'G21' : 'G20';
                 let { $20, $130, $131, $132, $23, $13 } = this.settings.settings;
 
+                //SL
+                log.debug('axes=' + JSON.stringify(axes) + ' $20=' + $20);
+                if (axes.x) {
+                    axes.X = axes.x;
+                    delete axes.x;
+                }
+                if (axes.y) {
+                    axes.Y = axes.y;
+                    delete axes.y;
+                }
+                if (axes.z) {
+                    axes.Z = axes.z;
+                    delete axes.z;
+                }
+
+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant