This commit is contained in:
2026-05-07 04:13:20 -03:00
parent eaf38a4d06
commit 3fc54a1fb5
3 changed files with 14 additions and 2 deletions

View File

@@ -28,6 +28,10 @@ if (!isNull _uav && {_activelyControlledUav isEqualTo _uav}) then {
}; };
}; };
if (!isNull _uav) exitWith {
_defaultVideoUri
};
private _sessionVideoUrl = player getVariable [QEGVAR(client,video_feed_url), ""]; private _sessionVideoUrl = player getVariable [QEGVAR(client,video_feed_url), ""];
private _normalizedSessionVideoUrl = [_sessionVideoUrl] call _normalize; private _normalizedSessionVideoUrl = [_sessionVideoUrl] call _normalize;
if (_normalizedSessionVideoUrl isNotEqualTo "") exitWith { if (_normalizedSessionVideoUrl isNotEqualTo "") exitWith {

View File

@@ -10,13 +10,16 @@ if !(player getVariable [QEGVAR(client,eudConnected), false]) exitWith {
}; };
private _uav = getConnectedUAV player; private _uav = getConnectedUAV player;
if (isNull _uav) then {
_uav = _broadcastingUav;
};
if (isNull _uav) exitWith { if (isNull _uav || {!alive _uav}) exitWith {
if (!isNull _broadcastingUav) then { if (!isNull _broadcastingUav) then {
_broadcastingUav setVariable ["armatak_uav_mavlink_broadcasting", false, true]; _broadcastingUav setVariable ["armatak_uav_mavlink_broadcasting", false, true];
player setVariable [QGVAR(broadcastingUav), objNull]; player setVariable [QGVAR(broadcastingUav), objNull];
systemChat "UAV broadcasting stopped"; systemChat "UAV broadcasting stopped";
"armatak" callExtension ["log", [["info", "UAV broadcasting stopped because player is no longer connected to a UAV"]]]; "armatak" callExtension ["log", [["info", "UAV broadcasting stopped because the UAV is no longer available"]]];
}; };
}; };

View File

@@ -125,6 +125,11 @@ pub fn send_uas_system(ctx: Context, payload: UasSystemPayload) -> &'static str
]; ];
if should_send_video_stream_information(&payload.video_uri) { if should_send_video_stream_information(&payload.video_uri) {
info!(
"Sending VIDEO_STREAM_INFORMATION for sysid={} uri={}",
system_id,
payload.video_uri
);
packets.push(video_stream_information_packet( packets.push(video_stream_information_packet(
system_id, system_id,
&payload.callsign, &payload.callsign,