From f3f0733a3f1533f6db6bb914526b6f43a2802764 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 2 Jan 2025 09:00:46 +0100 Subject: [PATCH] Add _MS suffix to TX_SWITCH_BACKOFF_AFTER_RX_ON constant --- impl/src/config.h.template | 2 +- impl/src/main.c | 2 +- impl/test/layer2_over_udp/l2udptest_client.c | 2 +- impl/test/layer2_over_udp/l2udptest_digipeater.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/impl/src/config.h.template b/impl/src/config.h.template index aadb453..58b0cad 100644 --- a/impl/src/config.h.template +++ b/impl/src/config.h.template @@ -27,7 +27,7 @@ #define TX_SWITCH_BACKOFF_PREAMBLE_MS 42 // only relevant if packet cannot be decoded (maximum packet duration) #define TX_SWITCH_BACKOFF_END_OF_PACKET_MS 5 // wait for 2*(preamble+rampup+rampdown duration) -#define TX_SWITCH_BACKOFF_AFTER_RX_ON 70 // time the transceiver must stay in RX mode (depends on the RX->TX switch time of the other station) +#define TX_SWITCH_BACKOFF_AFTER_RX_ON_MS 70 // time the transceiver must stay in RX mode (depends on the RX->TX switch time of the other station) /*** LAYER 1 CONFIG ***/ diff --git a/impl/src/main.c b/impl/src/main.c index 392f281..171fa1a 100644 --- a/impl/src/main.c +++ b/impl/src/main.c @@ -327,7 +327,7 @@ int main(int argc, char **argv) retransmit_time = get_hires_time() + HRTIME_SEC(1) + HRTIME_SEC(1.0 * rand() / RAND_MAX); - block_tx_for(TX_SWITCH_BACKOFF_AFTER_RX_ON); + block_tx_for(TX_SWITCH_BACKOFF_AFTER_RX_ON_MS); } } diff --git a/impl/test/layer2_over_udp/l2udptest_client.c b/impl/test/layer2_over_udp/l2udptest_client.c index 456e82a..2a046f4 100644 --- a/impl/test/layer2_over_udp/l2udptest_client.c +++ b/impl/test/layer2_over_udp/l2udptest_client.c @@ -377,7 +377,7 @@ int main(void) } // make sure the receiver runs for a minimum amount of time - block_tx_for(TX_SWITCH_BACKOFF_AFTER_RX_ON); + block_tx_for(TX_SWITCH_BACKOFF_AFTER_RX_ON_MS); while(get_hires_time() < next_tx_switch_time) { // ** Receive signal ** diff --git a/impl/test/layer2_over_udp/l2udptest_digipeater.c b/impl/test/layer2_over_udp/l2udptest_digipeater.c index eaa3113..7268e6f 100644 --- a/impl/test/layer2_over_udp/l2udptest_digipeater.c +++ b/impl/test/layer2_over_udp/l2udptest_digipeater.c @@ -252,7 +252,7 @@ int main(void) } // make sure the receiver runs for a minimum amount of time - block_tx_for(TX_SWITCH_BACKOFF_AFTER_RX_ON); + block_tx_for(TX_SWITCH_BACKOFF_AFTER_RX_ON_MS); // receive response while(get_hires_time() < next_tx_switch_time) {