From 28bab24e7046d58e28f184e7df52fafb89a85d39 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 20 May 2013 16:17:49 -0700 Subject: [PATCH] type squishes in AvatarData --- libraries/avatars/src/AvatarData.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 27f4286bbd..8c6f4fb894 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -80,10 +80,9 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) { destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _bodyRoll); // Head rotation (NOTE: This needs to become a quaternion to save two bytes) - printf("Current values are %f,%f,%f\n", _headData->getYaw(), _headData->getPitch(), _headData->getRoll()); - destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->getYaw()); - destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->getPitch()); - destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->getRoll()); + destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->_yaw); + destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->_pitch); + destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->_roll); // Head lean X,Z (head lateral and fwd/back motion relative to torso) memcpy(destinationBuffer, &_headLeanSideways, sizeof(float)); @@ -165,15 +164,15 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) { sourceBuffer += sizeof(float) * 3; // Body rotation (NOTE: This needs to become a quaternion to save two bytes) - sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &_bodyYaw); - sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &_bodyPitch); - sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &_bodyRoll); + sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &_bodyYaw); + sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &_bodyPitch); + sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &_bodyRoll); // Head rotation (NOTE: This needs to become a quaternion to save two bytes) float headYaw, headPitch, headRoll; - sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &headYaw); - sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &headPitch); - sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t *)sourceBuffer, &headRoll); + sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &headYaw); + sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &headPitch); + sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &headRoll); _headData->setYaw(headYaw); _headData->setPitch(headPitch);