[ext] 添加了信息读取与打印功能

This commit is contained in:
li.zhenye 2022-08-11 22:29:33 +08:00
parent 5754c74167
commit 6bdc464ca9
2 changed files with 11 additions and 2 deletions

View File

@ -28,8 +28,8 @@ class Config:
rgb_tobacco_model_path = r"models/tobacco_dt_2022-08-05_10-38.model"
rgb_background_model_path = r"models/background_dt_2022-08-09_16-08.model"
threshold_low, threshold_high = 10, 230
threshold_s = 190
rgb_size_threshold = 4
threshold_s = 190 # 饱和度的最高允许值
rgb_size_threshold = 4 # rgb的尺寸限制
# mask parameter
target_size = (1024, 1024) # (Width, Height) of mask

View File

@ -35,7 +35,16 @@ m. 模式切换:测下一个喷阀还是重发?
print("我在等连接...")
self.c, addr = self.s.accept() # 建立客户端连接
print('和它的链接建立成功了:', addr)
self.c.settimeout(0.1)
while True:
data = ''
try:
data = self.c.recv(1024)
except Exception as e:
print(f"===================================================================")
if len(data) > 0:
print("receive data!!!")
print(data)
value = input(self.reminder)
if value == 'q':
print("好的,我退出啦")