summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-08 21:55:44 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-08 21:55:44 +0100
commit4c85de6ccd20b6227c729f5cb075b28d77448368 (patch)
tree687d067081b38d5b672c0b3534cfa8312929292b
parent0ec776c5ddbc31a312b97f85d2ade86decfaeaf4 (diff)
slot_has_{power,data}: slots start at 0, arguments start at 0
-rwxr-xr-xbin/dlog-viewer4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dlog-viewer b/bin/dlog-viewer
index 8d296d8..020d516 100755
--- a/bin/dlog-viewer
+++ b/bin/dlog-viewer
@@ -272,10 +272,10 @@ class DLog:
self.slots[channel.slot - 1][channel.unit] = channel
def slot_has_data(self, slot):
- return len(self.slots[slot - 1]) > 0
+ return len(self.slots[slot]) > 0
def slot_has_power(self, slot):
- slot_data = self.slots[slot - 1]
+ slot_data = self.slots[slot]
if "W" in slot_data:
return True
if "V" in slot_data and "A" in slot_data: