Browse Source

move g_rc_function[] to RC_Channel library

libraries should not rely on data declared in the main program. This
caused a build error for the Desktop build for ArduCopter under cygwin
master
Andrew Tridgell 13 years ago
parent
commit
0211fc2f09
  1. 1
      ArduPlane/ArduPlane.pde
  2. 2
      libraries/RC_Channel/RC_Channel_aux.cpp
  3. 1
      libraries/RC_Channel/RC_Channel_aux.h

1
ArduPlane/ArduPlane.pde

@ -402,7 +402,6 @@ static unsigned long nav_loopTimer; // used to track the elapsed time for GP @@ -402,7 +402,6 @@ static unsigned long nav_loopTimer; // used to track the elapsed time for GP
static unsigned long dTnav; // Delta Time in milliseconds for navigation computations
static float load; // % MCU cycles used
RC_Channel_aux* g_rc_function[RC_Channel_aux::k_nr_aux_servo_functions]; // the aux. servo ch. assigned to each function
AP_Relay relay;
////////////////////////////////////////////////////////////////////////////////

2
libraries/RC_Channel/RC_Channel_aux.cpp

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
#include <APM_RC.h>
#include "RC_Channel_aux.h"
extern RC_Channel_aux* g_rc_function[RC_Channel_aux::k_nr_aux_servo_functions]; // the aux. servo ch. assigned to each function
RC_Channel_aux* g_rc_function[RC_Channel_aux::k_nr_aux_servo_functions]; // the aux. servo ch. assigned to each function
// map a function to a servo channel and output it
void

1
libraries/RC_Channel/RC_Channel_aux.h

@ -44,5 +44,6 @@ public: @@ -44,5 +44,6 @@ public:
};
void update_aux_servo_function(RC_Channel_aux* rc_5, RC_Channel_aux* rc_6, RC_Channel_aux* rc_7, RC_Channel_aux* rc_8);
extern RC_Channel_aux* g_rc_function[RC_Channel_aux::k_nr_aux_servo_functions]; // the aux. servo ch. assigned to each function
#endif /* RC_CHANNEL_AUX_H_ */

Loading…
Cancel
Save