From 92a3a312ad4453e0aa2b45a80c2bcd81178955d4 Mon Sep 17 00:00:00 2001 From: Eveldee Date: Tue, 24 Nov 2020 15:36:05 +0100 Subject: [PATCH] Remove unused methods --- .../FingerprintSensor.cs | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/WaveshareUARTFingerprintSensor/FingerprintSensor.cs b/WaveshareUARTFingerprintSensor/FingerprintSensor.cs index 0dae72f..bc5276d 100644 --- a/WaveshareUARTFingerprintSensor/FingerprintSensor.cs +++ b/WaveshareUARTFingerprintSensor/FingerprintSensor.cs @@ -118,39 +118,6 @@ namespace WaveshareUARTFingerprintSensor return true; } - /* - private void Send(CommandType commandType, byte first, byte second, byte third) - { - // Command packet - byte[] buffer = { PacketSeparator, (byte)commandType, first, second, third, 0, 0, PacketSeparator }; - - // Checksum - buffer[6] = ComputeChecksum(buffer); - - _serialPort.Write(buffer, 0, buffer.Length); - } - - private (byte first, byte second, byte third) Receive(CommandType commandType) - { - // Response buffer - var buffer = new byte[8]; - - // Response - _serialPort.Read(buffer, 0, buffer.Length); - - if (buffer[0] != PacketSeparator || buffer[7] != PacketSeparator || buffer[1] != (byte)commandType) - { - throw new InvalidDataException("Invalid response from the sensor"); - } - - if (buffer[6] != ComputeChecksum(buffer)) - { - throw new InvalidDataException("Invalid checksum"); - } - - return (buffer[2], buffer[3], buffer[4]); - } - */ public bool TryGetUserCount(out ushort count) {