Skip to content

Commit

Permalink
fix: use correct MC interface name for 4-series
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-welker committed Apr 22, 2024
1 parent 117953f commit 4151524
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/CiscoRoomOsCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,11 @@ public void InitializeBranding(string roomKey)

var mcBridgeKey = String.Format("mobileControlBridge-{0}", roomKey);

#if SERIES4
var mcBridge = DeviceManager.GetDeviceForKey(mcBridgeKey) as IMobileControlRoomMessenger;
#else
var mcBridge = DeviceManager.GetDeviceForKey(mcBridgeKey) as IMobileControlRoomBridge;

#endif
if (!String.IsNullOrEmpty(_brandingUrl))
{
Debug.Console(1, this, "Branding URL found: {0}", _brandingUrl);
Expand Down Expand Up @@ -1350,30 +1353,34 @@ private void DisplayUserCode(string code)
code));
}

private void SendMcBrandingUrl(IMobileControlRoomBridge mcBridge)
#if SERIES4
private void SendMcBrandingUrl(IMobileControlRoomMessenger roomMessenger)
#else
private void SendMcBrandingUrl(IMobileControlRoomBridge roomMessenger)
#endif
{
if (mcBridge == null)
if (roomMessenger == null)
{
return;
}

Debug.Console(1, this, "Sending url: {0}", mcBridge.QrCodeUrl);
Debug.Console(1, this, "Sending url: {0}", roomMessenger.QrCodeUrl);

EnqueueCommand(
"xconfiguration userinterface custommessage: \"Scan the QR code with a mobile phone to get started\"");
EnqueueCommand(
"xconfiguration userinterface osd halfwakemessage: \"Tap the touch panel or scan the QR code with a mobile phone to get started\"");

var checksum = !String.IsNullOrEmpty(mcBridge.QrCodeChecksum)
? String.Format("checksum: {0} ", mcBridge.QrCodeChecksum)
var checksum = !String.IsNullOrEmpty(roomMessenger.QrCodeChecksum)
? String.Format("checksum: {0} ", roomMessenger.QrCodeChecksum)
: String.Empty;

EnqueueCommand(String.Format(
"xcommand userinterface branding fetch {1}type: branding url: {0}",
mcBridge.QrCodeUrl, checksum));
roomMessenger.QrCodeUrl, checksum));
EnqueueCommand(String.Format(
"xcommand userinterface branding fetch {1}type: halfwakebranding url: {0}",
mcBridge.QrCodeUrl, checksum));
roomMessenger.QrCodeUrl, checksum));
}

private void SendBrandingUrl()
Expand Down

0 comments on commit 4151524

Please sign in to comment.