+
+#if HAS_RADIO_RATE
+ /* Limit max telemetry rate based on available radio bandwidth.
+ */
+ static __xdata const uint16_t min_interval[] = {
+ /* [AO_RADIO_RATE_38400] = */ AO_MS_TO_TICKS(100),
+ /* [AO_RADIO_RATE_9600] = */ AO_MS_TO_TICKS(500),
+ /* [AO_RADIO_RATE_2400] = */ AO_MS_TO_TICKS(1000)
+ };
+
+ ao_telemetry_desired_interval = interval;
+ if (interval && interval < min_interval[ao_config.radio_rate])
+ interval = min_interval[ao_config.radio_rate];
+#endif