Actuators Driver for Asctec V2 ESC
required xml configuration:
- servo section with driver="Asctec_v2"
- 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!
<module name="actuators_asctec_v2">
b'<configure name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2cX" />\n '
</module>
Module configuration options
Configure Options
- name:
ACTUATORS_ASCTEC_V2_I2C_DEV
value: i2cX
Description: I2C port (default i2c1)
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw actuators_asctec_v2.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="actuators_asctec_v2" dir="actuators" task="actuators">
<doc>
<description>
Actuators Driver for Asctec V2 ESC
required xml configuration:
- servo section with driver="Asctec_v2"
- command_laws section to map motor_mixing commands to servos
</description>
<configure name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2cX" description="I2C port (default i2c1)"/>
</doc>
<dep>
<depends>i2c,actuators</depends>
<provides>actuators</provides>
</dep>
<header>
<file name="actuators_asctec_v2.h"/>
</header>
<makefile target="!sim|nps">
<configure name="ACTUATORS_ASCTEC_V2_I2C_DEV" default="i2c1" case="upper|lower"/>
<configure name="ACTUATORS_ASCTEC_V2_I2C_SCL_TIME" default="150"/>
<define name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="$(ACTUATORS_ASCTEC_V2_I2C_DEV_LOWER)"/>
<define name="USE_$(ACTUATORS_ASCTEC_V2_I2C_DEV_UPPER)"/>
<file name="actuators_asctec_v2.c"/>
<test>
<define name="SERVO_FRONT_IDX" value="0"/>
<define name="SERVO_BACK_IDX" value="1"/>
<define name="SERVO_LEFT_IDX" value="2"/>
<define name="SERVO_RIGHT_IDX" value="3"/>
<define name="USE_I2C1"/>
<define name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2c1"/>
</test>
</makefile>
<makefile target="nps">
<define name="USE_I2C0"/>
<define name="ACTUATORS_ASCTEC_V2_I2C_DEV" value="i2c0"/>
<file name="actuators_asctec_v2.c"/>
</makefile>
</module>