|
本帖最后由 20082330 于 2013-6-5 11:30 编辑
IMU的底层在 ~/include/AP_AHRS 文件夹里 AP_AHRS_HIL那两个是关于硬件在环仿真的 没啥用 主要看 AP_AHRS_MPU6000那个就行 另外如果想调试,就用串口2输出数据,代码写在~/ArduCopter/usercode.cpp里 当然 ~/ArduCopter/ArduCopter.ino 也要改 具体方法见:http://www.diydrones.com/forum/t ... using-uart2-serial2。。。。。。。。。另外个人经验 其实只要在 ~/ArduCopter/ArduCopter.ino 里面加一句FastSerialPort2(Serial2);
上下文是:
FastSerialPort0(Serial); // FTDI/console
FastSerialPort1(Serial1); // GPS port
FastSerialPort2(Serial2);
FastSerialPort3(Serial3); // Telemetry port
这样就可以在~/ArduCopter/usercode.cpp里面自由的使用串口了
|
|