Skip to content

Commit 2a64360

Browse files
Copilotjyong15
andcommitted
Enable legacy command-response delay for MacOS
Co-authored-by: jyong15 <26561407+jyong15@users.noreply.github.com>
1 parent 7f1b5d3 commit 2a64360

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ShimmerBluetoothManager/src/main/java/com/shimmerresearch/managers/bluetoothManager/ShimmerBluetoothManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,9 @@ protected void connectUnknownShimmer() throws ShimmerException {
918918
printMessage("Connecting to new Shimmer with connection handle = " + (connectThroughComPort? comPort:bluetoothAddress));
919919

920920
//radio address will be the com port in case of the PC and the BT address in case of Android
921-
shimmerRadioInitializer = new ShimmerRadioInitializer();
921+
// On MacOS, enable legacy delay to allow time for device to process commands and respond
922+
boolean useLegacyDelay = UtilShimmer.isOsMac();
923+
shimmerRadioInitializer = new ShimmerRadioInitializer(null, useLegacyDelay);
922924
final AbstractSerialPortHal serialPortComm = createNewSerialPortComm(comPort, bluetoothAddress);
923925
shimmerRadioInitializer.setSerialCommPort(serialPortComm);
924926
serialPortComm.addByteLevelDataCommListener(new ByteLevelDataCommListener(){

0 commit comments

Comments
 (0)