From 31c0f20ac6b4a9854971b6ac432e33deda23a997 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Thu, 25 Feb 2021 01:17:54 +0000 Subject: [PATCH] Style --- src/blackcore/fsd/pilotdataupdate.cpp | 3 +- src/blackcore/fsd/pilotdataupdate.h | 3 +- src/blackmisc/network/fsdsetup.h | 4 +- .../simulator/xplane/simulatorxplane.h | 66 +++++++++---------- 4 files changed, 37 insertions(+), 39 deletions(-) diff --git a/src/blackcore/fsd/pilotdataupdate.cpp b/src/blackcore/fsd/pilotdataupdate.cpp index 38ce15135..dc0814cb3 100644 --- a/src/blackcore/fsd/pilotdataupdate.cpp +++ b/src/blackcore/fsd/pilotdataupdate.cpp @@ -22,7 +22,8 @@ namespace BlackCore PilotDataUpdate::PilotDataUpdate() : MessageBase() { } - PilotDataUpdate::PilotDataUpdate(CTransponder::TransponderMode transponderMode, const QString &sender, int transponderCode, PilotRating rating, double latitude, double longitude, int altitudeTrue, int altitudePressure, int groundSpeed, + PilotDataUpdate::PilotDataUpdate(CTransponder::TransponderMode transponderMode, const QString &sender, int transponderCode, PilotRating rating, + double latitude, double longitude, int altitudeTrue, int altitudePressure, int groundSpeed, double pitch, double bank, double heading, bool onGround) : MessageBase(sender, {}), m_transponderMode(transponderMode), diff --git a/src/blackcore/fsd/pilotdataupdate.h b/src/blackcore/fsd/pilotdataupdate.h index 1a0432b77..1b3d35fdd 100644 --- a/src/blackcore/fsd/pilotdataupdate.h +++ b/src/blackcore/fsd/pilotdataupdate.h @@ -24,7 +24,8 @@ namespace BlackCore { public: //! Constructor - PilotDataUpdate(BlackMisc::Aviation::CTransponder::TransponderMode transponderMode, const QString &sender, int transponderCode, PilotRating rating, double latitude, double longitude, int altitudeTrue, int altitudePressure, int groundSpeed, + PilotDataUpdate(BlackMisc::Aviation::CTransponder::TransponderMode transponderMode, const QString &sender, int transponderCode, PilotRating rating, + double latitude, double longitude, int altitudeTrue, int altitudePressure, int groundSpeed, double pitch, double bank, double heading, bool onGround); //! Message converted to tokens diff --git a/src/blackmisc/network/fsdsetup.h b/src/blackmisc/network/fsdsetup.h index 425f84547..3502002f4 100644 --- a/src/blackmisc/network/fsdsetup.h +++ b/src/blackmisc/network/fsdsetup.h @@ -50,8 +50,8 @@ namespace BlackMisc AllReceive = ReceiveAircraftParts | ReceiveInterimPositions | ReceiveGndFlag, //!< all in All = AllReceive | AllSending, //!< all AllParts = SendAircraftParts | ReceiveAircraftParts, //!< send/receive parts - AllSendingWithoutGnd = SendAircraftParts | SendInterimPositions, //!< all out, but no gnd.flag - AllReceiveWithoutGnd = ReceiveAircraftParts | ReceiveInterimPositions, //!< all in, but no gnd.flag + AllSendingWithoutGnd = AllSending - SendGndFlag, //!< all out, but no gnd.flag + AllReceiveWithoutGnd = AllReceive - ReceiveGndFlag, //!< all in, but no gnd.flag AllInterimPositions = SendInterimPositions | ReceiveInterimPositions, //!< all interim positions AllWithoutGnd = AllReceiveWithoutGnd | AllSendingWithoutGnd, //!< all, but no gnd.flag VATSIMDefault = AllParts | Force3LetterAirlineICAO diff --git a/src/plugins/simulator/xplane/simulatorxplane.h b/src/plugins/simulator/xplane/simulatorxplane.h index 3eadf48cd..a95447995 100644 --- a/src/plugins/simulator/xplane/simulatorxplane.h +++ b/src/plugins/simulator/xplane/simulatorxplane.h @@ -74,37 +74,37 @@ namespace BlackSimPlugin { QString aircraftModelPath; //!< Aircraft model path QString aircraftIcaoCode; //!< Aircraft ICAO code - double latitudeDeg; //!< Longitude [deg] - double longitudeDeg; //!< Latitude [deg] - double altitudeM; //!< Altitude [m] - double groundspeedMs; //!< Ground speed [m/s] - double pitchDeg; //!< Pitch [deg] - double rollDeg; //!< Roll [deg] - double trueHeadingDeg; //!< True heading [deg] - bool onGroundAll; //!< All wheels on ground? - int com1ActiveKhz; //!< COM1 active [kHz] - int com1StandbyKhz; //!< COM1 standby [kHz] - bool isCom1Receiving; //!< COM1 receiving - bool isCom1Transmitting; //!< COM1 transmittings - double com1Volume; //!< COM1 volume 0..1 - int com2ActiveKhz; //!< COM2 active [kHz] - int com2StandbyKhz; //!< COM2 standby [kHz] - bool isCom2Receiving; //!< COM2 receiving - bool isCom2Transmitting; //!< COM2 transmittings - double com2Volume; //!< COM2 volume 0..1 - int xpdrCode; //!< Transpondder code - int xpdrMode; //!< Transponder mode (off=0,stdby=1,on=2,test=3) - bool xpdrIdent; //!< Is transponder in ident? - bool beaconLightsOn; //!< Beacon lights on? - bool landingLightsOn; //!< Landing lights on? - bool navLightsOn; //!< NAV lights on? - bool strobeLightsOn; //!< Strobe lights on? - bool taxiLightsOn; //!< Taxi lights on? - double flapsDeployRatio; //!< Flaps deployment ratio [%] - double gearDeployRatio; //!< Gear deployment ratio [%] + double latitudeDeg = 0; //!< Longitude [deg] + double longitudeDeg = 0; //!< Latitude [deg] + double altitudeM = 0; //!< Altitude [m] + double groundspeedMs = 0; //!< Ground speed [m/s] + double pitchDeg = 0; //!< Pitch [deg] + double rollDeg = 0; //!< Roll [deg] + double trueHeadingDeg = 0; //!< True heading [deg] + bool onGroundAll = false; //!< All wheels on ground? + int com1ActiveKhz = 122800; //!< COM1 active [kHz] + int com1StandbyKhz = 122800; //!< COM1 standby [kHz] + bool isCom1Receiving = true; //!< COM1 receiving + bool isCom1Transmitting = true; //!< COM1 transmittings + double com1Volume = 1; //!< COM1 volume 0..1 + int com2ActiveKhz = 122800; //!< COM2 active [kHz] + int com2StandbyKhz = 122800; //!< COM2 standby [kHz] + bool isCom2Receiving = true; //!< COM2 receiving + bool isCom2Transmitting = true; //!< COM2 transmittings + double com2Volume = 1; //!< COM2 volume 0..1 + int xpdrCode = 2000; //!< Transpondder code + int xpdrMode = 0; //!< Transponder mode (off=0,stdby=1,on=2,test=3) + bool xpdrIdent = false; //!< Is transponder in ident? + bool beaconLightsOn = false; //!< Beacon lights on? + bool landingLightsOn = false; //!< Landing lights on? + bool navLightsOn = false; //!< NAV lights on? + bool strobeLightsOn = false; //!< Strobe lights on? + bool taxiLightsOn = false; //!< Taxi lights on? + double flapsDeployRatio = 0; //!< Flaps deployment ratio [%] + double gearDeployRatio = 0; //!< Gear deployment ratio [%] QList enginesN1Percentage; //!< N1 per engine [%] - double speedBrakeRatio; //!< Speed break ratio [%] - double seaLevelPressureInHg; //!< Sea level pressure [inhg] + double speedBrakeRatio = 0; //!< Speed break ratio [%] + double seaLevelPressureInHg = 0; //!< Sea level pressure [inhg] }; //! X-Plane ISimulator implementation @@ -284,11 +284,7 @@ namespace BlackSimPlugin //! Reset the XPlane data void resetXPlaneData() { - m_xplaneData = { "", "", 0, 0, 0, 0, 0, 0, 0, false, - 122800, 122800, true, true, 1.0, 122800, 122800, true, true, 1.0, - 2000, 0, false, false, false, false, - false, false, 0, 0, {}, 0.0, 0.0 - }; + m_xplaneData = {}; } };