@powered-up/protocol
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Encoded
Dual
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
Mode
set
Position
set
Value
For
Mode
Hierarchy
PortService
<
EncodedMotorModeType
>
EncodedDualMotorService
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
Mode
set
Position
set
Value
For
Mode
Constructors
constructor
new
Encoded
Dual
Motor
Service
(
portType
:
number
, maxPower
:
number
)
:
EncodedDualMotorService
Parameters
portType:
number
maxPower:
number
Returns
EncodedDualMotorService
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
(
powerA
:
number
, powerB
:
number
)
:
CommandOutput
Parameters
powerA:
number
powerB:
number
Returns
CommandOutput
run
With
Speed
run
With
Speed
(
speedA
:
number
, speedB
:
number
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speedA:
number
speedB:
number
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
run
With
Speed
For
Distance
run
With
Speed
For
Distance
(
speedA
:
number
, speedB
:
number
, distance
:
number
, endStateType
:
EncodedMotorEndStateType
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speedA:
number
speedB:
number
distance:
number
endStateType:
EncodedMotorEndStateType
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
run
With
Speed
For
Duration
run
With
Speed
For
Duration
(
speedA
:
number
, speedB
:
number
, duration
:
number
, endStateType
:
EncodedMotorEndStateType
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speedA:
number
speedB:
number
duration:
number
endStateType:
EncodedMotorEndStateType
accDecProfileType:
EncodedMotorAccDecProfileType
Returns
CommandOutput
run
With
Speed
ToPosition
run
With
Speed
ToPosition
(
speed
:
number
, positionA
:
number
, positionB
:
number
, endStateType
:
EncodedMotorEndStateType
, accDecProfileType
:
EncodedMotorAccDecProfileType
)
:
CommandOutput
Parameters
speed:
number
positionA:
number
positionB:
number
endStateType:
EncodedMotorEndStateType
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
(
positionA
:
number
, positionB
:
number
)
:
CommandOutput
Parameters
positionA:
number
positionB:
number
Returns
CommandOutput
Protected
set
Value
For
Mode
set
Value
For
Mode
(
modeType
:
EncodedMotorModeType
, value
:
Buffer
)
:
CommandOutput
Parameters
modeType:
EncodedMotorModeType
value:
Buffer
Returns
CommandOutput
Generated using
TypeDoc