projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Move TeleMetrum v2.0 to using internal eeprom for config
[fw/altos]
/
src
/
core
/
ao_log.c
diff --git
a/src/core/ao_log.c
b/src/core/ao_log.c
index 8bcb770763c0efe70ad1917c4d8caabc14ab257c..1a1f5ff6c37a7c56bd4f6944b59616d599c6da5a 100644
(file)
--- a/
src/core/ao_log.c
+++ b/
src/core/ao_log.c
@@
-17,6
+17,7
@@
#include "ao.h"
#include <ao_log.h>
#include "ao.h"
#include <ao_log.h>
+#include <ao_config.h>
__pdata uint32_t ao_log_current_pos;
__pdata uint32_t ao_log_end_pos;
__pdata uint32_t ao_log_current_pos;
__pdata uint32_t ao_log_end_pos;
@@
-48,7
+49,7
@@
static __xdata struct ao_log_erase erase;
static uint32_t
ao_log_erase_pos(uint8_t i)
{
static uint32_t
ao_log_erase_pos(uint8_t i)
{
- return i * sizeof (struct ao_log_erase)
+ AO_STORAGE_ERASE_LOG
;
+ return i * sizeof (struct ao_log_erase);
}
void
}
void
@@
-56,14
+57,14
@@
ao_log_write_erase(uint8_t pos)
{
erase.unused = 0x00;
erase.flight = ao_flight_number;
{
erase.unused = 0x00;
erase.flight = ao_flight_number;
- ao_
storage
_write(ao_log_erase_pos(pos), &erase, sizeof (erase));
- ao_
storage
_flush();
+ ao_
config
_write(ao_log_erase_pos(pos), &erase, sizeof (erase));
+ ao_
config
_flush();
}
static void
ao_log_read_erase(uint8_t pos)
{
}
static void
ao_log_read_erase(uint8_t pos)
{
- ao_
storage
_read(ao_log_erase_pos(pos), &erase, sizeof (erase));
+ ao_
config
_read(ao_log_erase_pos(pos), &erase, sizeof (erase));
}
}
@@
-87,7
+88,7
@@
ao_log_erase_mark(void)
static uint8_t
ao_log_slots()
{
static uint8_t
ao_log_slots()
{
- return (uint8_t) (ao_storage_
config
/ ao_config.flight_log_max);
+ return (uint8_t) (ao_storage_
log_max
/ ao_config.flight_log_max);
}
uint32_t
}
uint32_t