Skip to content

Commit 78422f0

Browse files
authored
Merge pull request #55 from ShimmerEngineering/ASM-1845
ASM-1845
2 parents 75bae96 + c7e99cf commit 78422f0

File tree

2 files changed

+0
-71
lines changed

2 files changed

+0
-71
lines changed

ShimmerBLE/ShimmerBLEAPI/Devices/VerisenseDevice.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,6 @@ protected byte[] UpdateDefaultDeviceConfigBytes(OpConfigPayload deviceOpConfig,
144144
return opConfigToWrite;
145145
}
146146

147-
public void setPasskeyEnabled(bool enabled)
148-
{
149-
if(enabled)
150-
{
151-
OpConfig.ConfigurationBytes[(int)ConfigurationBytesIndexName.GEN_CFG_2] = (byte)(OpConfig.ConfigurationBytes[(int)ConfigurationBytesIndexName.GEN_CFG_2] & 0b11111011);
152-
}
153-
else
154-
{
155-
OpConfig.ConfigurationBytes[(int)ConfigurationBytesIndexName.GEN_CFG_2] = (byte)((OpConfig.ConfigurationBytes[(int)ConfigurationBytesIndexName.GEN_CFG_2] | 0b00000100) & 0b11110111);
156-
}
157-
}
158-
159147
public void setLoggingEnabled(bool enabled)
160148
{
161149
if (enabled)
@@ -469,22 +457,6 @@ public bool IsDeviceEnabled()
469457
}
470458
}
471459

472-
public bool IsPasskeyEnabled()
473-
{
474-
if (OpConfig.ConfigurationBytes == null)
475-
{
476-
throw new Exception("Configuration Bytes Unknown");
477-
}
478-
if ((int)(OpConfig.ConfigurationBytes[(int)ConfigurationBytesIndexName.GEN_CFG_2] & 0b00000100) == 0)
479-
{
480-
return true;
481-
}
482-
else
483-
{
484-
return false;
485-
}
486-
}
487-
488460
public Sensor GetSensor(string key)
489461
{
490462
foreach (Sensor sensor in SensorList.Values)

ShimmerBLE/ShimmerBLETests/Communications/VerisenseCommandsTest.cs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -654,49 +654,6 @@ public void TestAdaptiveSchedulerMaxFailCount()
654654
Assert.Pass();
655655
}
656656

657-
[Test]
658-
public void TestIsPasskeyEnabled()
659-
{
660-
VerisenseBLEDevice clone = new TestVerisenseBLEDevice(uuid, "", defaultBytes);
661-
VerisenseBLEDevice bleDevice = new VerisenseBLEDevice(clone);
662-
//passkey is enabled by default
663-
if (bleDevice.IsPasskeyEnabled())
664-
{
665-
Assert.Pass();
666-
}
667-
else
668-
{
669-
Assert.Fail();
670-
}
671-
}
672-
673-
[Test]
674-
public void TestIsPasskeyDisabled()
675-
{
676-
VerisenseBLEDevice clone = new TestVerisenseBLEDevice(uuid, "", defaultBytes);
677-
VerisenseBLEDevice bleDevice = new VerisenseBLEDevice(clone);
678-
//disable passkey
679-
bleDevice.setPasskeyEnabled(false);
680-
if (!bleDevice.IsPasskeyEnabled())
681-
{
682-
683-
}
684-
else
685-
{
686-
Assert.Fail();
687-
}
688-
//check if bits 2 and 3 equal 01
689-
if ((bleDevice.GetOperationalConfigByteArray()[(int)ConfigurationBytesIndexName.GEN_CFG_2]).Equals(4))
690-
{
691-
692-
}
693-
else
694-
{
695-
Assert.Fail();
696-
}
697-
698-
Assert.Pass();
699-
}
700657
private byte[] CopyDefaultBytes()
701658
{
702659
var bytes = new byte[defaultBytes.Length];

0 commit comments

Comments
 (0)