-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add write_samples and description control from waterfall UI.
- Loading branch information
Showing
4 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,6 +222,7 @@ def __init__( | |
sigmf, | ||
zstd=True, | ||
rotate=False, | ||
description=description, | ||
), | ||
] | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 30 additions & 26 deletions
56
gamutrfwaterfall/gamutrfwaterfall/templates/waterfall.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,43 @@ | ||
{% extends "base.html" %} | ||
{% block body %} | ||
<div class="content_container"> | ||
<img id="waterfall" src="" /> | ||
<div class="scanner_args_form"> | ||
<form action = "{{ url_for('config_form') }}" method = "post"> | ||
<p>Freq start:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="freq_start" value="{{ config_vars['freq_start']|int }}"/></p> | ||
<p>Freq end:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="freq_end" value="{{ config_vars['freq_end']|int }}"/></p> | ||
<p>Gain:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="igain" value="{{ config_vars['igain']|int }}"/></p> | ||
<p>Tune overlap:</p> | ||
<p><input type = "text" name="tuneoverlap" value="{{ config_vars['tuneoverlap'] }}"/></p> | ||
<p>Tune step (# of FFTs):</p> | ||
<p><input type="number" step="1" pattern="\d+" name="tune_step_fft" value="{{ config_vars['tune_step_fft']|int }}"/></p> | ||
<p>Sweep seconds:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="sweep_sec" value="{{ config_vars['sweep_sec']|int }}"/></p> | ||
<img id="waterfall" src="" /> | ||
<div class="scanner_args_form"> | ||
<form action = "{{ url_for('config_form') }}" method = "post"> | ||
<p>Freq start:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="freq_start" value="{{ config_vars['freq_start']|int }}"/></p> | ||
<p>Freq end:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="freq_end" value="{{ config_vars['freq_end']|int }}"/></p> | ||
<p>Gain:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="igain" value="{{ config_vars['igain']|int }}"/></p> | ||
<p>Tune overlap:</p> | ||
<p><input type = "text" name="tuneoverlap" value="{{ config_vars['tuneoverlap'] }}"/></p> | ||
<p>Tune step (# of FFTs):</p> | ||
<p><input type="number" step="1" pattern="\d+" name="tune_step_fft" value="{{ config_vars['tune_step_fft']|int }}"/></p> | ||
<p>Sweep seconds:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="sweep_sec" value="{{ config_vars['sweep_sec']|int }}"/></p> | ||
<p>Write samples:</p> | ||
<p><input type="number" step="1" pattern="\d+" name="write_samples" value="{{ config_vars['write_samples']|int }}"/></p> | ||
<p>SigMF description:</p> | ||
<p><input type="number" step="1" pattern=".+" name="description" value="{{ config_vars['description'] }}"/></p> | ||
|
||
<p><button name="reset" type="submit" value="reset">Reset</button></p> | ||
</form> | ||
</div> | ||
<p><button name="reset" type="submit" value="reset">Reset</button></p> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock body %} | ||
{% block script %} | ||
<script> | ||
document.getElementById("waterfall_link").className += " active"; | ||
$(document).ready(function(){ | ||
setInterval(refreshFunction, 1000); | ||
}); | ||
document.getElementById("waterfall_link").className += " active"; | ||
$(document).ready(function(){ | ||
setInterval(refreshFunction, 1000); | ||
}); | ||
|
||
function refreshFunction(){ | ||
function refreshFunction(){ | ||
|
||
d = new Date(); | ||
$("#waterfall").attr("src", "{{ url_for('serve_waterfall_img') }}?"+d.getTime()); | ||
d = new Date(); | ||
$("#waterfall").attr("src", "{{ url_for('serve_waterfall_img') }}?"+d.getTime()); | ||
|
||
} | ||
} | ||
</script> | ||
{% endblock script %} |