1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Sensors: Scope some variables to suppress warnings

This commit is contained in:
James Cotton 2012-08-25 17:12:37 -05:00
parent a9b48cf1ca
commit 81ddbda972

View File

@ -226,8 +226,6 @@ static void SensorsTask(void *parameters)
AlarmsClear(SYSTEMALARMS_ALARM_SENSORS);
}
int32_t read_good;
int32_t count;
for (int i = 0; i < 3; i++) {
accel_accum[i] = 0;
@ -245,6 +243,9 @@ static void SensorsTask(void *parameters)
{
struct pios_bma180_data accel;
int32_t read_good;
int32_t count;
count = 0;
while((read_good = PIOS_BMA180_ReadFifo(&accel)) != 0 && !error)
error = ((xTaskGetTickCount() - lastSysTime) > SENSOR_PERIOD) ? true : error;