Skip to content

Commit 24ad5cd

Browse files
committed
Fix. Sensor assignments in manual calibration mode were being ignored.
In manual calibration mode, the player assigns sensors for the left/right movements. These assigned values were previously being ignored and an auto-calibration still occured.
1 parent 4b287ae commit 24ad5cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Components.pde

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2850,7 +2850,13 @@ public class CalibrateWizardComponent extends Component
28502850
for (IEvent event : eventManager.getEvents(EventType.SPACEBAR_PRESSED))
28512851
{
28522852
// register action
2853-
boolean success = emgManager.registerAction(currentAction);
2853+
boolean success = false;
2854+
if (calibrationMode == CalibrationMode.AUTO)
2855+
success = emgManager.registerAction(currentAction);
2856+
else if (currentAction == LEFT_DIRECTION_LABEL)
2857+
success = emgManager.registerAction(currentAction, leftSensor);
2858+
else if (currentAction == RIGHT_DIRECTION_LABEL)
2859+
success = emgManager.registerAction(currentAction, rightSensor);
28542860

28552861
if (!success) {
28562862
Event failureEvent = new Event(EventType.CALIBRATE_FAILURE);

0 commit comments

Comments
 (0)