APM 1.4 'ap' was not declared in this scope

Hi all, 

I am trying to program the board to fly with X-plane.

I did the configuration for the sketchbook, but I still get the following error message from Arduino:

AP_State.pde: In function 'void set_home_is_set(bool)':

AP_State:6: error: 'ap' was not declared in this scope
AP_State:8: error: 'DATA_SET_HOME' was not declared in this scope
AP_State:8: error: 'Log_Write_Event' was not declared in this scope
AP_State.pde: In function 'void set_armed(bool)':
AP_State:14: error: 'ap' was not declared in this scope
AP_State:16: error: 'DATA_ARMED' was not declared in this scope
AP_State:16: error: 'Log_Write_Event' was not declared in this scope
AP_State:19: error: 'DATA_DISARMED' was not declared in this scope
AP_State:19: error: 'Log_Write_Event' was not declared in this scope
AP_State.pde: In function 'void set_auto_armed(bool)':
AP_State:26: error: 'ap' was not declared in this scope
AP_State:28: error: 'DATA_AUTO_ARMED' was not declared in this scope
AP_State:28: error: 'Log_Write_Event' was not declared in this scope
AP_State.pde: In function 'void set_simple_mode(bool)':
AP_State:35: error: 'ap' was not declared in this scope
AP_State:37: error: 'DATA_SET_SIMPLE_ON' was not declared in this scope
AP_State:37: error: 'Log_Write_Event' was not declared in this scope
AP_State:39: error: 'DATA_SET_SIMPLE_OFF' was not declared in this scope
AP_State:39: error: 'Log_Write_Event' was not declared in this scope
AP_State:42: error: 'ap' was not declared in this scope
AP_State.pde: In function 'void set_failsafe(bool)':
AP_State:50: error: 'ap' was not declared in this scope
AP_State:59: error: 'failsafe_off_event' was not declared in this scope
AP_State:60: error: 'DATA_FAILSAFE_OFF' was not declared in this scope
AP_State:60: error: 'Log_Write_Event' was not declared in this scope
AP_State:65: error: 'failsafe_on_event' was not declared in this scope
AP_State:66: error: 'DATA_FAILSAFE_ON' was not declared in this scope
AP_State:66: error: 'Log_Write_Event' was not declared in this scope
AP_State.pde: In function 'void set_low_battery(bool)':
AP_State:75: error: 'ap' was not declared in this scope
AP_State:76: error: 'DATA_LOW_BATTERY' was not declared in this scope
AP_State:76: error: 'Log_Write_Event' was not declared in this scope
AP_State:78: error: 'ap' was not declared in this scope
AP_State.pde: In function 'void set_takeoff_complete(bool)':
AP_State:85: error: 'DATA_TAKEOFF' was not declared in this scope
AP_State:85: error: 'Log_Write_Event' was not declared in this scope
AP_State:87: error: 'ap' was not declared in this scope
AP_State.pde: In function 'void set_land_complete(bool)':
AP_State:94: error: 'DATA_LAND_COMPLETE' was not declared in this scope
AP_State:94: error: 'Log_Write_Event' was not declared in this scope
AP_State:96: error: 'ap' was not declared in this scope
AP_State.pde: In function 'void set_rtl_reached_alt(bool)':
AP_State:103: error: 'DATA_RTL_REACHED_ALT' was not declared in this scope
AP_State:103: error: 'Log_Write_Event' was not declared in this scope
AP_State:105: error: 'ap' was not declared in this scope
AP_State.pde: In function 'void set_alt_change(uint8_t)':
AP_State:111: error: 'alt_change_flag' was not declared in this scope
AP_State:113: error: 'REACHED_ALT' was not declared in this scope
AP_State:114: error: 'DATA_REACHED_ALT' was not declared in this scope
AP_State:114: error: 'Log_Write_Event' was not declared in this scope
AP_State:116: error: 'ASCENDING' was not declared in this scope
AP_State:117: error: 'DATA_ASCENDING' was not declared in this scope
AP_State:117: error: 'Log_Write_Event' was not declared in this scope
AP_State:119: error: 'DESCENDING' was not declared in this scope
AP_State:120: error: 'DATA_DESCENDING' was not declared in this scope
AP_State:120: error: 'Log_Write_Event' was not declared in this scope
AP_State.pde: In function 'void set_compass_healthy(bool)':
AP_State:126: error: 'ap' was not declared in this scope
AP_State:128: error: 'DATA_LOST_COMPASS' was not declared in this scope
AP_State:128: error: 'Log_Write_Event' was not declared in this scope
AP_State:131: error: 'ap' was not declared in this scope
AP_State.pde: In function 'void set_gps_healthy(bool)':
AP_State:136: error: 'ap' was not declared in this scope
AP_State:138: error: 'DATA_LOST_GPS' was not declared in this scope
AP_State:138: error: 'Log_Write_Event' was not declared in this scope
AP_State:141: error: 'ap' was not declared in this scope
AP_State.pde: In function 'void dump_state()':
AP_State:146: error: 'ap' was not declared in this scope
ArduCopter.pde: At global scope:
ArduCopter:144: error: redefinition of 'FastSerial Serial'
ArduPlane:85: error: 'FastSerial Serial' previously declared here
ArduCopter.pde: In function 'void __vector_25()':

