Changes to the way the XML is built

This commit is contained in:
Trevor Payne
2020-06-04 15:41:34 -05:00
parent 9517eaa0b0
commit d68645ccb0

View File

@@ -105,7 +105,9 @@ namespace PepperDash.Essentials.Core.Fusion
// Default poll time is 5 min unless overridden by config value
public long SchedulePollInterval = 300000;
public long PushNotificationTimeout = 5000;
public long PushNotificationTimeout = 5000;
private const string RemoteOccupancyXml = "<Occupancy><Type>Local</Type><State>{0}</State></Occupancy>";
protected Dictionary<int, FusionAsset> FusionStaticAssets;
@@ -1381,8 +1383,7 @@ namespace PepperDash.Essentials.Core.Fusion
void RoomIsOccupiedFeedback_OutputChange(object sender, FeedbackEventArgs e)
{
_roomOccupancyRemoteString = e.BoolValue ? @"<Occupancy><Type>Local</Type><State>Occupied</State></Occupancy>"
: @"<Occupancy><Type>Local</Type><State>Unoccupied</State></Occupancy>";
_roomOccupancyRemoteString = String.Format(RemoteOccupancyXml, e.BoolValue ? "Occupied" : "Unoccupied");
RoomOccupancyRemoteStringFeedback.FireUpdate();
}