PNI CompassPoint Prime User Manual
Page 67
Prime User Manual r08
Page 61
{
// Move(source, destination, size
// (bytes)). Move copies the
// specified number of bytes from
// the source pointer to the
// destination pointer.
// Store the roll.
Move(&(data[pntr]), &roll,
sizeof(roll));
// 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