Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Masfaraud committed Feb 4, 2019
1 parent 4a4b5b1 commit baeb76a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bms/blocks/nonlinear.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def Evaluate(self, it, ts):

delay_in_steps = int(self.delay // ts)
delay_remainder = self.delay % ts
if it - delay_in_steps-1 < 0:
print(it, 'a', self.inputs[0].initial_values[-1])
if (it - delay_in_steps -1) < 0:
# print(it, 'a', self.inputs[0].initial_values[-1])
return self.inputs[0].initial_values[-1]
else:
# Performing interpolation
Expand Down
4 changes: 2 additions & 2 deletions scripts/delay.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from bms.blocks import Delay
from bms.core import DynamicSystem
from bms.signals.functions import Ramp
from bms.core import Signal, Variable
from bms.core import Variable


""" test that we can delay a signal by 2 seconds
Expand All @@ -10,7 +10,7 @@
"""
delay = 2.3 # time
end_time = 10
time_step = 20
time_step = 200
input_ = Ramp()
output_ = Variable(('output', 'o'))
delay = Delay(input_, output_, delay)
Expand Down

0 comments on commit baeb76a

Please sign in to comment.