pyonair/PyonAir-pycom

too many SD car writes for no reason , does value have to be null/o or can we ig...

github-actions opened this issue · 0 comments

too many SD car writes for no reason , does value have to be null/o or can we ignore???

else:

raise Exception("Buffer is empty")

with self.buffer_lock:

self._removeTailNoLock()

# f.write((str(self.tail) + "\n").encode()) #TODO: too many SD car writes for no reason , does value have to be null/o or can we ignore???

            raise Exception("Buffer is empty") #why error , not just none?


    # def _removeTailNoLock(self):
    #     if self.tail is not self.head:  # if buffer is empty do not remove cell
    #     #with self.buffer_lock:
    #         with open(self.file_path, 'r+b') as f:
    #             self.tail += self.cell_size  # increment tail
    #             if self.tail >= self.buffer_end:  # loop around if beginning is reached
    #                 self.tail = self.buffer_start
    #             f.seek(self.tail_address)
    #             f.write((str(self.tail) + "\n").encode()) #TODO: too many SD car writes for no reason , does value have to be null/o or can we ignore???
    #     else:
    #         raise Exception("Buffer is empty")


    # def remove_tail(self):
    #     with self.buffer_lock:
    #        self._removeTailNoLock()


    def size(self, up_to=False):
        if not up_to:

1eb07d7ba191ca7e4170331a38ec50a8f418fb97