mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
mavlink_opticalflow: always send flow packets regardless of quality
the flight controller performs best if it has regular updates
This commit is contained in:
parent
b60bec96cf
commit
bb5f910e9e
@ -91,11 +91,8 @@ while(True):
|
|||||||
sub_pixel_x = int(-displacement.x_translation() * 35)
|
sub_pixel_x = int(-displacement.x_translation() * 35)
|
||||||
sub_pixel_y = int(displacement.y_translation() * 53)
|
sub_pixel_y = int(displacement.y_translation() * 53)
|
||||||
|
|
||||||
if(displacement.response() > MAV_OPTICAL_FLOW_confidence_threshold):
|
send_optical_flow_packet(sub_pixel_x, sub_pixel_y, displacement.response())
|
||||||
send_optical_flow_packet(sub_pixel_x, sub_pixel_y, displacement.response())
|
|
||||||
|
|
||||||
print("{0:+f}x {1:+f}y {2} {3} FPS".format(sub_pixel_x, sub_pixel_y,
|
print("{0:+f}x {1:+f}y {2} {3} FPS".format(sub_pixel_x, sub_pixel_y,
|
||||||
displacement.response(),
|
displacement.response(),
|
||||||
clock.fps()))
|
clock.fps()))
|
||||||
else:
|
|
||||||
print(clock.fps())
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user