Bambu Lab X1 Specific G-Code

Well, there’s a few more ways they use M221:

  • M221 S (no numbers) is commented as “push soft endstop status” in the P1S start gcode
  • M221 R is commented as “pop softend status” in the same start gcode

I’m not sure what exactly they do, but as It never explicitly enables them with M221 X1 Y1 Z1, I assume they somehow turn them on that way, even though I don’t really see how given my understanding of stacks:

The M221 commands in that gcode in sequence:

  • M221 S100 ;reset flowrate
  • M221 X0 Y0 Z0 ;turn off endstops
  • M221 S ;push soft endstop status (?)
  • M221 Z0 ;turn off Z endstop (again?)
  • M221 R ;pop softend status (?) (restores endstops?)

shouldn’t push write x0y0z0 to the stack and pop then restore x0y0z0? Or does R just stand for “R-eset the endstop status”? But what does S by itself do then?