Compare commits

...

2 Commits

Author SHA1 Message Date
Neale Pickett 047fd1e335 Remove CK button; people found it confusing 2022-06-10 23:16:58 -06:00
Neale Pickett 45c79230c2 remove debugging 2022-06-10 22:18:25 -06:00
3 changed files with 2 additions and 42 deletions

View File

@ -189,16 +189,6 @@
<div class="column"> <div class="column">
<div class="box"> <div class="box">
<h2 class="title" data-i18n="heading.knobs">Knobs</h2> <h2 class="title" data-i18n="heading.knobs">Knobs</h2>
<div class="block">
<div class="control">
<button id="ck" class="button is-primary">
CK
</button>
</div>
<div class="" data-i18n="description.ck">
Send <code>CK</code> (check) to the repeater, and play when it comes back.
</div>
</div>
<div class="block"> <div class="block">
<div class="control"> <div class="control">
<button id="reset" class="button" data-i18n="label.reset"> <button id="reset" class="button" data-i18n="label.reset">

View File

@ -106,9 +106,6 @@ export class Vail {
// and how many clients are connected // and how many clients are connected
if (msg.Duration.length == 0) { if (msg.Duration.length == 0) {
this.clockOffset = now - msg.Timestamp this.clockOffset = now - msg.Timestamp
console.log("them:", msg.Timestamp)
console.log(" us:", now)
console.log("Clock offset", this.clockOffset)
this.rx(0, 0, stats) this.rx(0, 0, stats)
return return
} }

View File

@ -54,9 +54,6 @@ class VailClient {
for (let e of document.querySelectorAll("button.maximize")) { for (let e of document.querySelectorAll("button.maximize")) {
e.addEventListener("click", e => this.maximize(e)) e.addEventListener("click", e => this.maximize(e))
} }
for (let e of document.querySelectorAll("#ck")) {
e.addEventListener("click", e => this.check())
}
for (let e of document.querySelectorAll("#reset")) { for (let e of document.querySelectorAll("#reset")) {
e.addEventListener("click", e => this.reset()) e.addEventListener("click", e => this.reset())
} }
@ -65,9 +62,9 @@ class VailClient {
this.inputInit("#keyer-mode", e => this.setKeyer(e.target.value)) this.inputInit("#keyer-mode", e => this.setKeyer(e.target.value))
this.inputInit("#keyer-rate", e => { this.inputInit("#keyer-rate", e => {
let rate = e.target.value let rate = e.target.value
this.ditDuration = Minute / rate / 50 this.ditDuration = Math.round(Minute / rate / 50)
for (let e of document.querySelectorAll("[data-fill='keyer-ms']")) { for (let e of document.querySelectorAll("[data-fill='keyer-ms']")) {
e.textContent = this.ditDuration.toFixed(0) e.textContent = this.ditDuration
} }
this.keyer.SetDitDuration(this.ditDuration) this.keyer.SetDitDuration(this.ditDuration)
this.roboKeyer.SetDitDuration(this.ditDuration) this.roboKeyer.SetDitDuration(this.ditDuration)
@ -419,30 +416,6 @@ class VailClient {
console.log(element) console.log(element)
} }
/**
* Send "CK" to server, and don't squelch the echo
*/
check() {
let when = Date.now()
let dit = this.ditDuration
let dah = dit * 3
let s = dit
let message = [
dah, s, dit, s, dah, s, dit,
s * 3,
dah, s, dit, s, dah
]
this.repeater.Transmit(when, 0) // Get round-trip time
for (let i in message) {
let duration = message[i]
if (i % 2 == 0) {
this.repeater.Transmit(when, duration, false)
}
when += duration
}
}
/** Reset to factory defaults */ /** Reset to factory defaults */
reset() { reset() {
localStorage.clear() localStorage.clear()