diff --git a/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_optical_flow.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_optical_flow.c index d5e94484da69e69e0ac9cd899af3f624ad97ef55..30d7a3381b677b54b0034810b72b58ba18619804 100644 --- a/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_optical_flow.c +++ b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_optical_flow.c @@ -17,6 +17,7 @@ int zybo_optical_flow_read(struct OpticalFlowDriver *self, px4flow_t *of) { struct I2CDriver *i2c = self->i2c; int error = 0; + // Note: Despite documentation, do not mark this as a "packed" struct. The actual code does not pack it. struct i2c_integral_frame { uint16_t frame_count_since_last_readout;//number of flow measurements since last I2C readout [#frames] @@ -30,7 +31,7 @@ int zybo_optical_flow_read(struct OpticalFlowDriver *self, px4flow_t *of) { int16_t ground_distance;// Ground distance in meters*1000 [meters*1000] int16_t gyro_temperature;// Temperature * 100 in centi-degrees Celsius [degcelsius*100] uint8_t quality;// averaged quality of accumulated flow values [0:bad quality;255: max quality] - } __attribute__((packed)) i2c_integral_frame; + } i2c_integral_frame; u8 buf[sizeof(i2c_integral_frame)];