Skip to content

Commit

Permalink
bebop correct motor directions i2c
Browse files Browse the repository at this point in the history
closes #1468
  • Loading branch information
EwoudSmeur authored and flixr committed Dec 8, 2015
1 parent dd308eb commit d608f1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sw/airborne/boards/bebop/actuators.c
Expand Up @@ -99,12 +99,12 @@ void actuators_bebop_commit(void)
// Start the motors
actuators_bebop.i2c_trans.buf[0] = ACTUATORS_BEBOP_START_PROP;
#if BEBOP_VERSION2
actuators_bebop.i2c_trans.buf[1] = 0b00000110; // For Bebop version 2 some motors are reversed (FIXME: test final version)
i2c_transmit(&i2c1, &actuators_bebop.i2c_trans, actuators_bebop.i2c_trans.slave_addr, 2);
// For Bebop version 2 some motors are reversed (FIXME: test final version)
actuators_bebop.i2c_trans.buf[1] = 0b00000110;
#else
actuators_bebop.i2c_trans.buf[1] = 0b00000000;
i2c_transmit(&i2c1, &actuators_bebop.i2c_trans, actuators_bebop.i2c_trans.slave_addr, 1);
actuators_bebop.i2c_trans.buf[1] = 0b00000101;
#endif
i2c_transmit(&i2c1, &actuators_bebop.i2c_trans, actuators_bebop.i2c_trans.slave_addr, 2);
}
// Stop the motors
else if (actuators_bebop.i2c_trans.buf[10] == 4 && !autopilot_motors_on) {
Expand Down

0 comments on commit d608f1a

Please sign in to comment.