gloomyandy / RepRapFirmware

OO C++ RepRap Firmware
GNU General Public License v3.0
256 stars 60 forks source link

gcode script at layer change #72

Closed whoim2 closed 3 years ago

whoim2 commented 3 years ago

Hello! I want to try use esp32cam for streaming and timelapse. Timelapse need simple gcode for move effector and on/off triger pin at new layer. Slicers support macroses on layer change, but its not simple way )

Maybe, i may create macro.g and rrf may call it at layer change automatically? Thanks.

Upd: maybe, add call macro in void PrintMonitor::LayerComplete()?

gloomyandy commented 3 years ago

There are a few issues with this...

  1. How would the firmware tell that you are changing layers, rather than just a change in Z? Consider what happens if you have Z hop enabled.
  2. The base Duet code does not support such a feature and we prefer to maintain compatibility with this.
  3. The slicer is in a much better position to know if a layer change is being made and already has the ability to add code at a layer change.