Skip to content

Commit a4db084

Browse files
committed
Add EmgJoystick data processing in background
1 parent 0734561 commit a4db084

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

OpenBCI_GUI/DataProcessing.pde

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,5 +303,6 @@ class DataProcessing {
303303
emgSettings.values.process(dataProcessingFilteredBuffer);
304304
w_focus.updateFocusWidgetData();
305305
w_bandPower.updateBandPowerWidgetData();
306+
w_emgJoystick.updateEmgJoystickWidgetData();
306307
}
307308
}

OpenBCI_GUI/W_EMGJoystick.pde

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ class W_EMGJoystick extends Widget {
101101

102102
public void update(){
103103
super.update(); //calls the parent update() method of Widget (DON'T REMOVE)
104-
105-
updateJoystickInput();
106104
}
107105

108106
public void draw(){
@@ -205,7 +203,8 @@ class W_EMGJoystick extends Widget {
205203
}
206204

207205
//This is the core method that updates the joystick input
208-
private void updateJoystickInput() {
206+
//Call this method in DataProcessing.pde to update the joystick input even when widget is closed
207+
public void updateEmgJoystickWidgetData() {
209208
previousJoystickRawX = joystickRawX;
210209
previousJoystickRawY = joystickRawY;
211210

0 commit comments

Comments
 (0)