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>
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|
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);
}