Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split the live connection receivers between live and time ones #83

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spinn_gym/games/breakout/visualise_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ def host_visualiser(
live_pops=live_spikes_pops)
vis.update()

vis_connection.add_receive_callback(
vis_connection.add_receive_time_callback(
breakout.breakout_pop.label,
functools.partial(handle_vis_spikes, vis=vis))
vis_connection.add_pause_stop_callback(
breakout.breakout_pop.label,
functools.partial(stop_visualiser, vis=vis))
for label in live_pop_labels:
vis_connection.add_receive_callback(
vis_connection.add_receive_time_callback(
label, functools.partial(handle_live_spikes, vis=vis))

return vis
4 changes: 2 additions & 2 deletions spinn_gym/games/breakout/visualise_jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ def jupyter_visualiser(
vis.update()
display_handle = display.display(plt.gcf(), display_id=True)

vis_connection.add_receive_callback(
vis_connection.add_receive_time_callback(
breakout.breakout_pop.label,
functools.partial(handle_vis_spikes, vis=vis))
vis_connection.add_pause_stop_callback(
breakout.breakout_pop.label,
functools.partial(stop_visualiser, vis=vis,
display_handle=display_handle))
for label in live_pop_labels:
vis_connection.add_receive_callback(
vis_connection.add_receive_time_callback(
label, functools.partial(handle_live_spikes, vis=vis))

vis_thread = threading.Thread(target=start_visualiser,
Expand Down
4 changes: 2 additions & 2 deletions spinn_gym/games/breakout/visualiser/visualiser_subsamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def __init__(self, key_input_connection, spike_output_connection,
self.y_res = y_res

# setup output spikes connection callbacks
self.spike_output_connection.add_receive_callback(
self.spike_output_connection.add_receive_time_callback(
on_pop_name, self.receive_spikes)
self.spike_output_connection.add_receive_callback(
self.spike_output_connection.add_receive_time_callback(
off_pop_name, self.receive_spikes)
# setup neuron_ids list
self.neuron_ids_on = []
Expand Down