From 07d7b29729736c64170ab94ece8ba4c375bceae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 24 Oct 2017 21:59:24 +0200 Subject: [PATCH] simulator_mavlink: fix type passed to param_get() --- src/modules/simulator/simulator_mavlink.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/simulator/simulator_mavlink.cpp b/src/modules/simulator/simulator_mavlink.cpp index e53492f92c..56bcf647a8 100644 --- a/src/modules/simulator/simulator_mavlink.cpp +++ b/src/modules/simulator/simulator_mavlink.cpp @@ -1106,8 +1106,9 @@ int Simulator::publish_flow_topic(mavlink_hil_optical_flow_t *flow_mavlink) flow.quality = flow_mavlink->quality; /* rotate measurements according to parameter */ - enum Rotation flow_rot; - param_get(param_find("SENS_FLOW_ROT"), &flow_rot); + int32_t flow_rot_int; + param_get(param_find("SENS_FLOW_ROT"), &flow_rot_int); + const enum Rotation flow_rot = (Rotation)flow_rot_int; float zeroval = 0.0f; rotate_3f(flow_rot, flow.pixel_flow_x_integral, flow.pixel_flow_y_integral, zeroval);