예제 #1
0
        public override void Synchronize(bool[,] m)
        {
            try
            {
                if (!LockPins && BrailleDis != null)
                {
                    var success = BrailleDis.SetCompleteMatrix(m, true);

                    if (!success)
                    {
                        _error = ErrorCode.CANT_SENT_MATRIX;
                    }
                }
            }
            catch
            {
                _error = ErrorCode.CANT_SENT_MATRIX;
            }
            finally
            {
                if (m != null)
                {
                    LastMatrix = m;
                }
            }
        }
예제 #2
0
 public override bool Recalibrate(double threshold)
 {
     if (BrailleDis != null)
     {
         BrailleDis.Recalibrate();
         Thread.Sleep(20000);
         bool re = base.Recalibrate(threshold);
         return(re);
     }
     return(false);
 }
예제 #3
0
        public override bool Connect()
        {
            base.Connect();
            _run = true;
            if (BrailleDis != null)
            {
                this.Device = new BrailleIODevice(BrailleDisConsts.NUMBER_OF_PIN_COLUMNS, BrailleDisConsts.NUMBER_OF_PIN_ROWS, "BrailleDis_" + (BrailleDis.UsedDevice).DeviceInformation.SerialNo, true, true, 30, this);
                BrailleDis.StartTouchEvaluation(20); //Absolutely important. No Events will be throws from BrailleDis if the TouchEvaluation is not active!
                registerEventListener();
                try
                {
                    type = BrailleDis.UsedDevice.DeviceInformation.DeviceType;
                }
                catch { }

                Thread.Sleep(400);
                fireInitialized(new BrailleIO_Initialized_EventArgs(Device));

                return(true);
            }
            return(false);
        }
예제 #4
0
 /// <summary>
 /// Starts the touch evaluation.
 /// </summary>
 public void startTouch()
 {
     BrailleDis.StartTouchEvaluation(20);
 }