Skip to content

Commit

Permalink
#613: Add static to file-local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ataffanel committed Aug 24, 2020
1 parent 86a34fd commit 1b2f63b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/hal/src/sensors_bmi088_bmp388.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ static bool isBarometerPresent = false;
static uint8_t baroMeasDelayMin = SENSORS_DELAY_BARO;

// Pre-calculated values for accelerometer alignment
float cosPitch;
float sinPitch;
float cosRoll;
float sinRoll;
static float cosPitch;
static float sinPitch;
static float cosRoll;
static float sinRoll;

#ifdef GYRO_GYRO_BIAS_LIGHT_WEIGHT
static bool processGyroBiasNoBuffer(int16_t gx, int16_t gy, int16_t gz, Axis3f *gyroBiasOut);
Expand Down
8 changes: 4 additions & 4 deletions src/hal/src/sensors_bmi088_spi_bmp388.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ static bool isBarometerPresent = false;
static uint8_t baroMeasDelayMin = SENSORS_DELAY_BARO;

// Pre-calculated values for accelerometer alignment
float cosPitch;
float sinPitch;
float cosRoll;
float sinRoll;
static float cosPitch;
static float sinPitch;
static float cosRoll;
static float sinRoll;

#ifdef GYRO_GYRO_BIAS_LIGHT_WEIGHT
static bool processGyroBiasNoBuffer(int16_t gx, int16_t gy, int16_t gz, Axis3f *gyroBiasOut);
Expand Down
8 changes: 4 additions & 4 deletions src/hal/src/sensors_bosch.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ static bool isMagnetometerPresent = false;
static uint8_t baroMeasDelayMin = SENSORS_DELAY_BARO;

// Pre-calculated values for accelerometer alignment
float cosPitch;
float sinPitch;
float cosRoll;
float sinRoll;
static float cosPitch;
static float sinPitch;
static float cosRoll;
static float sinRoll;

static void sensorsDeviceInit(void);
static void sensorsTaskInit(void);
Expand Down
8 changes: 4 additions & 4 deletions src/hal/src/sensors_mpu9250_lps25h.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ static bool isAK8963TestPassed = false;
static bool isLPS25HTestPassed = false;

// Pre-calculated values for accelerometer alignment
float cosPitch;
float sinPitch;
float cosRoll;
float sinRoll;
static float cosPitch;
static float sinPitch;
static float cosRoll;
static float sinRoll;

// This buffer needs to hold data from all sensors
static uint8_t buffer[SENSORS_MPU6500_BUFF_LEN + SENSORS_MAG_BUFF_LEN + SENSORS_BARO_BUFF_LEN] = {0};
Expand Down
2 changes: 1 addition & 1 deletion vendor/libdw1000

0 comments on commit 1b2f63b

Please sign in to comment.