1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-02 19:29:15 +01:00

OP-905: Fixes. Prevent LogFS from triggering watchdog

This commit is contained in:
Alessio Morale 2013-05-14 18:43:39 +02:00
parent 742ea6f6b8
commit 707e648457

View File

@ -32,7 +32,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <openpilot.h> #include <openpilot.h>
#include <pios_math.h> #include <pios_math.h>
#include <pios_wdg.h>
#include "pios_flashfs_logfs_priv.h" #include "pios_flashfs_logfs_priv.h"
/* /*
@ -193,6 +193,9 @@ static int32_t logfs_erase_all_arenas()
for (uint16_t arena = 0; arena < num_arenas; arena++) { for (uint16_t arena = 0; arena < num_arenas; arena++) {
#ifdef PIOS_LED_HEARTBEAT #ifdef PIOS_LED_HEARTBEAT
PIOS_LED_Toggle(PIOS_LED_HEARTBEAT); PIOS_LED_Toggle(PIOS_LED_HEARTBEAT);
#endif
#ifdef PIOS_INCLUDE_WDG
PIOS_WDG_Clear();
#endif #endif
if (logfs_erase_arena(arena) != 0) if (logfs_erase_arena(arena) != 0)
return -1; return -1;
@ -307,6 +310,10 @@ static int32_t logfs_find_active_arena()
/* This is the first active arena */ /* This is the first active arena */
return arena_id; return arena_id;
} }
#ifdef PIOS_INCLUDE_WDG
PIOS_WDG_Clear();
#endif
} }
/* Didn't find an active arena */ /* Didn't find an active arena */
@ -584,6 +591,9 @@ static int32_t logfs_garbage_collect (void) {
} }
dst_slot_id++; dst_slot_id++;
} }
#ifdef PIOS_INCLUDE_WDG
PIOS_WDG_Clear();
#endif
} }
/* Activate the destination arena */ /* Activate the destination arena */
@ -640,6 +650,9 @@ static int16_t logfs_object_find_next (struct slot_header * slot_hdr, uint16_t *
*curr_slot = slot_id; *curr_slot = slot_id;
return 0; return 0;
} }
#ifdef PIOS_INCLUDE_WDG
PIOS_WDG_Clear();
#endif
} }
/* No matching entry was found */ /* No matching entry was found */