From 5c3e059eea74b44084d7feabce16c46d23e48cba Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 12 Feb 2012 19:17:08 +1100 Subject: [PATCH] adapt Mavlink_compat.h to AP_Param --- libraries/GCS_MAVLink/Mavlink_compat.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/GCS_MAVLink/Mavlink_compat.h b/libraries/GCS_MAVLink/Mavlink_compat.h index fba0158cf9..c53544721a 100644 --- a/libraries/GCS_MAVLink/Mavlink_compat.h +++ b/libraries/GCS_MAVLink/Mavlink_compat.h @@ -53,15 +53,15 @@ #define mavlink_msg_waypoint_set_current_decode mavlink_msg_mission_set_current_decode #define mavlink_waypoint_set_current_t mavlink_mission_set_current_t -static uint8_t mav_var_type(AP_Meta_class::Type_id t) +static uint8_t mav_var_type(enum ap_var_type t) { - if (t == AP_Var::k_typeid_int8) { + if (t == AP_PARAM_INT8) { return MAV_VAR_INT8; } - if (t == AP_Var::k_typeid_int16) { + if (t == AP_PARAM_INT16) { return MAV_VAR_INT16; } - if (t == AP_Var::k_typeid_int32) { + if (t == AP_PARAM_INT32) { return MAV_VAR_INT32; } // treat any others as float @@ -72,7 +72,7 @@ static uint8_t mav_var_type(AP_Meta_class::Type_id t) #else // MAVLINK10 -static uint8_t mav_var_type(AP_Meta_class::Type_id t) +static uint8_t mav_var_type(enum ap_var_type t) { return 0; }