Skip to content

Scripting Mini

GitHub Action edited this page Apr 24, 2023 · 8 revisions

Scripting options for the selected printer:

E::

  • GetPosFloat() - Reports current position in mm.

KeyCtl::

  • Key(string) - Simulates a keypress

ScriptHost::

  • Log(string) - Print the std::string to stdout
  • SetQuitOnTimeout(bool) - If 1, quits when a timeout occurs. Exit code will be non-zero.
  • SetTimeoutMs(int) - Sets a timeout for actions that wait for an event
  • WaitMs(int) - Wait the specified number of milliseconds. (10 ms resolution)

X::

  • GetPosFloat() - Reports current position in mm.

Y::

  • GetPosFloat() - Reports current position in mm.

Z::

  • GetPosFloat() - Reports current position in mm.

encoder-input::

  • Push() - Presses the encoder
  • Reset() - Resets the printer
  • Twist(int) - Twists the encoder up(1)/down(-1)

fan::

  • GetRPM() - Reports the current RPM
  • Resume() - Resumes a stalled fan.
  • Stall() - Stalls the fan tachometer

fan1::

  • GetRPM() - Reports the current RPM
  • Resume() - Resumes a stalled fan.
  • Stall() - Stalls the fan tachometer

generic-spi-display::

  • Screenshot(string) - Takes a screenshot to the specified file.

heater::

  • Open() - Sets heater as open-circuit
  • Restore() - Restores normal (non-open or runaway) state
  • Runaway() - Sets heater as if in thermal runaway
  • SetTemp(float) - Sets the current temperature the heater uses to update the thermistor

heater1::

  • Open() - Sets heater as open-circuit
  • Restore() - Restores normal (non-open or runaway) state
  • Runaway() - Sets heater as if in thermal runaway
  • SetTemp(float) - Sets the current temperature the heater uses to update the thermistor

ir-sensor::

  • Set(bool) - Sets the IR sensor to the given value
  • Toggle() - Toggles IR sensor state

pinda::

  • SetMBL(int, int, bool) - Sets the given block of the 4x4 z-trigger grid to the specified value. (x,y,mm)

thermistor::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor1::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor2::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor3::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor

thermistor4::

  • Disconnect() - Disconnects the thermistor
  • GetTemp() - Prints the current temperature
  • Restore() - Restores the thermistor to normal (unshorted, heater-operated) state
  • Set(float) - Sets the temperature to a given value.
  • Short() - Shorts the thermistor End Scripting options