From: Keith Packard Date: Fri, 4 Sep 2009 19:25:37 +0000 (-0700) Subject: Set all of the values to reset the radio for telemetry X-Git-Tag: debian/0.5+77+gc57bd7f~30 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=15341b6e6dcf52df083d6aa37ef881ea6ad48ee5;ds=sidebyside 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 --- 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); }