Better structure alignment to avoid padding

This commit is contained in:
Martin Budden 2017-07-18 11:32:05 +01:00
parent dcc600a78b
commit 6869d78941
6 changed files with 8 additions and 8 deletions

View File

@ -55,9 +55,9 @@ typedef struct gyroDev_s {
extiCallbackRec_t exti;
busDevice_t bus;
float scale; // scalefactor
int16_t gyroADCRaw[XYZ_AXIS_COUNT];
int32_t gyroZero[XYZ_AXIS_COUNT];
int32_t gyroADC[XYZ_AXIS_COUNT]; // gyro data after calibration and alignment
int16_t gyroADCRaw[XYZ_AXIS_COUNT];
int16_t temperature;
uint8_t lpf;
gyroRateKHz_e gyroRateKHz;

View File

@ -61,8 +61,8 @@ PG_RESET_TEMPLATE(failsafeConfig_t, failsafeConfig,
.failsafe_delay = 10, // 1sec
.failsafe_off_delay = 10, // 1sec
.failsafe_throttle = 1000, // default throttle off.
.failsafe_kill_switch = 0, // default failsafe switch action is identical to rc link loss
.failsafe_throttle_low_delay = 100, // default throttle low delay for "just disarm" on failsafe condition
.failsafe_kill_switch = 0, // default failsafe switch action is identical to rc link loss
.failsafe_procedure = FAILSAFE_PROCEDURE_DROP_IT // default full failsafe procedure is 0: auto-landing
);

View File

@ -33,8 +33,8 @@ typedef struct failsafeConfig_s {
uint8_t failsafe_delay; // Guard time for failsafe activation after signal lost. 1 step = 0.1sec - 1sec in example (10)
uint8_t failsafe_off_delay; // Time for Landing before motors stop in 0.1sec. 1 step = 0.1sec - 20sec in example (200)
uint16_t failsafe_throttle; // Throttle level used for landing - specify value between 1000..2000 (pwm pulse width for slightly below hover). center throttle = 1500.
uint8_t failsafe_kill_switch; // failsafe switch action is 0: identical to rc link loss, 1: disarms instantly
uint16_t failsafe_throttle_low_delay; // Time throttle stick must have been below 'min_check' to "JustDisarm" instead of "full failsafe procedure".
uint8_t failsafe_kill_switch; // failsafe switch action is 0: identical to rc link loss, 1: disarms instantly
uint8_t failsafe_procedure; // selected full failsafe procedure is 0: auto-landing, 1: Drop it
} failsafeConfig_t;

View File

@ -90,11 +90,11 @@ void resetPidProfile(pidProfile_t *pidProfile)
.pidSumLimit = PIDSUM_LIMIT,
.pidSumLimitYaw = PIDSUM_LIMIT_YAW,
.yaw_lpf_hz = 0,
.itermWindupPointPercent = 50,
.dterm_filter_type = FILTER_BIQUAD,
.dterm_lpf_hz = 100, // filtering ON by default
.dterm_notch_hz = 260,
.dterm_notch_cutoff = 160,
.dterm_filter_type = FILTER_BIQUAD,
.itermWindupPointPercent = 50,
.vbatPidCompensation = 0,
.pidAtMinThrottle = PID_STABILISATION_ON,
.levelAngleLimit = 55,

View File

@ -74,11 +74,11 @@ typedef struct pid8_s {
typedef struct pidProfile_s {
pid8_t pid[PID_ITEM_COUNT];
uint8_t dterm_filter_type; // Filter selection for dterm
uint16_t dterm_lpf_hz; // Delta Filter in hz
uint16_t yaw_lpf_hz; // Additional yaw filter when yaw axis too noisy
uint16_t dterm_lpf_hz; // Delta Filter in hz
uint16_t dterm_notch_hz; // Biquad dterm notch hz
uint16_t dterm_notch_cutoff; // Biquad dterm notch low cutoff
uint8_t dterm_filter_type; // Filter selection for dterm
uint8_t itermWindupPointPercent; // Experimental ITerm windup threshold, percent motor saturation
uint16_t pidSumLimit;
uint16_t pidSumLimitYaw;

View File

@ -131,9 +131,9 @@ typedef struct osdConfig_s {
bool enabled_stats[OSD_STAT_COUNT];
// Alarms
uint8_t rssi_alarm;
uint16_t cap_alarm;
uint16_t alt_alarm;
uint8_t rssi_alarm;
osd_unit_e units;