1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-21 13:28:58 +01:00

OP-886: cosmetic style and spacing fixes

This commit is contained in:
Oleg Semyonov 2013-04-20 00:56:45 +03:00
parent cb068f507b
commit 343a4b9015
2 changed files with 12 additions and 12 deletions

View File

@ -157,8 +157,7 @@ int32_t AlarmsDefault(SystemAlarmsAlarmElem alarm)
*/
void AlarmsDefaultAll()
{
uint32_t n;
for (n = 0; n < SYSTEMALARMS_ALARM_NUMELEM; ++n) {
for (uint32_t n = 0; n < SYSTEMALARMS_ALARM_NUMELEM; ++n) {
AlarmsDefault(n);
}
}
@ -182,8 +181,7 @@ int32_t AlarmsClear(SystemAlarmsAlarmElem alarm)
*/
void AlarmsClearAll()
{
uint32_t n;
for (n = 0; n < SYSTEMALARMS_ALARM_NUMELEM; ++n) {
for (uint32_t n = 0; n < SYSTEMALARMS_ALARM_NUMELEM; ++n) {
AlarmsClear(n);
}
}
@ -224,7 +222,6 @@ int32_t AlarmsHasCritical()
static int32_t hasSeverity(SystemAlarmsAlarmOptions severity)
{
SystemAlarmsData alarms;
uint32_t n;
// Lock
xSemaphoreTakeRecursive(lock, portMAX_DELAY);
@ -233,7 +230,7 @@ static int32_t hasSeverity(SystemAlarmsAlarmOptions severity)
SystemAlarmsGet(&alarms);
// Go through alarms and check if any are of the given severity or higher
for (n = 0; n < SYSTEMALARMS_ALARM_NUMELEM; ++n) {
for (uint32_t n = 0; n < SYSTEMALARMS_ALARM_NUMELEM; ++n) {
if (alarms.Alarm[n] >= severity) {
xSemaphoreGiveRecursive(lock);
return 1;
@ -244,8 +241,8 @@ static int32_t hasSeverity(SystemAlarmsAlarmOptions severity)
xSemaphoreGiveRecursive(lock);
return 0;
}
/**
* @}
* @}
*/

View File

@ -39,8 +39,10 @@
*/
#include <openpilot.h>
// private includes
#include "inc/systemmod.h"
// UAVOs
#include <objectpersistence.h>
#include <flightstatus.h>
@ -51,6 +53,7 @@
#include <watchdogstatus.h>
#include <taskmonitor.h>
#include <hwsettings.h>
// Flight Libraries
#include <sanitycheck.h>
@ -69,8 +72,8 @@
#ifndef IDLE_COUNTS_PER_SEC_AT_NO_LOAD
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD 995998 // calibrated by running tests/test_cpuload.c
// must be updated if the FreeRTOS or compiler
// optimisation options are changed.
// must be updated if the FreeRTOS or compiler
// optimisation options are changed.
#endif
#if defined(PIOS_SYSTEM_STACK_SIZE)
@ -177,8 +180,8 @@ static void systemTask(void *parameters)
// Listen for SettingPersistance object updates, connect a callback function
ObjectPersistenceConnectQueue(objectPersistenceQueue);
// Load a copy of HwSetting active at boot time
HwSettingsGet(&bootHwSettings);
// Load a copy of HwSetting active at boot time
HwSettingsGet(&bootHwSettings);
// Whenever the configuration changes, make sure it is safe to fly
HwSettingsConnectCallback(hwSettingsUpdatedCb);
@ -314,7 +317,7 @@ static void objectUpdatedCb(UAVObjEvent * ev)
#if defined(PIOS_INCLUDE_FLASH_SECTOR_SETTINGS)
retval = PIOS_FLASHFS_Format(0);
#else
retval = -1;
retval = -1;
#endif
}
switch(retval) {