mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 11:37:06 +08:00
[rotorcraft sim] some fixes for actuators arch
* removed actuators mkk sim arch * added pwm arch
This commit is contained in:
@@ -14,5 +14,5 @@ endif
|
|||||||
|
|
||||||
# Simulator
|
# Simulator
|
||||||
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
||||||
sim.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=11
|
sim.CFLAGS += -DUSE_I2C0 -DACTUATORS_ASCTEC_DEVICE=i2c0
|
||||||
|
|
||||||
|
|||||||
@@ -29,3 +29,8 @@ ifeq ($(ARCH), stm32)
|
|||||||
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
|
ap.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
|
||||||
ap.CFLAGS += -DUSE_I2C1
|
ap.CFLAGS += -DUSE_I2C1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Simulator
|
||||||
|
sim.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||||
|
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_asctec.c
|
||||||
|
sim.CFLAGS += -DUSE_I2C0 -DACTUATORS_ASCTEC_DEVICE=i2c0
|
||||||
|
|||||||
@@ -33,17 +33,19 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||||
|
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
|
||||||
|
|
||||||
|
ifeq ($(ARCH), lpc21)
|
||||||
|
|
||||||
# set default i2c timing if not already configured
|
# set default i2c timing if not already configured
|
||||||
ifeq ($(MKK_I2C_SCL_TIME), )
|
ifeq ($(MKK_I2C_SCL_TIME), )
|
||||||
MKK_I2C_SCL_TIME=150
|
MKK_I2C_SCL_TIME=150
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_mkk.c
|
|
||||||
|
|
||||||
ifeq ($(ARCH), lpc21)
|
|
||||||
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c0
|
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c0
|
||||||
ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=$(MKK_I2C_SCL_TIME) -DI2C0_SCLH=$(MKK_I2C_SCL_TIME) -DI2C0_VIC_SLOT=11
|
ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=$(MKK_I2C_SCL_TIME) -DI2C0_SCLH=$(MKK_I2C_SCL_TIME) -DI2C0_VIC_SLOT=11
|
||||||
|
|
||||||
else ifeq ($(ARCH), stm32)
|
else ifeq ($(ARCH), stm32)
|
||||||
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c1
|
ap.CFLAGS += -DACTUATORS_MKK_DEVICE=i2c1
|
||||||
ap.CFLAGS += -DUSE_I2C1
|
ap.CFLAGS += -DUSE_I2C1
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
|
|
||||||
# add actuatos arch to include directories
|
# add actuatos arch to include directories
|
||||||
ap.CFLAGS += -I$(SRC_FIRMWARE)/actuators/arch/$(ARCH)
|
$(TARGET).CFLAGS += -I$(SRC_FIRMWARE)/actuators/arch/$(ARCH)
|
||||||
|
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm_supervision.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm_supervision.c
|
||||||
ap.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c
|
ap.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c
|
||||||
|
|
||||||
|
# Simulator
|
||||||
|
sim.srcs += $(SRC_FIRMWARE)/actuators/supervision.c
|
||||||
|
sim.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm_supervision.c
|
||||||
|
sim.srcs += $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#include "actuators/actuators_mkk.h"
|
|
||||||
|
|
||||||
void actuators_mkk_arch_init(void) {}
|
|
||||||
+16
-11
@@ -1,29 +1,34 @@
|
|||||||
/*
|
/*
|
||||||
* $Id$
|
* Copyright (C) 2010 The Paparazzi Team
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Antoine Drouin <poinix@gmail.com>
|
* This file is part of Paparazzi.
|
||||||
*
|
*
|
||||||
* This file is part of paparazzi.
|
* Paparazzi is free software; you can redistribute it and/or modify
|
||||||
*
|
|
||||||
* paparazzi is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* paparazzi is distributed in the hope that it will be useful,
|
* Paparazzi is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with paparazzi; see the file COPYING. If not, write to
|
* along with Paparazzi; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ACTUATORS_MKK_ARCH_H
|
/** @file arch/sim/actuators_pwm_arch.c
|
||||||
#define ACTUATORS_MKK_ARCH_H
|
* dummy servos handling for sim
|
||||||
|
*/
|
||||||
|
|
||||||
#define ActuatorsMkkArchSend() {}
|
#include "firmwares/rotorcraft/actuators/actuators_pwm.h"
|
||||||
|
|
||||||
#endif /* ACTUATORS_MKK_ARCH_H */
|
void actuators_pwm_arch_init(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void actuators_pwm_commit(void) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2010 The Paparazzi Team
|
||||||
|
*
|
||||||
|
* This file is part of Paparazzi.
|
||||||
|
*
|
||||||
|
* Paparazzi is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* Paparazzi is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Paparazzi; see the file COPYING. If not, write to
|
||||||
|
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
|
* Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file arch/sim/actuators_pwm_arch.h
|
||||||
|
* dummy servos handling for sim
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ACTUATORS_PWM_ARCH_H
|
||||||
|
#define ACTUATORS_PWM_ARCH_H
|
||||||
|
|
||||||
|
#define ACTUATORS_PWM_NB 8
|
||||||
|
|
||||||
|
extern void actuators_pwm_arch_init(void);
|
||||||
|
extern void actuators_pwm_commit(void);
|
||||||
|
|
||||||
|
#define ChopServo(_x,_a,_b) Chop(_x, _a, _b)
|
||||||
|
#define Actuator(_x) actuators_pwm_values[_x]
|
||||||
|
#define SERVOS_TICS_OF_USEC(_v) (_v)
|
||||||
|
|
||||||
|
#endif /* ACTUATORS_PWM_ARCH_H */
|
||||||
Reference in New Issue
Block a user