newbie testing phase


i am trying to conduct the tests before i fly my skywalker.

i have test flown my plane without any gear and have now just installed all the ardupilot.

on the test page http://code.google.com/p/ardupilot/wiki/Test

i have tried inputting 1 into my arudpilot with the new 2.7.0 code

AP_config.h

// Debug options - set only one of these options to 1 at a time, set the others to 0
#define DEBUG_SUBSYSTEM 1         // 0 = no debug
                                // 1 = Debug the Radio input
                                // 2 = Debug the Servo output
                                // 3 = Debug the Sensor input
                                // 4 = Debug the GPS input
                                // 5 = Debug the GPS input - RAW HEX OUTPUT
                                // 6 = Debug the IMU
                                // 7 = Debug the Control Switch
                                // 8 = Debug the Throttle
                                // 9 = Radio Min Max values


i hit upload and it stops 10 seconds in and highlights this piece of code on the ardupilot 2.7.0 tab

*/
       
float kp[]={SERVO_ROLL_P, SERVO_PITCH_P, SERVO_RUDDER_P, NAV_ROLL_P,NAV_PITCH_ASP_P, NAV_PITCH_ALT_P, THROTTLE_TE_P, THROTTLE_ALT_P};
floatki[]={SERVO_ROLL_I, SERVO_PITCH_I, SERVO_RUDDER_I, NAV_ROLL_I,NAV_PITCH_ASP_I, NAV_PITCH_ALT_I, THROTTLE_TE_I, THROTTLE_ALT_I};
floatkd[]={SERVO_ROLL_D, SERVO_PITCH_D, SERVO_RUDDER_D, NAV_ROLL_D,NAV_PITCH_ASP_D, NAV_PITCH_ALT_D, THROTTLE_TE_D, THROTTLE_ALT_D};       

const float integrator_max[] = {SERVO_ROLL_INT_MAX,SERVO_PITCH_INT_MAX, SERVO_RUDDER_INT_MAX, NAV_ROLL_INT_MAX,NAV_PITCH_ASP_INT_MAX, NAV_PITCH_ALT_INT_MAX, THROTTLE_TE_INT_MAX,THROTTLE_ALT_INT_MAX};

float    integrator[] = {0,0,0,0,0,0,0,0};    // PID Integrators
float    last_error[] = {0,0,0,0,0,0,0,0};    // PID last error for derivative
float     nav_gain_scaler    = 1;            // Gain scaling for headwind/tailwind


and the error below reads

error: 'SERVO_ROLL_P' was not declared in this scope In function 'void stabilize()':
 In function 'float roll_slew_limit(float)':
 In function 'float throttle_slew_limit(float)':
 In function 'void update_crosstrack()':

can someone explain what i am meant to setup here.

PS the new test page isnt very self explanitry for beginers.





You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer
    That's an odd error. My guess is Arduino is confused and this is a bad guess at the location of the error.

    You seem to be missing your AP_PID_settings.h file. Have you renamed it or commented it out from the main ArduPilot_2_7.pde file?

    SERVO_ROLL_P is a "define" which is basically a "find and replace" done by the compiler when you hit the compile or upload button. We use them to insert a value into the code in multiple places. They also make for easy to use config files.

    If for some reason you fail to include a file that has one of these defines, you may have strange results or failed compilations.

    Look for :

    #include "AP_Config.h"
    #include "AP_PID_settings.h"

    a double slash // is a comment and will disable any code it proceeds.
  • anyone ?
This reply was deleted.

Activity