当前位置: 首页 > 工具软件 > ArduPilot/APM > 使用案例 >

APM最新固件(20181220)

宗政安歌
2023-12-01

ardupilot/Makefile

  1. MAKEFILE_LIST
  2. WAF_BINARY= …/modules/waf/waf-light
  3. WAF = python WAF_BINARY WAF_FLAGS
  4. EXPLICIT_COMMANDS=‘check’ ‘check-all’ ‘clean’ ‘list_boards’
  5. VEHICLES = ‘copter’ ‘plane’ ‘rover’ ‘sub’ ‘heli’
  6. BOARD_LIST = WAF list_boards

sim_vehicle.py

  1. WAF build //对应脚本279行
  2. Configure waf
  3. ''ardupilot/modules/waf/waf-light"(287行) ''configure" ‘’–board" “sitl”(289行)
  4. Setting top to “/ardupilot”
  5. Setting out to “/ardupilot/build”
  6. Autoconfiguration “enable”
  7. Setting board to “sitl”
  8. /usr/bin/g++
  9. /usr/bin/gcc
  10. cxx flags ‘-MMD’
  11. ‘/usr/bin/python’
  12. ’configure’ finished successfully.
  13. Building
  14. “/ardupilot/modules/waf/waf-light” “build” “–target” “bin/arducopter”(305行)
  15. Waf: ‘/ardupilot/build/sitl’
  16. 333行“param_parse_path=ardupilot/Tools/autotest/param_metadata/param_parse.py”
  17. cmd_param_build=“python …/param_parse.py --vehilce”
  18. def do_build(vehicledir, opts, frame_options):
  19. 如果opts=“waf”,则执行 do_build_waf(opts,frame_options )
  20. ’build’ finished successfully
  21. sim_vehilce: using defaults from (/ardupilot/Tools/autotest/default_params/copter.parm)
  22. Run ArduCopter
  23. “/ardupilot/Tools/autotest/run_in_terminal_window.sh” “ArduCopter” “/ardupilot/build/sitl/bin/arducopter”
  24. “-S” “-I0” “–home” “-w” “–model” “–speedup” “–defaults” 依次对应540至547行 “/ardupilot/Tools/autotest/default_params/copter.parm” “-S” “-I0” “–home” “-w” “–model” “–speedup” “–defaults” “/ardupilot/Tools/autotest/default_params/copter.parm”

def start_mavproxy(opts,stuff)

如果在Windows下,/usr/bin/cygstart -w mavproxy.exe,否则mavproxy.py
如果选择HTL,则“–load-module” “HIL”;
否则(“–master”,mavlink_port),
如果stuff[“sitl-port”],则("–sitl", simout_port)

 类似资料: