diff options
author | Bdale Garbee <bdale@gag.com> | 2014-09-06 13:41:36 -0600 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2014-09-06 13:41:36 -0600 |
commit | 8c212cd5bfa03f71a31d84bd0051314e77d88461 (patch) | |
tree | 5be036b3510b8b474ad829caea20fcbc75b56839 /src/kernel/ao_log.c | |
parent | e9714e34091abe657aa1b30aeda9466331aa39c1 (diff) | |
parent | dd26ec2e706bdd29090759deeb90090a0e3b74f0 (diff) |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Conflicts:
ao-bringup/turnon_telemega
Diffstat (limited to 'src/kernel/ao_log.c')
-rw-r--r-- | src/kernel/ao_log.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/kernel/ao_log.c b/src/kernel/ao_log.c index dc3b6486..40a96ef7 100644 --- a/src/kernel/ao_log.c +++ b/src/kernel/ao_log.c @@ -192,12 +192,14 @@ ao_log_find_max_erase_flight(void) __reentrant ao_flight_number = 1; } -void +uint8_t ao_log_scan(void) __reentrant { uint8_t log_slot; uint8_t log_slots; -#if !FLIGHT_LOG_APPEND +#if FLIGHT_LOG_APPEND + uint8_t ret; +#else uint8_t log_want; #endif @@ -248,9 +250,13 @@ ao_log_scan(void) __reentrant empty = ao_log_current_pos; } } + ret = 1; } else { ao_log_find_max_erase_flight(); + ret = 0; } + ao_wakeup(&ao_flight_number); + return ret; #else if (ao_flight_number) @@ -278,8 +284,9 @@ ao_log_scan(void) __reentrant if (++log_slot >= log_slots) log_slot = 0; } while (log_slot != log_want); -#endif ao_wakeup(&ao_flight_number); + return 0; +#endif } void |