Subversion Repositories NaviCtrl

Rev

Rev 61 | Rev 72 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61 Rev 62
Line 434... Line 434...
434
            case I2C_CMD_READ_HEADING:
434
            case I2C_CMD_READ_HEADING:
435
                        DebugOut.Analog[10] = I2C_Heading.Heading;
435
                        DebugOut.Analog[10] = I2C_Heading.Heading;
436
                        I2C_RxBuffer = (u8 *)&I2C_Heading;
436
                        I2C_RxBuffer = (u8 *)&I2C_Heading;
437
                        I2C_RxBufferSize = sizeof(I2C_Heading);
437
                        I2C_RxBufferSize = sizeof(I2C_Heading);
438
                        // updat atitude from spi rx buffer
438
                        // updat atitude from spi rx buffer
439
                        I2C_WriteAttitude.Roll = FromFlightCtrl.IntegralRoll;
439
                        I2C_WriteAttitude.Roll = FromFlightCtrl.AngleRoll;
440
                        I2C_WriteAttitude.Nick = FromFlightCtrl.IntegralNick;
440
                        I2C_WriteAttitude.Nick = FromFlightCtrl.AngleNick;
441
                        I2C_TxBuffer =  (u8 *)&I2C_WriteAttitude;
441
                        I2C_TxBuffer =  (u8 *)&I2C_WriteAttitude;
442
                        I2C_TxBufferSize = sizeof(I2C_WriteAttitude);
442
                        I2C_TxBufferSize = sizeof(I2C_WriteAttitude);
443
                        break;
443
                        break;
444
                default: // unknown command id
444
                default: // unknown command id
445
                        I2C_RxBuffer = NULL;
445
                        I2C_RxBuffer = NULL;