Skip to content

Commit

Permalink
Merge branch 'release/0.1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
MicBoucinha committed Feb 10, 2020
2 parents 3d3099a + 1093af9 commit 8549611
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.4
current_version = 0.1.5
commit = False
tag = False

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

0.1.5 (2020-02-10)
------------------
* Renamed 'Skip all trials' button to 'Stop'
* Renamed 'Stop trial' button to 'Skip trial'

0.1.4 (2019-11-07)
------------------
* Add task kill button to UI
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
year = '2019'
author = 'Luís Teixeira'
copyright = '{0}, {1}'.format(year, author)
version = release = '0.1.4'
version = release = '0.1.5'

pygments_style = 'default'
templates_path = ['.']
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ When pressing the button, with a Bpod device connected, the window presented in
PyBpod's Main window with the Emulator Window opened

At the top of the window it is possible to see the selected Setup, the selected Board and protocol. The buttons that
are also available in the Setup details of PyBpod are also available in the Emulator window (i.e., Run, Stop trial and
are also available in the Setup details of PyBpod are also available in the Emulator window (i.e., Run, Skip trial and
Pause).

Afterwards, a section with the Behaviour Ports is presented with three rows of buttons, each button for each available
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def read(*names, **kwargs):

setup(
name='pybpod-gui-plugin-emulator',
version='0.1.4',
version='0.1.5',
license='MIT',
description="Emulator for PyBpod to work with the Bpod's State Machine ports.",
long_description='%s\n%s' % (
Expand Down
2 changes: 1 addition & 1 deletion src/pybpod_gui_plugin_emulator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.1.4'
__version__ = '0.1.5'

from pybpod_gui_plugin_emulator.emulator_gui import EmulatorGUI

Expand Down
3 changes: 1 addition & 2 deletions src/pybpod_gui_plugin_emulator/emulator_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, parent_win=None):

self._kill_task_btn.enabled = False

self._stop_trial_btn = ControlButton('Stop trial',
self._stop_trial_btn = ControlButton('Skip trial',
default=self.__stop_trial_btn_evt,
enabled=False)
self._pause_btn = ControlButton('Pause',
Expand Down Expand Up @@ -265,7 +265,6 @@ def __run_protocol_btn_evt(self):
self.warning(str(err), "Warning")
except Exception as err:
self.alert(str(err), "Unexpected Error")
pass

def __kill_btn_evt(self):
if self.setup.status == self.setup.STATUS_RUNNING_TASK:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def update_ui(self):
print("board locked")
elif self.status == self.STATUS_RUNNING_TASK:
self.emulator_plugin._run_task_btn.checked = True
self.emulator_plugin._run_task_btn.label = 'Skip all trials'
self.emulator_plugin._run_task_btn.label = 'Stop'
self.emulator_plugin._kill_task_btn.enabled = True
self.emulator_plugin._stop_trial_btn.enabled = True
self.emulator_plugin._pause_btn.enabled = True
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,10 @@ def _board_changed_evt(self):
super()._board_changed_evt()

def __emulator_btn_evt(self):
if not hasattr(self, 'emulator_plugin'):
self.create_emulator_window()
if hasattr(self, 'emulator_plugin') and self.emulator_plugin.started_correctly:
self.emulator_plugin.show()
else:
if self.emulator_plugin.started_correctly:
self.emulator_plugin.show()
else:
self.create_emulator_window()
self.create_emulator_window()

def create_emulator_window(self):
self.emulator_plugin = EmulatorGUI(self)
Expand Down

0 comments on commit 8549611

Please sign in to comment.