Pal_Script.py
実行用スクリプト
読み出し方法
from apppal import AppPAL
...
def mainloop(PAL):
global end_flag
try:
from Main_user import Main
except:
mainflag = False
else:
mainflag = True
if PAL.ReadSensorData():
if mainflag:
Main(PAL)
else:
PAL.ShowSensorData()
...
if __name__ == '__main__':
...
try:
PAL = AppPAL(port=options.target, baud=options.baud, tout=0.05, sformat=options.format, autolog=bEnableLog, err=bEnableErrMsg, stdinput=options.stdinp, Logfilename=options.file)
except:
print("Cannot open \"AppPAL\" class...")
exit(1)
while True:
try:
mainloop(PAL)
except KeyboardInterrupt:
break
del PAL最終更新