1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

uncrustification

This commit is contained in:
Corvus Corax 2014-05-08 23:18:38 +02:00
parent 7a85c0939c
commit d916fa5aad
3 changed files with 25 additions and 23 deletions

View File

@ -84,7 +84,9 @@ AccelGyroSettingsData agcal;
// These values are initialized by settings but can be updated by the attitude algorithm // These values are initialized by settings but can be updated by the attitude algorithm
static float mag_bias[3] = { 0, 0, 0 }; static float mag_bias[3] = { 0, 0, 0 };
static float mag_transform[3][3]={{ 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1}}; static float mag_transform[3][3] = {
{ 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }
};
// temp coefficient to calculate gyro bias // temp coefficient to calculate gyro bias
static volatile bool gyro_temp_calibrated = false; static volatile bool gyro_temp_calibrated = false;
static volatile bool accel_temp_calibrated = false; static volatile bool accel_temp_calibrated = false;
@ -442,9 +444,9 @@ static void settingsUpdatedCb(__attribute__((unused)) UAVObjEvent *objEv)
{ {
RevoCalibrationGet(&cal); RevoCalibrationGet(&cal);
AccelGyroSettingsGet(&agcal); AccelGyroSettingsGet(&agcal);
mag_bias[0] = cal.mag_bias.X; mag_bias[0] = cal.mag_bias.X;
mag_bias[1] = cal.mag_bias.Y; mag_bias[1] = cal.mag_bias.Y;
mag_bias[2] = cal.mag_bias.Z; mag_bias[2] = cal.mag_bias.Z;
accel_temp_calibrated = (agcal.temp_calibrated_extent.max - agcal.temp_calibrated_extent.min > .1f) && accel_temp_calibrated = (agcal.temp_calibrated_extent.max - agcal.temp_calibrated_extent.min > .1f) &&
(fabsf(agcal.accel_temp_coeff.X) > 1e-9f || fabsf(agcal.accel_temp_coeff.Y) > 1e-9f || fabsf(agcal.accel_temp_coeff.Z) > 1e-9f); (fabsf(agcal.accel_temp_coeff.X) > 1e-9f || fabsf(agcal.accel_temp_coeff.Y) > 1e-9f || fabsf(agcal.accel_temp_coeff.Z) > 1e-9f);
@ -459,16 +461,16 @@ static void settingsUpdatedCb(__attribute__((unused)) UAVObjEvent *objEv)
// Indicates not to expend cycles on rotation // Indicates not to expend cycles on rotation
if (fabsf(attitudeSettings.BoardRotation.Roll) < 0.00001f if (fabsf(attitudeSettings.BoardRotation.Roll) < 0.00001f
&& fabsf(attitudeSettings.BoardRotation.Pitch) < 0.00001f && && fabsf(attitudeSettings.BoardRotation.Pitch) < 0.00001f &&
fabsf(attitudeSettings.BoardRotation.Yaw) <0.00001f ) { fabsf(attitudeSettings.BoardRotation.Yaw) < 0.00001f) {
rotate = 0; rotate = 0;
} else { } else {
rotate = 1; rotate = 1;
} }
float rotationQuat[4]; float rotationQuat[4];
const float rpy[3] = { attitudeSettings.BoardRotation.Roll, const float rpy[3] = { attitudeSettings.BoardRotation.Roll,
attitudeSettings.BoardRotation.Pitch, attitudeSettings.BoardRotation.Pitch,
attitudeSettings.BoardRotation.Yaw }; attitudeSettings.BoardRotation.Yaw };
RPY2Quaternion(rpy, rotationQuat); RPY2Quaternion(rpy, rotationQuat);
Quaternion2R(rotationQuat, R); Quaternion2R(rotationQuat, R);

View File

@ -55,7 +55,7 @@ static const struct pios_gpio pios_leds[] = {
}, },
.active_low = false .active_low = false
}, },
[PIOS_LED_D1] = { [PIOS_LED_D1] = {
.pin = { .pin = {
.gpio = GPIOD, .gpio = GPIOD,
.init = { .init = {
@ -68,7 +68,7 @@ static const struct pios_gpio pios_leds[] = {
}, },
.active_low = false .active_low = false
}, },
[PIOS_LED_D2] = { [PIOS_LED_D2] = {
.pin = { .pin = {
.gpio = GPIOD, .gpio = GPIOD,
.init = { .init = {
@ -91,7 +91,7 @@ static const struct pios_gpio_cfg pios_led_cfg = {
const struct pios_gpio_cfg *PIOS_BOARD_HW_DEFS_GetLedCfg(__attribute__((unused)) uint32_t board_revision) const struct pios_gpio_cfg *PIOS_BOARD_HW_DEFS_GetLedCfg(__attribute__((unused)) uint32_t board_revision)
{ {
return &pios_led_cfg; return &pios_led_cfg;
} }
#endif /* PIOS_INCLUDE_LED */ #endif /* PIOS_INCLUDE_LED */

View File

@ -78,15 +78,15 @@
/* #define PIOS_INCLUDE_ADXL345 */ /* #define PIOS_INCLUDE_ADXL345 */
/* #define PIOS_INCLUDE_BMA180 */ /* #define PIOS_INCLUDE_BMA180 */
/* #define PIOS_INCLUDE_L3GD20 */ /* #define PIOS_INCLUDE_L3GD20 */
//#define PIOS_INCLUDE_MPU6000 // #define PIOS_INCLUDE_MPU6000
//#define PIOS_MPU6000_ACCEL // #define PIOS_MPU6000_ACCEL
/* #define PIOS_INCLUDE_HMC5843 */ /* #define PIOS_INCLUDE_HMC5843 */
//#define PIOS_INCLUDE_HMC5883 // #define PIOS_INCLUDE_HMC5883
//#define PIOS_HMC5883_HAS_GPIOS // #define PIOS_HMC5883_HAS_GPIOS
/* #define PIOS_INCLUDE_BMP085 */ /* #define PIOS_INCLUDE_BMP085 */
//#define PIOS_INCLUDE_MS5611 // #define PIOS_INCLUDE_MS5611
//#define PIOS_INCLUDE_MPXV // #define PIOS_INCLUDE_MPXV
//#define PIOS_INCLUDE_ETASV3 // #define PIOS_INCLUDE_ETASV3
/* #define PIOS_INCLUDE_HCSR04 */ /* #define PIOS_INCLUDE_HCSR04 */
/* PIOS receiver drivers */ /* PIOS receiver drivers */
@ -96,7 +96,7 @@
#define PIOS_INCLUDE_DSM #define PIOS_INCLUDE_DSM
#define PIOS_INCLUDE_SBUS #define PIOS_INCLUDE_SBUS
#define PIOS_INCLUDE_GCSRCVR #define PIOS_INCLUDE_GCSRCVR
//#define PIOS_INCLUDE_OPLINKRCVR // #define PIOS_INCLUDE_OPLINKRCVR
/* PIOS abstract receiver interface */ /* PIOS abstract receiver interface */
#define PIOS_INCLUDE_RCVR #define PIOS_INCLUDE_RCVR
@ -117,9 +117,9 @@
/* #define PIOS_INCLUDE_FLASH_EEPROM */ /* #define PIOS_INCLUDE_FLASH_EEPROM */
/* PIOS radio modules */ /* PIOS radio modules */
//#define PIOS_INCLUDE_RFM22B // #define PIOS_INCLUDE_RFM22B
//#define PIOS_INCLUDE_RFM22B_COM // #define PIOS_INCLUDE_RFM22B_COM
//#define PIOS_INCLUDE_RFM22B_RCVR // #define PIOS_INCLUDE_RFM22B_RCVR
/* #define PIOS_INCLUDE_PPM_OUT */ /* #define PIOS_INCLUDE_PPM_OUT */
/* #define PIOS_RFM22B_DEBUG_ON_TELEM */ /* #define PIOS_RFM22B_DEBUG_ON_TELEM */