The latest version of chilipeppr json server now uses % to wipe the buffer.

The latest version of chilipeppr json server now uses % to wipe the buffer. This makes gcode generated with gcodetools in Inkscape no longer works. The gcode generated by Inkscape uses % as comments. Upon processing one of these commands, the entire buffer is wiped leaving the machine with its spindle on. Yikes.

I downgraded to 1.74 for now. Can we have this new buffer wipe feature via some other way?

Ouch. Hmm. If it’s inside a comment it should not get processed, but @Jarret_Luft built that part of the code. I bet he could fix this fast. I do think it’s worth trying to keep that feature as it will make jogging way better for Grbl users. Not having a ~ wipe for Grbl is a huge downside vs TinyG.

Certainly, would be good to have the feature, perhaps there is another character we can use?

We could always use an invisible character that is untypable on the keyboard similar to the reset character used to reset TinyG or Grbl. However, I think we can solve this via filtering out comments.

Hmm, yes, this likely happens on TinyG too and I’ve just never heard of it. In the BreakApartCommands() method the comment gets swapped after a newline is added to a ~. That order should get reversed and then problem solved.

@Jarret_Luft I filtered out all % coming from gcode files in tgfx. This is the better choice. 3d printer people in the early days introduced % for comments which is not right but it just stuck. I leave sending % via programmatic. IE I pushed a button etc.

Sorry, I meant % for wipe. ~ means continue.

It maybe the gcodetools settings that I didn’t change correctly. I remember seeing somewhere that there is prefix and suffix for each file that can be added.

I just ran the file and it actually runs fine on TinyG. Those %'s are ok in the Gcode file. The buffer is wiped when it’s hit, but then all subsequent lines are processed correctly and in order. The last line having the % does nothing other than wipe an empty buffer. So, I’m ok on the TinyG end.

I see the problem. @Jarret_Luft when you run BreakApartCommands() you do more than break them apart and queue. You actually process the buffer wiping. I’d let that command queue up and then when it gets processed let it wipe. That will happen in SeeIfSpecificCommandsShouldWipeBuffer(cmd) later on from serial.go. That’s how I do it in TinyG, and thus why this ran ok for me.

Ok. Fix published to ChiliPeppr. Just reload. All meta commands get swapped to the word of the command. % or ~ or ! on its own line gets commented now. So, you should be able to run ok now without any changes to the Serial Port JSON Server.