Beispiel #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')
Beispiel #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')
Beispiel #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')
Beispiel #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')
Beispiel #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
Beispiel #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')
Beispiel #7
0
def video_feed():
    return Response(gen_frames(), mimetype='multipart/x-mixed-replace; boundary=frame')