Pixhawk源码笔记四:学习RC Input and Output

标签:
源码分析pixhawkrc遥控输入input |
分类: 航模 |
http://s11/mw690/001aRpVkgy6OjV7tOuS6a&690Input and Output" TITLE="Pixhawk源码笔记四:学习RC Input and Output" />
第五部分 学习RC Input and Output
1、RCInput对象(AP_HAL)
2、RCOutput对象(AP_HAL)
3、RC_Channel对象
4、RC_Channel奇怪的input/output 设置
5、RC_Channel_aux 对象
http://s3/mw690/001aRpVkgy6OjUHb6Ey02&690Input
// FUNCTION 为1-27,function参数。
typedef enum
{
k_none = 0, ///< disabled
k_manual = 1, ///< manual, just pass-thru the RC in signal
k_flap = 2, ///< flap
k_flap_auto = 3, ///< flap automated
k_aileron = 4, ///< aileron
k_unused1 = 5, ///< unused function
k_mount_pan = 6, ///< mount yaw (pan)
k_mount_tilt = 7, ///< mount pitch (tilt)
k_mount_roll = 8, ///< mount roll
k_mount_open = 9, ///< mount open (deploy) / close (retract)
k_cam_trigger = 10, ///< camera trigger
k_egg_drop = 11, ///< egg drop
k_mount2_pan = 12, ///< mount2 yaw (pan)
k_mount2_tilt = 13, ///< mount2 pitch (tilt)
k_mount2_roll = 14, ///< mount2 roll
k_mount2_open = 15, ///< mount2 open (deploy) / close (retract)
k_dspoiler1 = 16, ///< differential spoiler 1 (left wing)
k_dspoiler2 = 17, ///< differential spoiler 2 (right wing)
k_aileron_with_input = 18, ///< aileron, with rc input
k_elevator = 19, ///< elevator
k_elevator_with_input = 20, ///< elevator, with rc input
k_rudder = 21, ///< secondary rudder channel
k_sprayer_pump = 22, ///< crop sprayer pump channel
k_sprayer_spinner = 23, ///< crop sprayer spinner channel
k_flaperon1 = 24, ///< flaperon, left wing
k_flaperon2 = 25, ///< flaperon, right wing
k_steering = 26, ///< ground steering, used to separate from rudder
k_parachute_release = 27, ///< parachute release
k_epm = 28, ///< epm gripper
k_nr_aux_servo_functions ///< This must be the last enum value (only add new values _before_ this one)
} Aux_servo_function_t;
AP_Int8 function; ///< see Aux_servo_function_t enum
前面的文章:
Pixhawk源码笔记一:APM代码基本结构:http://blog.sina.com.cn/s/blog_402c071e0102v59r.html
Pixhawk源码笔记二:APM线程: http://blog.sina.com.cn/s/blog_402c071e0102v5br.html
Pixhawk源码笔记三:串行接口UART和Console: http://blog.sina.com.cn/s/blog_402c071e0102v5e5.html