Permalink
Browse files

Split up RX and TX.

  • Loading branch information...
1 parent 977041e commit d950d196563de9ce5443f027c6ef69d453566e77 @yoos yoos committed May 11, 2012
Showing with 3 additions and 10 deletions.
  1. +1 −2 micro/globals.h
  2. +2 −8 micro/rov_controller.cpp
View
@@ -112,8 +112,7 @@ float currentAngPos[3]; // Current angular position, calculated from DCM.
#define MASTER_DT 10000 // 10000 us interval = 100 Hz master loop.
#define CONTROL_LOOP_INTERVAL 1 // 1x master = 100 Hz.
#define ACC_READ_INTERVAL 5 // Read accelerometer every 5th loop.
-#define RX_LOOP_INTERVAL 1 // 1x master = 100 Hz.
-#define TX_LOOP_INTERVAL 2 // 1/2 master = 50 Hz.
+#define COMM_LOOP_INTERVAL 2 // 1x master = 100 Hz.
#define DOGLIFE 600 // Watchdog life in milliseconds.
// Throttle stuff. Minimum signal is 750 us. Maximum signal is 2200 us. Hover
@@ -82,16 +82,10 @@ int main(void) {
// ================================================================
// Telemetry loop
// ================================================================
- if (loopCount % RX_LOOP_INTERVAL == 0) {
- //sendTelemetry(nextRunTime);
-
+ if (loopCount % COMM_LOOP_INTERVAL == 0) {
eth.RX();
}
-
- // ================================================================
- // Telemetry loop
- // ================================================================
- if (loopCount % TX_LOOP_INTERVAL == 0) {
+ else {
eth.TX();
}

0 comments on commit d950d19

Please sign in to comment.