From 7413a238865d5173c2b18509bcd4d88f18260afb Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Fri, 16 Jan 2015 17:55:56 -0500 Subject: [PATCH] Code modernization --- Devices/DeviceBase.cs | 4 ++-- Devices/PressureDevice.cs | 6 +++--- Session.cs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Devices/DeviceBase.cs b/Devices/DeviceBase.cs index 5d7d4ba..f964a27 100644 --- a/Devices/DeviceBase.cs +++ b/Devices/DeviceBase.cs @@ -70,13 +70,13 @@ namespace WeatherService.Devices _valueList = new Dictionary(); // Store properties of the device - _deviceAddress = device.ID.Name; + _deviceAddress = device.Id.Name; _deviceType = deviceType; _session = session; _device = device; // Default the display name - _displayName = device.ID.Name; + _displayName = device.Id.Name; // Default the read interval if (Type == DeviceType.WindDirection || Type == DeviceType.WindSpeed) diff --git a/Devices/PressureDevice.cs b/Devices/PressureDevice.cs index 9e26470..2b92cac 100644 --- a/Devices/PressureDevice.cs +++ b/Devices/PressureDevice.cs @@ -152,7 +152,7 @@ namespace WeatherService.Devices PrepPioForWrite(); - owAdapter.Select(_writeDevice.ID); + owAdapter.Select(_writeDevice.Id); data[dataCount++] = ChannelAccessCommand; data[dataCount++] = ConfigWrite; @@ -172,7 +172,7 @@ namespace WeatherService.Devices PrepPioForRead(); - owAdapter.Select(_readDevice.ID); + owAdapter.Select(_readDevice.Id); data[dataCount++] = ChannelAccessCommand; data[dataCount++] = ConfigRead; @@ -192,7 +192,7 @@ namespace WeatherService.Devices PrepPioForWrite(); - owAdapter.Select(_readDevice.ID); + owAdapter.Select(_readDevice.Id); data[dataCount++] = ChannelAccessCommand; data[dataCount++] = ConfigPulseRead; diff --git a/Session.cs b/Session.cs index 46a87af..5edd64a 100644 --- a/Session.cs +++ b/Session.cs @@ -81,7 +81,7 @@ namespace WeatherService device.Errors++; // TODO - Error event - Tracer.WriteLine(String.Format("{0} - Error in device {1}: {2}", DateTime.Now, exception.DeviceID.Name, exception.Message)); + Tracer.WriteLine(String.Format("{0} - Error in device {1}: {2}", DateTime.Now, exception.DeviceId.Name, exception.Message)); } catch (Exception exception) { @@ -116,7 +116,7 @@ namespace WeatherService owIdentifier deviceID; // Identifier for the other device // Select this device - owAdapter.Select(device.ID); + owAdapter.Select(device.Id); // Setup to try to open the pressure sensor file fileEntry.Name = System.Text.Encoding.ASCII.GetBytes("8570"); @@ -152,7 +152,7 @@ namespace WeatherService break; case 0x1D: - if (device.ID.Name == "4000000004A4081D") + if (device.Id.Name == "4000000004A4081D") { // Create a new rain device and add it to the list Devices.Add(new RainDevice(this, device));