Returns the state of the jog port or an individual jog switch on that port.
First jog switch has index 1.
When the index is omitted or set to -1, returns the entire jog value.
planetcnc.hw_jog() planetcnc.hw_jog(index)
#! /usr/bin/env python import planetcnc # Get the complete jog port state full_jog = planetcnc.hw_jog() print("Full Jog State:", full_jog) # Get the state of the first jog switch jog1 = planetcnc.hw_jog(1) print("Jog switch 1 state:", jog1)