Skip to content

Commit

Permalink
fix: unnecessary issue of commands in the Oscilloscope
Browse files Browse the repository at this point in the history
  • Loading branch information
AsCress authored and marcnause committed Dec 23, 2024
1 parent 640da48 commit 4508197
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/src/main/java/io/pslab/activity/OscilloscopeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,15 @@ public void run() {
if (isAudioInputSelected && isInBuiltMicSelected || (scienceLab.isConnected() && isMICSelected)) {
channels.add(CHANNEL.MIC.toString());
}
captureTask = new CaptureTask();
captureTask.execute(channels.toArray(new String[0]));
synchronized (lock) {
try {
lock.wait();
} catch (InterruptedException e) {
e.printStackTrace();
if (!channels.isEmpty()) {
captureTask = new CaptureTask();
captureTask.execute(channels.toArray(new String[0]));
synchronized (lock) {
try {
lock.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
Expand Down

0 comments on commit 4508197

Please sign in to comment.