- Fix missing last area, zone, unit, thermostat, and button

This commit is contained in:
Ryan Wagoner 2019-10-30 00:21:42 -04:00
parent 23dd321f25
commit a1b15cd08b
2 changed files with 16 additions and 16 deletions

View file

@ -306,7 +306,7 @@ namespace OmniLinkBridge.Modules
{
log.Debug("Publishing areas");
for (ushort i = 1; i < OmniLink.Controller.Areas.Count; i++)
for (ushort i = 1; i <= OmniLink.Controller.Areas.Count; i++)
{
clsArea area = OmniLink.Controller.Areas[i];
@ -353,7 +353,7 @@ namespace OmniLinkBridge.Modules
{
log.Debug("Publishing zones");
for (ushort i = 1; i < OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = OmniLink.Controller.Zones[i];
@ -386,7 +386,7 @@ namespace OmniLinkBridge.Modules
{
log.Debug("Publishing units");
for (ushort i = 1; i < OmniLink.Controller.Units.Count; i++)
for (ushort i = 1; i <= OmniLink.Controller.Units.Count; i++)
{
clsUnit unit = OmniLink.Controller.Units[i];
@ -412,7 +412,7 @@ namespace OmniLinkBridge.Modules
{
log.Debug("Publishing thermostats");
for (ushort i = 1; i < OmniLink.Controller.Thermostats.Count; i++)
for (ushort i = 1; i <= OmniLink.Controller.Thermostats.Count; i++)
{
clsThermostat thermostat = OmniLink.Controller.Thermostats[i];
@ -439,7 +439,7 @@ namespace OmniLinkBridge.Modules
{
log.Debug("Publishing buttons");
for (ushort i = 1; i < OmniLink.Controller.Buttons.Count; i++)
for (ushort i = 1; i <= OmniLink.Controller.Buttons.Count; i++)
{
clsButton button = OmniLink.Controller.Buttons[i];
@ -463,7 +463,7 @@ namespace OmniLinkBridge.Modules
// Since the controller doesn't fire zone status change on area status change
// request update so armed, tripped, and secure statuses are correct
for (ushort i = 1; i < OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = OmniLink.Controller.Zones[i];

View file

@ -25,7 +25,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListAreas");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Areas.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Areas.Count; i++)
{
clsArea area = WebServiceModule.OmniLink.Controller.Areas[i];
@ -52,7 +52,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListZonesContact");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = WebServiceModule.OmniLink.Controller.Zones[i];
@ -67,7 +67,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListZonesMotion");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = WebServiceModule.OmniLink.Controller.Zones[i];
@ -82,7 +82,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListZonesWater");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = WebServiceModule.OmniLink.Controller.Zones[i];
@ -97,7 +97,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListZonesSmoke");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = WebServiceModule.OmniLink.Controller.Zones[i];
@ -112,7 +112,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListZonesCO");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = WebServiceModule.OmniLink.Controller.Zones[i];
@ -127,7 +127,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListZonesTemp");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Zones.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Zones.Count; i++)
{
clsZone zone = WebServiceModule.OmniLink.Controller.Zones[i];
@ -161,7 +161,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListUnits");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Units.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Units.Count; i++)
{
clsUnit unit = WebServiceModule.OmniLink.Controller.Units[i];
@ -205,7 +205,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListThermostats");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Thermostats.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Thermostats.Count; i++)
{
clsThermostat unit = WebServiceModule.OmniLink.Controller.Thermostats[i];
@ -278,7 +278,7 @@ namespace OmniLinkBridge.WebAPI
log.Debug("ListButtons");
List<NameContract> names = new List<NameContract>();
for (ushort i = 1; i < WebServiceModule.OmniLink.Controller.Buttons.Count; i++)
for (ushort i = 1; i <= WebServiceModule.OmniLink.Controller.Buttons.Count; i++)
{
clsButton unit = WebServiceModule.OmniLink.Controller.Buttons[i];