Removed packed attribute from rtx and radio state data structures as they can cause crashes due to unaligned memory accesses.

This commit is contained in:
Silvano Seva 2021-04-15 21:24:26 +02:00
parent c887a61599
commit a850f9f1ab
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ typedef struct
uint16_t txToneEn : 1, /**< TX CTC/DCS tone enable */ uint16_t txToneEn : 1, /**< TX CTC/DCS tone enable */
txTone : 15; /**< TX CTC/DCS tone */ txTone : 15; /**< TX CTC/DCS tone */
} }
__attribute__((packed)) rtxStatus_t; rtxStatus_t;
/** /**
* \enum bandwidth Enumeration type defining the current rtx bandwidth. * \enum bandwidth Enumeration type defining the current rtx bandwidth.

View File

@ -37,7 +37,7 @@ typedef struct
uint16_t azimuth; // Azimuth in degrees uint16_t azimuth; // Azimuth in degrees
uint8_t snr; // Quality of the signal in range 0-99 uint8_t snr; // Quality of the signal in range 0-99
} }
__attribute__((packed)) sat_t; sat_t;
/** /**
* Data structure representing the last state received from the GPS module. * Data structure representing the last state received from the GPS module.
@ -58,7 +58,7 @@ typedef struct
float tmg_mag; // Course over ground, degrees, magnetic float tmg_mag; // Course over ground, degrees, magnetic
float tmg_true; // Course over ground, degrees, true float tmg_true; // Course over ground, degrees, true
} }
__attribute__((packed)) gps_t; gps_t;
/** /**
* Part of this structure has been commented because the corresponding * Part of this structure has been commented because the corresponding
@ -96,7 +96,7 @@ typedef struct
settings_t settings; settings_t settings;
gps_t gps_data; gps_t gps_data;
} }
__attribute__((packed)) state_t; state_t;
enum TunerMode enum TunerMode
{ {