Example #1
0
        private void CheckLaserStatus()
        {
            LaserC01Request c01   = new LaserC01Request();
            var             bytes = serialPortCom.Encode(c01);

            serialPortCom.SendData(bytes);
        }
Example #2
0
        private byte[] Send01Command()
        {
            LaserC01Request c01   = new LaserC01Request();
            var             bytes = serialPortCom.Encode(c01);

            return(serialPortCom.SendData(bytes));
        }
Example #3
0
        private void CheckLaserStatus()
        {
            LaserC01Request c01   = new LaserC01Request();
            var             bytes = serialPortCom.Encode(c01);

            byte[] recData = serialPortCom.SendData(bytes);
            if (recData != null)
            {
                if (recData.Length == 6)
                {
                    var flag = recData[1] * 128 + recData[2];
                    if (flag == 1152)
                    {
                        EnableRedLaser(false);
                    }
                }
            }
        }