diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ao.h | 9 | ||||
| -rw-r--r-- | src/ao_cmd.c | 3 | ||||
| -rw-r--r-- | src/ao_log.c | 2 | ||||
| -rw-r--r-- | src/ao_log_tiny.c | 2 | ||||
| -rw-r--r-- | src/ao_telebt.c | 2 | 
5 files changed, 18 insertions, 0 deletions
| @@ -539,6 +539,15 @@ extern __pdata enum flight_state ao_log_state;  /* required functions from the underlying log system */ +#define AO_LOG_FORMAT_UNKNOWN		0	/* unknown; altosui will have to guess */ +#define AO_LOG_FORMAT_FULL		1	/* 8 byte typed log records */ +#define AO_LOG_FORMAT_TINY		2	/* two byte state/baro records */ +#define AO_LOG_FORMAT_TELEMETRY		3	/* 32 byte ao_telemetry records */ +#define AO_LOG_FORMAT_TELESCIENCE	4	/* 32 byte typed telescience records */ +#define AO_LOG_FORMAT_NONE		127	/* No log at all */ + +extern __code uint8_t ao_log_format; +  /* Return the flight number from the given log slot, 0 if none */  uint16_t  ao_log_flight(uint8_t slot); diff --git a/src/ao_cmd.c b/src/ao_cmd.c index 6d3ae38d..1442ebea 100644 --- a/src/ao_cmd.c +++ b/src/ao_cmd.c @@ -219,6 +219,9 @@ version(void)  	printf("manufacturer     %s\n", ao_manufacturer);  	printf("product          %s\n", ao_product);  	printf("serial-number    %u\n", ao_serial_number); +#if HAS_EEPROM +	printf("log-format       %u\n", ao_log_format); +#endif  	printf("software-version %s\n", ao_version);  } diff --git a/src/ao_log.c b/src/ao_log.c index 80d7243d..6d3ad535 100644 --- a/src/ao_log.c +++ b/src/ao_log.c @@ -24,6 +24,8 @@ __xdata uint8_t	ao_log_running;  __pdata enum flight_state ao_log_state;  __xdata uint16_t ao_flight_number; +__code uint8_t ao_log_format = AO_LOG_FORMAT_FULL; +  void  ao_log_flush(void)  { diff --git a/src/ao_log_tiny.c b/src/ao_log_tiny.c index d26e0080..d5a3b99f 100644 --- a/src/ao_log_tiny.c +++ b/src/ao_log_tiny.c @@ -28,6 +28,8 @@ static __data uint16_t	ao_log_tiny_interval;  #define AO_PAD_RING	2  #endif +__code uint8_t ao_log_format = AO_LOG_FORMAT_TINY; +  void  ao_log_tiny_set_interval(uint16_t ticks)  { diff --git a/src/ao_telebt.c b/src/ao_telebt.c index 8e77c4d9..85565172 100644 --- a/src/ao_telebt.c +++ b/src/ao_telebt.c @@ -17,6 +17,8 @@  #include "ao.h" +__code uint8_t ao_log_format = AO_LOG_FORMAT_NONE;	/* until we actually log stuff */ +  void  main(void)  { | 
