Cleanup
This commit is contained in:
parent
3080194dc1
commit
fab0a52189
|
@ -4,9 +4,10 @@ import (
|
||||||
"image"
|
"image"
|
||||||
"image/draw"
|
"image/draw"
|
||||||
"image/png"
|
"image/png"
|
||||||
"janouch.name/sklad/bdf"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"janouch.name/sklad/bdf"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
20
ql/status.go
20
ql/status.go
|
@ -151,28 +151,28 @@ func (s *Status) Dump(f io.Writer) {
|
||||||
fmt.Fprintln(f, "media length:", s[17], "mm")
|
fmt.Fprintln(f, "media length:", s[17], "mm")
|
||||||
|
|
||||||
// Status type.
|
// Status type.
|
||||||
switch t := s[18]; t {
|
switch t := s[18]; StatusType(t) {
|
||||||
case 0x00:
|
case StatusTypeReplyToRequest:
|
||||||
fmt.Fprintln(f, "status type: reply to status request")
|
fmt.Fprintln(f, "status type: reply to status request")
|
||||||
case 0x01:
|
case StatusTypePrintingCompleted:
|
||||||
fmt.Fprintln(f, "status type: printing completed")
|
fmt.Fprintln(f, "status type: printing completed")
|
||||||
case 0x02:
|
case StatusTypeErrorOccurred:
|
||||||
fmt.Fprintln(f, "status type: error occurred")
|
fmt.Fprintln(f, "status type: error occurred")
|
||||||
case 0x04:
|
case StatusTypeTurnedOff:
|
||||||
fmt.Fprintln(f, "status type: turned off")
|
fmt.Fprintln(f, "status type: turned off")
|
||||||
case 0x05:
|
case StatusTypeNotification:
|
||||||
fmt.Fprintln(f, "status type: notification")
|
fmt.Fprintln(f, "status type: notification")
|
||||||
case 0x06:
|
case StatusTypePhaseChange:
|
||||||
fmt.Fprintln(f, "status type: phase change")
|
fmt.Fprintln(f, "status type: phase change")
|
||||||
default:
|
default:
|
||||||
fmt.Fprintln(f, "status type:", t)
|
fmt.Fprintln(f, "status type:", t)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Phase type.
|
// Phase type.
|
||||||
switch t := s[19]; t {
|
switch t := s[19]; StatusPhase(t) {
|
||||||
case 0x00:
|
case StatusPhaseReceiving:
|
||||||
fmt.Fprintln(f, "phase state: receiving state")
|
fmt.Fprintln(f, "phase state: receiving state")
|
||||||
case 0x01:
|
case StatusPhasePrinting:
|
||||||
fmt.Fprintln(f, "phase state: printing state")
|
fmt.Fprintln(f, "phase state: printing state")
|
||||||
default:
|
default:
|
||||||
fmt.Fprintln(f, "phase state:", t)
|
fmt.Fprintln(f, "phase state:", t)
|
||||||
|
|
Loading…
Reference in New Issue