This application relates to the field of
vehicle control, specifically to a method for controlling a
sunroof and a vehicle. This application, upon responding to a
sunroof opening operation, compares the actual opening degree of the sunshade with the maximum driven opening degree to clarify the relationship between the two, thus mitigating the risk of premature
sunroof opening from the control source. Secondly, based on the comparison results, a targeted
motion strategy is formulated. If the actual opening degree of the sunshade already meets the maximum driven opening degree, the sunroof can be directly controlled to open normally. If not, the strategy is adjusted to ensure that the sunroof movement does not exceed the sunshade's
adaptation range, avoiding an imbalance in the two opening degrees. Finally, this
control logic does not require modification of the existing independent mechanical structure. Through linked judgment and strategy adjustment, it achieves dynamic
adaptation between the sunroof opening and the sunshade opening degree, completely solving the problem of sunshade damage due to
airflow impact and friction during driving caused by mismatched opening degrees, ensuring component lifespan and
driving safety.