X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao.h;h=06daf48f98aa4af597bfe0a7344c6c665f7cdaf8;hb=46407f7f3e4d2b6e74b3a2e90b38736a792cfc54;hp=c13029bf3511b20cfbbb68072ff7b1813f4fd19a;hpb=33f8f7add27a02d24b0671da353b59762224c1ee;p=fw%2Faltos diff --git a/src/core/ao.h b/src/core/ao.h index c13029bf..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,6 +531,13 @@ extern __xdata uint8_t ao_radio_dma_done; extern __xdata uint8_t ao_radio_done; extern __xdata uint8_t 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_general_isr(void) ao_arch_interrupt(16); @@ -521,10 +558,11 @@ 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(void); void -ao_radio_rdf(uint8_t pkt_len); +ao_radio_continuity(uint8_t c); void ao_radio_rdf_abort(void); @@ -644,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