Beispiel #1
0
def hello():
    frame = get_frame()
    data = {
        'frame': frame,
        'image': FILENAME_FORMAT.format(frame=frame),
        'IMAGES_URL': '/m/',
        'space': get_space(),
        'INTERVAL': INTERVAL
    }
    return render_template('base.html', data=data)
Beispiel #2
0
def hello():
    frame = get_frame()
    data = {
        'frame': frame,
        'image': FILENAME_FORMAT.format(frame=frame),
        'IMAGES_URL': '/m/',
        'space': get_space(),
        'INTERVAL': INTERVAL
    }
    return render_template('base.html', data=data)
Beispiel #3
0
display.sendCmd('Starting...')
display.setCurPos(2, 1)
try:
    ip = check_output(['sh', '{0}/ip.sh'.format(APP_ROUTE)])\
            .replace('addr:', '')
except:
    print 'Cant get ip'
    display.sendCmd('Unknown IP')
else:
    display.sendCmd(ip)

display.setCurPos(1, 1)
time.sleep(5)

# Pick up from last time
frame = get_frame()
loop_index = 0
clear_next = True

COMMAND = 'raspistill -o {out_path}/{frame} -w {w} -h {h} -ISO {iso}'\
        .format(out_path=OUT_PATH, w=W, h=H, frame=FILENAME_FORMAT, iso=ISO)


def update_frame(frame):
    display.sendCmd('Frame {0}'.format(frame))
    display.setCurPos(2, 1)
    display.sendCmd(get_space())
    display.setCurPos(1, 1)
    with open(FRAME_FILE, 'w') as f:
        f.write(str(frame))