Add getMachineState to cc turtle