diff --git a/addons/uav/functions/fnc_resolveVideoUri.sqf b/addons/uav/functions/fnc_resolveVideoUri.sqf index 88f0ad3..39dd3af 100644 --- a/addons/uav/functions/fnc_resolveVideoUri.sqf +++ b/addons/uav/functions/fnc_resolveVideoUri.sqf @@ -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 _normalizedSessionVideoUrl = [_sessionVideoUrl] call _normalize; if (_normalizedSessionVideoUrl isNotEqualTo "") exitWith { diff --git a/addons/uav/functions/fnc_updateMavlinkBroadcast.sqf b/addons/uav/functions/fnc_updateMavlinkBroadcast.sqf index bf3b0c7..f7d0286 100644 --- a/addons/uav/functions/fnc_updateMavlinkBroadcast.sqf +++ b/addons/uav/functions/fnc_updateMavlinkBroadcast.sqf @@ -10,13 +10,16 @@ if !(player getVariable [QEGVAR(client,eudConnected), false]) exitWith { }; private _uav = getConnectedUAV player; +if (isNull _uav) then { + _uav = _broadcastingUav; +}; -if (isNull _uav) exitWith { +if (isNull _uav || {!alive _uav}) exitWith { if (!isNull _broadcastingUav) then { _broadcastingUav setVariable ["armatak_uav_mavlink_broadcasting", false, true]; player setVariable [QGVAR(broadcastingUav), objNull]; 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"]]]; }; }; diff --git a/src/uas/send.rs b/src/uas/send.rs index 15b39ee..77f9055 100644 --- a/src/uas/send.rs +++ b/src/uas/send.rs @@ -125,6 +125,11 @@ pub fn send_uas_system(ctx: Context, payload: UasSystemPayload) -> &'static str ]; 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( system_id, &payload.callsign,