1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Uncrustify

This commit is contained in:
Alessio Morale 2013-06-18 20:23:46 +02:00
parent 2b232ae155
commit 5cc3645b96
3 changed files with 10 additions and 9 deletions
flight

@ -468,14 +468,14 @@ static void updateStats()
idleCounter = 0; idleCounter = 0;
} }
#if !defined(ARCH_POSIX) && !defined(ARCH_WIN32) #if !defined(ARCH_POSIX) && !defined(ARCH_WIN32)
if(pios_uavo_settings_fs_id){ if (pios_uavo_settings_fs_id) {
PIOS_FLASHFS_GetStats(pios_uavo_settings_fs_id, &fsStats); PIOS_FLASHFS_GetStats(pios_uavo_settings_fs_id, &fsStats);
stats.SysSlotsFree = fsStats.num_free_slots; stats.SysSlotsFree = fsStats.num_free_slots;
stats.SysSlotsActive = fsStats.num_active_slots; stats.SysSlotsActive = fsStats.num_active_slots;
} }
if(pios_user_fs_id){ if (pios_user_fs_id) {
PIOS_FLASHFS_GetStats(pios_user_fs_id, &fsStats); PIOS_FLASHFS_GetStats(pios_user_fs_id, &fsStats);
stats.UsrSlotsFree = fsStats.num_free_slots; stats.UsrSlotsFree = fsStats.num_free_slots;
stats.UsrSlotsActive = fsStats.num_active_slots; stats.UsrSlotsActive = fsStats.num_active_slots;
} }
#endif #endif

@ -1164,7 +1164,8 @@ out_exit:
* @return 0 if success or error code * @return 0 if success or error code
* @retval -1 if fs_id is not a valid filesystem instance * @retval -1 if fs_id is not a valid filesystem instance
*/ */
int32_t PIOS_FLASHFS_GetStats(uintptr_t fs_id, struct PIOS_FLASHFS_Stats *stats){ int32_t PIOS_FLASHFS_GetStats(uintptr_t fs_id, struct PIOS_FLASHFS_Stats *stats)
{
PIOS_Assert(stats); PIOS_Assert(stats);
struct logfs_state *logfs = (struct logfs_state *)fs_id; struct logfs_state *logfs = (struct logfs_state *)fs_id;
@ -1172,7 +1173,7 @@ int32_t PIOS_FLASHFS_GetStats(uintptr_t fs_id, struct PIOS_FLASHFS_Stats *stats)
return -1; return -1;
} }
stats->num_active_slots = logfs->num_active_slots; stats->num_active_slots = logfs->num_active_slots;
stats->num_free_slots = logfs->num_free_slots; stats->num_free_slots = logfs->num_free_slots;
return 0; return 0;
} }
#endif /* PIOS_INCLUDE_FLASH */ #endif /* PIOS_INCLUDE_FLASH */

@ -29,9 +29,9 @@
#include <stdint.h> #include <stdint.h>
struct PIOS_FLASHFS_Stats{ struct PIOS_FLASHFS_Stats {
uint16_t num_free_slots; /* slots in free state */ uint16_t num_free_slots; /* slots in free state */
uint16_t num_active_slots; /* slots in active state */ uint16_t num_active_slots; /* slots in active state */
}; };
int32_t PIOS_FLASHFS_Format(uintptr_t fs_id); int32_t PIOS_FLASHFS_Format(uintptr_t fs_id);