示例#1
0
文件: main.py 项目: trandi/Mk4-Apps
def updatePhone():
    global ringBell, hookStatus, calling
    if sim800.isringing():
        ringBell = True
        if hookStatus:
            sim800.answer()
    else:
        ringBell = False
        # status == 4 means call in progress
        if ((not hookStatus) and (sim800.getstatus() == 4)):
            sim800.hangup()
            calling = False
示例#2
0
文件: main.py 项目: Jake-E/Mk4-Apps
def answercall():
    if sim800.isringing():
        sim800.answer()
    else:
        notice("No call to answer.", title="TiLDA Phone")