Using the sonar sensors, if there are objects (i.e. a wall) within 1 foot, do no auto-unfold mirrors until driving 50 ft or 20 mph or faster.
Those of us with narrow garage door openings may fold our mirrors before pulling into our garages. If the mirrors subsequently auto-unfold when we get into our cars and we forget to re-fold them, then we may strike them on the garage door opening.
The deferral of auto-unfold would continue only as long as the proximity sensors continue to detect nearby obstacles. Upon clearing the obstacles (e.g., upon pulling out of the garage), the intended auto-unfold would commence immediately.
A happy side effect of this option is that mirror auto-unfold would also be deferred while in a perpendicular parking space (with a car in an adjacent space).