refactor: share step targets between remote and group steps

A received step and a group step each worked out where a step takes the
shade, the group copy with its own inline maths. stepTargets() in
ShadeMotion now does it for both: a tilt-only shade steps its tilt, an
integrated tilt turns its slats to the end first and then steps the lift,
and every other shade steps its lift.

Only edge cases change. A group step on a tilt-only shade already at the
end now goes through like a remote step, and a step that can't be sized
(no travel time) leaves the targets alone in both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-13 21:17:02 +02:00
parent 5f26340d06
commit c75b715b3b
5 changed files with 160 additions and 134 deletions

View file

@ -136,6 +136,8 @@ class SomfyShade : public SomfyRemote {
void runToLimit(int8_t dir, bool tilt, uint32_t since);
// Sets the targets the sun or wind sends the shade to.
void applySensorMove(SensorMove move);
// Sets the targets for a step in dir. False when the step is dropped.
bool applyStep(int8_t dir, uint8_t frameStepSize);
public:
uint8_t roomId = 0;
int8_t sortOrder = 0;