From eafc0179c3e0b0dfb0f6a2edc3831ac7ef931e53 Mon Sep 17 00:00:00 2001 From: Saxon Nelson-Milton Date: Mon, 20 Sep 2021 17:59:51 +0930 Subject: [PATCH] cmd/rv/main.go: updating bitrate pin and using const --- cmd/rv/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/rv/main.go b/cmd/rv/main.go index 47d3f694..834f53a3 100644 --- a/cmd/rv/main.go +++ b/cmd/rv/main.go @@ -103,6 +103,7 @@ const ( profilePath = "rv.prof" pkg = "rv: " runPreDelay = 20 * time.Second + bitratePin = "X36" ) // This is set to true if the 'profile' build tag is provided on build. @@ -269,11 +270,11 @@ func sleep(ns *netsender.Sender, l *logger.Logger) { } // readPin provides a callback function of consistent signature for use by -// netsender to retrieve software defined pin values e.g. revid bitrate (X23). +// netsender to retrieve software defined pin values e.g. revid bitrate. func readPin(rv *revid.Revid) func(pin *netsender.Pin) error { return func(pin *netsender.Pin) error { switch { - case pin.Name == "X23": + case pin.Name == bitratePin: pin.Value = -1 if rv != nil { pin.Value = rv.Bitrate()