Hereflow optical flow works but there's still some drift

Hello, i mounted the hereflow optical flow on my quadcopter with a pixhawk 2.1 running on the 4.0.5 firmware, i made all the necessary settings and calibrations, and the flowX is identical to bodyX, same for Y axis along with gyros, however, it seems like the pixhawk isen’t taking taking into considerations the values from the sensor properly, there’s still a drift on loiter and flowhold mode, however, if rotate the orientation of the sensor, the quadcopter behaves crazy which indicates that the sensor is working fine. any solution please?

.bin log file please. We can not guess what is wrong with your system. No telepathic powers here :slight_smile:

Thanks for your reply, i somehow managed to make it work by re flashing the firmware and then following the instructions, “which is exactly what i did before few times but it diden’t work, but now it did and i dont know why” also when i was going to set up log files for you,i wascleaning the desk and i picked up my quad without noticing that the cube was plugged to the pc, “boom connecter gets out from the cube” , i tried to open the cube to resolder the usb connecter, the moment i opend the cuber, an ic got damaged along with a via and a trace, now i dont know what to do, i tried to find the bottom circuit of the cube black online, but all i can find is a cube for 200 dollars :confused:

what do you mean by reflashing the firmware? Are you talking about reflashing the pixhawk or the Hereflow? and follow these instructions https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html#common-optical-flow-sensor-setup. I’ve been having this problem for the longest time and there are very few to no solution for the drifting with the Hereflow