X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao.h;h=06daf48f98aa4af597bfe0a7344c6c665f7cdaf8;hb=46407f7f3e4d2b6e74b3a2e90b38736a792cfc54;hp=204c85301854546d4858963ddfea03cb4a018d0d;hpb=d2bd95edb6f77daeb1e8f043c4a239c248728e0c;p=fw%2Faltos diff --git a/src/core/ao.h b/src/core/ao.h index 204c8530..06daf48f 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -264,6 +264,26 @@ ao_cmd_filter(void); * ao_report.c */ +#define AO_RDF_INTERVAL_TICKS AO_SEC_TO_TICKS(5) +#define AO_RDF_LENGTH_MS 500 +#define AO_RDF_CONTINUITY_MS 32 +#define AO_RDF_CONTINUITY_PAUSE 96 +#define AO_RDF_CONTINUITY_TOTAL ((AO_RDF_CONTINUITY_PAUSE + AO_RDF_CONTINUITY_MS) * 3 + AO_RDF_CONTINUITY_PAUSE) + +/* This assumes that we're generating a 1kHz tone, which + * modulates the carrier at 2kbps, or 250kBps + */ +#define AO_MS_TO_RDF_LEN(ms) ((ms) / 4) + +#define AO_RADIO_RDF_LEN AO_MS_TO_RDF_LEN(AO_RDF_LENGTH_MS) +#define AO_RADIO_CONT_TONE_LEN AO_MS_TO_RDF_LEN(AO_RDF_CONTINUITY_MS) +#define AO_RADIO_CONT_PAUSE_LEN AO_MS_TO_RDF_LEN(AO_RDF_CONTINUITY_PAUSE) +#define AO_RADIO_CONT_TOTAL_LEN AO_MS_TO_RDF_LEN(AO_RDF_CONTINUITY_TOTAL) + +/* returns a value 0-3 to indicate igniter continuity */ +uint8_t +ao_report_igniter(void); + void ao_report_init(void); @@ -396,6 +416,16 @@ ao_gps_report(void); void ao_gps_report_init(void); +/* + * ao_gps_report_mega.c + */ + +void +ao_gps_report_mega(void); + +void +ao_gps_report_mega_init(void); + /* * ao_telemetry_orig.c */ @@ -501,19 +531,18 @@ extern __xdata uint8_t ao_radio_dma_done; extern __xdata uint8_t ao_radio_done; extern __xdata uint8_t ao_radio_mutex; -void -ao_radio_general_isr(void) ao_arch_interrupt(16); - -void -ao_radio_get(uint8_t len); - -#define ao_radio_put() ao_mutex_put(&ao_radio_mutex) +#ifdef PKT_APPEND_STATUS_1_CRC_OK +#define AO_RADIO_STATUS_CRC_OK PKT_APPEND_STATUS_1_CRC_OK +#else +#include +#define AO_RADIO_STATUS_CRC_OK AO_FEC_DECODE_CRC_OK +#endif void -ao_radio_set_packet(void); +ao_radio_general_isr(void) ao_arch_interrupt(16); void -ao_radio_send(__xdata void *d, uint8_t size) __reentrant; +ao_radio_send(const __xdata void *d, uint8_t size) __reentrant; uint8_t ao_radio_recv(__xdata void *d, uint8_t size) __reentrant; @@ -529,16 +558,14 @@ ao_radio_recv_abort(void); * 2 * ms bits, or ms / 4 bytes */ -#define AO_MS_TO_RDF_LEN(ms) ((ms) > 255 * 4 ? 255 : ((ms) >> 2)) - void -ao_radio_rdf(uint8_t pkt_len); +ao_radio_rdf(void); void -ao_radio_rdf_abort(void); +ao_radio_continuity(uint8_t c); void -ao_radio_idle(void); +ao_radio_rdf_abort(void); void ao_radio_init(void); @@ -655,6 +682,13 @@ ao_igniter_init(void); * ao_config.c */ +#if HAS_FORCE_FREQ +/* + * Set this to force the frequency to 434.550MHz + */ +extern __xdata uint8_t ao_force_freq; +#endif + #define AO_CONFIG_MAJOR 1 #define AO_CONFIG_MINOR 11