1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-122 Ground: Fixed bug in GCS usb sending that prevented sending large objects. Also made the model view rotate the models so it's consistent with both the 3D modelers convention and the flight convention OP is adpoting.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1407 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-08-25 06:25:24 +00:00 committed by peabody124
parent efb7b158b4
commit d445e36717
2 changed files with 5 additions and 4 deletions

View File

@ -205,8 +205,8 @@ void ModelViewGadgetWidget::updateAttitude()
// Rotate to the actual angles (if a gimbal lock at yaw 90/270 deg, change sequence of rotations)
AttitudeActual::DataFields data = attActual->getData();
m_GlView.cameraHandle()->rotateAroundTarget(glc::Z_AXIS, data.Yaw*glc::PI/180.0);
m_GlView.cameraHandle()->rotateAroundTarget(glc::X_AXIS, data.Roll*glc::PI/180.0);
m_GlView.cameraHandle()->rotateAroundTarget(glc::Y_AXIS, -data.Pitch*glc::PI/180.0);
m_GlView.cameraHandle()->rotateAroundTarget(glc::Y_AXIS, data.Roll*glc::PI/180.0);
m_GlView.cameraHandle()->rotateAroundTarget(glc::X_AXIS, data.Pitch*glc::PI/180.0);
updateGL();
}

View File

@ -234,13 +234,14 @@ void RawHIDWriteThread::run()
{
//only remove the size actually written to the device
m_writeBufMtx.lock();
m_writeBuffer.remove(0, ret);
m_writeBuffer.remove(0, ret - 2);
m_writeBufMtx.unlock();
emit m_hid->bytesWritten(ret);
emit m_hid->bytesWritten(ret - 2);
}
else if(ret < 0) // < 0 => error
{
qDebug() << "Error writing to device";
}
else
{