mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 18:25:42 +08:00
[xswiftbus] Add labels when pushing positions to xplanemp2
This commit is contained in:
@@ -49,6 +49,7 @@ namespace XSwiftBus
|
|||||||
surfaces.lights.bcnLights = surfaces.lights.landLights = surfaces.lights.navLights = surfaces.lights.strbLights = 1;
|
surfaces.lights.bcnLights = surfaces.lights.landLights = surfaces.lights.navLights = surfaces.lights.strbLights = 1;
|
||||||
|
|
||||||
std::strncpy(label, callsign.c_str(), sizeof(label));
|
std::strncpy(label, callsign.c_str(), sizeof(label));
|
||||||
|
for (auto &position : positions) { memcpy(position.label, label, sizeof(label)); }
|
||||||
|
|
||||||
std::srand(static_cast<unsigned int>(std::time(nullptr)));
|
std::srand(static_cast<unsigned int>(std::time(nullptr)));
|
||||||
surfaces.lights.timeOffset = static_cast<uint16_t>(std::rand() % 0xffff);
|
surfaces.lights.timeOffset = static_cast<uint16_t>(std::rand() % 0xffff);
|
||||||
|
|||||||
Reference in New Issue
Block a user