projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add date to GPS data, captured from GPRMC packet.
[fw/altos]
/
src
/
ao.h
diff --git
a/src/ao.h
b/src/ao.h
index 2df81d2a7285d8230d91f86e5c75c138079fead5..c1a0f6e396228906e7b4942240a1a0049c9cf82f 100644
(file)
--- a/
src/ao.h
+++ b/
src/ao.h
@@
-493,6
+493,7
@@
ao_ee_init(void);
#define AO_LOG_GPS_LON 'W'
#define AO_LOG_GPS_ALT 'H'
#define AO_LOG_GPS_SAT 'V'
#define AO_LOG_GPS_LON 'W'
#define AO_LOG_GPS_ALT 'H'
#define AO_LOG_GPS_SAT 'V'
+#define AO_LOG_GPS_DATE 'Y'
#define AO_LOG_POS_NONE (~0UL)
#define AO_LOG_POS_NONE (~0UL)
@@
-538,6
+539,11
@@
struct ao_log_record {
uint8_t state;
uint8_t c_n;
} gps_sat;
uint8_t state;
uint8_t c_n;
} gps_sat;
+ struct {
+ uint8_t year;
+ uint8_t month;
+ uint8_t day;
+ } gps_date;
struct {
uint16_t d0;
uint16_t d1;
struct {
uint16_t d0;
uint16_t d1;
@@
-553,11
+559,11
@@
ao_log_data(struct ao_log_record *log);
void
ao_log_flush(void);
void
ao_log_flush(void);
-/*
Log dumping API:
- *
ao_log_dump_first() - get first log recor
d
- *
ao_log_dump_next() - get next log record
+/*
We record flight numbers in the first record of
+ *
the log. Tasks may wait for this to be initialize
d
+ *
by sleeping on this variable.
*/
*/
-extern __xdata
struct ao_log_record ao_log_dump
;
+extern __xdata
uint16_t ao_flight_number
;
/* Retrieve first log record for the current flight */
uint8_t
/* Retrieve first log record for the current flight */
uint8_t
@@
-720,8
+726,12
@@
ao_serial_init(void);
#define AO_GPS_VALID (1 << 4)
#define AO_GPS_RUNNING (1 << 5)
#define AO_GPS_VALID (1 << 4)
#define AO_GPS_RUNNING (1 << 5)
+#define AO_GPS_DATE_VALID (1 << 6)
struct ao_gps_data {
struct ao_gps_data {
+ uint8_t year;
+ uint8_t month;
+ uint8_t day;
uint8_t hour;
uint8_t minute;
uint8_t second;
uint8_t hour;
uint8_t minute;
uint8_t second;
@@
-788,10
+798,11
@@
ao_gps_report_init(void);
*/
#define AO_MAX_CALLSIGN 8
*/
#define AO_MAX_CALLSIGN 8
-#define AO_TELEMETRY_VERSION
1
+#define AO_TELEMETRY_VERSION
2
struct ao_telemetry {
uint8_t addr;
struct ao_telemetry {
uint8_t addr;
+ uint16_t flight;
uint8_t flight_state;
int16_t flight_accel;
int16_t ground_accel;
uint8_t flight_state;
int16_t flight_accel;
int16_t ground_accel;