Skip to content

Commit 3ff1a7b

Browse files
Copilotjyong15
andcommitted
Improve variable naming: useLegacyDelay -> requiresCommandResponseDelay
Co-authored-by: jyong15 <26561407+jyong15@users.noreply.github.com>
1 parent 2a64360 commit 3ff1a7b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -918,9 +918,10 @@ 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-
// 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);
921+
// On MacOS, enable delay between command transmission and response reading
922+
// This gives the device time to process commands (200ms per command)
923+
boolean requiresCommandResponseDelay = UtilShimmer.isOsMac();
924+
shimmerRadioInitializer = new ShimmerRadioInitializer(null, requiresCommandResponseDelay);
924925
final AbstractSerialPortHal serialPortComm = createNewSerialPortComm(comPort, bluetoothAddress);
925926
shimmerRadioInitializer.setSerialCommPort(serialPortComm);
926927
serialPortComm.addByteLevelDataCommListener(new ByteLevelDataCommListener(){

0 commit comments

Comments
 (0)