PNI CompassPoint Prime User Manual
Page 59
Prime User Manual r08
Page 53
kRAngle,
// 25 - type Float32
};
enum
{
//maximum size of our input buffer
kBufferSize = 512,
//minimum size of a serial packet
kPacketMinSize = 5
};
//SerPort is a serial communication object abstracting
//the hardware implementation
CommProtocol(CommHandler * handler = NULL, SerPort * serPort =
NULL);
void Init(UInt32 baud = 38400);
void SendData(UInt8 frame, void * dataPtr = NULL, UInt32 len =
0);
void SetBaud(UInt32 baud);
protected:
CommHandler * mHandler;
SerPort * mSerialPort;
UInt8 mOutData[kBufferSize], mInData[kBufferSize];
UInt16 mExpectedLen;
UInt32 mOutLen, mOldInLen, mTime, mStep;
UInt16 CRC(void * data, UInt32 len);
void Control();
};