From 7876ac5d67b12e206a68db17c4034df52fa2f060 Mon Sep 17 00:00:00 2001 From: z8018 <1282578289@qq.com> Date: 星期五, 06 六月 2025 09:23:38 +0800 Subject: [PATCH] 1 --- project/后台管理/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/ParametersService.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) diff --git "a/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/ParametersService.cs" "b/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/ParametersService.cs" index 2df8ef6..e9327e6 100644 --- "a/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/ParametersService.cs" +++ "b/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_TelescopicService/ParametersService.cs" @@ -63,6 +63,35 @@ int liftPosition = (int)para.LeftPosition;//宸︿几鍑轰綅缃� int rigtpostition = (int)para.RightPosition;//鍙充几鍑轰綅缃� + try + { + var leftorigin = devices.Value.left.Communicator.Read<bool>("M115");//宸lc鍒板師鐐逛綅缃俊鍙� + var rightorigin = devices.Value.right.Communicator.Read<bool>("M115");//鍙硃lc鍒拌揪鍘熺偣浣嶇疆淇″彿 + if (leftorigin == true || rightorigin == true) + { + return new WebResponseContent { Status = false, Message = "宸插埌鍘熷鐐�" }; + } + } + catch (Exception) + { + + + } + try + { + var lefttarget = devices.Value.left.Communicator.Read<bool>("M116");//宸lc鍒拌揪鐩爣浣嶇疆 + var righttarget = devices.Value.right.Communicator.Read<bool>("M116");//鍙硃lc鍒拌揪鐩爣浣嶇疆 + if (lefttarget == true || righttarget == true) + { + return new WebResponseContent { Status = false, Message = "宸插埌鏈�澶у��" }; + } + + } + catch (Exception) + { + + + } if (extendedState == "浼稿嚭") @@ -161,6 +190,36 @@ int ext = (int)para.ManualExtend;//宸LC鎵嬪姩浼稿嚭缂╁洖閫熷害 int ret = (int)para.ManualRetraction;//鍙砅LC鎵嬪姩浼稿嚭缂╁洖閫熷害 + try + { + var leftorigin = devices.Value.left.Communicator.Read<bool>("M115");//宸lc鍒板師鐐逛綅缃俊鍙� + var rightorigin = devices.Value.right.Communicator.Read<bool>("M115");//鍙硃lc鍒拌揪鍘熺偣浣嶇疆淇″彿 + if (leftorigin == true || rightorigin == true) + { + return new WebResponseContent { Status = false, Message = "宸插埌鍘熷鐐�" }; + } + } + catch (Exception) + { + + + } + try + { + var lefttarget = devices.Value.left.Communicator.Read<bool>("M116");//宸lc鍒拌揪鐩爣浣嶇疆 + var righttarget = devices.Value.right.Communicator.Read<bool>("M116");//鍙硃lc鍒拌揪鐩爣浣嶇疆 + if (lefttarget == true || righttarget == true) + { + return new WebResponseContent { Status = false, Message = "宸插埌鏈�澶у��" }; + } + + } + catch (Exception) + { + + + } + if (position == "宸�" && ExtendedState == "浼稿嚭") { -- Gitblit v1.9.3