Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian_Zug committed Mar 31, 2016
1 parent c0c7af4 commit d0915d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pysimavr/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ def simulate(self):
# if self.serial_in:
# avr.uart.send_string(self.serial_in)

if fps:
dt_real = 1. / fps
dt_mcu = dt_real * speed
count = int(timespan * fps / speed)
if self.fps:
dt_real = 1. / self.fps
dt_mcu = dt_real * self.speed
count = int(self.timespan * self.fps / self.speed)
for _ in range(count):
time.sleep(dt_real)

avr.goto_time(timespan)
while avr.time_passed() < timespan * 0.99:
avr.goto_time(self.timespan)
while avr.time_passed() < self.timespan * 0.99:
time.sleep(0.05)

if simvcd:
Expand Down

0 comments on commit d0915d2

Please sign in to comment.