projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add telemini-v3.0 to list of binaries we stach in LLC repo for production use
[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..02551169fd46f80a18a8839f5518ef9d63c22da1 100644
(file)
--- a/
src/kernel/ao_log_gps.c
+++ b/
src/kernel/ao_log_gps.c
@@
-3,7
+3,8
@@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-26,6
+27,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
+138,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;
+}