Actuators Driver for Asctec V1 ESC
required xml configuration:
- servo section with driver="Asctec"
- command_laws section to map motor_mixing commands to servos
Example for airframe file
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
1 <module name="actuators_asctec">
2 <configure name="ACTUATORS_ASCTEC_I2C_DEV" value="i2cX" />
3 <configure name="ACTUATORS_ASCTEC_I2C_SCL_TIME" value="150" />
Module configuration options
Configure Options
- name:
ACTUATORS_ASCTEC_I2C_DEV
value: i2cX
Description: I2C port (default i2c1)
- name:
ACTUATORS_ASCTEC_I2C_SCL_TIME
value: 150
Description: configurable I2C timing on lpc21 boards
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw actuators_asctec.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="actuators_asctec" dir="actuators" task="actuators">
<doc>
<description>
Actuators Driver for Asctec V1 ESC
required xml configuration:
- servo section with driver="Asctec"
- command_laws section to map motor_mixing commands to servos
</description>
<configure name="ACTUATORS_ASCTEC_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
<configure name="ACTUATORS_ASCTEC_I2C_SCL_TIME" value="150" description="configurable I2C timing on lpc21 boards"/>
</doc>
<header>
<file name="actuators_asctec.h" dir="subsystems/actuators"/>
</header>
<makefile target="!sim|nps">
<configure name="ACTUATORS_ASCTEC_I2C_DEV" default="i2c1" case="upper|lower"/>
<configure name="ACTUATORS_ASCTEC_I2C_SCL_TIME" default="150"/>
<define name="ACTUATORS"/>
<define name="ACTUATORS_ASCTEC_I2C_DEV" value="$(ACTUATORS_ASCTEC_I2C_DEV_LOWER)"/>
<define name="USE_$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)"/>
<define name="$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)_SCLL" value="$(ACTUATORS_ASCTEC_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
<define name="$(ACTUATORS_ASCTEC_I2C_DEV_UPPER)_SCLH" value="$(ACTUATORS_ASCTEC_I2C_SCL_TIME)" cond="ifeq ($(ARCH), lpc21)"/>
<file name="actuators_asctec.c" dir="subsystems/actuators"/>
</makefile>
<makefile target="nps">
<define name="USE_I2C0"/>
<define name="ACTUATORS_ASCTEC_I2C_DEV" value="i2c0"/>
<file name="actuators_asctec.c" dir="subsystems/actuators"/>
</makefile>
</module>