Hi all, Novice here, I've been having issues with chilipeppr/jpadie workspace coordinates widget.

Hi all,
Novice here, I’ve been having issues with chilipeppr/jpadie workspace coordinates widget.
I originally wanted to use the inches scale to mil PCBs but the autolevel doesn’t work properly with inches. So I remade my g-code in metric but now however, my coordinates widget is stuck displaying inches. I can switch between inches metric with g20 and g21 but the numbers don’t change, just the size of steps that the machine takes.
I’m running a new xcarve using json server 1.88, GRBL 1.1f and up to date firefox.
So aside from needing help just to get the coordinates widget displaying correctly, I’m wondering if the displayed autolevel data is going to displace the g code with .025 inches or mm. It shows the actual displacement in inches even though it should be in mm.
Ive tried to no avail to reset the coordinates widget.
Any help is appreciated.

So I tested it, Its adding the offset of .025 mm when it should be .025 inches, even though the coordinates thinks its in mm. Any help to just reset the entire work space and start from scratch would be appreciated. I promise I’ll never try to switch units to inches again.

The serial console keeps getting an $13=1, Ive tried sending an $13=0 but it just gets overwritten again and again. I’ve tried clicking the grbl settings cog wheel and changing the $13 'report in inches to report in mm but it doesn’t save it.

I already mentioned it to jpadie/ @Justin_Adie ​ This was a bug but the bugfix didn’t make it to the live version.

So I think I’ve fixed it. The issue was, while in the /jpadie work space it kept sending an $13=1 every second or so(no idea why). I went to the GRBL workspace and it wasn’t sending an $13=1 every second so I put $13=0 in the /GRBL work space command prompt and then loaded the /jpadie work space and it stopped sending the #13=1 every second. Hope that helps someone in the future.

If you specifically send G21 from the serial console that should normalise things. If not I will have to check - it may be that someone has updated the axis widget.

@ChPech ​. The changes were absolutely pushed to the master branch months ago. For a week about ten days ago the wrong branch was published but this was changed a.v quickly when I was told.
If the machine is sending $13=1 then this is because it thinks you need to be in inches. Which means your gcode is in inches. Or you are using an old cached version of the workspace. First try to refresh the cache. If that doesn’t work then let me know.

Thanks for the Insight Chris and Justin, My G code was in mm, It had the G21 at the top of the G code. I did try to send a G21 command and even an $13=0 Command(in the /jpadie workspace), but those I’m assuming where overwritten quickly since there was a constant s13=1 command being sent every second or so. The only thing that fixed it was going to the /GRBL workspace (where there wasn’t a constant $13=1 being sent), and then typing $13=0 in the /GRBL work space. Not sure how it got stuck sending an $13=1(in the jpadie work space), I can’t seem to reproduce the bug but I’ll update here if I can.

There was a bug ten days ago caused by an incorrect branch being committed I believe. This was corrected on friday of last week. It is possible you have a cached version of the widget. You can force a refresh using the menu at the top right of cp.

Thanks. Good to know. I will clear may cache.

i’ve rewritten the interface so that there is no attempt to harmonise the reporting and display of units. instead the unit is passed to the axis widget which then takes responsibility for the display.

it was quite a lot of code to ‘undo’ so please test and feedback. I no longer have a mill to test with and am a little too far away from the nearest arduino to test virtually.

I tested it. The Axes widget doesn’t show any coordinates anymore. The console is full of the following error messages:

VM384:631 Uncaught TypeError: Cannot read property ‘substring’ of undefined
at Object.isV1 (eval at globalEval (jquery-2.1.0.min.js:2), :631:32)
at Object.grblResponse (eval at globalEval (jquery-2.1.0.min.js:2), :1743:22)
at Object.eval (eval at globalEval (jquery-2.1.0.min.js:2), :528:22)
at publish (amplify.js:35)
at Object.publish (app.js:167)
at Object.onWsMessage (eval at globalEval (jquery-2.1.0.min.js:2), :1388:40)
at Object.eval (eval at globalEval (jquery-2.1.0.min.js:2), :165:22)
at publish (amplify.js:35)
at Object.publish (app.js:167)
at Object.publishMsg (eval at globalEval (jquery-2.1.0.min.js:2), :1280:24)

Thanks. I will have to see what I can do to create a test rig and debug it properly. It appears to be failing at the very first hurdle - trying to work out whether you’re on grblv1 or v0.9

@ChPech ​. I’ve made material changes to the workspace. If you would not mind testing again I wish appreciate it. The version suffix is currently h.

@Justin_Adie My machine is no longer connecting to the /jpadie work space. I go through the usual routine. Run Json 1.88 in admin mode, Go to /jpadie work space and click on the port. I hear a relay click over on the x controller but it just stays in offline mode and cant be controlled.

That sounds very odd. Make sure you have toggled the js console and then check for errors at the js level.

It’s still the same. Exception in isV1() is thrown because this.version is undefined. isV1() is called from grblResponse().
If I manually set this.version="" inside the google Chrome debugger and then reconnect it will work.
The mm coordinates work correctly but in inches the display is wrong, it shows 0.093 if I move 1 inch. switching back to mm and everything is correct again.

Maybe line 732: if(options.grbVersion == ‘undefined’) options.grbVersion = “”;

I think it should be grblVersion