From c27277c7f194f5f1d32d916c68311106ad934617 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 28 Dec 2011 20:34:59 +1100 Subject: [PATCH] ACM: use new I2C library --- ArduCopter/ArduCopter.pde | 2 +- ArduCopter/system.pde | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index 7ecf42bbbb..cf9043f71a 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -54,7 +54,7 @@ http://code.google.com/p/ardupilot-mega/downloads/list #include #include // ArduPilot Mega RC Library #include // ArduPilot GPS library -#include // Arduino I2C lib +#include // Arduino I2C lib #include // Arduino SPI lib #include // ArduPilot Mega Flash Memory Library #include // ArduPilot Mega Analog to Digital Converter Library diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index 02de32f048..2ef482272e 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -107,7 +107,8 @@ static void init_ardupilot() // Initialize Wire and SPI libraries // #ifndef DESKTOP_BUILD - Wire.begin(); + I2c.begin(); + I2c.timeOut(20); #endif SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV16); // 1MHZ SPI rate