A Problem about the Continuous Rotation of Drones

Hi

I installed an optical flow sensor at the bottom of the quadcopter drone and attempted to perform offboard mode. When executing the official website routine code, the drone spun wildly and took off in a spiral. It rotates in the yaw direction. Do you know what the reason would be?

Thank you for your help!
1e7cc4fe4870aa15855fe3f308f60ed