def on_for_rotations(self, speed, rotations, brake=True, block=True):
        """
        Rotate the motor at ``speed`` for ``rotations``

        ``speed`` can be a percentage or a :class:`ev3dev2.motor.SpeedValue`
        object, enabling use of other units.
        """
        speed_sp = self._speed_native_units(speed)
        self._set_rel_position_degrees_and_speed_sp(rotations * 360, speed_sp)
        self._set_brake(brake)
        self.run_to_rel_pos()

        if block:
            self.wait_until('running', timeout=WAIT_RUNNING_TIMEOUT)
            self.wait_until_not_moving()
def on_for_rotations ( self , speed , rotations , brake = True , block = True ) : speed_sp = self . _speed_native_units ( speed ) self . _set_rel_position_degrees_and_speed_sp ( rotations * 360 , speed_sp ) self . _set_brake ( brake ) self . run_to_rel_pos ( ) if block : self . wait_until ( 'running' , timeout = WAIT_RUNNING_TIMEOUT ) self . wait_until_not_moving ( )
Rotate the motor at ``speed`` for ``rotations``

        ``speed`` can be a percentage or a :class:`ev3dev2.motor.SpeedValue`
        object, enabling use of other units.