Rev 398 | Rev 419 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 398 | Rev 416 | ||
---|---|---|---|
Line 504... | Line 504... | ||
504 | static s32 filter_z; |
504 | static s32 filter_z; |
505 | if(RxBufferSize == sizeof(AccRawVector) ) |
505 | if(RxBufferSize == sizeof(AccRawVector) ) |
506 | { |
506 | { |
507 | memcpy((u8*)&AccRawVector, pRxBuffer,sizeof(AccRawVector)); |
507 | memcpy((u8*)&AccRawVector, pRxBuffer,sizeof(AccRawVector)); |
508 | } |
508 | } |
509 | DebugOut.Analog[16] = AccRawVector.X; |
509 | // DebugOut.Analog[16] = AccRawVector.X; |
510 | DebugOut.Analog[17] = AccRawVector.Y; |
510 | // DebugOut.Analog[17] = AccRawVector.Y; |
511 | filter_z = (filter_z * 7 + AccRawVector.Z) / 8; |
511 | filter_z = (filter_z * 7 + AccRawVector.Z) / 8; |
Line 512... | Line 512... | ||
512 | 512 | ||
513 | DebugOut.Analog[18] = filter_z; |
513 | // DebugOut.Analog[18] = filter_z; |
514 | DebugOut.Analog[19] = AccRawVector.Z; |
514 | // DebugOut.Analog[19] = AccRawVector.Z; |
515 | } |
515 | } |
516 | // rx data handler for reading magnetic sensor configuration |
516 | // rx data handler for reading magnetic sensor configuration |
517 | void NCMAG_UpdateMagConfig(u8* pRxBuffer, u8 RxBufferSize) |
517 | void NCMAG_UpdateMagConfig(u8* pRxBuffer, u8 RxBufferSize) |
518 | { // if number of byte are matching |
518 | { // if number of byte are matching |