i will take a look at the source code later as we also need a route to push things into grbl at the front of the queue. or perhaps you know if this is a quick fix?
@Justin_Adie you rock. Just added your binary to the releases page on Github. I added the tools folder as well to program your avr and sam boards.
As for the grbl buffer, take a look at line 292 in bufferflow_grbl.go and add to the regexp other commands that should skip buffer and move to front of line.
func (b BufferflowGrbl) SeeIfSpecificCommandsShouldSkipBuffer(cmd string) bool {
// remove comments
//cmd = regexp.MustCompile("\(.?\)").ReplaceAllString(cmd, “”)
//cmd = regexp.MustCompile(";.*").ReplaceAllString(cmd, “”)
if match, _ := regexp.MatchString("[!~\?]|(\u0018)", cmd); match {
log.Printf(“Found cmd that should skip buffer. cmd:%v\n”, cmd)
return true
}
return false
}
Can you change that max buffer size to 126 to be safe, maybe even 125 in cash it’s a double byte and/or a newline sneaks in the command bypassing the buffer. There needs to be an extra byte reserved for these commands that skip the queue so you never drop a character or byte.