Bugfix
This commit is contained in:
11
lactor.py
11
lactor.py
@@ -20,7 +20,7 @@ infotype = {0 : 'S-Buffer deleted',
|
||||
6 : 'state'
|
||||
}
|
||||
|
||||
grfid = 0
|
||||
grfid = '0'
|
||||
|
||||
class CanListener (can.Listener):
|
||||
def on_message_received (self, msg):
|
||||
@@ -108,11 +108,12 @@ class CanListener (can.Listener):
|
||||
self.log ("Anforderung Tiernummer von Tiererkennung", 3)
|
||||
#AnimalNr from RFID
|
||||
animalnr = 0
|
||||
anr = self.db_con.getanimalnrbyrfid (grfid.lstrip('0'))
|
||||
if anr:
|
||||
animalnr = int (anr[0])
|
||||
if int (grfid) > 0:
|
||||
anr = self.db_con.getanimalnrbyrfid (grfid.lstrip('0'))
|
||||
if anr:
|
||||
animalnr = int (anr[0])
|
||||
#_sendecho = 0
|
||||
_repdata = bytearray (('REP00%03d' % anr).encode ())
|
||||
_repdata = bytearray (('REP00%03d' % animalnr).encode ())
|
||||
self.waitack [_address] = 1
|
||||
|
||||
elif self.waitack [_address]:
|
||||
|
||||
Reference in New Issue
Block a user