mirror of https://github.com/nealey/vail.git
Indicate when a repeater is local-only
This commit is contained in:
parent
c64708fa05
commit
f50540aefe
|
@ -89,6 +89,7 @@
|
|||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<output id="note"></output>
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div class="mdl-tabs__tab-bar">
|
||||
<a href="#straight" class="mdl-tabs__tab is-active">Straight Key</a>
|
||||
|
@ -325,6 +326,7 @@
|
|||
<span>Over -.-</span>
|
||||
<span>Correction ........</span>
|
||||
<span>? / Say Again ..--..</span>
|
||||
<span>Speak Slower --.- .-. ...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -429,7 +431,15 @@
|
|||
I also didn't have a lot of money to spend on equipment, but I did have a computer, phone, and gamepad.
|
||||
Nothing else like this exists on the Internet, as far as I can tell.
|
||||
</p>
|
||||
|
||||
|
||||
<h3 class="mdl-card__title-text">What does "local" mean next to the repeater name?</h3>
|
||||
<p>
|
||||
It means this repeater doesn't repeat anything:
|
||||
nothing you key in will be sent anywhere.
|
||||
These are to help people practice and learn,
|
||||
without worrying about anyone else hearing them fumble around.
|
||||
</p>
|
||||
|
||||
<h3 class="mdl-card__title-text">Why do I hear a low tone?</h3>
|
||||
<p>
|
||||
This is the "drop tone", and will be accompanied by an error.
|
||||
|
|
|
@ -141,6 +141,9 @@ export class Fortune {
|
|||
|
||||
let fortune = GetFortune()
|
||||
this.keyer.EnqueueAsciiString(`${fortune}\x04 `)
|
||||
this.rx(0, 0, {
|
||||
note: "local",
|
||||
})
|
||||
}
|
||||
|
||||
Transmit(time, duration, squelch=true) {
|
||||
|
|
|
@ -17,7 +17,7 @@ function install(event) {
|
|||
self.addEventListener("fetch", e => cacheFetch(e))
|
||||
function cacheFetch(event) {
|
||||
let fetchInit = {}
|
||||
if (event.request.match(/(css|js|html)$/)) {
|
||||
if (event.request.url.match(/\.(css|mjs|js|html)$/)) {
|
||||
fetchInit.cache = "no-cache"
|
||||
}
|
||||
event.respondWith(
|
||||
|
|
|
@ -109,6 +109,14 @@ img {
|
|||
background-color: orange;
|
||||
}
|
||||
|
||||
#note {
|
||||
position: absolute;
|
||||
top: 0.5em;
|
||||
right: 5em;
|
||||
font-size: 80%;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.input-methods td {
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ class VailClient {
|
|||
this.sent = []
|
||||
this.lagTimes = [0]
|
||||
this.rxDurations = [0]
|
||||
this.clockOffset = "unknown" // How badly our clock is off of the server's
|
||||
this.clockOffset = null // How badly our clock is off of the server's
|
||||
this.rxDelay = 0 // Milliseconds to add to incoming timestamps
|
||||
this.beginTxTime = null // Time when we began transmitting
|
||||
this.debug = localStorage.debug
|
||||
|
@ -192,9 +192,10 @@ class VailClient {
|
|||
* @param {dict} stats Stuff the repeater class would like us to know about
|
||||
*/
|
||||
receive(when, duration, stats) {
|
||||
this.clockOffset = stats.clockOffset || "unknown"
|
||||
this.clockOffset = stats.clockOffset || "?"
|
||||
let now = Date.now()
|
||||
when += this.rxDelay
|
||||
console.log(stats)
|
||||
|
||||
if (duration > 0) {
|
||||
if (when < now) {
|
||||
|
@ -212,6 +213,7 @@ class VailClient {
|
|||
let longestRxDuration = this.rxDurations.reduce((a,b) => Math.max(a,b))
|
||||
let suggestedDelay = ((averageLag + longestRxDuration) * 1.2).toFixed(0)
|
||||
|
||||
this.updateReading("#note", stats.note || "")
|
||||
this.updateReading("#lag-value", averageLag)
|
||||
this.updateReading("#longest-rx-value", longestRxDuration)
|
||||
this.updateReading("#suggested-delay-value", suggestedDelay)
|
||||
|
|
Loading…
Reference in New Issue