diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-12-16 09:47:14 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-12-16 09:47:14 +0100 |
commit | b173f02cdc5099ce90268f9d2633b2d2e02818a3 (patch) | |
tree | 840e9d070397c031c57d68241157f57ba7e0aacc /lib | |
parent | a1e3ca835f8acfda2aa2c5502da5c1d305d59b03 (diff) |
loader: fix off-by-one in energytrace++ state changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/loader.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/loader.py b/lib/loader.py index b5cfa97..2f45a99 100644 --- a/lib/loader.py +++ b/lib/loader.py @@ -1268,7 +1268,8 @@ def _load_energytrace(data_string): hardware_state_changes = list() if hardware_states[0]: prev_state = hardware_states[0] - for i, state in enumerate(hardware_states): + # timestamps start at data[1], so hardware state change indexes must start at 1, too + for i, state in enumerate(hardware_states[1:]): if ( state != prev_state and state != "0000000000000000" |