beautypg.com

PNI TCM 5 User Manual

Page 58

background image

PNI Sensor Corporation

Doc #1007537 r12

TCM3 & TCM5 User Manual- Sept 2011

Page 58

// increase the pointer to point to the next data element type

pntr +=

sizeof

(roll);

break

;

}

case

CommProtocol::kTemperature:

{

// Move(source, destination, size (bytes)). Move copies the

specified number of

// bytes from the source pointer to the destination pointer.

// Store the heading.

Move(&(data[pntr]), &temperature,

sizeof

(temperature));

// increase the pointer to point to the next data element type

pntr +=

sizeof

(temperature);

break

;

}

default

:

// Message is a function that displays a formatted string (similar

to printf)

Message(

"Unknown type: %02X\r\n"

, data[pntr -

1

]);

// unknown data type, so size is unknown, so skip everything

return

;

break

;

}

count--;

// One less element to read in

}

// Message is a function that displays a formatted string (similar to printf)

Message(

"Heading: %f, Pitch: %f, Roll: %f, Temperature: %f\r\n"

, heading, pitch,

roll,

temperature);

mStep--;

// send next data request

break

;

}

default

:

{

// Message is a function that displays a formatted string (similar to printf)

Message(

"Unknown frame %02X received\r\n"

, (UInt16)frameType);

break

;

}

}

}

This manual is related to the following products: