From 14f07cdcb29fbae3cc55e217201c9cbfdd99e4d8 Mon Sep 17 00:00:00 2001
From: 천호석 <hosuk1418@naver.com>
Date: 월, 21 11월 2022 13:34:53 +0900
Subject: [PATCH] auto mode 일 때 key switch 돌리지 못하도록 수정.

---
 SHARP_CLAS_UI/100.Screen/Form_Main.cs |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/SHARP_CLAS_UI/100.Screen/Form_Main.cs b/SHARP_CLAS_UI/100.Screen/Form_Main.cs
index b9854f8..8c15d1b 100644
--- a/SHARP_CLAS_UI/100.Screen/Form_Main.cs
+++ b/SHARP_CLAS_UI/100.Screen/Form_Main.cs
@@ -182,6 +182,12 @@
                 return;
             }
 
+            if (_Parent._equip.equip_mode == En_Equipment_Mode.Auto && _Parent.sm.Get_Bit(Output_Memory_Address.Safety_Mode_SW_Unlock) == false)
+            {
+                Interlock_Manager.Add_Interlock_Msg("Key switch can't change.", "Equipment mode is Auto");
+                return;
+            }
+
             Button data = (Button)sender;
             _Parent.WriteButtonLog($"{this.Name},{data.Name}");
             _Parent._equip.Board_Control.IO_manager.Set_Output(OutputData.Safety_Mode_SW_Unlock, !_Parent.sm.Get_Bit(Output_Memory_Address.Safety_Mode_SW_Unlock));

--
Gitblit v1.9.3