We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d21867a + 4b48c8b commit 5237247Copy full SHA for 5237247
1 file changed
escposprinter/src/main/java/com/dantsu/escposprinter/connection/DeviceConnection.java
@@ -53,9 +53,9 @@ public void send(int addWaitingTime) throws EscPosConnectionException {
53
try {
54
this.stream.write(this.data);
55
this.stream.flush();
56
- this.data = new byte[0];
57
58
- int waitingTime = addWaitingTime + (int) Math.floor(this.data.length / 16f);
+ int waitingTime = addWaitingTime + this.data.length / 16;
+ this.data = new byte[0];
59
if(waitingTime > 0) {
60
Thread.sleep(waitingTime);
61
}
0 commit comments