Skip to content

Commit 871a40b

Browse files
committed
fix config blank freq when using mouse
1 parent 90c6986 commit 871a40b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/component/ConfigDialog.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public ConfigDialog(Project project) throws IOException, InterruptedException {
6565
pythonEnvironment = AvailabilityChecker.checkPythonEnvironment(getPythonInterpreter());
6666
if (pythonEnvironment && checkBoxes.get(1).isSelected()) {
6767
eyeTracker = AvailabilityChecker.checkEyeTracker(getPythonInterpreter());
68-
if (eyeTracker) {
68+
if (eyeTracker) { //eye tracker found, add mouse and eye tracker name, add eye tracker freq
6969
String trackerName = AvailabilityChecker.getEyeTrackerName(getPythonInterpreter());
7070
if (trackerName != null && !trackerName.equals("Not Found")) {
7171
deviceCombo.removeAllItems();
@@ -79,6 +79,13 @@ public ConfigDialog(Project project) throws IOException, InterruptedException {
7979
for (String freq : freqList) {
8080
freqCombo.addItem(Double.parseDouble(freq));
8181
}
82+
}else{ //use mouse and default freq
83+
deviceCombo.removeAllItems();
84+
deviceCombo.addItem("Mouse");
85+
freqCombo.removeAllItems();
86+
freqCombo.addItem(30.0);
87+
freqCombo.addItem(60.0);
88+
freqCombo.addItem(120.0);
8289
}
8390
}
8491
if (!checkBoxes.get(1).isSelected() || !pythonEnvironment) {

0 commit comments

Comments
 (0)