there's some rename PID values.
#define PIDVEL 4
Changed to
#define PIDPOS 4
Resulting in that LCD is broken.

/PatrikE
Code: Select all
LCD:766: error: 'lcd_param_text14' was not declared in this scope
LCD:766: error: 'PIDVEL' was not declared in this scope
LCD:767: error: 'lcd_param_text15' was not declared in this scope
LCD:767: error: 'PIDVEL' was not declared in this scope
LCD:768: error: 'lcd_param_text16' was not declared in this scope
LCD:768: error: 'PIDVEL' was not declared in this scope
Code: Select all
#if defined(I2C_GPS)
GPS_Enable = 1;
#endif
dramida wrote:This is how dev20120528 works. Complete features video: Gps return-to-Home, GPS Position Hold, Altitude Hold, Magnetic Head Hold.
http://www.youtube.com/watch?v=952DYF3XV8s
Code: Select all
#if MAG
// Attitude of the cross product vector GxM
heading = _atan2( EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X , EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z ) / 10;
#endif
Code: Select all
#if MAG
// Attitude of the cross product vector GxM
//******************************************EOSBANDI - removed /10 to increase precision of decliniation calc
heading = _atan2( EstG.V.X * EstM.V.Z - EstG.V.Z * EstM.V.X , EstG.V.Z * EstM.V.Y - EstG.V.Y * EstM.V.Z );
//******************************************EOSBANDI
//add declination
//Heading is -180 - 180 had to wrap up accordingly
heading = heading + (MAG_DECLINIATION * 10);
heading = heading /10; // /10 moved here from above
if ( heading > 180)
heading = heading - 360;
else if (heading < -180)
heading = heading + 360;
//***************************************************
#endif
Code: Select all
#if defined(HMC5883)
magCal[ROLL] = 1160.0 / abs(magADC[ROLL]);
magCal[PITCH] = 1160.0 / abs(magADC[PITCH]);
magCal[YAW] = 1080.0 / abs(magADC[YAW]);
#else
nhadrian wrote:And another one... :
With this I get false MAG calibration, N and S are ok, but E and W have 5-6 degrees error:Code: Select all
#if defined(HMC5883)
magCal[ROLL] = 1160.0 / abs(magADC[ROLL]);
magCal[PITCH] = 1160.0 / abs(magADC[PITCH]);
magCal[YAW] = 1080.0 / abs(magADC[YAW]);
#else
So I had to change to this for proper mag working:
magCal[ROLL] = 1000.0 / abs(magADC[ROLL]);
magCal[PITCH] = 1000.0 / abs(magADC[PITCH]);
magCal[YAW] = 1080.0 / abs(magADC[YAW]);
#else[/code]
I don't know why...
BR
Adrian
Code: Select all
LCD:766: error: 'lcd_param_text14' was not declared in this scope
LCD:766: error: 'PIDVEL' was not declared in this scope
LCD:767: error: 'lcd_param_text15' was not declared in this scope
LCD:767: error: 'PIDVEL' was not declared in this scope
LCD:768: error: 'lcd_param_text16' was not declared in this scope
LCD:768: error: 'PIDVEL' was not declared in this scope
Code: Select all
#if BARO
&lcd_param_text11, &conf.P8[PIDALT], &__P,
&lcd_param_text12, &conf.I8[PIDALT], &__I,
&lcd_param_text13, &conf.D8[PIDALT], &__D,
//&lcd_param_text14, &conf.P8[PIDVEL], &__P,
//&lcd_param_text15, &conf.I8[PIDVEL], &__I,
//&lcd_param_text16, &conf.D8[PIDVEL], &__D,
#endif
nhadrian wrote:Hi,
after reading the link you posted and followed this method, now it works with 1160/1160/1080 :
- rotate yaw 360 degree (x,y calibration)
- rotate pitch 360 degree (y z calibration)
- point multicopter west
- roll 360 degree (x z calibration)
So, the code is OK, but the method I used till now (rotate the copter around all axes, but in level) may result false calibration, so the methon mentioned above must followed!!!
BR
Adrian
so the methon mentioned above must followed!!!
rbirdie001 wrote:-Is it planned that advanced parameters (like servo centrepoints) currently reachable only by LCD will be soon accessible via GUI?
Hamburger wrote:about 168p - read up on the specs of this mcu what is different from 328p, that may help you identify the root of your problem. Way easier to invest in a 328p arduino, imho.
Scotth72 wrote:I don't have access to pin 19 on my Mega, and I would like to use PPM sum. I used to use this code to move the ppm pin to pin 2, but I can't find the pin order in the new code.
changing this:
#define PPM_PIN_INTERRUPT attachInterrupt(4, rxInt, RISING); //PIN 19
#define MOTOR_ORDER 3,5,6,2,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left
to this:
#define PPM_PIN_INTERRUPT attachInterrupt(0, rxInt, RISING); //PIN 2
#define MOTOR_ORDER 3,5,6,9,7,8 //for a quad+: rear,right,left,front //+ for y6: 7:under right 8:under left
How would I achieve the same result in the new code?
Thanks.
Scotth72 wrote:I have the old Flyduino, where pin 19 is out to that tiny jst connector. Makes it useless. I would like to use serial 2 or 3, which do have regular pins.