diff --git a/micro/globals.h b/micro/globals.h index 25ea2db..c4425b5 100644 --- a/micro/globals.h +++ b/micro/globals.h @@ -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 diff --git a/micro/rov_controller.cpp b/micro/rov_controller.cpp index 228fa44..9c16780 100644 --- a/micro/rov_controller.cpp +++ b/micro/rov_controller.cpp @@ -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(); }