资源简介
四旋翼飞行器 飞控程序源码
基于MK项目,经实践检验

代码片段和文件信息
/******************************************************************************/
/* flight_ctrl.c: */
/******************************************************************************/
/* This file is part of the uVision/ARM development tools. */
/* Copyright (c) 2005-2006 Keil Software. All rights reserved. */
/* This software may only be used under the terms of a valid current */
/* end user licence from KEIL for a compatible version of KEIL software */
/* development tools. Nothing else gives you the right to use this software. */
/******************************************************************************/
#include /* prototype declarations for I/O functions */
#include “general.h“ //general header file
#include “flight_ctrl.h“
#include “ppm_io.h“
axis_t roll;
axis_t pitch;
axis_t yam;
axis_thr_t thr;
motor_t motor;
short int flying = 0; // the QuadroCopter flying flag
short int buzzer_free; // buzzer is not busy
float temp; //temp
float tempa[3];
void buzzer (short int cycle float duty short int times );
void led_green (short int cycle float duty short int times );
void led_red (short int cycle float duty short int times );
void parameter_init (void);
/****************/
/* main program */
/****************/
int main (void) { /* execution starts here */
short int thr_guard_count = 0; // for throttle safety check
short int ppm_count = 0; // for Radio Controller safety check
short int battery_count = 0;
float thr_dec = 0; // Throttle decrease while battery is low
int i;
PINSEL0 = 0x0AF00205; // Enable RxD0 and TxD0 ;Enable CAP0.1 */
PINSEL1 = 0x003FF280; // Enable A/D0~4 & A/D6~7; MAT1.0~1.3 */
IODIR = 0x0000C0E1; // P0.14: LED red ; p0.15: LED green; p0.7: Buzzer output
IOSET = 1 << 5; // set the sensitivity of accelerometer to 2g
IOSET = LED_RED;
IOCLR = LED_GREEN; // LED red on
for ( i = 0; i < 0x00ffffff; i ++ ); // delay for safety
VICIntEnClr = 0xFFFFFFFF; // Disable all the interrupt
VICVectAddr = 0; // Acknowledge Interrupt
parameter_init ( );
com_initialize ( ); /* init interrupt driven serial I/O */
ppm_io_init ( ); // initialize PPM I/O function
sensor_init ( ); // initialize sensors
pid_init ( ); // initialize pid
//********************************************************************************
//Main Loop
//********************************************************************************
while ( 1 ) {
if ( timeSlot == 0 ) {
timeSlot = 10; // totally 20ms
// get_ppm_value ( ); // get ppm input true values
// get_sensor_value ( );
// flying start when the throttle above THR
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 9641 2009-01-22 13:06 FlightCtrl V0.21\flight_ctrl.c
文件 339 2009-01-02 11:50 FlightCtrl V0.21\flight_ctrl.h
文件 3786 2009-01-22 13:16 FlightCtrl V0.21\flight_ctrl.Opt
文件 2825 2008-12-26 19:37 FlightCtrl V0.21\flight_ctrl.Uv2
文件 3782 2009-01-07 15:02 FlightCtrl V0.21\flight_ctrl_Opt.Bak
文件 2688 2009-01-22 13:06 FlightCtrl V0.21\flight_ctrl_Target 1.dep
文件 2852 2008-12-23 01:24 FlightCtrl V0.21\flight_ctrl_Uv2.Bak
文件 2129 2009-01-06 21:22 FlightCtrl V0.21\general.h
文件 8450 2009-01-06 21:52 FlightCtrl V0.21\menu.c
文件 2 2008-12-22 11:42 FlightCtrl V0.21\menu.h
文件 19 2009-01-07 14:42 FlightCtrl V0.21\ob
文件 15341 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 266 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 32320 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 15518 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 231 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 31904 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 8942 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 128 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 22908 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 76300 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 90539 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 448 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 126500 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 548 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 479 2008-12-06 01:48 FlightCtrl V0.21\ob
文件 1507 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 9780 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 146 2009-01-22 13:06 FlightCtrl V0.21\ob
文件 26256 2009-01-22 13:06 FlightCtrl V0.21\ob
............此处省略37个文件信息
相关资源
- APM_飞控4G数传源码.zip
- 飞控代码源码-台湾飞控大神版
- 四轴飞控源码 PID参考apm 采用了dmp自带
- 匿名领航者飞控源码、原理图和上位
- zadig-2.3.exe
- 无人机飞行PID控制及智能PID控制技术
- 基于STM32F103C8T6的四轴飞行器源码
- 基于stm32的四旋翼飞控程序
- 无人机系统路线图2005-2030中文版
- PX4飞控系统的流程图
- 现代飞行控制系统
- PIXHAWK飞控教程
- apm飞控源代码
- Flight_Control_Systems_-_practical_issues_in_d
- 无人机灯光秀路径规划 c
- mpu6050+地磁传感器通过卡尔曼滤波得出
- 无人机系统路线图2005-2030英文版
- PIX4飞控+光流源代码.rar
- clean flight 软件
- PIXHAWK飞控源码
- 飞控stm32程序
- 有关无人机自动着陆的一篇英文文章
- 无人机飞行PID控制
- AGV模拟无人机器人搬运
- px4飞控源码
- CC3D飞控官方固件及PCB电路图
- betaflight汉化版
- PIX4飞控+光流源代码
- 无人机编队
- 数模无人机路径选择数模无人机路径
评论
共有 条评论