Rev 27 | Rev 29 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 27 | Rev 28 | ||
---|---|---|---|
Line 173... | Line 173... | ||
173 | I2C_TxBuffer = (uint8_t *)&I2C_Mag; |
173 | I2C_TxBuffer = (uint8_t *)&I2C_Mag; |
174 | I2C_TxBufferSize = sizeof(I2C_Mag); |
174 | I2C_TxBufferSize = sizeof(I2C_Mag); |
175 | I2C_RxBuffer = 0; |
175 | I2C_RxBuffer = 0; |
176 | I2C_RxBufferSize = 0; |
176 | I2C_RxBufferSize = 0; |
Line 177... | Line 177... | ||
177 | 177 | ||
178 | I2C_Mag.MagX = MagnetX; |
178 | I2C_Mag.MagX = MagX; |
179 | I2C_Mag.MagY = MagnetY; |
179 | I2C_Mag.MagY = MagY; |
180 | I2C_Mag.MagZ = MagnetZ; |
180 | I2C_Mag.MagZ = MagZ; |
Line 181... | Line 181... | ||
181 | break; |
181 | break; |
182 | 182 | ||
183 | case I2C_CMD_READ_HEADING: |
183 | case I2C_CMD_READ_HEADING: |
184 | I2C_TxBuffer = (uint8_t *)&I2C_Heading; |
184 | I2C_TxBuffer = (uint8_t *)&I2C_Heading; |
185 | I2C_TxBufferSize = sizeof(I2C_Heading); |
185 | I2C_TxBufferSize = sizeof(I2C_Heading); |
186 | I2C_RxBuffer = (uint8_t *)&I2C_WriteAttitude; |
186 | I2C_RxBuffer = (uint8_t *)&I2C_WriteAttitude; |
- | 187 | I2C_RxBufferSize = sizeof(I2C_WriteAttitude); |
|
187 | I2C_RxBufferSize = sizeof(I2C_WriteAttitude); |
188 | I2C_Heading.Heading = Heading; |
188 | I2C_Heading.Heading = Heading; |
189 | AttitudeSource = ATTITUDE_SOURCE_I2C; |
189 | break; |
190 | break; |
190 | default: // unknown command id |
191 | default: // unknown command id |
191 | I2C_RxBuffer = 0; |
192 | I2C_RxBuffer = 0; |