aa
This commit is contained in:
@@ -179,8 +179,8 @@ func connHandler(c net.Conn) {
|
|||||||
printInit := "1b40" //打印机初始化
|
printInit := "1b40" //打印机初始化
|
||||||
voice := "1b59415501" //语音响一次
|
voice := "1b59415501" //语音响一次
|
||||||
check := "ff"
|
check := "ff"
|
||||||
go func() {
|
select {
|
||||||
s := <-textChan
|
case s := <-textChan:
|
||||||
//写入数据
|
//写入数据
|
||||||
printData := hex.EncodeToString([]byte(s))
|
printData := hex.EncodeToString([]byte(s))
|
||||||
lenData := int64(len(str) + len(const1) + len(orderNo) + len(printInit) + len(voice) + 1 + 2 + len(printData))
|
lenData := int64(len(str) + len(const1) + len(orderNo) + len(printInit) + len(voice) + 1 + 2 + len(printData))
|
||||||
@@ -191,7 +191,7 @@ func connHandler(c net.Conn) {
|
|||||||
fmt.Println("Write err:", err, n)
|
fmt.Println("Write err:", err, n)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}()
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func int2h8l8(i int64) (h, l string) {
|
func int2h8l8(i int64) (h, l string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user