From fc16840434d3ab669ececd31f6b9d77d0a84c373 Mon Sep 17 00:00:00 2001 From: ponty Date: Fri, 8 Feb 2013 10:27:32 +0100 Subject: [PATCH] fix tests --- pysimavr/sim.py | 2 +- pysimavr/swig/parts/ac_input.c | 1 + tests/test_udp.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pysimavr/sim.py b/pysimavr/sim.py index c2bf4f8..e44123e 100644 --- a/pysimavr/sim.py +++ b/pysimavr/sim.py @@ -29,7 +29,7 @@ class ArduinoSim(object): '''arduino code builder and simulator for serial testing''' def __init__(self, snippet=None, - mcu='atmega328', + mcu='atmega328p', f_cpu=16000000, extra_lib=None, timespan=0.01, diff --git a/pysimavr/swig/parts/ac_input.c b/pysimavr/swig/parts/ac_input.c index d50c6bc..18b1aa2 100644 --- a/pysimavr/swig/parts/ac_input.c +++ b/pysimavr/swig/parts/ac_input.c @@ -23,6 +23,7 @@ #include "sim_avr.h" #include "ac_input.h" #include "stdio.h" +#include "sim_time.h" static avr_cycle_count_t switch_auto(struct avr_t * avr, diff --git a/tests/test_udp.py b/tests/test_udp.py index 50b825a..ca7d12e 100644 --- a/tests/test_udp.py +++ b/tests/test_udp.py @@ -12,7 +12,7 @@ def test_udp(): //delay(100); } ''' - x = ArduinoSim(snippet=snippet, timespan=2.5).get_serial() + x = ArduinoSim(snippet=snippet, timespan=10).get_serial() print x lines = x.splitlines() eq_(len(lines), 100)