2021-03-21
2021-03-21 本文已影响0人
邯山之郸
if FLG['West_Top']:
FLG['West_Top_Old']=True
window['-lp-'].update('在卸载位',text_color='white')
window['-rp-'].update('在装载位',text_color='white')
x = mysql_connect.readweights('eskip',FLG)
if x == -1:
# 定量斗连接错误,显示错误信息
FLG['Dingliangdou']=True
# pass
elif x == 255:
# 数据库打开错误,显示错误信息
FLG['SQL_DB']=True
else:
# 显示 定量斗数据到主界面
x=round(x,2)
eskip_dump[0] = x
window['-rw-'].update(str(x)+"吨",text_color='white')
# window['-lw-'].update('')
# window['-rdump-'].update('')
FLG['Dingliangdou']=False
FLG['SQL_DB']=False
elif FLG['East_Top']:
FLG['East_Top_Old']=True
window['-rp-'].update('在卸载位',text_color='white')
window['-lp-'].update('在装载位',text_color='white')
else:
window['-lp-'].update('不在位',text_color='white')
window['-rp-'].update('不在位',text_color='white')