The px4flow won’t be able to communicate with the cube, if the system is booted with battery directly. There is no flow information on the log, and neither loiter mode switch nor arming in loiter is possible.
However, if the cube is booted with USB cable, the flow sensor values are transmitted to the copter nicely, and I was able to achieve position hold.
For now I was using the following fix: Cannot switch to loiter mode with optical flow
Happy to do any test related.
Thanks for the reports. Sorry for the slow reply but I’ve had a look at this and I’ve raised a PR which I hope will resolve the problem. https://github.com/ArduPilot/ardupilot/pull/6803
Basically we try 10x at startup to connect to the flow sensor. I’ve produced a couple of binaries linked below (-v2 is for Pixhawk, -v3 is for the Cube). If you want to give them a try and report back whether it helps that would be great. Note that these binaries are Copter-3.6 which hasn’t gone through beta testing so I don’t recommend trying to actually fly it.
Thanks Randy - I’ll give this a try when I have a minute.
so I gave your firmware a try ( -v3 more specifically, since I have my optical flow installed on a Pixhawk 2).
Before I installed the new firmware, I verified that the flow_enable resetting problem was still prominent (which it was).
After installing the firmware, I powercycled the system multiple times. I also powered the pixhawk by itself(via USB), leaving the px4flow without power (the I2C bus gets its power separately) .
Repeating those two procedures multiple times did not reset the flow_enable parameter. Success! Thank you very much Randy!!
However, I now get a red error message in the hud saying: “bad optflow health”. Also both opt_m_x / _y are zero.
Going back to 3.5.2 rc1 the flow_enable keeps resetting again. But also, no “bad optflow heath” message and reasonable opt_m_x / _y values.
Are other people having similar results?
What socket did you connect the px4flow to?
Was it the i2c connector?
Can you show me the wiring diagram?
The wiring diagram I am using is:
The wires from left to right, looking at it as in the picture is
This is connected to the i2c2 port on the ph2.1.
But, I cannot get the px4flow to light up. It lights up when using a usb connection, but as soon as I use the i2c to power the px4flow, I don’t get lights.