diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 1ef2432..ce8b395 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -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) _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) { diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index 9f62265..b3dbdca 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -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: 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;