Implement guidance around absolute position and degrees
Closed this issue · 0 comments
tthiery commented
Knowledge dump
TachoMotor.StartSpeedForDegreesAsync
support moving the motor by degrees. It operates relative of its current position.AbsoluteMotor.GotoAbsolutePositionAsync
allows moving the motor to an absolute position. It operates relative to a changeable zero position.- The input mode 2 (POS) is reflecting the position relative to a changeable zero position (firmware in-memory encoded)
- The input mode 3 (APOS) is reflecting the position relative to marked zero position (physically encoded).
- POS is resetable with
PortOutputCommandPresetEncoderMessage
, APOS not. Technic(X)LargeLinearMotor
/TechnicMediumHub
do not remember their zero POS position.
Implementation
- Encode
PortOutputCommandPresetEncoderMessage
- Add a
AbsoluteMotor.GotoRealZeroAsync
which moves the motor to align the position and the absolute position. - Add a
TachoMotor.SetZeroAsync
allowing to reseting the zero value to the current position. - Add comments to
GotoAbsolutePosition
andAbsolutePosition(Observable)
explaining the behavior.