Skip to content

Commit

Permalink
[actuators/asctec] disable the i2c hack for the general case
Browse files Browse the repository at this point in the history
It can be activated for lisa/m boards with the flag:
USE_I2C_ACTUATORS_REBOOT_HACK

This issue should be handled at the i2c level (#71)
  • Loading branch information
gautierhattenberger committed Feb 7, 2013
1 parent f456421 commit f6cc321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/airframes/examples/lisa_asctec.xml
Expand Up @@ -196,6 +196,7 @@
<define name="RADIO_MODE" value="RADIO_AUX2"/>
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/>
<define name="RADIO_CONTROL_SPEKTRUM_SIGNS" value="\{1,1,-1,1,-1,-1,-1,1,1,1,1,1\}"/>
<define name="USE_I2C_ACTUATORS_REBOOT_HACK"/>
</target>
<target name="sim" board="pc">
<subsystem name="fdm" type="jsbsim"/>
Expand Down
2 changes: 2 additions & 0 deletions sw/airborne/subsystems/actuators/actuators_asctec.c
Expand Up @@ -142,9 +142,11 @@ void actuators_asctec_set(bool_t motors_on) {
#if defined ACTUATORS_START_DELAY && ! defined SITL
if (!actuators_delay_done) {
if (SysTimeTimer(actuators_delay_time) < USEC_OF_SEC(ACTUATORS_START_DELAY)) {
#ifdef USE_I2C_ACTUATORS_REBOOT_HACK
//Lisa-L with Asctech v2 motors only start after reflashing when a bus error was sensed on stm32-i2c.
//multiple re-init solves the problem.
i2c1_init();
#endif
return;
}
else actuators_delay_done = TRUE;
Expand Down

0 comments on commit f6cc321

Please sign in to comment.