mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-07-15 07:12:14 +02:00
Always send Up/Down at hard-stop positions for recalibration
moveToTarget() silently dropped commands when pos == currentPos, which prevented position recalibration via slider, MQTT, or Home Assistant when the shade was already at 0% or 100%. Physical end-stops are ground truth — always send the command so the motor can jog to the hard stop and self-correct any position drift. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a5f7404b95
commit
c88d36997f
1 changed files with 4 additions and 0 deletions
|
|
@ -3833,6 +3833,10 @@ void SomfyShade::moveToTarget(float pos, float tilt)
|
|||
cmd = somfy_commands::Up;
|
||||
else if (pos > this->currentPos)
|
||||
cmd = somfy_commands::Down;
|
||||
else if (pos == 0.0f)
|
||||
cmd = somfy_commands::Up; // Hard stop: always send to allow position recalibration
|
||||
else if (pos == 100.0f)
|
||||
cmd = somfy_commands::Down; // Hard stop: always send to allow position recalibration
|
||||
else if (tilt >= 0 && tilt < this->currentTiltPos)
|
||||
cmd = somfy_commands::Up;
|
||||
else if (tilt >= 0 && tilt > this->currentTiltPos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue