Commit 1be9ccd
authored
In inline tilt mode the slats are articulated by the main travel motor, so a
tilt move drives the travel relay. When the cover is parked at a travel
endpoint (fully open/closed) — the usual case when adjusting slats — the tilt
move drives the motor *off* its limit switch, so it will NOT self-stop there.
The self-stopping relay modes (toggle, pulse, wrapped — _self_stops_at_endpoints()
True) took the endpoint self-stop branch in auto_stop_if_necessary, which skips
the relay stop on the assumption the motor is seated against its physical limit.
For a tilt move that assumption is wrong, so the stop was never sent and the
cover ran on to the full endpoint (e.g. tilting open while fully closed rolled
the blind all the way up).
#125 fixed the analogous overshoot for switch mode by excluding tilt moves from
the adjacent run-on branch (not self._moving_tilt). Hoist that exclusion into a
shared `endpoint_applies = _at_endpoint(...) and not _moving_tilt` predicate and
gate both endpoint branches on it, so a tilt move at an endpoint always falls
through to the explicit stop. Real travel moves to an endpoint still skip the
redundant stop (toggle re-pulse would restart the motor — #105).
Add tests covering inline tilt at the closed and open endpoints in a
self-stopping mode, plus a regression guard that a travel move to an endpoint
still skips the stop.
1 parent 3ce556e commit 1be9ccd
3 files changed
Lines changed: 99 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1447 | 1447 | | |
1448 | 1448 | | |
1449 | 1449 | | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
1450 | 1460 | | |
1451 | 1461 | | |
1452 | 1462 | | |
| |||
1461 | 1471 | | |
1462 | 1472 | | |
1463 | 1473 | | |
1464 | | - | |
| 1474 | + | |
1465 | 1475 | | |
1466 | 1476 | | |
1467 | 1477 | | |
| |||
1472 | 1482 | | |
1473 | 1483 | | |
1474 | 1484 | | |
1475 | | - | |
1476 | | - | |
| 1485 | + | |
1477 | 1486 | | |
1478 | 1487 | | |
1479 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
0 commit comments