diff options
author | Keith Packard <keithp@keithp.com> | 2009-04-26 00:11:32 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-04-26 00:11:32 -0700 |
commit | 38a0b61b0a0b3c00f064c8d562950a17a6ddff4a (patch) | |
tree | ee099db3cfa30d5fe7a94523fe1e7a46f64d238d /ao_radio.c | |
parent | c65f1a1acd2ca00758833cec5d3f8056d303d3e2 (diff) |
Add configuration support
Current config variables:
Main deploy altitude above launch (in meters)
Acceleration zero g calibration (manual or automatic)
Radio channel (freq = 435.550MHz + channel * 100kHz)
Callsign (max 8 characters)
Supporting this involved shuffling code around so that the
non-telemetrum builds could include only the stuff they needed.
Diffstat (limited to 'ao_radio.c')
-rw-r--r-- | ao_radio.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -275,8 +275,10 @@ ao_radio_idle(void) void ao_radio_send(__xdata struct ao_telemetry *telemetry) __reentrant { + ao_config_get(); ao_mutex_get(&ao_radio_mutex); ao_radio_idle(); + RF_CHANNR = ao_config.radio_channel; ao_dma_set_transfer(ao_radio_dma, telemetry, &RFDXADDR, @@ -297,8 +299,10 @@ ao_radio_send(__xdata struct ao_telemetry *telemetry) __reentrant void ao_radio_recv(__xdata struct ao_radio_recv *radio) __reentrant { + ao_config_get(); ao_mutex_get(&ao_radio_mutex); ao_radio_idle(); + RF_CHANNR = ao_config.radio_channel; ao_dma_set_transfer(ao_radio_dma, &RFDXADDR, radio, |