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:
parent
3b81ce87f6
commit
daad1d6f8f
@ -225,8 +225,6 @@ static void SensorsTask(void *parameters)
|
|||||||
AlarmsClear(SYSTEMALARMS_ALARM_SENSORS);
|
AlarmsClear(SYSTEMALARMS_ALARM_SENSORS);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t read_good;
|
|
||||||
int32_t count;
|
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
accel_accum[i] = 0;
|
accel_accum[i] = 0;
|
||||||
@ -244,6 +242,9 @@ static void SensorsTask(void *parameters)
|
|||||||
{
|
{
|
||||||
struct pios_bma180_data accel;
|
struct pios_bma180_data accel;
|
||||||
|
|
||||||
|
int32_t read_good;
|
||||||
|
int32_t count;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
while((read_good = PIOS_BMA180_ReadFifo(&accel)) != 0 && !error)
|
while((read_good = PIOS_BMA180_ReadFifo(&accel)) != 0 && !error)
|
||||||
error = ((xTaskGetTickCount() - lastSysTime) > SENSOR_PERIOD) ? true : error;
|
error = ((xTaskGetTickCount() - lastSysTime) > SENSOR_PERIOD) ? true : error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user