mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Merge pull request #3662 from martinbudden/bf_structure_alignments2
Improve structure alignments
This commit is contained in:
commit
70b89bb69d
5 changed files with 10 additions and 21 deletions
|
@ -124,10 +124,10 @@ typedef struct flightLogEvent_flightMode_s { // New Event Data type
|
|||
} flightLogEvent_flightMode_t;
|
||||
|
||||
typedef struct flightLogEvent_inflightAdjustment_s {
|
||||
uint8_t adjustmentFunction;
|
||||
bool floatFlag;
|
||||
int32_t newValue;
|
||||
float newFloatValue;
|
||||
uint8_t adjustmentFunction;
|
||||
bool floatFlag;
|
||||
} flightLogEvent_inflightAdjustment_t;
|
||||
|
||||
typedef struct flightLogEvent_loggingResume_s {
|
||||
|
@ -137,18 +137,11 @@ typedef struct flightLogEvent_loggingResume_s {
|
|||
|
||||
#define FLIGHT_LOG_EVENT_INFLIGHT_ADJUSTMENT_FUNCTION_FLOAT_VALUE_FLAG 128
|
||||
|
||||
typedef struct flightLogEvent_gtuneCycleResult_s {
|
||||
uint8_t gtuneAxis;
|
||||
int32_t gtuneGyroAVG;
|
||||
int16_t gtuneNewP;
|
||||
} flightLogEvent_gtuneCycleResult_t;
|
||||
|
||||
typedef union flightLogEventData_u {
|
||||
flightLogEvent_syncBeep_t syncBeep;
|
||||
flightLogEvent_flightMode_t flightMode; // New event data
|
||||
flightLogEvent_inflightAdjustment_t inflightAdjustment;
|
||||
flightLogEvent_loggingResume_t loggingResume;
|
||||
flightLogEvent_gtuneCycleResult_t gtuneCycleResult;
|
||||
} flightLogEventData_t;
|
||||
|
||||
typedef struct flightLogEvent_s {
|
||||
|
|
|
@ -22,13 +22,10 @@
|
|||
|
||||
typedef struct flashGeometry_s {
|
||||
uint16_t sectors; // Count of the number of erasable blocks on the device
|
||||
|
||||
uint16_t pagesPerSector;
|
||||
const uint16_t pageSize; // In bytes
|
||||
|
||||
uint32_t sectorSize; // This is just pagesPerSector * pageSize
|
||||
|
||||
uint32_t totalSize; // This is just sectorSize * sectors
|
||||
uint16_t pagesPerSector;
|
||||
} flashGeometry_t;
|
||||
|
||||
typedef struct flashConfig_s {
|
||||
|
|
|
@ -25,19 +25,18 @@ typedef struct sdcardConfig_s {
|
|||
} sdcardConfig_t;
|
||||
|
||||
typedef struct sdcardMetadata_s {
|
||||
uint8_t manufacturerID;
|
||||
uint32_t numBlocks; /* Card capacity in 512-byte blocks*/
|
||||
uint16_t oemID;
|
||||
uint8_t manufacturerID;
|
||||
|
||||
char productName[5];
|
||||
|
||||
uint32_t productSerial;
|
||||
uint8_t productRevisionMajor;
|
||||
uint8_t productRevisionMinor;
|
||||
uint32_t productSerial;
|
||||
|
||||
uint16_t productionYear;
|
||||
uint8_t productionMonth;
|
||||
|
||||
uint32_t numBlocks; /* Card capacity in 512-byte blocks*/
|
||||
} sdcardMetadata_t;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -83,12 +83,12 @@ typedef struct gpsLocation_s {
|
|||
} gpsLocation_t;
|
||||
|
||||
typedef struct gpsSolutionData_s {
|
||||
uint8_t numSat;
|
||||
gpsLocation_t llh;
|
||||
uint16_t GPS_altitude; // altitude in 0.1m
|
||||
uint16_t groundSpeed; // speed in 0.1m/s
|
||||
uint16_t groundCourse; // degrees * 10
|
||||
uint16_t hdop; // generic HDOP value (*100)
|
||||
uint8_t numSat;
|
||||
} gpsSolutionData_t;
|
||||
|
||||
typedef enum {
|
||||
|
@ -99,8 +99,6 @@ typedef enum {
|
|||
} gpsMessageState_e;
|
||||
|
||||
typedef struct gpsData_s {
|
||||
uint8_t state; // GPS thread state. Used for detecting cable disconnects and configuring attached devices
|
||||
uint8_t baudrateIndex; // index into auto-detecting or current baudrate
|
||||
uint32_t errors; // gps error counter - crc error/lost of data/sync etc..
|
||||
uint32_t timeouts;
|
||||
uint32_t lastMessage; // last time valid GPS data was received (millis)
|
||||
|
@ -108,6 +106,8 @@ typedef struct gpsData_s {
|
|||
|
||||
uint32_t state_position; // incremental variable for loops
|
||||
uint32_t state_ts; // timestamp for last state_position increment
|
||||
uint8_t state; // GPS thread state. Used for detecting cable disconnects and configuring attached devices
|
||||
uint8_t baudrateIndex; // index into auto-detecting or current baudrate
|
||||
gpsMessageState_e messageState;
|
||||
} gpsData_t;
|
||||
|
||||
|
|
|
@ -94,9 +94,9 @@ extern const serialPortIdentifier_e serialPortIdentifiers[SERIAL_PORT_COUNT];
|
|||
// runtime
|
||||
//
|
||||
typedef struct serialPortUsage_s {
|
||||
serialPortIdentifier_e identifier;
|
||||
serialPort_t *serialPort;
|
||||
serialPortFunction_e function;
|
||||
serialPortIdentifier_e identifier;
|
||||
} serialPortUsage_t;
|
||||
|
||||
serialPort_t *findSharedSerialPort(uint16_t functionMask, serialPortFunction_e sharedWithFunction);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue