Skip to content

Commit

Permalink
Bullet list in Motor.commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ddemidov committed Oct 31, 2015
1 parent 2efcd6f commit 8828d32
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions ev3dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,22 @@ def commands(self):
Returns a list of commands that are supported by the motor
controller. Possible values are `run-forever`, `run-to-abs-pos`, `run-to-rel-pos`,
`run-timed`, `run-direct`, `stop` and `reset`. Not all commands may be supported.
`run-forever` will cause the motor to run until another command is sent.
`run-to-abs-pos` will run to an absolute position specified by `position_sp`
and then stop using the command specified in `stop_command`.
`run-to-rel-pos` will run to a position relative to the current `position` value.
The new position will be current `position` + `position_sp`. When the new
position is reached, the motor will stop using the command specified by `stop_command`.
`run-timed` will run the motor for the amount of time specified in `time_sp`
and then stop the motor using the command specified by `stop_command`.
`run-direct` will run the motor at the duty cycle specified by `duty_cycle_sp`.
Unlike other run commands, changing `duty_cycle_sp` while running *will*
take effect immediately.
`stop` will stop any of the run commands before they are complete using the
command specified by `stop_command`.
`reset` will reset all of the motor parameter attributes to their default value.
This will also have the effect of stopping the motor.
- `run-forever` will cause the motor to run until another command is sent.
- `run-to-abs-pos` will run to an absolute position specified by `position_sp`
and then stop using the command specified in `stop_command`.
- `run-to-rel-pos` will run to a position relative to the current `position` value.
The new position will be current `position` + `position_sp`. When the new
position is reached, the motor will stop using the command specified by `stop_command`.
- `run-timed` will run the motor for the amount of time specified in `time_sp`
and then stop the motor using the command specified by `stop_command`.
- `run-direct` will run the motor at the duty cycle specified by `duty_cycle_sp`.
Unlike other run commands, changing `duty_cycle_sp` while running *will*
take effect immediately.
- `stop` will stop any of the run commands before they are complete using the
command specified by `stop_command`.
- `reset` will reset all of the motor parameter attributes to their default value.
This will also have the effect of stopping the motor.
"""
return self.get_attr_set( 'commands' )

Expand Down

0 comments on commit 8828d32

Please sign in to comment.