Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions ShimmerAPI/ShimmerAPI.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
# Visual Studio Version 17
VisualStudioVersion = 17.13.35931.197 d17.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShimmerBluetoothTests", "ShimmerBluetoothTests\ShimmerBluetoothTests.csproj", "{F5DD4AA6-B826-49CB-96E2-A6DAE01A1C47}"
EndProject
Expand Down Expand Up @@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeedTestExample", "SpeedTe
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShimmerProtocolExample", "ShimmerProtocolExample\ShimmerProtocolExample.csproj", "{E4B4BB7B-5323-48E2-8AB7-25978C2A27E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShimmerSDLogExample", "..\ShimmerSDLogExample\ShimmerSDLogExample.csproj", "{6CD0FBAB-48FE-4794-BB78-425F59C751D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -408,6 +410,30 @@ Global
{E4B4BB7B-5323-48E2-8AB7-25978C2A27E8}.ShimmerAPIBasic|x64.Build.0 = Debug|Any CPU
{E4B4BB7B-5323-48E2-8AB7-25978C2A27E8}.ShimmerAPIBasic|x86.ActiveCfg = Debug|Any CPU
{E4B4BB7B-5323-48E2-8AB7-25978C2A27E8}.ShimmerAPIBasic|x86.Build.0 = Debug|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Debug|x64.ActiveCfg = Debug|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Debug|x64.Build.0 = Debug|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Debug|x86.ActiveCfg = Debug|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Debug|x86.Build.0 = Debug|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Release|Any CPU.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Release|x64.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Release|x64.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Release|x86.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.Release|x86.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPI|Any CPU.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPI|Any CPU.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPI|x64.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPI|x64.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPI|x86.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPI|x86.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPIBasic|Any CPU.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPIBasic|Any CPU.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPIBasic|x64.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPIBasic|x64.Build.0 = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPIBasic|x86.ActiveCfg = Release|Any CPU
{6CD0FBAB-48FE-4794-BB78-425F59C751D8}.ShimmerAPIBasic|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
17 changes: 11 additions & 6 deletions ShimmerAPI/ShimmerAPI/ShimmerBluetooth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,14 @@ public abstract class ShimmerBluetooth : ShimmerDevice
protected int ExpansionBoardRevSpecial;
protected double BatteryVoltage;
protected int ChargingStatus;

protected virtual bool ShouldAddSystemTimestamp => true;

List<double> HRMovingAVGWindow = new List<double>(4);
String[] SignalNameArray = new String[MAX_NUMBER_OF_SIGNALS];
String[] SignalDataTypeArray = new String[MAX_NUMBER_OF_SIGNALS];
protected String[] SignalNameArray = new String[MAX_NUMBER_OF_SIGNALS];
protected String[] SignalDataTypeArray = new String[MAX_NUMBER_OF_SIGNALS];
protected int PacketSize = 2; // Time stamp
protected int EnabledSensors;
protected long EnabledSensors;
protected long DerivedSensors;
protected ObjectCluster KeepObjectCluster = null; // this is to keep the packet for one byte, just incase there is a dropped packet
public double[,] AlignmentMatrixAccel = new double[3, 3] { { -1, 0, 0 }, { 0, -1, 0 }, { 0, 0, 1 } };
public double[,] SensitivityMatrixAccel = new double[3, 3] { { 38, 0, 0 }, { 0, 38, 0 }, { 0, 0, 38 } };
Expand Down Expand Up @@ -3704,6 +3705,7 @@ public String[] GetSignalNameArray()
/// </summary>
/// <param name="address"></param>
public abstract void SetShimmerAddress(String address);

protected virtual ObjectCluster BuildMsg(List<byte> packet)
{

Expand All @@ -3723,7 +3725,10 @@ protected virtual ObjectCluster BuildMsg(List<byte> packet)
FirstSystemTimestamp = false;
}
double shimmerPCTimeStamp = FirstSystemTimeStampValue + calibratedTS;
objectCluster.Add(ShimmerConfiguration.SignalNames.SYSTEM_TIMESTAMP, ShimmerConfiguration.SignalFormats.CAL, ShimmerConfiguration.SignalUnits.MilliSeconds, shimmerPCTimeStamp);
if (ShouldAddSystemTimestamp)
{
objectCluster.Add(ShimmerConfiguration.SignalNames.SYSTEM_TIMESTAMP, ShimmerConfiguration.SignalFormats.CAL, ShimmerConfiguration.SignalUnits.MilliSeconds, shimmerPCTimeStamp);
}

double[] accelerometer = new double[3];
double[] gyroscope = new double[3];
Expand Down Expand Up @@ -5495,7 +5500,7 @@ public double GetSamplingRate()
return SamplingRate;
}

public int GetEnabledSensors()
public long GetEnabledSensors()
{
return EnabledSensors;
}
Expand Down
7 changes: 6 additions & 1 deletion ShimmerAPI/ShimmerAPI/ShimmerLogAndStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public enum ShimmerSDBTMinorIdentifier
MSG_ERROR = 2,
}

public ShimmerLogAndStream()
{

}

public ShimmerLogAndStream(String devID)
: base(devID)
{
Expand Down Expand Up @@ -249,7 +254,7 @@ public enum UsbState
private string SdDir = "";
private string experimentid = null;
public string RadioVersion = "";
private long configtime = 0;
protected long configtime = 0;
public byte[] storedConfig = new byte[118];

// btsd changes
Expand Down
Loading
Loading