Detecting presence of cap.

Use PM6 diffuse reflection photoelectric switch sensor to realize the detection of the presence or absence of the cover.