Пример #1
0
def set_pause(flag):
    if flag == '1':
        if SerialManager.set_pause(True):
            print "pausing ..."
            return '1'
        else:
            print "warn: nothing to pause"
            return ''
    elif flag == '0':
        print "resuming ..."
        if SerialManager.set_pause(False):
            return '1'
        else:
            return ''
Пример #2
0
def set_pause(flag):
    # returns pause status
    if flag == '1':
        if SerialManager.set_pause(True):
            print "pausing ..."
            return '1'
        else:
            return '0'
    elif flag == '0':
        print "resuming ..."
        if SerialManager.set_pause(False):
            return '1'
        else:
            return '0'
Пример #3
0
def set_pause(flag):
    # returns pause status
    if flag == '1':
        if SerialManager.set_pause(True):
            print "pausing ..."
            return '1'
        else:
            return '0'
    elif flag == '0':
        print "resuming ..."
        if SerialManager.set_pause(False):
            return '1'
        else:
            return '0'
Пример #4
0
def set_pause(flag):
    if flag == '1':
        if SerialManager.set_pause(True):
            print "pausing ..."
            return '1'
        else:
            print "warn: nothing to pause"
            return ''
    elif flag == '0':
        print "resuming ..."
        if SerialManager.set_pause(False):
            return '1'
        else:
            return ''
Пример #5
0
def set_pause(flag):
    # returns pause status
    if flag == "1":
        if SerialManager.set_pause(True):
            print "pausing ..."
            return "1"
        else:
            return "0"
    elif flag == "0":
        print "resuming ..."
        if SerialManager.set_pause(False):
            return "1"
        else:
            return "0"
Пример #6
0
def set_pause(flag):
    global user_approved
    if not user_approved:
        return 'Access denied'
    # returns pause status
    if flag == '1':
        if SerialManager.set_pause(True):
            print "pausing ..."
            return '1'
        else:
            return '0'
    elif flag == '0':
        print "resuming ..."
        if SerialManager.set_pause(False):
            return '1'
        else:
            return '0'