I spent some time last night writing a parser for version 1.1 of grbl.

I spent some time last night writing a parser for version 1.1 of grbl. i have included it in a version of the existing widget javascript. it’s done I believe.

I will try to make it into an ‘includable’ widget this evening (I will need to read up on how this works and watch the videos). Is anyone willing to test too (my gShield is broken so i have no ability to test ‘in the wild’ although the software interface should suffice).

Hey @Justin_Adie I can help, where I can find your code?

@Luca_Nervetti ​ that’s so kind. Thanks Luca.

I finished adjusting the workspace to transform the top left button group into a drop down panel and now want to spend an hour or so trawling the code for inconsistencies against the new grbl code.
I also want to implement the new jog standard for grbl 1.1. That will require a fork of the axes widget.
I haven’t yet rolled all of this into a cp workspace but will do so later today. It will be at /jpadie (ignore what is there now, if anything.

We can get your changes merged via a pull request. Will it fall back to older versions too by doing version detect?

It will do exactly that @jlauer ​. In fact the default will still be 0.8c+. If the version is 1.x it simply sends the received line to another method.
At the moment the received lines are being intercepted by another widget so I need to track down where that is happening.
Too much screen time at work today so I won’t progress. The code is up at the workspace I created but at the moment the divs are not properly named so the load event times out.

My recollection of the pubsub is that incoming strings from the CNC come into the SPJS widget. That widget publishes out to all of ChiliPeppr and the Grbl widget listens for all incoming lines. Then Grbl widget parses and transmits a new pubsub that the Axes widget listens to. So, you should only have to make changes in Grbl widget and as long as you are pubsub’ing out the same format so things like Axes widget work, you are done.

That’s what I’m doing. But oddly I’m not seeing any console output. So my widget is not getting any info. I will need to check things - it’s a naming issue I’m sure. I will refactor the code so that it uses identical ids to the existing widget.

There’s no console info once you’re in production because we override console.log to an empty function. You can turn that back on in the upper right menu of the main workspace. When you’re in dev mode though the console should work fine. Many times I make sure in dev mode I also pull in the SPJS widget in the require_test() method so that I can get live streaming data, but then you have to test it in a non-SSL browser window due to that websocket still being non-SSL.

Yes - I saw that you were stubbing out the console.

Pulling in the spjs is an idea. I’m not familiar with requirejs yet. This exercise is exposing a lot of new frameworks to me. Typically I just use a combination of jquery, jqueryui and jqm. Thankfully I see that jq and jqui at least are in the CP mix.

Yeah, CP is all jquery, bootstrap, and amplify.js for pubsub, require.js for dependency mgmt, and of course three.js for all the 3d.

Is there a plan to refactor the http://three.js code to avoid the deprecation notices?

@Justin_Adie just elevated you to moderator because for some reason Google keeps treating your posts as spam. Maybe that will fix it.

I will try hard not to abuse the privilege!

@Justin_Adie lots of fixes have already been done by @Daniel_Chote1 to refactor lots of three.js stuff. His changes are impressive thus far. This would likely get rid of all warnings.

@Justin_Adie to include a widget while testing you just cut and paste the http://ChiliPeppr.load boilerplate from the widget’s readme and paste it into your test method.


work in progress :slight_smile:

missing/deleted image from Google+

ah - are you working on this as well? i will stop then.

the code to date is here: https://github.com/jpadie/grbl1-test-widget

the work is done in the grblresponsev1 method (although you have to interrupt the grblresponse method too.

I’m currently working on js/html interface, I have to flash an arduino with grbl 1.1 to check the response. What are you doing about it?