[buffer] adding True for fixing test
This commit is contained in:
parent
0b067df69c
commit
b18f870a6b
@ -55,7 +55,7 @@ class CircBuffer:
|
|||||||
return self._buffer[channel, : self._index[channel]]
|
return self._buffer[channel, : self._index[channel]]
|
||||||
|
|
||||||
def has_value(self, index, channel):
|
def has_value(self, index, channel):
|
||||||
if index < 0 and self.is_full(channel):
|
if index <= 0 and self.is_full(channel):
|
||||||
return True
|
return True
|
||||||
elif index < 0 and not self.is_full(channel):
|
elif index < 0 and not self.is_full(channel):
|
||||||
return False
|
return False
|
||||||
@ -73,6 +73,8 @@ class CircBuffer:
|
|||||||
if index == self.write_index(channel) and self._totalcount[channel] == 0:
|
if index == self.write_index(channel) and self._totalcount[channel] == 0:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def valid_range(self, channel: int = 0) -> Tuple[int, int]:
|
def valid_range(self, channel: int = 0) -> Tuple[int, int]:
|
||||||
"""
|
"""
|
||||||
Return the start index that are valid within the buffer
|
Return the start index that are valid within the buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user