def set_right(camera): try: conf = Config(IP = net + '.' + camera, right = True) conf.write_to_file() tracking_system.run() except: return 'ERROR! def right' return 'OK! def right'
def tracking_off(camera): try: conf = Config(IP = net + '.' + camera, on = False) conf.write_to_file() tracking_system.run() except: return 'ERROR! def tracking_off' return 'OK! def tracking_off'
def set_zoom(camera, zoom): try: try: zoom = float(zoom) if (zoom > 1) or (zoom < 0): return 'Not in interv' except: return 'Not float' conf = Config(IP = net + '.' + camera, zoom = zoom) conf.write_to_file() ##DO tracking_system.run() except: return 'ERROR! def zoom' return 'OK! def zoom ', zoom
def tracking_on(camera): conf = Config(IP = settings.net + '.' + camera, on = True) conf.write_to_file() tracking_system.run() return 'OK! def tracking_on'