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; } } }
public override bool Recalibrate(double threshold) { if (BrailleDis != null) { BrailleDis.Recalibrate(); Thread.Sleep(20000); bool re = base.Recalibrate(threshold); return(re); } return(false); }
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); }
/// <summary> /// Starts the touch evaluation. /// </summary> public void startTouch() { BrailleDis.StartTouchEvaluation(20); }