mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
refs #349, housekeeping
* formatting * tweaks (such as changing to new log style), * Doxygen * int instead of qint
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "simconnect_datadefinition.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "simconnect_object.h"
|
||||
#include "blackcore/interpolator_linear.h"
|
||||
|
||||
@@ -514,12 +514,13 @@ namespace BlackSimPlugin
|
||||
position.Heading = situation.getHeading().value(CAngleUnit::deg());
|
||||
position.Airspeed = situation.getGroundSpeed().value(CSpeedUnit::kts());
|
||||
|
||||
// TODO: epic fail for helicopters and VTOPs!
|
||||
//! \todo : epic fail for helicopters and VTOPs!
|
||||
position.OnGround = position.Airspeed < 30 ? 1 : 0;
|
||||
|
||||
DataDefinitionRemoteAircraftSituation ddAircraftSituation;
|
||||
ddAircraftSituation.position = position;
|
||||
|
||||
//! \todo Gear handling with new protocol extension
|
||||
DataDefinitionGearHandlePosition gearHandle;
|
||||
gearHandle.gearHandlePosition = position.Altitude < 1000 ? 1 : 0;
|
||||
|
||||
@@ -563,11 +564,11 @@ namespace BlackSimPlugin
|
||||
|
||||
if (hr != S_OK)
|
||||
{
|
||||
qWarning() << "Sending time sync failed!";
|
||||
CLogMessage(this).warning("Sending time sync failed!");
|
||||
}
|
||||
|
||||
m_syncDeferredCounter = 5; // allow some time to sync
|
||||
CLogMessage(this).info("Synchronized time to UTC: %1") << myTime.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "simulator_fsx.h"
|
||||
#include "simconnect_datadefinition.h"
|
||||
@@ -48,8 +52,9 @@ namespace BlackSimPlugin
|
||||
ex.sprintf("Exception=%d SendID=%d Index=%d cbData=%d",
|
||||
static_cast<int>(exception->dwException), static_cast<int>(exception->dwSendID),
|
||||
static_cast<int>(exception->dwIndex), static_cast<int>(cbData));
|
||||
qDebug() << "Caught simConnect exception: " << CSimConnectUtilities::simConnectExceptionToString((SIMCONNECT_EXCEPTION)exception->dwException);
|
||||
qDebug() << ex;
|
||||
CLogMessage(static_cast<CSimulatorFsx *>(nullptr)).error("Caught simConnect exception: %1 %2")
|
||||
<< CSimConnectUtilities::simConnectExceptionToString((SIMCONNECT_EXCEPTION)exception->dwException)
|
||||
<< ex;
|
||||
break;
|
||||
}
|
||||
case SIMCONNECT_RECV_ID_QUIT:
|
||||
@@ -178,5 +183,8 @@ namespace BlackSimPlugin
|
||||
break;
|
||||
} // main switch
|
||||
} // method
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user