mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
449e05fd2a
2 changed files with 3 additions and 2 deletions
|
@ -169,7 +169,6 @@ void SerialInterface::readData() {
|
||||||
int initialSamples = totalSamples;
|
int initialSamples = totalSamples;
|
||||||
|
|
||||||
while (read(serialFd, &bufchar, 1) > 0) {
|
while (read(serialFd, &bufchar, 1) > 0) {
|
||||||
//printLof("%c", bufchar[0]);
|
|
||||||
serialBuffer[serialBufferPos] = bufchar[0];
|
serialBuffer[serialBufferPos] = bufchar[0];
|
||||||
serialBufferPos++;
|
serialBufferPos++;
|
||||||
// Have we reached end of a line of input?
|
// Have we reached end of a line of input?
|
||||||
|
@ -209,7 +208,7 @@ void SerialInterface::readData() {
|
||||||
}
|
}
|
||||||
if (totalSamples == GRAVITY_SAMPLES) {
|
if (totalSamples == GRAVITY_SAMPLES) {
|
||||||
gravity = glm::normalize(gravity);
|
gravity = glm::normalize(gravity);
|
||||||
//printLof("gravity: %f,%f,%f\n", gravity.x, gravity.y, gravity.z);
|
printLog("gravity: %f,%f,%f\n", gravity.x, gravity.y, gravity.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
totalSamples++;
|
totalSamples++;
|
||||||
|
|
|
@ -65,6 +65,8 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) {
|
||||||
memcpy(destinationBuffer, &_handPosition, sizeof(float) * 3);
|
memcpy(destinationBuffer, &_handPosition, sizeof(float) * 3);
|
||||||
destinationBuffer += sizeof(float) * 3;
|
destinationBuffer += sizeof(float) * 3;
|
||||||
|
|
||||||
|
//printLog("%f, %f, %f\n", _handPosition.x, _handPosition.y, _handPosition.z);
|
||||||
|
|
||||||
return destinationBuffer - bufferStart;
|
return destinationBuffer - bufferStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue