Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
AStA
AStAPrint Admin Business Logic
Commits
0d7c0f2c
Commit
0d7c0f2c
authored
Apr 26, 2022
by
Leon Tappe
🔥
Browse files
add status string getter to status model
parent
c2a08b48
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/src/models/printer_status.dart
View file @
0d7c0f2c
...
...
@@ -34,6 +34,88 @@ class PrinterStatus {
tray3:
map
[
'tray_3'
]
as
int
,
);
List
<
String
>
get
copyStatus
{
var
problems
=
<
String
>[];
if
(
copy
!=
null
)
{
if
(
copy
==
0
)
{
return
problems
;
}
if
(((
copy
>>
0
)
&
1
)
==
1
||
((
copy
>>
4
)
&
1
)
==
1
)
{
problems
.
add
(
'Sonstiger Fehler'
);
}
if
(((
copy
>>
1
)
&
1
)
==
1
)
{
problems
.
add
(
'Tonerstand niedrig'
);
}
if
(((
copy
>>
2
)
&
1
)
==
1
)
{
problems
.
add
(
'Gerät in Benutzung'
);
}
if
(((
copy
>>
3
)
&
1
)
==
1
)
{
problems
.
add
(
'Vorheizphase'
);
}
if
(((
copy
>>
5
)
&
1
)
==
1
)
{
problems
.
add
(
'Vorlageneinzug Deckel offen'
);
}
if
(((
copy
>>
6
)
&
1
)
==
1
)
{
problems
.
add
(
'Drucker Deckel offen'
);
}
if
(((
copy
>>
7
)
&
1
)
==
1
)
{
problems
.
add
(
'Papier alle'
);
}
if
(((
copy
>>
8
)
&
1
)
==
1
)
{
problems
.
add
(
'Papierstau Scanner'
);
}
if
(((
copy
>>
9
)
&
1
)
==
1
)
{
problems
.
add
(
'Papierstau Drucker'
);
}
if
(((
copy
>>
10
)
&
1
)
==
1
)
{
problems
.
add
(
'Toner alle'
);
}
if
(((
copy
>>
11
)
&
1
)
==
1
)
{
problems
.
add
(
'Service rufen'
);
}
}
return
problems
;
}
List
<
String
>
get
scanStatus
{
var
problems
=
<
String
>[];
if
(
scan
!=
null
)
{
if
(
scan
==
0
)
{
return
problems
;
}
if
(((
scan
>>
0
)
&
1
)
==
1
)
{
problems
.
add
(
'Vorlagenglas belegt'
);
}
if
(((
scan
>>
1
)
&
1
)
==
1
)
{
problems
.
add
(
'Vorlageneinzug Deckel offen'
);
}
if
(((
scan
>>
2
)
&
1
)
==
1
)
{
problems
.
add
(
'Papierstau Vorlageneinzug'
);
}
if
(((
scan
>>
3
)
&
1
)
==
1
)
{
problems
.
add
(
'Vorlageneinzug Wartungsklappe offen'
);
}
if
(((
scan
>>
4
)
&
1
)
==
1
||
((
scan
>>
9
)
&
1
)
==
1
)
{
problems
.
add
(
'Sonstiger Fehler'
);
}
if
(((
scan
>>
5
)
&
1
)
==
1
)
{
problems
.
add
(
'User Maintenance'
);
}
if
(((
scan
>>
6
)
&
1
)
==
1
)
{
problems
.
add
(
'Service rufen'
);
}
if
(((
scan
>>
7
)
&
1
)
==
1
)
{
problems
.
add
(
'Scaneinheit ausgeschaltet'
);
}
if
(((
scan
>>
8
)
&
1
)
==
1
)
{
problems
.
add
(
'Gerät in Benutzung'
);
}
}
return
problems
;
}
Map
<
String
,
dynamic
>
get
toMap
=>
<
String
,
dynamic
>{
'scan'
:
scan
,
'copy'
:
copy
,
...
...
Write
Preview
Supports
Markdown
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