Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/paparazzi/paparazzi
Browse files Browse the repository at this point in the history
  • Loading branch information
rbdavison committed Feb 10, 2011
2 parents fcf9f3c + 1885aec commit 5412fc3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions conf/autopilot/rotorcraft.makefile
Expand Up @@ -95,6 +95,9 @@ endif
#
ap.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c

# I2C is needed for speed controllers and barometers on lisa
ap.srcs += mcu_periph/i2c.c
ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c

ap.srcs += $(SRC_BOOZ)/booz2_commands.c

Expand Down Expand Up @@ -134,8 +137,6 @@ ifeq ($(BOARD), booz)
ap.CFLAGS += -DROTORCRAFT_BARO_LED=$(BARO_LED) -DBOOZ2_ANALOG_BARO_PERIOD='SYS_TICS_OF_SEC((1./100.))'
else ifeq ($(BOARD), lisa_l)
ap.CFLAGS += -DUSE_I2C2
ap.srcs += mcu_periph/i2c.c
ap.srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
endif

#
Expand Down
11 changes: 10 additions & 1 deletion sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c
Expand Up @@ -37,6 +37,14 @@

#include "generated/airframe.h"

/* In case Asctec controllers are used without supervision */
#ifndef SUPERVISION_MIN_MOTOR
#define SUPERVISION_MIN_MOTOR 1
#endif
#ifndef SUPERVISION_MAX_MOTOR
#define SUPERVISION_MAX_MOTOR 200
#endif

uint8_t guidance_v_mode;
int32_t guidance_v_ff_cmd;
int32_t guidance_v_fb_cmd;
Expand Down Expand Up @@ -153,8 +161,9 @@ void guidance_v_run(bool_t in_flight) {
// AKA SUPERVISION and co
if (in_flight) {
// we should use something after the supervision!!! fuck!!!
int32_t cmd_hack = Chop(stabilization_cmd[COMMAND_THRUST], 1, 200);
int32_t cmd_hack = Chop(stabilization_cmd[COMMAND_THRUST], SUPERVISION_MIN_MOTOR, SUPERVISION_MAX_MOTOR);
gv_adapt_run(ins_ltp_accel.z, cmd_hack);
//gv_adapt_run(ins_ltp_accel.z, cmd_hack, guidance_v_zd_ref);
}
else {
// reset vertical filter until takeoff
Expand Down

0 comments on commit 5412fc3

Please sign in to comment.