From 4c85de6ccd20b6227c729f5cb075b28d77448368 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 8 Dec 2022 21:55:44 +0100 Subject: slot_has_{power,data}: slots start at 0, arguments start at 0 --- bin/dlog-viewer | 4 ++-- 1 file 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: -- cgit v1.2.3