PX4Flow with pixhawk 4

I am trying to get sensor data form PX4flow with pixhawk4. I am using TFmini lidar that is working fine and publishing correct distance and publishing to correct topic distance_sensor. Now I am able to see in mavlink console that my px4flow driver is running but the optical flow topic gives the following output.

and moreover i can not see optical_flow topic in analyzer in QGC. I have connected TFmini lidar to I2C B (6 pin port) on pixhawk 4 and PX4flow sensor to I2C A (4 pin port ) on pixhawk4. Please tell me if i am doing any mistake? why is the error and more importantly how to get rid of it.