paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [4307] Move I2C scheduler out of the 20Hz control lo


From: Vassilis V.
Subject: [paparazzi-commits] [4307] Move I2C scheduler out of the 20Hz control loop
Date: Tue, 03 Nov 2009 03:57:12 +0000

Revision: 4307
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4307
Author:   vassilis
Date:     2009-11-03 03:57:11 +0000 (Tue, 03 Nov 2009)
Log Message:
-----------
Move I2C scheduler out of the 20Hz control loop

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/main_ap.c

Modified: paparazzi3/trunk/sw/airborne/main_ap.c
===================================================================
--- paparazzi3/trunk/sw/airborne/main_ap.c      2009-11-02 14:59:55 UTC (rev 
4306)
+++ paparazzi3/trunk/sw/airborne/main_ap.c      2009-11-03 03:57:11 UTC (rev 
4307)
@@ -635,33 +635,35 @@
   }
 #endif
 
-#if CONTROL_RATE == 20
-  if (!_20Hz)
-#endif
-    {
-
-    // I2C scheduler
-    switch (_20Hz) {
-      case 0:
+#ifdef USE_I2C0
+  // I2C0 scheduler
+  switch (_20Hz) {
+    case 0:
 #ifdef USE_AIRSPEED_ETS
-        airspeed_ets_periodic(); // process airspeed
+      airspeed_ets_periodic(); // process airspeed
 #endif // USE_AIRSPEED_ETS
 #ifdef USE_BARO_ETS
-        baro_ets_read(); // initiate next i2c read
+      baro_ets_read(); // initiate next i2c read
 #endif // USE_BARO_ETS
-        break;
-      case 1:
+      break;
+    case 1:
 #ifdef USE_BARO_ETS
-        baro_ets_periodic(); // process altitude
+      baro_ets_periodic(); // process altitude
 #endif // USE_BARO_ETS
 #ifdef USE_AIRSPEED_ETS
-        airspeed_ets_read(); // initiate next i2c read
+      airspeed_ets_read(); // initiate next i2c read
 #endif // USE_AIRSPEED_ETS
-        break;
-      case 2:
-        break;
-    }
+      break;
+    case 2:
+      break;
+  }
+#endif // USE_I2C0
 
+#if CONTROL_RATE == 20
+  if (!_20Hz)
+#endif
+    {
+
 #if defined GYRO
       gyro_update();
 #endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]