summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2017-03-29 14:32:36 +0200
committerPiotr Dobrowolski <admin@tastycode.pl>2017-03-29 14:32:36 +0200
commitf2eb24aeac4507232357e988e418fa08ccfdbe17 (patch)
tree26cd2984bb3cda90fb75d1947f188d7956bf29ef
parent940ca43f5ba584aed88f9d104bd2008341fe0f89 (diff)
downloadbitvend-f2eb24aeac4507232357e988e418fa08ccfdbe17.tar.gz
bitvend-f2eb24aeac4507232357e988e418fa08ccfdbe17.tar.bz2
bitvend-f2eb24aeac4507232357e988e418fa08ccfdbe17.tar.xz
bitvend-f2eb24aeac4507232357e988e418fa08ccfdbe17.zip
Fix lockup recovery
-rw-r--r--mdb/device.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdb/device.py b/mdb/device.py
index 5f789b5..6175bfe 100644
--- a/mdb/device.py
+++ b/mdb/device.py
@@ -150,9 +150,10 @@ class CashlessMDBDevice(MDBDevice):
if req.command == 0x30 and req.validate_checksum():
self.lockup_counter += 1
- if self.lockup_counter >= 20:
+ if self.lockup_counter % 50 == 0:
self.logger.info('YOLO')
return []
+ return
if req.command == 0x31 and req.validate_checksum():
return []
if req.command == 0x37 and req.validate_checksum():