Use Companion's native Gauge element for level displays
Companion 5.1 marks image-buffer feedbacks as deprecated, and its layered buttons have a Gauge element that follows a number directly. So: - New numeric value feedbacks for gauges: fader/level position 0-100 for inputs, busses, matrix outputs, control groups, aux sends and matrix sends (one shared fader taper: 0 dB at 75 %, -inf at 0), raw pan 0..1 for a symmetric gauge, GEQ band dB, and input meter position. - Every knob and meter preset is now a layered preset: background box, channel name, live dB text and a Gauge bound to $(local:pos); on/off and mute tint the background. Meters use a vertical green/amber/red gauge. Text uses size 100 with shrink-to-fit (14 rendered tiny on 5.1) and the level gauge is white so it stays visible on a green background. - The old image-bar feedbacks keep working and are labelled "(legacy image)"; HELP.md explains how to add a gauge to your own button. - A sleeping iPad no longer logs a relay send error every few seconds: one warning per iPad per 10 minutes. Checked on the booth Companion 5.1: the layered knob previews show live names, levels and gauge fills. npm test: 392 checks pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+12
@@ -367,6 +367,18 @@ export default class DigicoS31Instance extends InstanceBase {
|
||||
if (last !== undefined && now - last < this.timing.errorLogMs) return false
|
||||
if (this.errorLog.size > 200) this.errorLog.clear()
|
||||
this.errorLog.set(key, now)
|
||||
// An iPad that went to sleep makes every fan-out fail with "host down/unreachable" until the relay forgets it
|
||||
// (up to the idle timeout): say so once per iPad as a warning instead of an error every few seconds.
|
||||
const asleep = source === 'Relay socket' && err.dest && ['EHOSTDOWN', 'EHOSTUNREACH', 'ENETUNREACH'].includes(err.code)
|
||||
if (asleep) {
|
||||
const ip = String(err.dest).split(':')[0]
|
||||
const sleepKey = `asleep|${ip}`
|
||||
const lastSleep = this.errorLog.get(sleepKey)
|
||||
if (lastSleep !== undefined && now - lastSleep < 10 * 60 * 1000) return false
|
||||
this.errorLog.set(sleepKey, now)
|
||||
this.log('warn', `Relay: iPad ${ip} is not reachable (asleep or off the network); it stays on the list until it sends again or the idle timeout passes`)
|
||||
return true
|
||||
}
|
||||
this.log('error', `${source}: ${err.message}${err.dest ? ` (${err.dest})` : ''}`)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user