*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
__pdata uint8_t ao_config_dirty;
__xdata uint8_t ao_config_mutex;
+#if HAS_FORCE_FREQ
+__xdata uint8_t ao_force_freq;
+#endif
+
#ifndef AO_CONFIG_DEFAULT_APRS_INTERVAL
#define AO_CONFIG_DEFAULT_APRS_INTERVAL 0
#endif
/* Version 0 stuff */
ao_config.main_deploy = AO_CONFIG_DEFAULT_MAIN_DEPLOY;
ao_xmemset(&ao_config.callsign, '\0', sizeof (ao_config.callsign));
- ao_xmemcpy(&ao_config.callsign, CODE_TO_XDATA(AO_CONFIG_DEFAULT_CALLSIGN),
+ ao_xmemcpy(&ao_config.callsign, AO_CONFIG_DEFAULT_CALLSIGN,
sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1);
ao_config._legacy_radio_channel = 0;
}
if (ao_force_freq) {
ao_config.frequency = 434550;
ao_config.radio_cal = ao_radio_cal;
- ao_xmemcpy(&ao_config.callsign, CODE_TO_XDATA(AO_CONFIG_DEFAULT_CALLSIGN),
+#if HAS_RADIO_RATE
+ ao_config.radio_rate = AO_CONFIG_DEFAULT_RADIO_RATE;
+#endif
+ ao_xmemcpy(&ao_config.callsign, AO_CONFIG_DEFAULT_CALLSIGN,
sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1);
}
#endif
accel_total = 0;
cal_data_ring = ao_sample_data;
while (i) {
- ao_sleep(DATA_TO_XDATA(&ao_sample_data));
+ ao_sleep(&ao_sample_data);
while (i && cal_data_ring != ao_sample_data) {
accel_total += (int32_t) ao_data_accel(&ao_data_ring[cal_data_ring]);
#if HAS_GYRO