diff --git a/History.txt b/History.txt index 77fc4657..0e6d6951 100644 --- a/History.txt +++ b/History.txt @@ -8,7 +8,7 @@ ******************************************************************************** 29.04.2022 - deviceServiceVersion = 1013649 + deviceServiceVersion = 1013650 [-] Fixed error with receipt item discount diff --git a/Source/Core/src/com/shtrih/jpos/fiscalprinter/SmFptrConst.java b/Source/Core/src/com/shtrih/jpos/fiscalprinter/SmFptrConst.java index 251fded2..f0ebd899 100644 --- a/Source/Core/src/com/shtrih/jpos/fiscalprinter/SmFptrConst.java +++ b/Source/Core/src/com/shtrih/jpos/fiscalprinter/SmFptrConst.java @@ -876,10 +876,11 @@ private SmFptrConst() { public static final int PORT_TYPE_SOCKET = 2; public static final int PORT_TYPE_FROMCLASS = 3; public static final int PORT_TYPE_BLUETOOTH_LE = 4; - public static final int PORT_TYPE_PPP = 5; + public static final int PORT_TYPE_PPP_BT = 5; + public static final int PORT_TYPE_PPP_BLE = 6; public static final int PORT_TYPE_MIN = 0; - public static final int PORT_TYPE_MAX = 5; + public static final int PORT_TYPE_MAX = 6; ///////////////////////////////////////////////////////////////////// // Header mode constants diff --git a/Source/Core/src/com/shtrih/util/CircularBuffer.java b/Source/Core/src/com/shtrih/util/CircularBuffer.java deleted file mode 100644 index d8bf09fd..00000000 --- a/Source/Core/src/com/shtrih/util/CircularBuffer.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.shtrih.util; - -public class CircularBuffer { - - /** Size of the buffer */ - private final int size; - - /** The buffer */ - private final byte[] buffer; - - /** Index of the next data to be read from the buffer */ - private int readIndex; - - /** Index of the next data written in the buffer */ - private int writeIndex; - - public CircularBuffer(int size) { - this.size = size; - buffer = new byte[size]; - } - - /** - * Tells if a new byte can be read from the buffer. - */ - public int available() { - return writeIndex - readIndex; - } - - public void clear() { - readIndex = 0; - writeIndex = 0; - } - - public int read() { - if (available() > 0) { - final int value = buffer[readIndex]; - readIndex = (readIndex + 1) % size; - return value & 0xFF; - } - return -1; - } - - - public byte[] read(int len){ - if (!(available() >= len)){ - return null; - } - byte[] out = new byte[len]; - System.arraycopy(buffer, readIndex, out, 0, len); - readIndex = (readIndex + len) % size; - return out; - } - - /** - * Writes a byte to the buffer. - */ - public void write(final int value) - { - buffer[writeIndex] = (byte) value; - writeIndex = (writeIndex + 1) % size; - } - - public void write(byte[] value) { - for (int i=0;i