This commit is contained in:
邹宗楠
2022-07-26 16:19:15 +08:00
parent d103197d43
commit 38c5f63334

View File

@@ -67,7 +67,8 @@ const (
hexSignQrRight = "1d5804" // 二维码居右 hexSignQrRight = "1d5804" // 二维码居右
hexSignQr = "1b5a000106" // "1b5a000106" 0600 : 后面二维码的字节数 hexSignQr = "1b5a000106" // "1b5a000106" 0600 : 后面二维码的字节数
hexSignQrEnd = "000a1b40" // 000a0a0a1b40 hexSignQrEnd = "000a1b40" // 000a0a0a1b40
hexSignSound = "1d6b40" // 音频指令 hexSignSound = "1d6b40" // 音频指令(自定义语音指令)
hexSignSoundSolidification = "1B594155" // 音频指令(固化指令)
//起始标签 -- 自定义标签utf8转码为gbk字符集 //起始标签 -- 自定义标签utf8转码为gbk字符集
byteSignBR = "3c62723e" // 换行 byteSignBR = "3c62723e" // 换行
@@ -520,7 +521,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) {
//soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2)) //soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2))
//result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr) //result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr)
result = strings.ReplaceAll(result, sound, "") result = strings.ReplaceAll(result, sound, "")
result = strings.ReplaceAll(result, byteSignSound, hexSignSound+"01"+voice) result = strings.ReplaceAll(result, byteSignSound, hexSignSoundSolidification+"14")
//} //}
} }
} }