Browse Source

Gimbal yaw typo

QGC4.4
Tzuriel Lampner 4 years ago committed by Don Gagne
parent
commit
c1b7b3e35f
  1. 10
      src/Vehicle/Vehicle.cc
  2. 4
      src/Vehicle/Vehicle.h

10
src/Vehicle/Vehicle.cc

@ -3713,15 +3713,15 @@ void Vehicle::gimbalPitchStep(int direction) @@ -3713,15 +3713,15 @@ void Vehicle::gimbalPitchStep(int direction)
if(_haveGimbalData) {
//qDebug() << "Pitch:" << _curGimbalPitch << direction << (_curGimbalPitch + direction);
double p = static_cast<double>(_curGimbalPitch + direction);
gimbalControlValue(p, static_cast<double>(_curGinmbalYaw));
gimbalControlValue(p, static_cast<double>(_curGimbalYaw));
}
}
void Vehicle::gimbalYawStep(int direction)
{
if(_haveGimbalData) {
//qDebug() << "Yaw:" << _curGinmbalYaw << direction << (_curGinmbalYaw + direction);
double y = static_cast<double>(_curGinmbalYaw + direction);
//qDebug() << "Yaw:" << _curGimbalYaw << direction << (_curGimbalYaw + direction);
double y = static_cast<double>(_curGimbalYaw + direction);
gimbalControlValue(static_cast<double>(_curGimbalPitch), y);
}
}
@ -3745,8 +3745,8 @@ void Vehicle::_handleGimbalOrientation(const mavlink_message_t& message) @@ -3745,8 +3745,8 @@ void Vehicle::_handleGimbalOrientation(const mavlink_message_t& message)
_curGimbalPitch = o.pitch;
emit gimbalPitchChanged();
}
if(fabsf(_curGinmbalYaw - o.yaw) > 0.5f) {
_curGinmbalYaw = o.yaw;
if(fabsf(_curGimbalYaw - o.yaw) > 0.5f) {
_curGimbalYaw = o.yaw;
emit gimbalYawChanged();
}
if(!_haveGimbalData) {

4
src/Vehicle/Vehicle.h

@ -777,7 +777,7 @@ public: @@ -777,7 +777,7 @@ public:
qreal gimbalRoll () const{ return static_cast<qreal>(_curGimbalRoll);}
qreal gimbalPitch () const{ return static_cast<qreal>(_curGimbalPitch); }
qreal gimbalYaw () const{ return static_cast<qreal>(_curGinmbalYaw); }
qreal gimbalYaw () const{ return static_cast<qreal>(_curGimbalYaw); }
bool gimbalData () const{ return _haveGimbalData; }
bool isROIEnabled () const{ return _isROIEnabled; }
@ -1104,7 +1104,7 @@ private: @@ -1104,7 +1104,7 @@ private:
float _curGimbalRoll = 0.0f;
float _curGimbalPitch = 0.0f;
float _curGinmbalYaw = 0.0f;
float _curGimbalYaw = 0.0f;
bool _haveGimbalData = false;
bool _isROIEnabled = false;
Joystick* _activeJoystick = nullptr;

Loading…
Cancel
Save