diff options
author | Keith Packard <keithp@keithp.com> | 2009-09-04 12:25:37 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-09-04 12:25:37 -0700 |
commit | 15341b6e6dcf52df083d6aa37ef881ea6ad48ee5 (patch) | |
tree | d4934ad54cfa456224c005c3bd0bb5aae69c7969 /src | |
parent | fee46389b70a624ab5b1128a8b4c3083c7747bcb (diff) |
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 <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ao_radio.c | 4 |
1 files 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); } |