AdityaSantosh / aeroquad

Automatically exported from code.google.com/p/aeroquad
0 stars 0 forks source link

FINDZERO usage should be changed #112

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The array declarations using FINDZERO are located on the stack now, so
#if defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
  #define FINDZERO 9
#else
  #define FINDZERO 49
#endif
in AeroQuad.h can be changed back to
#define FINDZERO 49

In Accel.h line 289 we have:
#ifdef ArduCopter
class Accel_ArduCopter : public Accel {
private:
  int findZero[FINDZERO];

The findZero array declaration has to be moved to line 331, so
  void calibrate(void) {
    for(byte calAxis = XAXIS; calAxis < LASTAXIS; calAxis++) {
becomes
  void calibrate(void) {
    int findZero[FINDZERO];
    for(byte calAxis = XAXIS; calAxis < LASTAXIS; calAxis++) {

Original issue reported on code.google.com by al...@arcor.de on 17 Mar 2011 at 6:36

GoogleCodeExporter commented 8 years ago
I made these 2 changes in my branch... Thanks for pointing them out...

Original comment by akadam...@gmail.com on 18 Mar 2011 at 2:43

GoogleCodeExporter commented 8 years ago

Original comment by CaranchoEngineering@gmail.com on 25 Jun 2011 at 4:41