From 7a27c54f9cbc59f08330671897273d9705029914 Mon Sep 17 00:00:00 2001 From: SightAndSound-Marcel <129047005+SightAndSound-Marcel@users.noreply.github.com> Date: Wed, 10 May 2023 10:09:58 +0200 Subject: [PATCH 1/2] Update index for 3rd byte from 3 to 2 --- integra/Objects.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/integra/Objects.cs b/integra/Objects.cs index 65709a4..8abe0b7 100644 --- a/integra/Objects.cs +++ b/integra/Objects.cs @@ -101,14 +101,14 @@ public struct UserPermissions public bool Tests { get { return (_permissions[1] & 0x40) == 0x40; } set { if (value) _permissions[1] |= (byte)0x30; } } public bool Downloading { get { return (_permissions[1] & 0x80) == 0x80; } set { if (value) _permissions[1] |= (byte)0x80; } } - public bool CanAlwaysDisarm { get { return (_permissions[3] & 0x01) == 0x01; } set { if (value) _permissions[2] |= (byte)1; } } - public bool VoiceMessageClearing { get { return (_permissions[3] & 0x02) == 0x02; } set { if (value) _permissions[2] |= (byte)2; } } - public bool GuardX { get { return (_permissions[3] & 0x01) == 0x04; } set { if (value) _permissions[2] |= (byte)4;} } + public bool CanAlwaysDisarm { get { return (_permissions[2] & 0x01) == 0x01; } set { if (value) _permissions[2] |= (byte)1; } } + public bool VoiceMessageClearing { get { return (_permissions[2] & 0x02) == 0x02; } set { if (value) _permissions[2] |= (byte)2; } } + public bool GuardX { get { return (_permissions[2] & 0x01) == 0x04; } set { if (value) _permissions[2] |= (byte)4;} } public bool AccessToTemporaryBlockedPartitions { get { return (_permissions[3] & 0x08) == 0x08; } set { if (value) _permissions[2] |= (byte)8;}} - public bool Entering1stCode { get { return (_permissions[3] & 0x10) == 0x10; }set { if (value) _permissions[2] |= (byte)0x10; }} - public bool Entering2ndCode { get { return (_permissions[3] & 0x20) == 0x20; } set { if (value) _permissions[2] |= (byte)0x20;}} - public bool OutputsControl { get { return (_permissions[3] & 0x40) == 0x40; } set { if (value) _permissions[2] |= (byte)0x40;}} - public bool ClearingLatchedOutputs { get { return (_permissions[3] & 0x80) == 0x80; } set { if (value) _permissions[2] |= (byte)0x80;}} + public bool Entering1stCode { get { return (_permissions[2] & 0x10) == 0x10; }set { if (value) _permissions[2] |= (byte)0x10; }} + public bool Entering2ndCode { get { return (_permissions[2] & 0x20) == 0x20; } set { if (value) _permissions[2] |= (byte)0x20;}} + public bool OutputsControl { get { return (_permissions[2] & 0x40) == 0x40; } set { if (value) _permissions[2] |= (byte)0x40;}} + public bool ClearingLatchedOutputs { get { return (_permissions[2] & 0x80) == 0x80; } set { if (value) _permissions[2] |= (byte)0x80;}} public UserPermissions(byte[] permissions) { _permissions = permissions; From d3bde93e63b48485b21622dc230fe39a99016054 Mon Sep 17 00:00:00 2001 From: SightAndSound-Marcel <129047005+SightAndSound-Marcel@users.noreply.github.com> Date: Wed, 10 May 2023 10:21:58 +0200 Subject: [PATCH 2/2] Update index for forgotten line --- integra/Objects.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integra/Objects.cs b/integra/Objects.cs index 8abe0b7..6cfe835 100644 --- a/integra/Objects.cs +++ b/integra/Objects.cs @@ -104,7 +104,7 @@ public struct UserPermissions public bool CanAlwaysDisarm { get { return (_permissions[2] & 0x01) == 0x01; } set { if (value) _permissions[2] |= (byte)1; } } public bool VoiceMessageClearing { get { return (_permissions[2] & 0x02) == 0x02; } set { if (value) _permissions[2] |= (byte)2; } } public bool GuardX { get { return (_permissions[2] & 0x01) == 0x04; } set { if (value) _permissions[2] |= (byte)4;} } - public bool AccessToTemporaryBlockedPartitions { get { return (_permissions[3] & 0x08) == 0x08; } set { if (value) _permissions[2] |= (byte)8;}} + public bool AccessToTemporaryBlockedPartitions { get { return (_permissions[2] & 0x08) == 0x08; } set { if (value) _permissions[2] |= (byte)8;}} public bool Entering1stCode { get { return (_permissions[2] & 0x10) == 0x10; }set { if (value) _permissions[2] |= (byte)0x10; }} public bool Entering2ndCode { get { return (_permissions[2] & 0x20) == 0x20; } set { if (value) _permissions[2] |= (byte)0x20;}} public bool OutputsControl { get { return (_permissions[2] & 0x40) == 0x40; } set { if (value) _permissions[2] |= (byte)0x40;}}