Skip to content

Commit

Permalink
Motors: add loop_rate to constructor for all frames
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Mar 3, 2015
1 parent 77d4b3a commit 7ab76db
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_Motors/AP_MotorsCoax.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class AP_MotorsCoax : public AP_Motors {
public:

/// Constructor
AP_MotorsCoax( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, RC_Channel& servo1, RC_Channel& servo2, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz),
AP_MotorsCoax( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, RC_Channel& servo1, RC_Channel& servo2, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz),
_servo1(servo1),
_servo2(servo2)
{
Expand Down
3 changes: 2 additions & 1 deletion libraries/AP_Motors/AP_MotorsHeli.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ class AP_MotorsHeli : public AP_Motors {
RC_Channel& swash_servo_2,
RC_Channel& swash_servo_3,
RC_Channel& yaw_servo,
uint16_t loop_rate,
uint16_t speed_hz = AP_MOTORS_HELI_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz),
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz),
_servo_aux(servo_aux),
_servo_rsc(servo_rotor),
_servo_1(swash_servo_1),
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_Motors/AP_MotorsHexa.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AP_MotorsHexa : public AP_MotorsMatrix {
public:

/// Constructor
AP_MotorsHexa( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz) {
AP_MotorsHexa(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz) {
};

// setup_motors - configures the motors for a quad
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_Motors/AP_MotorsMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class AP_MotorsMatrix : public AP_Motors {
public:

/// Constructor
AP_MotorsMatrix( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz)
AP_MotorsMatrix(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz)
{};

// init
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_Motors/AP_MotorsOcta.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AP_MotorsOcta : public AP_MotorsMatrix {
public:

/// Constructor
AP_MotorsOcta( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz) {
AP_MotorsOcta(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz) {
};

// setup_motors - configures the motors for a quad
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_Motors/AP_MotorsOctaQuad.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AP_MotorsOctaQuad : public AP_MotorsMatrix {
public:

/// Constructor
AP_MotorsOctaQuad( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz) {
AP_MotorsOctaQuad(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz) {
};

// setup_motors - configures the motors for a quad
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_Motors/AP_MotorsQuad.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AP_MotorsQuad : public AP_MotorsMatrix {
public:

/// Constructor
AP_MotorsQuad( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz) {
AP_MotorsQuad(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz) {
};

// setup_motors - configures the motors for a quad
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_Motors/AP_MotorsSingle.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class AP_MotorsSingle : public AP_Motors {
public:

/// Constructor
AP_MotorsSingle( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, RC_Channel& servo1, RC_Channel& servo2, RC_Channel& servo3, RC_Channel& servo4, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz),
AP_MotorsSingle(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, RC_Channel& servo1, RC_Channel& servo2, RC_Channel& servo3, RC_Channel& servo4, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz),
_servo1(servo1),
_servo2(servo2),
_servo3(servo3),
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_Motors/AP_MotorsTri.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class AP_MotorsTri : public AP_Motors {
public:

/// Constructor
AP_MotorsTri( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, RC_Channel& rc_tail, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz),
AP_MotorsTri(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, RC_Channel& rc_tail, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) :
AP_Motors(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz),
_rc_tail(rc_tail) {
};

Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_Motors/AP_MotorsY6.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AP_MotorsY6 : public AP_MotorsMatrix {
public:

/// Constructor
AP_MotorsY6( RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, speed_hz) {
AP_MotorsY6(RC_Channel& rc_roll, RC_Channel& rc_pitch, RC_Channel& rc_throttle, RC_Channel& rc_yaw, uint16_t loop_rate, uint16_t speed_hz = AP_MOTORS_SPEED_DEFAULT) : AP_MotorsMatrix(rc_roll, rc_pitch, rc_throttle, rc_yaw, loop_rate, speed_hz) {
};

// setup_motors - configures the motors for a quad
Expand Down

0 comments on commit 7ab76db

Please sign in to comment.