mirror of
https://github.com/NanjingForestryUniversity/supermachine-tobacco.git
synced 2025-11-08 14:23:55 +00:00
[fix] fix the valve bug when repeat
This commit is contained in:
parent
bd3f677a83
commit
96085c3c49
@ -130,7 +130,7 @@ m. 模式切换:测下一个喷阀还是重发?
|
|||||||
self.last_cmd = 1
|
self.last_cmd = 1
|
||||||
print(f'自动变化到 喷阀测试 {self.last_cmd}')
|
print(f'自动变化到 喷阀测试 {self.last_cmd}')
|
||||||
value = self.last_cmd
|
value = self.last_cmd
|
||||||
cmd = b'\x00\x0A' + 'te'.encode('ascii') + f"{value:08d}".encode('ascii')
|
cmd = b'\x00\x0A' + 'te'.encode('ascii') + f"{value - 1:08d}".encode('ascii')
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
value = int(value)
|
value = int(value)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user