Skip to content

Commit f8b2ef3

Browse files
committed
I added a setStopCommand for the motors - anticipating what we'll need this afternoon
1 parent 81dba7a commit f8b2ef3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Ev3LangScala/src/ev3dev4s/lego/Motors.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,9 @@ object Motors {
8686
val motor: Motor = motors(port)
8787
motor.readPosition()
8888
}
89+
90+
def setStopCommand(port:MotorPort,stopCommand: MotorStopCommand): Unit = handleUnpluggedMotor{
91+
val motor = motors(port)
92+
motor.writeStopAction(stopCommand)
93+
}
8994
}

0 commit comments

Comments
 (0)