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
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ public void connectShimmerThroughBTAddress(BluetoothDeviceDetails deviceDetails)
connectThread.start();
}

/**
* @param connectionHandle comport or mac address, note that this does not remove the device from the map
*/
public void disconnectShimmer(String connectionHandle){
printMessage("Attempting to disconnect from connection handle = " + connectionHandle);
ShimmerDevice shimmerDevice = getShimmerDeviceBtConnected(connectionHandle);
Expand Down
1 change: 1 addition & 0 deletions ShimmerDriverPC/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ dependencies {
// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
// 'test.useTestNG()' to your build script.
testCompile 'junit:junit:4.12'
compile 'com.parse.bolts:bolts-tasks:1.4.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public void actionPerformed(ActionEvent e) {

@Override
protected void createFrame() {
dialog = new JDialog();
dialog.setModal(true);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setTitle("Enable Sensors");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected Shimmer4sdk createNewShimmer4(ShimmerRadioInitializer radioInitializer
}

@Override
protected void connectVerisenseDevice(BluetoothDeviceDetails bdd) {
public void connectVerisenseDevice(BluetoothDeviceDetails bdd) {
VerisenseDevice verisenseDevice;

if(!verisenseMacIdList.contains(bdd.mShimmerMacId)) {
Expand Down Expand Up @@ -178,7 +178,7 @@ protected void connectVerisenseDevice(BluetoothDeviceDetails bdd) {
}

@Override
protected void connectShimmer3BleGrpc(BluetoothDeviceDetails bdd) {
public void connectShimmer3BleGrpc(BluetoothDeviceDetails bdd) {
ShimmerGRPC shimmer;

if(!shimmer3BleMacIdList.contains(bdd.mShimmerMacId)) {
Expand Down Expand Up @@ -207,6 +207,12 @@ protected void connectShimmer3BleGrpc(BluetoothDeviceDetails bdd) {
@Override
public void connectShimmerThroughCommPort(String comPort){
directConnectUnknownShimmer=true;

if (mMapOfBtConnectedShimmers.containsKey(comPort)){
if(!mMapOfBtConnectedShimmers.get(comPort).isConnected()) {
mMapOfBtConnectedShimmers.remove(comPort);
}
}

super.setConnectionExceptionListener(new ConnectionExceptionListener() {

Expand Down Expand Up @@ -243,6 +249,7 @@ public void putShimmerGlobalMap(String bluetoothAddress, ShimmerDevice shimmerDe

protected void setupShimmer3BluetoothForBtManager(ShimmerDevice shimmerDevice) {
((ShimmerPC)shimmerDevice).setUseInfoMemConfigMethod(USE_INFOMEM_CONFIG_METHOD);
((ShimmerPC)shimmerDevice).enableCheckifAlive(true);
}


Expand Down
Loading