and the error keeps on going.. 

I can post the complete error, but it was too long. please let me know if you want me to post the entire error message.

Anyone has any idea why I am getting this error?

Thanks so much!

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

Join diydrones

Email me when people reply –

Replies

  • To fly autonomous I need to go through Arduino, right?

  • 3D Robotics

    You don't need Arduino for Xplane. Just click the "HIL" version in the Mission Planner and it will load automatically. 

This reply was deleted.

Activity

DIY Robocars via Twitter
yesterday
DIY Robocars via Twitter
RT @_JonMyer: 🚨Attention DeepRacer's including #UndergroundDeepRacer🚨 Check our our LIVE stream that including @IAM_dbro Take a few moments…
Aug 5
DIY Drones via Twitter
RT @MarvelmindMaxim: Extreme precision for 60 swarming robots. #marvelmind #autonomousrobotics #robotics #swarmrobotics #rtls #ips #indoor…
Aug 3
DIY Drones via Twitter
RT @MarvelmindMaxim: Precise (±2cm) tracking for racing boats and autonomous boats. Works outdoor and indoor. #autonomous #AutonomousVehic…
Aug 3
DIY Drones via Twitter
RT @MarvelmindMaxim: Helping PixHawk folks to fly autonomous quadcopters using PX4 and ArduPilot. https://marvelmind.com/drones/ Equally suitab…
Aug 3
DIY Robocars via Twitter
RT @chr1sa: The @DIYRobocars @donkey_car virtual AI car race is starting in 15 minutes! Watch it live on Twitch https://www.twitch.tv/mossmann3333 htt…
Aug 1
DIY Robocars via Twitter
RT @chr1sa: Don't miss our monthly @DIYRobocars @donkey_car virtual AI car race tomorrow at 10:00am PT live on Twitch. Head-to-head racing…
Jul 31
DIY Robocars via Twitter
RT @sparkfun: Our completed tutorial on building an @NVIDIA Jetson Nano-powered @Sphero RVR gets your bot up and running via teleoperation…
Jul 30
DIY Robocars via Twitter
RT @SmallpixelCar: Freeway test https://t.co/4V5tV9lhIP
Jul 29
DIY Robocars via Twitter
Very small autonomous cars racing, thanks to an overhead camera: https://control.ee.ethz.ch/research/team-projects/autonomous-rc-car-racing.html
Jul 29
DIY Robocars via Twitter
Jul 29
DIY Robocars via Twitter
Jul 29
DIY Robocars via Twitter
RT @chr1sa: Don't miss our virtual AI car race this Saturday! Real developers + virtual cars =🏎️🏎️🏎️ Head-to-head battles with thrills, sp…
Jul 28
DIY Robocars via Twitter
Jul 27
DIY Robocars via Twitter
RT @usashirou1: Jetson nano by Isaac Kaya #jetson https://t.co/Mu1N0CyQkN
Jul 23
DIY Robocars via Twitter
RT @GPUsolution: JetRacer mady by Iflytek company #JetsonNANO #Nvidia https://t.co/MimTymIwge
Jul 23
More…