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!

Views: 352

Reply to This

Replies to This Discussion

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

But I want to fly autonomous in X-plane, I got it to work but not with autonomous mode. I was reading that to do that I need to change the code with arduino.

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

No. The default code in the MP will do all the same autonomous flight as the real ArduPlane. Where did you read that you needed Arduino ???

Oh, sorry my bad. I just realized that I misread the wiki.

Sorry for the trouble. I got it working already, thanks a lot!

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service