Can show i slider roundSlider that i have used before and coded AJAX for to flask server.
I have not used xhttp in in html,as jQuery with AJAX make this a little simpler.
You have pick a project that's not so easy if new to all of this
I have not used xhttp in in html,as jQuery with AJAX make this a little simpler.
app.py
from flask import Flask, render_template, jsonify, request, redirect, url_for from random import randint app = Flask(__name__) @app.route('/') def hex_color(): return render_template("index.html") @app.route('/valueofslider') def slide(): slide_val = request.args.get('slide_val') print(slide_val) return slide_val if __name__ == '__main__': app.run(debug=True)
index.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>jQuery roundSlider - JS Bin</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/roundSlider/1.3.2/roundslider.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/roundSlider/1.3.2/roundslider.min.js"></script> </head> <body> <!-- Only html needed --> <div id="slider"></div> <script> var val; $("#slider").roundSlider({ radius: 85, sliderType: "min-range", change: function () { var obj1 = $("#slider").data("roundSlider"); val = obj1.getValue(); value: 1 $.getJSON('/valueofslider', { slide_val: val }); } }); </script> </body> </html>Run
app.py
see that values from slider come live to server.λ python app.py * Serving Flask app "app" (lazy loading) * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: on * Restarting with stat * Debugger is active! * Debugger PIN: 148-447-994 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)So
slide_val
is what you need to integrate in GNU Radio code.You have pick a project that's not so easy if new to all of this