diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-10-23 14:23:52 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-10-23 14:23:52 +0200 |
commit | 1809c309a7cbc2025161e805009d19d702749d2e (patch) | |
tree | eaa66ed9ccdca8fb271301643bbe6013082e494f /lib | |
parent | 0d387ea41e64afbb80a4ec5ac0f49327d07bd6d9 (diff) |
sync=timer: fix end of measurement offset error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/harness.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/harness.py b/lib/harness.py index 3074d25..92fb9b4 100644 --- a/lib/harness.py +++ b/lib/harness.py @@ -421,21 +421,19 @@ class OnboardTimerHarness(TransitionHarness): # TODO Make nicer ret += """\nvoid runLASync(){ // ======================= LED SYNC ================================ - ptalog.passTransition(0); - ptalog.startTransition(); - gpio.led_toggle(0); - gpio.led_toggle(1); - ptalog.stopTransition(); + gpio.write(PTALOG_GPIO, 1); + gpio.led_on(0); + gpio.led_on(1); + gpio.write(PTALOG_GPIO, 0); for (unsigned char i = 0; i < 4; i++) { arch.sleep_ms(250); } - ptalog.passTransition(0); - ptalog.startTransition(); - gpio.led_toggle(0); - gpio.led_toggle(1); - ptalog.stopTransition(); + gpio.write(PTALOG_GPIO, 1); + gpio.led_off(0); + gpio.led_off(1); + gpio.write(PTALOG_GPIO, 0); // ======================= LED SYNC ================================ }\n\n""" return ret @@ -452,9 +450,11 @@ class OnboardTimerHarness(TransitionHarness): def stop_benchmark(self): ret = "" - ret += super().stop_benchmark() if self.energytrace_sync == "led": + ret += "counter.stop();\n" ret += "runLASync();\n" + ret += super().stop_benchmark() + if self.energytrace_sync == "led": ret += "arch.sleep_ms(250);\n" return ret |