TeleMega config is 200 bytes. AO_CONFIG_MAX_SIZE was 128. That didn't
work out well when logging erased flight information. Allow TeleMega
to use a larger value (1k), and then do a compiler hack to make sure
the defined value is at least as large as the ao_config structure.
Signed-off-by: Keith Packard <keithp@keithp.com>
#define AO_PAD_ORIENTATION_ANTENNA_UP 0
#define AO_PAD_ORIENTATION_ANTENNA_DOWN 1
+#ifndef AO_CONFIG_MAX_SIZE
#define AO_CONFIG_MAX_SIZE 128
+#endif
+
+/* Make sure AO_CONFIG_MAX_SIZE is big enough */
+typedef uint8_t config_check_space[(int) (AO_CONFIG_MAX_SIZE - sizeof (struct ao_config))];
extern __xdata struct ao_config ao_config;
extern __pdata uint8_t ao_config_loaded;