fix function name

This commit is contained in:
Alvin Young 2024-03-13 16:28:47 +08:00
parent ab5510e8a7
commit d96cae0ce7

View File

@ -38,7 +38,7 @@
<label for="freqInput">freq</label>
<input type="text" class="form-control" id="freqInput" placeholder="frequency">
</div>
<button type="button" class="btn btn-primary" href="javascript:void(0);" onclick="convert_usb_pcm_data()">
<button type="button" class="btn btn-primary" href="javascript:void(0);" onclick="calc_distance()">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
calc
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@ -82,7 +82,7 @@
</body>
<script>
function convert_usb_pcm_data() {
function calc_distance() {
var input1 = document.getElementById("lossInput");
var input2 = document.getElementById("freqInput");
var output = document.getElementById("resultOut");