Skip to content

Commit

Permalink
Split up RX and TX.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoos committed May 11, 2012
1 parent 977041e commit d950d19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions micro/globals.h
Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions micro/rov_controller.cpp
Expand Up @@ -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();
}

Expand Down

0 comments on commit d950d19

Please sign in to comment.