diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-26 22:16:57 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-26 22:16:57 +0200 |
commit | d7456e61ffdf8587973e977a529d297aed233c22 (patch) | |
tree | 9e366f900e90e04fa37dc1fb3239f7adeba1ef62 | |
parent | cbb1f1c9eda7f4eb3b4b8be8be80eeb1ad7b9209 (diff) | |
download | px4-firmware-d7456e61ffdf8587973e977a529d297aed233c22.tar.gz px4-firmware-d7456e61ffdf8587973e977a529d297aed233c22.tar.bz2 px4-firmware-d7456e61ffdf8587973e977a529d297aed233c22.zip |
Fixed a max value in the AR.Drone interface
-rw-r--r-- | apps/ardrone_interface/ardrone_interface.c | 2 | ||||
-rw-r--r-- | apps/ardrone_interface/ardrone_motor_control.c | 4 | ||||
-rw-r--r-- | apps/ardrone_interface/ardrone_motor_control.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/apps/ardrone_interface/ardrone_interface.c b/apps/ardrone_interface/ardrone_interface.c index 8d77e7502..8031497d2 100644 --- a/apps/ardrone_interface/ardrone_interface.c +++ b/apps/ardrone_interface/ardrone_interface.c @@ -1,7 +1,7 @@ /**************************************************************************** * * Copyright (C) 2012 PX4 Development Team. All rights reserved. - * Author: @author Lorenz Meier <lm@inf.ethz.ch> + * Author: Lorenz Meier <lm@inf.ethz.ch> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/apps/ardrone_interface/ardrone_motor_control.c b/apps/ardrone_interface/ardrone_motor_control.c index 787db1877..edb518631 100644 --- a/apps/ardrone_interface/ardrone_motor_control.c +++ b/apps/ardrone_interface/ardrone_motor_control.c @@ -306,7 +306,7 @@ int ar_init_motors(int ardrone_uart, int gpios) return errcounter; } -/* +/** * Sets the leds on the motor controllers, 1 turns led on, 0 off. */ void ar_set_leds(int ardrone_uart, uint8_t led1_red, uint8_t led1_green, uint8_t led2_red, uint8_t led2_green, uint8_t led3_red, uint8_t led3_green, uint8_t led4_red, uint8_t led4_green) @@ -370,7 +370,7 @@ void ardrone_mixing_and_output(int ardrone_write, const struct actuator_controls const float min_thrust = 0.02f; /**< 2% minimum thrust */ const float max_thrust = 1.0f; /**< 100% max thrust */ - const float scaling = 512.0f; /**< 100% thrust equals a value of 512 */ + const float scaling = 500.0f; /**< 100% thrust equals a value of 500 which works, 512 leads to cutoff */ const float min_gas = min_thrust * scaling; /**< value range sent to motors, minimum */ const float max_gas = max_thrust * scaling; /**< value range sent to motors, maximum */ diff --git a/apps/ardrone_interface/ardrone_motor_control.h b/apps/ardrone_interface/ardrone_motor_control.h index 664419707..78b603b63 100644 --- a/apps/ardrone_interface/ardrone_motor_control.h +++ b/apps/ardrone_interface/ardrone_motor_control.h @@ -87,4 +87,7 @@ int ar_init_motors(int ardrone_uart, int gpio); */ void ar_set_leds(int ardrone_uart, uint8_t led1_red, uint8_t led1_green, uint8_t led2_red, uint8_t led2_green, uint8_t led3_red, uint8_t led3_green, uint8_t led4_red, uint8_t led4_green); +/** + * Mix motors and output actuators + */ void ardrone_mixing_and_output(int ardrone_write, const struct actuator_controls_s *actuators); |