projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos]
/
src
/
kernel
/
ao_log_gps.c
diff --git
a/src/kernel/ao_log_gps.c
b/src/kernel/ao_log_gps.c
index a5a6358bf7fd9267ddb414357a0f5fbd220eab8d..7643091cdaa759964cdb5b3e7a214eb8c2df55f5 100644
(file)
--- a/
src/kernel/ao_log_gps.c
+++ b/
src/kernel/ao_log_gps.c
@@
-26,6
+26,7
@@
static __xdata struct ao_log_gps log;
__code uint8_t ao_log_format = AO_LOG_FORMAT_TELEGPS;
static __xdata struct ao_log_gps log;
__code uint8_t ao_log_format = AO_LOG_FORMAT_TELEGPS;
+__code uint8_t ao_log_size = sizeof (struct ao_log_gps);
static uint8_t
ao_log_csum(__xdata uint8_t *b) __reentrant
static uint8_t
ao_log_csum(__xdata uint8_t *b) __reentrant
@@
-136,3
+137,16
@@
ao_log_flight(uint8_t slot)
return log.u.flight.flight;
return 0;
}
return log.u.flight.flight;
return 0;
}
+
+uint8_t
+ao_log_check(uint32_t pos)
+{
+ if (!ao_storage_read(pos,
+ &log,
+ sizeof (struct ao_log_gps)))
+ return 0;
+
+ if (ao_log_dump_check_data())
+ return 1;
+ return 0;
+}