@powered-up/protocol
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Encoded
Motor
Service
constructor
port
Type
brake
drift
execute
Command
hold
run
With
Power
run
With
Speed
run
With
Speed
For
Distance
run
With
Speed
For
Duration
run
With
Speed
ToPosition
set
Acceleration
Duration
set
Deceleration
Duration
set
Mode
set
Position
set
Value
For
Mode
parse
Value
Hierarchy
PortService
<
EncodedMotorModeType
>
EncodedMotorService
Index
Constructors
constructor
Properties
port
Type
Methods
brake
drift
execute
Command
hold
run
With
Power
run
With
Speed
run
With
Speed
For
Distance
run
With
Speed
For
Duration
run
With
Speed
ToPosition
set
Acceleration
Duration
set
Deceleration
Duration
set
Mode
set
Position
set
Value
For
Mode
parse
Value
Constructors
constructor
new
Encoded
Motor
Service
(
portType
:
number
, maxPower
:
number
)
:
EncodedMotorService
Parameters
portType:
number
maxPower:
number
Returns
EncodedMotorService
Properties
port
Type
port
Type
:
number
Methods
brake
brake
(
)
:
CommandOutput
Returns
CommandOutput
drift
drift
(
)
:
CommandOutput
Returns
CommandOutput
Protected
execute
Command
execute
Command
(
commandType
:
CommandType
, commandPayload
:
Buffer
)
:
CommandOutput
Parameters
commandType:
CommandType
commandPayload:
Buffer
Returns
CommandOutput
hold
hold
(
)
:
CommandOutput
Returns
CommandOutput
run
With
Power
run
With
Power
(
power
:
number
)
:
CommandOutput
Parameters
power:
number
Returns
CommandOutput
run
With
Speed
run
With
Speed
(
speed
:
number
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speed:
number
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
run
With
Speed
For
Distance
run
With
Speed
For
Distance
(
speed
:
number
, distance
:
number
, endStateType
:
EncodedMotorEndStateType
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speed:
number
distance:
number
endStateType:
EncodedMotorEndStateType
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
run
With
Speed
For
Duration
run
With
Speed
For
Duration
(
speed
:
number
, duration
:
number
, endStateType
:
EncodedMotorEndStateType
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speed:
number
duration:
number
endStateType:
EncodedMotorEndStateType
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
run
With
Speed
ToPosition
run
With
Speed
ToPosition
(
speed
:
number
, position
:
number
, endStateType
:
EncodedMotorEndStateType
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speed:
number
position:
number
endStateType:
EncodedMotorEndStateType
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
set
Acceleration
Duration
set
Acceleration
Duration
(
duration
:
number
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
duration:
number
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
set
Deceleration
Duration
set
Deceleration
Duration
(
duration
:
number
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
duration:
number
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
set
Mode
set
Mode
(
modeType
:
EncodedMotorModeType
, valueReportThresholdDelta
:
number
, valueReportEnabled
:
boolean
)
:
ModeOutput
Parameters
modeType:
EncodedMotorModeType
valueReportThresholdDelta:
number
valueReportEnabled:
boolean
Returns
ModeOutput
set
Position
set
Position
(
position
:
number
)
:
CommandOutput
Parameters
position:
number
Returns
CommandOutput
Protected
set
Value
For
Mode
set
Value
For
Mode
(
modeType
:
EncodedMotorModeType
, value
:
Buffer
)
:
CommandOutput
Parameters
modeType:
EncodedMotorModeType
value:
Buffer
Returns
CommandOutput
Static
parse
Value
parse
Value
(
modeType
:
EncodedMotorModeType
, rawValue
:
Buffer
)
:
number
Parameters
modeType:
EncodedMotorModeType
rawValue:
Buffer
Returns
number
Generated using
TypeDoc