From 62adf5111ff494666a4ca04cd8dd7725b62d46db Mon Sep 17 00:00:00 2001
From: Kenny Sharma <kenny.sharma@tum.de>
Date: Mon, 21 Aug 2017 11:33:05 +0200
Subject: [PATCH] [NRRPLT-5496] Use default timestep from CLE.
This patch removes the hardcoded 20ms timestep value and instead
references the default value set in the CLE.
Change-Id: Iaa17d20a39b6c6b0b3fd271a19db3ddff42b6fe6
---
.../hbp_nrp_music_interface/launch/MUSICBrainProcess.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICBrainProcess.py b/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICBrainProcess.py
index 9c78be3..84948aa 100644
--- a/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICBrainProcess.py
+++ b/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICBrainProcess.py
@@ -27,6 +27,7 @@ A distributed brain process that can be launched standalone on remote hosts.
from hbp_nrp_cle.brainsim import config
from hbp_nrp_cle.brainsim.pynn import simulator as sim
from hbp_nrp_cle.brainsim.pynn.PyNNControlAdapter import PyNNControlAdapter
+from hbp_nrp_cle.cle.ClosedLoopEngine import ClosedLoopEngine
import hbp_nrp_cle.tf_framework.config as tf_config
from hbp_nrp_commons.generated import bibi_api_gen
@@ -98,8 +99,10 @@ class MUSICBrainProcess(object):
self._proxies = xml_factory.create_proxies(music_xml)
- # extract the simulation timestep from the BIBI or default to 20 ms
- self._timestep = float(self._bibi.timestep) if self._bibi.timestep is not None else 20.0
+ # extract the simulation timestep from the BIBI if set or default to CLE value (in ms)
+ self._timestep = ClosedLoopEngine.DEFAULT_TIMESTEP * 1000.0
+ if self._bibi.timestep:
+ self._timestep = float(self._bibi.timestep)
def run(self):
"""
--
GitLab