Patent ID: 8030872

Claim:
A motor controller for a sunshade assembly, the sunshade assembly including a flexible screen body, a mechanism that is operable so as to extend or retract the flexible screen body, a motor for controlling the mechanism, a first manually actuated switch assigned with a function to extend the flexible screen body, and a second manually actuated switch assigned with a function to retract the flexible screen body, said motor controller comprising: a judging unit adapted to be coupled to the first and second manually actuated switches, and operable so as to determine a currently actuated one of the first and second manually actuated switches, and so as to generate a function signal indicative of the function assigned to the currently actuated one of the first and second manually actuated switches determined thereby; a recording unit coupled to said judging unit, and storing therein a function message indicative of the function assigned to a previously actuated one of the first and second manually actuated switches; a signal-generating unit adapted to be coupled to the motor, and operable so as to control rotational direction and rotational speed of the motor; and a processing unit coupled to said judging unit, said recording unit, and said signal-generating unit, and operable so as to determine whether the function signal generated by said judging unit matches the function message stored in said recording unit, wherein when it is determined that the function signal does not match the function message, said processing unit operates said signal-generating unit to rotate the motor in a direction based on the function assigned to the currently actuated one of the first and second manually actuated switches, and wherein said processing unit further operates said signal-generating unit to generate a decelerating signal for progressively reducing the rotational speed of the motor during a final stage of retraction of the flexible screen body.