Skip to content

Commit

Permalink
removed static from mixer matrix (clang compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Jun 28, 2017
1 parent d1fa3aa commit 87e5445
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions AirLib/include/controllers/simple_flight/firmware/Mixer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class Mixer {
for (int motor_index = 0; motor_index < kMotorCount; ++motor_index) {
if (controls.throttle > 0) {
motor_outputs[motor_index] =
controls.throttle * Mixer::mixerQuadX[motor_index].throttle
+ controls.angles.pitch * Mixer::mixerQuadX[motor_index].pitch
+ controls.angles.roll * Mixer::mixerQuadX[motor_index].roll
+ controls.angles.yaw * Mixer::mixerQuadX[motor_index].yaw
controls.throttle * mixerQuadX[motor_index].throttle
+ controls.angles.pitch * mixerQuadX[motor_index].pitch
+ controls.angles.roll * mixerQuadX[motor_index].roll
+ controls.angles.yaw * mixerQuadX[motor_index].yaw
;
}
else {
Expand Down Expand Up @@ -67,7 +67,7 @@ class Mixer {
} motorMixer_t;

//only thing that this matrix does is change the sign
static constexpr motorMixer_t mixerQuadX[] = { //QuadX config
const motorMixer_t mixerQuadX[4] = { //QuadX config
{ 1.0f, -1.0f, 1.0f, 1.0f }, // FRONT_R
{ 1.0f, 1.0f, -1.0f, 1.0f }, // REAR_L
{ 1.0f, 1.0f, 1.0f, -1.0f }, // FRONT_L
Expand Down

0 comments on commit 87e5445

Please sign in to comment.