Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
esc_pos_print_plus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
esc_pos_print_plus
Commits
8d9019c5
Commit
8d9019c5
authored
Jun 12, 2019
by
Andrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deleted obsolete cut commands
parent
44df8195
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
commands.dart
lib/src/commands.dart
+2
-3
enums.dart
lib/src/enums.dart
+1
-1
printer.dart
lib/src/printer.dart
+2
-4
No files found.
lib/src/commands.dart
View file @
8d9019c5
...
...
@@ -6,9 +6,8 @@ const cInit = '$esc@'; // Initialize printer
const
cBeep
=
'
${esc}
B'
;
// Beeper [count] [duration]
// Mech. Control
const
cCut
=
'
${gs}
V0'
;
// Cut paper
const
cCutFull
=
'
${esc}
i'
;
// Execute paper full cut
const
cCutPart
=
'
${esc}
m'
;
// Execute paper partial cut.
const
cCutFull
=
'
${gs}
V0'
;
// Full cut
const
cCutPart
=
'
${gs}
V1'
;
// Partial cut
// Character
const
cReverseOn
=
'
${gs}
B1'
;
// Turn white/black reverse print mode on
...
...
lib/src/enums.dart
View file @
8d9019c5
enum
PosTextAlign
{
left
,
center
,
right
}
enum
PosCutMode
{
normal
,
partial
,
ful
l
}
enum
PosCutMode
{
full
,
partia
l
}
enum
PosFontType
{
fontA
,
fontB
}
class
PosTextSize
{
...
...
lib/src/printer.dart
View file @
8d9019c5
...
...
@@ -105,14 +105,12 @@ class Printer {
);
}
void
cut
({
PosCutMode
mode
=
PosCutMode
.
norma
l
})
{
void
cut
({
PosCutMode
mode
=
PosCutMode
.
ful
l
})
{
_socket
.
write
(
'
\n\n\n\n\n
'
);
if
(
mode
==
PosCutMode
.
partial
)
{
_socket
.
write
(
cCutPart
);
}
else
if
(
mode
==
PosCutMode
.
full
)
{
_socket
.
write
(
cCutFull
);
}
else
{
_socket
.
write
(
cCut
);
_socket
.
write
(
cCut
Full
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment