Exemplo n.º 1
0
def redirect():
    if request.method == 'POST':
        if request.form.get('Start') == 'Start':
            return render_template('panel.html')
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
        elif request.form.get('start') == 'Start':
            return render_template('panel.html')
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
        elif request.form.get('Home') == 'Home':
            return render_template('index.html')
        elif request.form.get('Stop') == 'Stop':
            return render_template('index.html')
Exemplo n.º 2
0
def movec():
    if request.method == 'POST':
        if request.form.get('center') == 'center':
            center()
            return render_template('panel.html')
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
Exemplo n.º 3
0
def photo():
    if request.method == 'POST':
        if request.form.get('Photo') == '📷':
            take_photo()
            return render_template('panel.html')
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
Exemplo n.º 4
0
def moves():
    if request.method == 'POST':
        if request.form.get('stop') == 'stop':
            brake()
            return render_template('panel.html')
            return Response(forward.brake())
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
Exemplo n.º 5
0
def movef():
    if request.method == 'POST':
        if request.form.get('forward') == '↑':
            forward()
            return render_template('panel.html')
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
        else:
            pass  # unknown
Exemplo n.º 6
0
def record():
    if request.method == 'POST':
        if request.form.get('Start') == '▶':
            Recordvideo.video()
            return render_template('panel.html')
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
        elif request.form.get('Stop') == '■':
            Recordvideo.stop_video()
            return render_template('panel.html')
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
        else:
            return render_template("panel.html")
            return Response(
                gen_frames(),
                mimetype='multipart/x-mixed-replace; boundary=frame')
Exemplo n.º 7
0
def video_feed():
    return Response(gen_frames(), mimetype='multipart/x-mixed-replace; boundary=frame')