码迷,mamicode.com
首页 > 其他好文 > 详细

APM源码学习笔记一、开篇

时间:2015-02-26 18:17:01      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:

最近在学习APM,由于所做的项目要在APMRover基础上完成。

看了散步蚂蚁的博客(http://blog.sina.com.cn/s/articlelist_1076627230_0_1.html)之后,受益匪浅。

现在也想把自己学习源码的过程和之中遇到的问题记录下来,做个备份,更希望能有高手多多指点,大家一起学习!!!

/*
  scheduler table - all regular tasks should be listed here, along
  with how often they should be called (in 20ms units) and the maximum
  time they are expected to take (in microseconds)
 */
static const AP_Scheduler::Task scheduler_tasks[] PROGMEM = {
	{ read_radio,             1,   1000 },
    { ahrs_update,            1,   6400 },
    { read_sonars,            1,   2000 },
    { update_current_mode,    1,   1500 },
    { set_servos,             1,   1500 },
    { update_GPS_50Hz,        1,   2500 },
    { update_GPS_10Hz,        5,   2500 },
    { update_alt,             5,   3400 },
    { navigate,               5,   1600 },
    { update_compass,         5,   2000 },
    { update_commands,        5,   1000 },
    { update_logging1,        5,   1000 },
    { update_logging2,        5,   1000 },
    { gcs_retry_deferred,     1,   1000 },
    { gcs_update,             1,   1700 },
    { gcs_data_stream_send,   1,   3000 },
    { read_control_switch,   15,   1000 },
    { read_trim_switch,       5,   1000 },
    { read_battery,           5,   1000 },
    { read_receiver_rssi,     5,   1000 },
    { update_events,          1,   1000 },
    { check_usb_mux,         15,   1000 },
    { mount_update,           1,    600 },
    { gcs_failsafe_check,     5,    600 },
    { compass_accumulate,     1,    900 },
    { update_notify,          1,    300 },
    { one_second_loop,       50,   3000 },
#if FRSKY_TELEM_ENABLED == ENABLED
    { telemetry_send,        10,    100 }	
#endif
};

接下来将逐个分析一下APMRover每个Task的执行过程。

 

APM源码学习笔记一、开篇

标签:

原文地址:http://www.cnblogs.com/bgphone/p/4301611.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!