changed error message

This commit is contained in:
Lucas Pleß 2014-04-12 21:43:16 +02:00
parent 3e14468463
commit ae8d0ea9f5
1 changed files with 3 additions and 3 deletions

View File

@ -49,14 +49,14 @@ class RingBuffer(object):
self.reset() self.reset()
self.ring_buf[0] = 0 self.ring_buf[0] = 0
self.head = 1 self.head = 1
raise ValueError("not complete - ringbuffer resettet") raise ValueError("not complete - reset ringbuffer")
data.append(value) data.append(value)
if data[0] != 0x0 or data[1] != 0xff: if data[0] != 0x0 or data[1] != 0xff:
print "issue", data print "issue", data
self.reset() self.reset()
self.ring_buf[0] = 0 self.ring_buf[0] = 0
self.head = 1 self.head = 1
raise ValueError("not synced - ringbuffer resettet") raise ValueError("not synced - reset ringbuffer")
return data[2:] return data[2:]
@ -85,7 +85,7 @@ def main():
except TypeError, e: except TypeError, e:
continue continue
print "got value", t #print "got value", t
buf.append(t) buf.append(t)
if t == 0: if t == 0: