From 15341b6e6dcf52df083d6aa37ef881ea6ad48ee5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 4 Sep 2009 12:25:37 -0700 Subject: [PATCH] Set all of the values to reset the radio for telemetry Was sizeof(rdf_setup) instead of sizeof(telemetry_setup) when resetting the radio back to telemetry data mode from rdf mode. With the length value removed from the rdf config, these two arrays are no longer the same length, and so the last config value was not set leaving the radio sending garbage. Signed-off-by: Keith Packard --- src/ao_radio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ao_radio.c b/src/ao_radio.c index 76fa3e5d..a7fa682e 100644 --- a/src/ao_radio.c +++ b/src/ao_radio.c @@ -222,7 +222,7 @@ static __code uint8_t rdf_setup[] = { RF_DEVIATN_OFF, ((RDF_DEVIATION_E << RF_DEVIATN_DEVIATION_E_SHIFT) | (RDF_DEVIATION_M << RF_DEVIATN_DEVIATION_M_SHIFT)), - /* packet length */ + /* packet length is set in-line */ RF_PKTCTRL1_OFF, ((1 << PKTCTRL1_PQT_SHIFT)| PKTCTRL1_ADR_CHK_NONE), RF_PKTCTRL0_OFF, (RF_PKTCTRL0_PKT_FORMAT_NORMAL| @@ -362,7 +362,7 @@ ao_radio_rdf(int ms) ao_sleep(&ao_radio_dma_done); ao_radio_rdf_running = 0; ao_radio_idle(); - for (i = 0; i < sizeof (rdf_setup); i += 2) + for (i = 0; i < sizeof (telemetry_setup); i += 2) RF[telemetry_setup[i]] = telemetry_setup[i+1]; ao_mutex_put(&ao_radio_mutex); } -- 2.30.2