Commit 8d9019c5 authored by Andrey's avatar Andrey

Deleted obsolete cut commands

parent 44df8195
...@@ -6,9 +6,8 @@ const cInit = '$esc@'; // Initialize printer ...@@ -6,9 +6,8 @@ const cInit = '$esc@'; // Initialize printer
const cBeep = '${esc}B'; // Beeper [count] [duration] const cBeep = '${esc}B'; // Beeper [count] [duration]
// Mech. Control // Mech. Control
const cCut = '${gs}V0'; // Cut paper const cCutFull = '${gs}V0'; // Full cut
const cCutFull = '${esc}i'; // Execute paper full cut const cCutPart = '${gs}V1'; // Partial cut
const cCutPart = '${esc}m'; // Execute paper partial cut.
// Character // Character
const cReverseOn = '${gs}B1'; // Turn white/black reverse print mode on const cReverseOn = '${gs}B1'; // Turn white/black reverse print mode on
......
enum PosTextAlign { left, center, right } enum PosTextAlign { left, center, right }
enum PosCutMode { normal, partial, full } enum PosCutMode { full, partial }
enum PosFontType { fontA, fontB } enum PosFontType { fontA, fontB }
class PosTextSize { class PosTextSize {
......
...@@ -105,14 +105,12 @@ class Printer { ...@@ -105,14 +105,12 @@ class Printer {
); );
} }
void cut({PosCutMode mode = PosCutMode.normal}) { void cut({PosCutMode mode = PosCutMode.full}) {
_socket.write('\n\n\n\n\n'); _socket.write('\n\n\n\n\n');
if (mode == PosCutMode.partial) { if (mode == PosCutMode.partial) {
_socket.write(cCutPart); _socket.write(cCutPart);
} else if (mode == PosCutMode.full) {
_socket.write(cCutFull);
} else { } else {
_socket.write(cCut); _socket.write(cCutFull);
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment