Hi, I'm having errors trying to compile the arducopter code onto my apm 2.5. I've done all I did in the instruction site, but when I go to ArduPilot > HAL Board > ArduPilot Mega 2.x, I get a bunch of compiling errors, but when I select none instead, the code would compile. Here are some errors I get:
Parameters:680: error: 'micros' was not declared in this scope
commands.pde: In function 'void set_cmd_with_index(Location, int)':
commands:74: error: 'constrain' was not declared in this scope
commands.pde: In function 'int32_t get_RTL_alt()':
commands:111: error: 'min' was not declared in this scope
commands:113: error: 'min' was not declared in this scope
commands.pde: In function 'void set_next_WP(Location*)':
commands:151: error: 'max' was not declared in this scope
commands.pde: In function 'void init_home()':
commands:188: error: 'Log_Write_Cmd' was not declared in this scope
commands_logic.pde: In function 'void do_RTL()':
commands_logic:229: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_takeoff()':
commands_logic:245: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_nav_wp()':
commands_logic:266: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_land()':
commands_logic:295: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_unlimited()':
commands_logic:305: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_turns()':
commands_logic:320: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_time()':
commands_logic:347: error: 'wp_control' was not declared in this scope
commands_logic:348: error: 'millis' was not declared in this scope
commands_logic:351: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'bool verify_nav_wp()':
commands_logic:400: error: 'millis' was not declared in this scope
commands_logic:410: error: 'wp_control' was not declared in this scope
commands_logic:412: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'bool verify_loiter_unlimited()':
commands_logic:431: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'bool verify_loiter_time()':
commands_logic:441: error: 'wp_control' was not declared in this scope
commands_logic:442: error: 'millis' was not declared in this scope
commands_logic:446: error: 'wp_control' was not declared in this scope
commands_logic:448: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'bool verify_RTL()':
commands_logic:490: error: 'wp_control' was not declared in this scope
commands_logic:504: error: 'wp_control' was not declared in this scope
commands_logic:507: error: 'millis' was not declared in this scope
commands_logic:516: error: 'millis' was not declared in this scope
commands_logic:541: error: 'set_mode' was not declared in this scope
commands_logic.pde: In function 'void do_wait_delay()':
commands_logic:573: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'void do_yaw()':
commands_logic:609: error: 'constrain' was not declared in this scope
commands_logic.pde: In function 'bool verify_wait_delay()':
commands_logic:627: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'void do_repeat_servo()':
commands_logic:820: error: 'event_id' was not declared in this scope
commands_logic.pde: In function 'void do_repeat_relay()':
commands_logic:849: error: 'event_id' was not declared in this scope
commands_process.pde: In function 'void change_command(uint8_t)':
commands_process:9: error: 'min' was not declared in this scope
commands_process.pde: In function 'void execute_nav_command()':
commands_process:159: error: 'Log_Write_Cmd' was not declared in this scope
commands_process.pde: In function 'void exit_mission()':
commands_process:223: error: 'set_mode' was not declared in this scope
commands_process:225: error: 'set_mode' was not declared in this scope
control_modes.pde: In function 'void read_control_switch()':
control_modes:8: error: 'byte' was not declared in this scope
control_modes:8: error: expected `;' before 'switchPosition'
control_modes:10: error: 'oldSwitchPosition' was not declared in this scope
control_modes:10: error: 'switchPosition' was not declared in this scope
control_modes:18: error: 'set_mode' was not declared in this scope
control_modes.pde: At global scope:
control_modes:34: error: 'byte' does not name a type
control_modes.pde: In function 'void reset_control_switch()':
control_modes:47: error: 'oldSwitchPosition' was not declared in this scope
control_modes.pde: In function 'void read_trim_switch()':
control_modes:93: error: 'set_mode' was not declared in this scope
control_modes:116: error: 'set_mode' was not declared in this scope
control_modes:142: error: 'constrain' was not declared in this scope
control_modes.pde: In function 'void auto_trim()':
control_modes:192: error: 'led_mode' was not declared in this scope
events.pde: In function 'void failsafe_on_event()':
events:25: error: 'set_mode' was not declared in this scope
events:28: error: 'set_mode' was not declared in this scope
events:35: error: 'set_mode' was not declared in this scope
events:38: error: 'set_mode' was not declared in this scope
events:45: error: 'set_mode' was not declared in this scope
events:48: error: 'set_mode' was not declared in this scope
events.pde: In function 'void low_battery_event()':
events:76: error: 'set_mode' was not declared in this scope
events:81: error: 'set_mode' was not declared in this scope
events:84: error: 'set_mode' was not declared in this scope
events:88: error: 'set_mode' was not declared in this scope
events:101: error: 'bitRead' was not declared in this scope
events.pde: In function 'void update_events()':
events:110: error: 'millis' was not declared in this scope
events:114: error: 'millis' was not declared in this scope
events:116: error: 'event_id' was not declared in this scope
events:124: error: 'event_id' was not declared in this scope
failsafe.pde: In function 'void failsafe_enable()':
failsafe:20: error: 'micros' was not declared in this scope
leds.pde: In function 'void update_lights()':
leds:5: error: 'led_mode' was not declared in this scope
leds.pde: In function 'void update_GPS_light()':
leds:25: error: 'HIGH' was not declared in this scope
leds:25: error: 'bitWrite' was not declared in this scope
leds:25: error: 'bitWrite' was not declared in this scope
leds:25: error: 'digitalWrite' was not declared in this scope
leds:27: error: 'LOW' was not declared in this scope
leds:27: error: 'bitWrite' was not declared in this scope
leds:27: error: 'bitWrite' was not declared in this scope
leds:27: error: 'digitalWrite' was not declared in this scope
leds:35: error: 'LOW' was not declared in this scope
leds:35: error: 'bitWrite' was not declared in this scope
leds:35: error: 'bitWrite' was not declared in this scope
leds:35: error: 'digitalWrite' was not declared in this scope
leds:37: error: 'HIGH' was not declared in this scope
leds:37: error: 'bitWrite' was not declared in this scope
leds:37: error: 'bitWrite' was not declared in this scope
leds:37: error: 'digitalWrite' was not declared in this scope
leds:44: error: 'LOW' was not declared in this scope
leds:44: error: 'bitWrite' was not declared in this scope
leds:44: error: 'bitWrite' was not declared in this scope
leds:44: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void update_motor_light()':
leds:56: error: 'HIGH' was not declared in this scope
leds:56: error: 'bitWrite' was not declared in this scope
leds:56: error: 'bitWrite' was not declared in this scope
leds:56: error: 'digitalWrite' was not declared in this scope
leds:58: error: 'LOW' was not declared in this scope
leds:58: error: 'bitWrite' was not declared in this scope
leds:58: error: 'bitWrite' was not declared in this scope
leds:58: error: 'digitalWrite' was not declared in this scope
leds:63: error: 'HIGH' was not declared in this scope
leds:63: error: 'bitWrite' was not declared in this scope
leds:63: error: 'bitWrite' was not declared in this scope
leds:63: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void dancing_light()':
leds:70: error: 'byte' does not name a type
leds:72: error: 'step' was not declared in this scope
leds:75: error: 'step' was not declared in this scope
leds:78: error: 'LOW' was not declared in this scope
leds:78: error: 'bitWrite' was not declared in this scope
leds:78: error: 'bitWrite' was not declared in this scope
leds:78: error: 'digitalWrite' was not declared in this scope
leds:79: error: 'HIGH' was not declared in this scope
leds:79: error: 'bitWrite' was not declared in this scope
leds:79: error: 'bitWrite' was not declared in this scope
leds:79: error: 'digitalWrite' was not declared in this scope
leds:83: error: 'LOW' was not declared in this scope
leds:83: error: 'bitWrite' was not declared in this scope
leds:83: error: 'bitWrite' was not declared in this scope
leds:83: error: 'digitalWrite' was not declared in this scope
leds:84: error: 'HIGH' was not declared in this scope
leds:84: error: 'bitWrite' was not declared in this scope
leds:84: error: 'bitWrite' was not declared in this scope
leds:84: error: 'digitalWrite' was not declared in this scope
leds:88: error: 'LOW' was not declared in this scope
leds:88: error: 'bitWrite' was not declared in this scope
leds:88: error: 'bitWrite' was not declared in this scope
leds:88: error: 'digitalWrite' was not declared in this scope
leds:89: error: 'HIGH' was not declared in this scope
leds:89: error: 'bitWrite' was not declared in this scope
leds:89: error: 'bitWrite' was not declared in this scope
leds:89: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void clear_leds()':
leds:95: error: 'LOW' was not declared in this scope
leds:95: error: 'bitWrite' was not declared in this scope
leds:95: error: 'bitWrite' was not declared in this scope
leds:95: error: 'digitalWrite' was not declared in this scope
leds:96: error: 'LOW' was not declared in this scope
leds:96: error: 'bitWrite' was not declared in this scope
leds:96: error: 'bitWrite' was not declared in this scope
leds:96: error: 'digitalWrite' was not declared in this scope
leds:97: error: 'LOW' was not declared in this scope
leds:97: error: 'bitWrite' was not declared in this scope
leds:97: error: 'bitWrite' was not declared in this scope
leds:97: error: 'digitalWrite' was not declared in this scope
leds:99: error: 'led_mode' was not declared in this scope
leds.pde: In function 'void update_copter_leds()':
leds:129: error: 'bitRead' was not declared in this scope
leds:151: error: 'bitRead' was not declared in this scope
leds:185: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_reset()':
leds:196: error: 'LOW' was not declared in this scope
leds:196: error: 'bitWrite' was not declared in this scope
leds:196: error: 'bitWrite' was not declared in this scope
leds:196: error: 'digitalWrite' was not declared in this scope
leds:197: error: 'LOW' was not declared in this scope
leds:197: error: 'bitWrite' was not declared in this scope
leds:197: error: 'bitWrite' was not declared in this scope
leds:197: error: 'digitalWrite' was not declared in this scope
leds:198: error: 'LOW' was not declared in this scope
leds:198: error: 'bitWrite' was not declared in this scope
leds:198: error: 'bitWrite' was not declared in this scope
leds:198: error: 'digitalWrite' was not declared in this scope
leds:199: error: 'LOW' was not declared in this scope
leds:199: error: 'bitWrite' was not declared in this scope
leds:199: error: 'bitWrite' was not declared in this scope
leds:199: error: 'digitalWrite' was not declared in this scope
leds:200: error: 'LOW' was not declared in this scope
leds:200: error: 'bitWrite' was not declared in this scope
leds:200: error: 'bitWrite' was not declared in this scope
leds:200: error: 'digitalWrite' was not declared in this scope
leds:201: error: 'LOW' was not declared in this scope
leds:201: error: 'bitWrite' was not declared in this scope
leds:201: error: 'bitWrite' was not declared in this scope
leds:201: error: 'digitalWrite' was not declared in this scope
leds:202: error: 'LOW' was not declared in this scope
leds:202: error: 'bitWrite' was not declared in this scope
leds:202: error: 'bitWrite' was not declared in this scope
leds:202: error: 'digitalWrite' was not declared in this scope
leds:203: error: 'LOW' was not declared in this scope
leds:203: error: 'bitWrite' was not declared in this scope
leds:203: error: 'bitWrite' was not declared in this scope
leds:203: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_on()':
leds:207: error: 'bitRead' was not declared in this scope
leds:208: error: 'HIGH' was not declared in this scope
leds:208: error: 'bitWrite' was not declared in this scope
leds:208: error: 'bitWrite' was not declared in this scope
leds:208: error: 'digitalWrite' was not declared in this scope
leds:215: error: 'HIGH' was not declared in this scope
leds:215: error: 'bitWrite' was not declared in this scope
leds:215: error: 'bitWrite' was not declared in this scope
leds:215: error: 'digitalWrite' was not declared in this scope
leds:217: error: 'bitRead' was not declared in this scope
leds:218: error: 'HIGH' was not declared in this scope
leds:218: error: 'bitWrite' was not declared in this scope
leds:218: error: 'bitWrite' was not declared in this scope
leds:218: error: 'digitalWrite' was not declared in this scope
leds:220: error: 'HIGH' was not declared in this scope
leds:220: error: 'bitWrite' was not declared in this scope
leds:220: error: 'bitWrite' was not declared in this scope
leds:220: error: 'digitalWrite' was not declared in this scope
leds:221: error: 'HIGH' was not declared in this scope
leds:221: error: 'bitWrite' was not declared in this scope
leds:221: error: 'bitWrite' was not declared in this scope
leds:221: error: 'digitalWrite' was not declared in this scope
leds:222: error: 'HIGH' was not declared in this scope
leds:222: error: 'bitWrite' was not declared in this scope
leds:222: error: 'bitWrite' was not declared in this scope
leds:222: error: 'digitalWrite' was not declared in this scope
leds:223: error: 'HIGH' was not declared in this scope
leds:223: error: 'bitWrite' was not declared in this scope
leds:223: error: 'bitWrite' was not declared in this scope
leds:223: error: 'digitalWrite' was not declared in this scope
leds:224: error: 'HIGH' was not declared in this scope
leds:224: error: 'bitWrite' was not declared in this scope
leds:224: error: 'bitWrite' was not declared in this scope
leds:224: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_off()':
leds:228: error: 'bitRead' was not declared in this scope
leds:229: error: 'LOW' was not declared in this scope
leds:229: error: 'bitWrite' was not declared in this scope
leds:229: error: 'bitWrite' was not declared in this scope
leds:229: error: 'digitalWrite' was not declared in this scope
leds:236: error: 'LOW' was not declared in this scope
leds:236: error: 'bitWrite' was not declared in this scope
leds:236: error: 'bitWrite' was not declared in this scope
leds:236: error: 'digitalWrite' was not declared in this scope
leds:238: error: 'bitRead' was not declared in this scope
leds:239: error: 'LOW' was not declared in this scope
leds:239: error: 'bitWrite' was not declared in this scope
leds:239: error: 'bitWrite' was not declared in this scope
leds:239: error: 'digitalWrite' was not declared in this scope
leds:241: error: 'LOW' was not declared in this scope
leds:241: error: 'bitWrite' was not declared in this scope
leds:241: error: 'bitWrite' was not declared in this scope
leds:241: error: 'digitalWrite' was not declared in this scope
leds:242: error: 'LOW' was not declared in this scope
leds:242: error: 'bitWrite' was not declared in this scope
leds:242: error: 'bitWrite' was not declared in this scope
leds:242: error: 'digitalWrite' was not declared in this scope
leds:243: error: 'LOW' was not declared in this scope
leds:243: error: 'bitWrite' was not declared in this scope
leds:243: error: 'bitWrite' was not declared in this scope
leds:243: error: 'digitalWrite' was not declared in this scope
leds:244: error: 'LOW' was not declared in this scope
leds:244: error: 'bitWrite' was not declared in this scope
leds:244: error: 'bitWrite' was not declared in this scope
leds:244: error: 'digitalWrite' was not declared in this scope
leds:245: error: 'LOW' was not declared in this scope
leds:245: error: 'bitWrite' was not declared in this scope
leds:245: error: 'bitWrite' was not declared in this scope
leds:245: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_slow_blink()':
leds:249: error: 'copter_leds_motor_blink' was not declared in this scope
leds:252: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_fast_blink()':
leds:262: error: 'copter_leds_motor_blink' was not declared in this scope
leds.pde: In function 'void copter_leds_oscillate()':
leds:273: error: 'copter_leds_motor_blink' was not declared in this scope
leds:275: error: 'bitRead' was not declared in this scope
leds:276: error: 'HIGH' was not declared in this scope
leds:276: error: 'bitWrite' was not declared in this scope
leds:276: error: 'bitWrite' was not declared in this scope
leds:276: error: 'digitalWrite' was not declared in this scope
leds:283: error: 'HIGH' was not declared in this scope
leds:283: error: 'bitWrite' was not declared in this scope
leds:283: error: 'bitWrite' was not declared in this scope
leds:283: error: 'digitalWrite' was not declared in this scope
leds:285: error: 'bitRead' was not declared in this scope
leds:286: error: 'LOW' was not declared in this scope
leds:286: error: 'bitWrite' was not declared in this scope
leds:286: error: 'bitWrite' was not declared in this scope
leds:286: error: 'digitalWrite' was not declared in this scope
leds:288: error: 'LOW' was not declared in this scope
leds:288: error: 'bitWrite' was not declared in this scope
leds:288: error: 'bitWrite' was not declared in this scope
leds:288: error: 'digitalWrite' was not declared in this scope
leds:289: error: 'HIGH' was not declared in this scope
leds:289: error: 'bitWrite' was not declared in this scope
leds:289: error: 'bitWrite' was not declared in this scope
leds:289: error: 'digitalWrite' was not declared in this scope
leds:290: error: 'HIGH' was not declared in this scope
leds:290: error: 'bitWrite' was not declared in this scope
leds:290: error: 'bitWrite' was not declared in this scope
leds:290: error: 'digitalWrite' was not declared in this scope
leds:291: error: 'LOW' was not declared in this scope
leds:291: error: 'bitWrite' was not declared in this scope
leds:291: error: 'bitWrite' was not declared in this scope
leds:291: error: 'digitalWrite' was not declared in this scope
leds:292: error: 'LOW' was not declared in this scope
leds:292: error: 'bitWrite' was not declared in this scope
leds:292: error: 'bitWrite' was not declared in this scope
leds:292: error: 'digitalWrite' was not declared in this scope
leds:294: error: 'bitRead' was not declared in this scope
leds:295: error: 'LOW' was not declared in this scope
leds:295: error: 'bitWrite' was not declared in this scope
leds:295: error: 'bitWrite' was not declared in this scope
leds:295: error: 'digitalWrite' was not declared in this scope
leds:302: error: 'LOW' was not declared in this scope
leds:302: error: 'bitWrite' was not declared in this scope
leds:302: error: 'bitWrite' was not declared in this scope
leds:302: error: 'digitalWrite' was not declared in this scope
leds:304: error: 'bitRead' was not declared in this scope
leds:305: error: 'HIGH' was not declared in this scope
leds:305: error: 'bitWrite' was not declared in this scope
leds:305: error: 'bitWrite' was not declared in this scope
leds:305: error: 'digitalWrite' was not declared in this scope
leds:307: error: 'HIGH' was not declared in this scope
leds:307: error: 'bitWrite' was not declared in this scope
leds:307: error: 'bitWrite' was not declared in this scope
leds:307: error: 'digitalWrite' was not declared in this scope
leds:308: error: 'LOW' was not declared in this scope
leds:308: error: 'bitWrite' was not declared in this scope
leds:308: error: 'bitWrite' was not declared in this scope
leds:308: error: 'digitalWrite' was not declared in this scope
leds:309: error: 'LOW' was not declared in this scope
leds:309: error: 'bitWrite' was not declared in this scope
leds:309: error: 'bitWrite' was not declared in this scope
leds:309: error: 'digitalWrite' was not declared in this scope
leds:310: error: 'HIGH' was not declared in this scope
leds:310: error: 'bitWrite' was not declared in this scope
leds:310: error: 'bitWrite' was not declared in this scope
leds:310: error: 'digitalWrite' was not declared in this scope
leds:311: error: 'HIGH' was not declared in this scope
leds:311: error: 'bitWrite' was not declared in this scope
leds:311: error: 'bitWrite' was not declared in this scope
leds:311: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_on()':
leds:319: error: 'HIGH' was not declared in this scope
leds:319: error: 'bitWrite' was not declared in this scope
leds:319: error: 'bitWrite' was not declared in this scope
leds:319: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_off()':
leds:323: error: 'LOW' was not declared in this scope
leds:323: error: 'bitWrite' was not declared in this scope
leds:323: error: 'bitWrite' was not declared in this scope
leds:323: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_slow_blink()':
leds:327: error: 'copter_leds_GPS_blink' was not declared in this scope
leds:330: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_fast_blink()':
leds:340: error: 'copter_leds_GPS_blink' was not declared in this scope
leds.pde: In function 'void copter_leds_aux_off()':
leds:350: error: 'LOW' was not declared in this scope
leds:350: error: 'bitWrite' was not declared in this scope
leds:350: error: 'bitWrite' was not declared in this scope
leds:350: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_aux_on()':
leds:354: error: 'HIGH' was not declared in this scope
leds:354: error: 'bitWrite' was not declared in this scope
leds:354: error: 'bitWrite' was not declared in this scope
leds:354: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_on()':
leds:358: error: 'HIGH' was not declared in this scope
leds:358: error: 'bitWrite' was not declared in this scope
leds:358: error: 'bitWrite' was not declared in this scope
leds:358: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_off()':
leds:362: error: 'LOW' was not declared in this scope
leds:362: error: 'bitWrite' was not declared in this scope
leds:362: error: 'bitWrite' was not declared in this scope
leds:362: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_beep()':
leds:367: error: 'delay' was not declared in this scope
limits.pde: In function 'void limits_loop()':
limits:53: error: 'millis' was not declared in this scope
limits:129: error: 'millis' was not declared in this scope
limits:140: error: 'millis' was not declared in this scope
limits:173: error: 'millis' was not declared in this scope
limits:195: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:195: error: 'oldSwitchPosition' was not declared in this scope
limits:196: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:216: error: 'millis' was not declared in this scope
limits:229: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:229: error: 'oldSwitchPosition' was not declared in this scope
limits:259: error: 'set_mode' was not declared in this scope
limits:260: error: 'millis' was not declared in this scope
limits:286: error: 'millis' was not declared in this scope
limits:288: error: 'set_mode' was not declared in this scope
limits:297: error: 'millis' was not declared in this scope
limits:301: error: 'set_mode' was not declared in this scope
limits:324: error: 'millis' was not declared in this scope
limits:331: error: 'set_mode' was not declared in this scope
limits.pde: In function 'void limits_send_mavlink_status(mavlink_channel_t)':
limits:347: error: 'millis' was not declared in this scope
motors.pde: In function 'void init_arm_motors()':
motors:123: error: 'bitRead' was not declared in this scope
motors:125: error: 'delay' was not declared in this scope
motors:157: error: 'HIGH' was not declared in this scope
motors:157: error: 'digitalWrite' was not declared in this scope
motors.pde: In function 'void init_disarm_motors()':
motors:198: error: 'bitRead' was not declared in this scope
navigation.pde: In function 'void update_navigation()':
navigation:16: error: 'millis' was not declared in this scope
navigation:20: error: 'min' was not declared in this scope
navigation:66: error: 'millis' was not declared in this scope
navigation.pde: In function 'void run_navigation_contollers()':
navigation:184: error: 'set_mode' was not declared in this scope
navigation:242: error: 'wp_control' was not declared in this scope
navigation:253: error: 'wp_control' was not declared in this scope
navigation:268: error: 'wp_control' was not declared in this scope
navigation.pde: In function 'void update_nav_wp()':
navigation:297: error: 'wp_control' was not declared in this scope
navigation:360: error: 'constrain' was not declared in this scope
navigation.pde: In function 'void calc_loiter(int16_t, int16_t)':
navigation:480: error: 'constrain' was not declared in this scope
navigation.pde: In function 'void calc_nav_rate(int16_t)':
navigation:545: error: 'constrain' was not declared in this scope
navigation.pde: In function 'void calc_nav_pitch_roll()':
navigation:597: error: 'constrain' was not declared in this scope
navigation.pde: In function 'int16_t get_desired_speed(int16_t)':
navigation:620: error: 'min' was not declared in this scope
navigation:624: error: 'min' was not declared in this scope
navigation:625: error: 'max' was not declared in this scope
navigation.pde: In function 'int32_t get_yaw_slew(int32_t, int32_t, int16_t)':
navigation:739: error: 'constrain' was not declared in this scope
radio.pde: In function 'void init_rc_out()':
radio:71: error: 'byte' was not declared in this scope
radio:71: error: expected `;' before 'i'
radio:71: error: 'i' was not declared in this scope
radio:72: error: 'delay' was not declared in this scope
radio:95: error: 'delay' was not declared in this scope
radio.pde: In function 'void read_radio()':
radio:146: error: 'min' was not declared in this scope
radio:151: error: 'millis' was not declared in this scope
radio.pde: In function 'void trim_radio()':
radio:204: error: 'byte' was not declared in this scope
radio:204: error: expected `;' before 'i'
radio:204: error: 'i' was not declared in this scope
sensors.pde: In function 'void read_receiver_rssi()':
sensors:150: error: 'constrain' was not declared in this scope
setup.pde: In function 'int8_t setup_mode(uint8_t, const Menu::arg*)':
setup:72: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_factory(uint8_t, const Menu::arg*)':
setup:133: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_radio(uint8_t, const Menu::arg*)':
setup:151: error: 'delay' was not declared in this scope
setup:158: error: 'delay' was not declared in this scope
setup:194: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_motors(uint8_t, const Menu::arg*)':
setup:237: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_accel(uint8_t, const Menu::arg*)':
setup:252: error: 'delay' was not declared in this scope
setup.pde: In function 'void setup_printf_P(const prog_char_t*, ...)':
setup:267: error: invalid conversion from 'void*' to 'int'
setup:267: error: initializing argument 2 of 'void BetterStream::vprintf_P(const prog_char_t*, int)'
setup.pde: In function 'void setup_wait_key()':
setup:275: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_accel_scale(uint8_t, const Menu::arg*)':
setup:292: error: 'delay' was not declared in this scope
setup:295: error: 'constrain' was not declared in this scope
setup.pde: In function 'int8_t setup_flightmodes(uint8_t, const Menu::arg*)':
setup:326: error: 'byte' was not declared in this scope
setup:326: error: expected `;' before '_switchPosition'
setup:327: error: expected `;' before '_oldSwitchPosition'
setup:334: error: 'delay' was not declared in this scope
setup:336: error: '_switchPosition' was not declared in this scope
setup:336: error: 'readSwitch' was not declared in this scope
setup:340: error: '_oldSwitchPosition' was not declared in this scope
setup:343: error: 'constrain' was not declared in this scope
setup:346: error: 'print_switch' was not declared in this scope
setup:362: error: 'print_switch' was not declared in this scope
setup:370: error: 'print_switch' was not declared in this scope
setup:378: error: 'print_switch' was not declared in this scope
setup.pde: In function 'int8_t setup_declination(uint8_t, const Menu::arg*)':
setup:398: error: 'radians' was not declared in this scope
setup.pde: At global scope:
setup:790: error: variable or field 'report_wp' declared void
setup:790: error: 'byte' was not declared in this scope
can anyone help me please?
Replies
If it compiles when you use the "None" option in the Arduino IDE menu, then you are using a pre-HAL version of the arducopter code. ( ie 2.9.1b or earlier ). There is absolutely nothing wrong with this, do it. :-) If you want to run the "bleeding edge" version/s then you need to use GIT to get the source code, and use the Arduino IDE menu to select which "HAL" you want to compile against. It's pretty easy, and we're just going through a transitional period from "Classic Arduino" to "HAL" based builds.