ShockStatemachine.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:SmartDoorControl 作者: xiaokaizh 项目源码 文件源码
def convert(a):
    ctState.currentState = a
    if ctState.currentState != st.nomal:
        print("CurrentState %s" % a)
    if ctState.currentState == st.knockOr:
        global knockNum
        knockNum += 1
        if knockNum == 2:
            ctState.currentState = st.knock
    if ctState.currentState == st.knock:
        # url = "192.168.12.101"
        # port = 9001
        # MessageHandle.CallAlarm(url, port, 1)
        print "Tong zhi Yong hu :you ren qiao men"




# Timer???
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号