"Pinch" is a different function.
UP: Detect pinch and go down, say an inch away from the pinch.
DOWN: There should be nothing to pinch (stuff in the way). If the track is bad, then the polyswitch works. The motor stopping going down seems pretty acceptable.
If this was a motorized spoiler:
UP: (Say ice on spoiler). Spoiler is fully retracted. Try up, if pinch, then go full down.
Down: (pinch detected), Spoiler is fully up. Spoiler should go back up.
UP also gets disabled at high speeds. Up should probably be staged speed wise.
A pocket door might need a different algorithm. Search for: Automatic Door Controls SIDOOR
UP: Detect pinch and go down, say an inch away from the pinch.
DOWN: There should be nothing to pinch (stuff in the way). If the track is bad, then the polyswitch works. The motor stopping going down seems pretty acceptable.
If this was a motorized spoiler:
UP: (Say ice on spoiler). Spoiler is fully retracted. Try up, if pinch, then go full down.
Down: (pinch detected), Spoiler is fully up. Spoiler should go back up.
UP also gets disabled at high speeds. Up should probably be staged speed wise.
A pocket door might need a different algorithm. Search for: Automatic Door Controls SIDOOR