mirror of https://github.com/aredn/aredn.git
bugfix: correct issue when pushing sound "on" more than once (#345)
This commit is contained in:
parent
89c9d37075
commit
ddda727da0
|
@ -192,9 +192,13 @@ $header = <<EOF;
|
|||
gainNode.connect(audioCtx.destination);
|
||||
gainNode.gain.value = 1;
|
||||
oscillator.start();
|
||||
document.getElementById("toneOff").disabled = false;
|
||||
document.getElementById("toneOn").disabled = true;
|
||||
};
|
||||
|
||||
function toneOff() {
|
||||
document.getElementById("toneOff").disabled = true;
|
||||
document.getElementById("toneOn").disabled = false;
|
||||
oscillator.stop();
|
||||
};
|
||||
|
||||
|
@ -260,7 +264,7 @@ $page = $page . <<EOF;
|
|||
<div id="snrValues" style="float: left;">
|
||||
EOF
|
||||
$page = $page . "<div><h3>SNR: <span id='snr'>0</span>dB</h3></div>" if($parms{"realtime"} eq "1");
|
||||
$page = $page . "<div style='float: right;'>Sound: <button onclick='toneOn();'>On</button> <button onclick='toneOff();'>Off</button></div>" if($parms{"realtime"} eq "1");
|
||||
$page = $page . "<div style='float: right;'>Sound: <button id='toneOn' onclick='toneOn();'>On</button> <button id='toneOff' disabled onclick='toneOff();'>Off</button></div>" if($parms{"realtime"} eq "1");
|
||||
$page = $page . <<EOF;
|
||||
</div>
|
||||
<div id="chartContainer" style="width: 80%; height: 60%;"></div>
|
||||
|
|
Loading…
Reference in New Issue