mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Align the position and surface variable names to plural
This commit is contained in:
committed by
Klaus Basan
parent
c437c2eabd
commit
654cc1621e
@@ -156,7 +156,7 @@ namespace BlackSimPlugin
|
|||||||
//! \copydoc XSwiftBus::CTraffic::setPlanesPositions
|
//! \copydoc XSwiftBus::CTraffic::setPlanesPositions
|
||||||
void setPlanesPositions(const PlanesPositions &planesPositions);
|
void setPlanesPositions(const PlanesPositions &planesPositions);
|
||||||
|
|
||||||
//! \copydoc XSwiftBus::CTraffic::setPlaneSurfaces
|
//! \copydoc XSwiftBus::CTraffic::setPlanesSurfaces
|
||||||
void setPlanesSurfaces(const PlanesSurfaces &planesSurfaces);
|
void setPlanesSurfaces(const PlanesSurfaces &planesSurfaces);
|
||||||
|
|
||||||
//! \copydoc XSwiftBus::CTraffic::setPlaneTransponder
|
//! \copydoc XSwiftBus::CTraffic::setPlaneTransponder
|
||||||
|
|||||||
@@ -36,33 +36,39 @@ R"(<node>
|
|||||||
</method>
|
</method>
|
||||||
<method name="removeAllPlanes">
|
<method name="removeAllPlanes">
|
||||||
</method>
|
</method>
|
||||||
<method name="setPlanePosition">
|
<method name="setPlanesPositions">
|
||||||
<arg name="callsign" type="s" direction="in"/>
|
<arg name="callsigns" type="as" direction="in"/>
|
||||||
<arg name="latitude" type="d" direction="in"/>
|
<arg name="latitudes" type="ad" direction="in"/>
|
||||||
<arg name="longitude" type="d" direction="in"/>
|
<arg name="longitudes" type="ad" direction="in"/>
|
||||||
<arg name="altitude" type="d" direction="in"/>
|
<arg name="altitudes" type="ad" direction="in"/>
|
||||||
<arg name="pitch" type="d" direction="in"/>
|
<arg name="pitches" type="ad" direction="in"/>
|
||||||
<arg name="roll" type="d" direction="in"/>
|
<arg name="rolls" type="ad" direction="in"/>
|
||||||
<arg name="heading" type="d" direction="in"/>
|
<arg name="headings" type="ad" direction="in"/>
|
||||||
</method>
|
</method>
|
||||||
<method name="setPlaneSurfaces">
|
<method name="setPlanesSurfaces">
|
||||||
<arg name="callsign" type="as" direction="in"/>
|
<arg name="callsigns" type="as" direction="in"/>
|
||||||
<arg name="gear" type="ad" direction="in"/>
|
<arg name="gears" type="ad" direction="in"/>
|
||||||
<arg name="flap" type="ad" direction="in"/>
|
<arg name="flaps" type="ad" direction="in"/>
|
||||||
<arg name="spoiler" type="ad" direction="in"/>
|
<arg name="spoilers" type="ad" direction="in"/>
|
||||||
<arg name="speedBrake" type="ad" direction="in"/>
|
<arg name="speedBrakes" type="ad" direction="in"/>
|
||||||
<arg name="slat" type="ad" direction="in"/>
|
<arg name="slats" type="ad" direction="in"/>
|
||||||
<arg name="wingSweep" type="ad" direction="in"/>
|
<arg name="wingSweeps" type="ad" direction="in"/>
|
||||||
<arg name="thrust" type="ad" direction="in"/>
|
<arg name="thrusts" type="ad" direction="in"/>
|
||||||
<arg name="elevator" type="ad" direction="in"/>
|
<arg name="elevators" type="ad" direction="in"/>
|
||||||
<arg name="rudder" type="ad" direction="in"/>
|
<arg name="rudders" type="ad" direction="in"/>
|
||||||
<arg name="aileron" type="ad" direction="in"/>
|
<arg name="ailerons" type="ad" direction="in"/>
|
||||||
<arg name="landLight" type="ab" direction="in"/>
|
<arg name="landLights" type="ab" direction="in"/>
|
||||||
<arg name="beaconLight" type="ab" direction="in"/>
|
<arg name="beaconLights" type="ab" direction="in"/>
|
||||||
<arg name="strobeLight" type="ab" direction="in"/>
|
<arg name="strobeLights" type="ab" direction="in"/>
|
||||||
<arg name="navLight" type="ab" direction="in"/>
|
<arg name="navLights" type="ab" direction="in"/>
|
||||||
<arg name="lightPattern" type="ai" direction="in"/>
|
<arg name="lightPatterns" type="ai" direction="in"/>
|
||||||
<arg name="onGround" type="ab" direction="in"/>
|
<arg name="onGrounds" type="ab" direction="in"/>
|
||||||
|
</method>
|
||||||
|
<method name="setPlaneTransponder">
|
||||||
|
<arg name="callsign" type="s" direction="in"/>
|
||||||
|
<arg name="code" type="i" direction="in"/>
|
||||||
|
<arg name="modeC" type="b" direction="in"/>
|
||||||
|
<arg name="ident" type="b" direction="in"/>
|
||||||
</method>
|
</method>
|
||||||
<method name="setPlaneTransponder">
|
<method name="setPlaneTransponder">
|
||||||
<arg name="callsign" type="s" direction="in"/>
|
<arg name="callsign" type="s" direction="in"/>
|
||||||
|
|||||||
@@ -277,8 +277,8 @@ namespace XSwiftBus
|
|||||||
m_planeViewMenuItems.clear();
|
m_planeViewMenuItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTraffic::setPlanePositions(const std::vector<std::string> &callsigns, std::vector<double> latitudes, std::vector<double> longitudes, std::vector<double> altitudes,
|
void CTraffic::setPlanesPositions(const std::vector<std::string> &callsigns, std::vector<double> latitudes, std::vector<double> longitudes, std::vector<double> altitudes,
|
||||||
std::vector<double> pitches, std::vector<double> rolles, std::vector<double> headings)
|
std::vector<double> pitches, std::vector<double> rolles, std::vector<double> headings)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < callsigns.size(); i++)
|
for (size_t i = 0; i < callsigns.size(); i++)
|
||||||
{
|
{
|
||||||
@@ -296,12 +296,13 @@ namespace XSwiftBus
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTraffic::setPlaneSurfaces(const std::vector<std::string> &callsign, const std::vector<double> &gear, const std::vector<double> &flap, const std::vector<double> &spoiler,
|
void CTraffic::setPlanesSurfaces(const std::vector<std::string> &callsign, const std::vector<double> &gear, const std::vector<double> &flap, const std::vector<double> &spoilers,
|
||||||
const std::vector<double> &speedBrake, const std::vector<double> &slat, const std::vector<double> &wingSweep, const std::vector<double> &thrust,
|
const std::vector<double> &speedBrakes, const std::vector<double> &slats, const std::vector<double> &wingSweeps, const std::vector<double> &thrusts,
|
||||||
const std::vector<double> &elevator, const std::vector<double> &rudder, const std::vector<double> &aileron, const std::vector<bool> &landLight,
|
const std::vector<double> &elevators, const std::vector<double> &rudders, const std::vector<double> &ailerons, const std::vector<bool> &landLights,
|
||||||
const std::vector<bool> &beaconLight, const std::vector<bool> &strobeLight, const std::vector<bool> &navLight, const std::vector<int> &lightPattern, const std::vector<bool> &onGround)
|
const std::vector<bool> &beaconLights, const std::vector<bool> &strobeLights, const std::vector<bool> &navLights, const std::vector<int> &lightPatterns,
|
||||||
|
const std::vector<bool> &onGrounds)
|
||||||
{
|
{
|
||||||
(void)onGround;
|
(void)onGrounds;
|
||||||
|
|
||||||
for (size_t i = 0; i < callsign.size(); i++)
|
for (size_t i = 0; i < callsign.size(); i++)
|
||||||
{
|
{
|
||||||
@@ -314,19 +315,19 @@ namespace XSwiftBus
|
|||||||
plane->hasSurfaces = true;
|
plane->hasSurfaces = true;
|
||||||
plane->targetGearPosition = static_cast<float>(gear.at(i));
|
plane->targetGearPosition = static_cast<float>(gear.at(i));
|
||||||
plane->surfaces.flapRatio = static_cast<float>(flap.at(i));
|
plane->surfaces.flapRatio = static_cast<float>(flap.at(i));
|
||||||
plane->surfaces.spoilerRatio = static_cast<float>(spoiler.at(i));
|
plane->surfaces.spoilerRatio = static_cast<float>(spoilers.at(i));
|
||||||
plane->surfaces.speedBrakeRatio = static_cast<float>(speedBrake.at(i));
|
plane->surfaces.speedBrakeRatio = static_cast<float>(speedBrakes.at(i));
|
||||||
plane->surfaces.slatRatio = static_cast<float>(slat.at(i));
|
plane->surfaces.slatRatio = static_cast<float>(slats.at(i));
|
||||||
plane->surfaces.wingSweep = static_cast<float>(wingSweep.at(i));
|
plane->surfaces.wingSweep = static_cast<float>(wingSweeps.at(i));
|
||||||
plane->surfaces.thrust = static_cast<float>(thrust.at(i));
|
plane->surfaces.thrust = static_cast<float>(thrusts.at(i));
|
||||||
plane->surfaces.yokePitch = static_cast<float>(elevator.at(i));
|
plane->surfaces.yokePitch = static_cast<float>(elevators.at(i));
|
||||||
plane->surfaces.yokeHeading = static_cast<float>(rudder.at(i));
|
plane->surfaces.yokeHeading = static_cast<float>(rudders.at(i));
|
||||||
plane->surfaces.yokeRoll = static_cast<float>(aileron.at(i));
|
plane->surfaces.yokeRoll = static_cast<float>(ailerons.at(i));
|
||||||
plane->surfaces.lights.landLights = landLight.at(i);
|
plane->surfaces.lights.landLights = landLights.at(i);
|
||||||
plane->surfaces.lights.bcnLights = beaconLight.at(i);
|
plane->surfaces.lights.bcnLights = beaconLights.at(i);
|
||||||
plane->surfaces.lights.strbLights = strobeLight.at(i);
|
plane->surfaces.lights.strbLights = strobeLights.at(i);
|
||||||
plane->surfaces.lights.navLights = navLight.at(i);
|
plane->surfaces.lights.navLights = navLights.at(i);
|
||||||
plane->surfaces.lights.flashPattern = lightPattern.at(i);
|
plane->surfaces.lights.flashPattern = lightPatterns.at(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -535,7 +536,7 @@ namespace XSwiftBus
|
|||||||
removeAllPlanes();
|
removeAllPlanes();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (message.getMethodName() == "setPlanePositions")
|
else if (message.getMethodName() == "setPlanesPositions")
|
||||||
{
|
{
|
||||||
maybeSendEmptyDBusReply(wantsReply, sender, serial);
|
maybeSendEmptyDBusReply(wantsReply, sender, serial);
|
||||||
std::vector<std::string> callsigns;
|
std::vector<std::string> callsigns;
|
||||||
@@ -543,7 +544,7 @@ namespace XSwiftBus
|
|||||||
std::vector<double> longitudes;
|
std::vector<double> longitudes;
|
||||||
std::vector<double> altitudes;
|
std::vector<double> altitudes;
|
||||||
std::vector<double> pitches;
|
std::vector<double> pitches;
|
||||||
std::vector<double> rolles;
|
std::vector<double> rolls;
|
||||||
std::vector<double> headings;
|
std::vector<double> headings;
|
||||||
message.beginArgumentRead();
|
message.beginArgumentRead();
|
||||||
message.getArgument(callsigns);
|
message.getArgument(callsigns);
|
||||||
@@ -551,56 +552,56 @@ namespace XSwiftBus
|
|||||||
message.getArgument(longitudes);
|
message.getArgument(longitudes);
|
||||||
message.getArgument(altitudes);
|
message.getArgument(altitudes);
|
||||||
message.getArgument(pitches);
|
message.getArgument(pitches);
|
||||||
message.getArgument(rolles);
|
message.getArgument(rolls);
|
||||||
message.getArgument(headings);
|
message.getArgument(headings);
|
||||||
queueDBusCall([ = ]()
|
queueDBusCall([ = ]()
|
||||||
{
|
{
|
||||||
setPlanePositions(callsigns, latitudes, longitudes, altitudes, pitches, rolles, headings);
|
setPlanesPositions(callsigns, latitudes, longitudes, altitudes, pitches, rolls, headings);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (message.getMethodName() == "setPlaneSurfaces")
|
else if (message.getMethodName() == "setPlanesSurfaces")
|
||||||
{
|
{
|
||||||
maybeSendEmptyDBusReply(wantsReply, sender, serial);
|
maybeSendEmptyDBusReply(wantsReply, sender, serial);
|
||||||
std::vector<std::string> callsign;
|
std::vector<std::string> callsigns;
|
||||||
std::vector<double> gear;
|
std::vector<double> gears;
|
||||||
std::vector<double> flap;
|
std::vector<double> flaps;
|
||||||
std::vector<double> spoiler;
|
std::vector<double> spoilers;
|
||||||
std::vector<double> speedBrake;
|
std::vector<double> speedBrakes;
|
||||||
std::vector<double> slat;
|
std::vector<double> slats;
|
||||||
std::vector<double> wingSweep;
|
std::vector<double> wingSweeps;
|
||||||
std::vector<double> thrust;
|
std::vector<double> thrusts;
|
||||||
std::vector<double> elevator;
|
std::vector<double> elevators;
|
||||||
std::vector<double> rudder;
|
std::vector<double> rudders;
|
||||||
std::vector<double> aileron;
|
std::vector<double> ailerons;
|
||||||
std::vector<bool> landLight;
|
std::vector<bool> landLights;
|
||||||
std::vector<bool> beaconLight;
|
std::vector<bool> beaconLights;
|
||||||
std::vector<bool> strobeLight;
|
std::vector<bool> strobeLights;
|
||||||
std::vector<bool> navLight;
|
std::vector<bool> navLights;
|
||||||
std::vector<int> lightPattern;
|
std::vector<int> lightPatterns;
|
||||||
std::vector<bool> onGround;
|
std::vector<bool> onGrounds;
|
||||||
message.beginArgumentRead();
|
message.beginArgumentRead();
|
||||||
message.getArgument(callsign);
|
message.getArgument(callsigns);
|
||||||
message.getArgument(gear);
|
message.getArgument(gears);
|
||||||
message.getArgument(flap);
|
message.getArgument(flaps);
|
||||||
message.getArgument(spoiler);
|
message.getArgument(spoilers);
|
||||||
message.getArgument(speedBrake);
|
message.getArgument(speedBrakes);
|
||||||
message.getArgument(slat);
|
message.getArgument(slats);
|
||||||
message.getArgument(wingSweep);
|
message.getArgument(wingSweeps);
|
||||||
message.getArgument(thrust);
|
message.getArgument(thrusts);
|
||||||
message.getArgument(elevator);
|
message.getArgument(elevators);
|
||||||
message.getArgument(rudder);
|
message.getArgument(rudders);
|
||||||
message.getArgument(aileron);
|
message.getArgument(ailerons);
|
||||||
message.getArgument(landLight);
|
message.getArgument(landLights);
|
||||||
message.getArgument(beaconLight);
|
message.getArgument(beaconLights);
|
||||||
message.getArgument(strobeLight);
|
message.getArgument(strobeLights);
|
||||||
message.getArgument(navLight);
|
message.getArgument(navLights);
|
||||||
message.getArgument(lightPattern);
|
message.getArgument(lightPatterns);
|
||||||
message.getArgument(onGround);
|
message.getArgument(onGrounds);
|
||||||
queueDBusCall([ = ]()
|
queueDBusCall([ = ]()
|
||||||
{
|
{
|
||||||
setPlaneSurfaces(callsign, gear, flap, spoiler, speedBrake, slat, wingSweep, thrust, elevator,
|
setPlanesSurfaces(callsigns, gears, flaps, spoilers, speedBrakes, slats, wingSweeps, thrusts, elevators,
|
||||||
rudder, aileron, landLight, beaconLight, strobeLight, navLight, lightPattern,
|
rudders, ailerons, landLights, beaconLights, strobeLights, navLights, lightPatterns,
|
||||||
onGround);
|
onGrounds);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (message.getMethodName() == "setPlaneTransponder")
|
else if (message.getMethodName() == "setPlaneTransponder")
|
||||||
|
|||||||
@@ -95,14 +95,15 @@ namespace XSwiftBus
|
|||||||
void removeAllPlanes();
|
void removeAllPlanes();
|
||||||
|
|
||||||
//! Set the position of multiple traffic aircrafts
|
//! Set the position of multiple traffic aircrafts
|
||||||
void setPlanePositions(const std::vector<std::string> &callsigns, std::vector<double> latitudes, std::vector<double> longitudes, std::vector<double> altitude,
|
void setPlanesPositions(const std::vector<std::string> &callsigns, std::vector<double> latitudes, std::vector<double> longitudes, std::vector<double> altitudes,
|
||||||
std::vector<double> pitchs, std::vector<double> rolls, std::vector<double> headings);
|
std::vector<double> pitches, std::vector<double> rolls, std::vector<double> headings);
|
||||||
|
|
||||||
//! Set the flight control surfaces and lights of multiple traffic aircrafts
|
//! Set the flight control surfaces and lights of multiple traffic aircrafts
|
||||||
void setPlaneSurfaces(const std::vector<std::string> &callsign, const std::vector<double> &gear, const std::vector<double> &flap, const std::vector<double> &spoiler,
|
void setPlanesSurfaces(const std::vector<std::string> &callsigns, const std::vector<double> &gears, const std::vector<double> &flaps, const std::vector<double> &spoilers,
|
||||||
const std::vector<double> &speedBrake, const std::vector<double> &slat, const std::vector<double> &wingSweep, const std::vector<double> &thrust,
|
const std::vector<double> &speedBrakes, const std::vector<double> &slats, const std::vector<double> &wingSweeps, const std::vector<double> &thrusts,
|
||||||
const std::vector<double> &elevator, const std::vector<double> &rudder, const std::vector<double> &aileron, const std::vector<bool> &landLight,
|
const std::vector<double> &elevators, const std::vector<double> &rudders, const std::vector<double> &ailerons, const std::vector<bool> &landLights,
|
||||||
const std::vector<bool> &beaconLight, const std::vector<bool> &strobeLight, const std::vector<bool> &navLight, const std::vector<int> &lightPattern, const std::vector<bool> &onGround);
|
const std::vector<bool> &beaconLights, const std::vector<bool> &strobeLights, const std::vector<bool> &navLights, const std::vector<int> &lightPatterns,
|
||||||
|
const std::vector<bool> &onGrounds);
|
||||||
|
|
||||||
//! Set the transponder of a traffic aircraft
|
//! Set the transponder of a traffic aircraft
|
||||||
void setPlaneTransponder(const std::string &callsign, int code, bool modeC, bool ident);
|
void setPlaneTransponder(const std::string &callsign, int code, bool modeC, bool ident);
|
||||||
|
|||||||
Reference in New Issue
Block a user