From 5b755c5358516d187ddd7d4770c0e34831d285b7 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 4 Dec 2024 19:29:06 +0900 Subject: [PATCH] AP_Scripting: video-stream-information gets herelink support --- .../applets/video-stream-information.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Scripting/applets/video-stream-information.lua b/libraries/AP_Scripting/applets/video-stream-information.lua index 046dae195bb53..52b7ed9555552 100644 --- a/libraries/AP_Scripting/applets/video-stream-information.lua +++ b/libraries/AP_Scripting/applets/video-stream-information.lua @@ -7,7 +7,7 @@ local PARAM_TABLE_PREFIX = "VID1_" local MAV_SEVERITY = {EMERGENCY=0, ALERT=1, CRITICAL=2, ERROR=3, WARNING=4, NOTICE=5, INFO=6, DEBUG=7} local VID_TYPE_ENUM = {RTSP=0, RTPUDP=1, TCP_MPEG=2, MPEG_TS=3} -local CAMMODEL_ENUM = {UNKNOWN=0, SIYI_A8=1, SIYI_ZR10=2, SIYI_ZR30=3, SIYI_ZT30_ZOOM=4, SIYI_ZT30_WIDE=5, SIYI_ZT30_IR=6, SIYI_ZT6_RGB=7, SIYI_ZT6_IR=8} +local CAMMODEL_ENUM = {UNKNOWN=0, SIYI_A8=1, SIYI_ZR10=2, SIYI_ZR30=3, SIYI_ZT30_ZOOM=4, SIYI_ZT30_WIDE=5, SIYI_ZT30_IR=6, SIYI_ZT6_RGB=7, SIYI_ZT6_IR=8, HERELINK_WIFIAP=9, HERELINK_USB_TETHERING=10} local TEXT_PREFIX_STR = "video-stream-information:" local SIYI_IP_DEFAULT = '192.168.144.25:8554' @@ -24,7 +24,7 @@ end // @Param: VID1_CAMMODEL // @DisplayName: Camera1 Video Stream Camera Model // @Description: Video stream camera model - // @Values: 0:Unknown, 1:Siyi A8, 2:Siyi ZR10, 3:Siyi ZR30, 4:Siyi ZT30 Zoom, 5:Siyi ZT30 Wide, 6:Siyi ZT30 IR, 7:Siyi ZT6 RGB, 8:Siyi ZT6 IR + // @Values: 0:Unknown, 1:Siyi A8, 2:Siyi ZR10, 3:Siyi ZR30, 4:Siyi ZT30 Zoom, 5:Siyi ZT30 Wide, 6:Siyi ZT30 IR, 7:Siyi ZT6 RGB, 8:Siyi ZT6 IR, 9:Herelink WifiAP, 10:Herelink USB-tethering // @User: Standard --]] -- values should match CAMMODEL_ENUM @@ -205,6 +205,14 @@ function set_video_stream_information() uri_suffix = '/video1' hfov = 32 end + if VID1_CAMMODEL:get() == CAMMODEL_ENUM.HERELINK_WIFIAP then + uri_ip = '192.168.42.1:8554' + uri_suffix = '/fpv_stream' + end + if VID1_CAMMODEL:get() == CAMMODEL_ENUM.HERELINK_USB_TETHERING then + uri_ip = '192.168.42.129:8554' + uri_suffix = '/fpv_stream' + end -- calculate hfov if VID1_HFOV:get() ~= 0 then