From 3c987d63680d153e4d954ad6249d24e5448e2204 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 31 Oct 2012 18:50:00 +0100 Subject: [PATCH] Casting and fix default param path --- apps/mavlink/mavlink_receiver.c | 9 ++++----- apps/systemcmds/param/param.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/mavlink/mavlink_receiver.c b/apps/mavlink/mavlink_receiver.c index cfff0f4694..826eb5625a 100644 --- a/apps/mavlink/mavlink_receiver.c +++ b/apps/mavlink/mavlink_receiver.c @@ -253,14 +253,13 @@ handle_message(mavlink_message_t *msg) break; } - offboard_control_sp.p1 = quad_motors_setpoint.roll[mavlink_system.sysid] / (float)INT16_MAX; - offboard_control_sp.p2 = quad_motors_setpoint.pitch[mavlink_system.sysid] / (float)INT16_MAX; - offboard_control_sp.p3= quad_motors_setpoint.yaw[mavlink_system.sysid] / (float)INT16_MAX; + offboard_control_sp.p1 = (float)quad_motors_setpoint.roll[mavlink_system.sysid] / (float)INT16_MAX; + offboard_control_sp.p2 = (float)quad_motors_setpoint.pitch[mavlink_system.sysid] / (float)INT16_MAX; + offboard_control_sp.p3= (float)quad_motors_setpoint.yaw[mavlink_system.sysid] / (float)INT16_MAX; offboard_control_sp.p4 = (float)quad_motors_setpoint.thrust[mavlink_system.sysid]/(float)UINT16_MAX; - if (quad_motors_setpoint.thrust[mavlink_system.sysid] ==0){ + if (quad_motors_setpoint.thrust[mavlink_system.sysid] == 0) { ml_armed = false; - } offboard_control_sp.armed = ml_armed; diff --git a/apps/systemcmds/param/param.c b/apps/systemcmds/param/param.c index 77f47b95de..9cb280933e 100644 --- a/apps/systemcmds/param/param.c +++ b/apps/systemcmds/param/param.c @@ -62,7 +62,7 @@ static void do_import(const char* param_file_name); static void do_show(void); static void do_show_print(void *arg, param_t param); -static const char *param_file_name_default = "/fs/microsd/parameters"; +static const char *param_file_name_default = "/eeprom/parameters"; int param_main(int argc, char *argv[])