Create/wiki/Lua-Rotation-Speed-Controller.md
caelwarner fac1ebcd3f
Added documentation for most peripherals
- Lua documentation has been added for all peripherals except the train station (not looking forward to writing that one)
- This documentation will be added to the GitHub wiki pages
2023-03-11 16:12:58 -08:00

18 lines
742 B
Markdown

| Method | Description |
|:-----------------------------------------------:|----------------------------------------|
| [`setTargetSpeed(speed)`](#setTargetSpeedspeed) | Sets the target rotation speed |
| [`getTargetSpeed()`](#getTargetSpeed) | Gets the current target rotation speed |
---
### `setTargetSpeed(speed)`
Sets the rotation speed controller's target speed.
**Parameters**
- _speed:_ `number` Target speed. Must be an integer within range of [-256..256]. Values outside of this range will be clamped.
---
### `getTargetSpeed()`
Gets the rotation speed controller's current target speed.
**Returns**
- `number` Current target rotation speed.