python: lock hw device inside loop (#1522)

This commit is contained in:
Adeeb Shihadeh
2023-07-18 00:03:17 -07:00
committed by GitHub
parent b2741013f6
commit 268f6bc2fb
4 changed files with 72 additions and 67 deletions

View File

@@ -26,7 +26,6 @@ __version__ = '0.0.10'
LOGLEVEL = os.environ.get('LOGLEVEL', 'INFO').upper()
logging.basicConfig(level=LOGLEVEL, format='%(message)s')
USBPACKET_MAX_SIZE = 0x40
CANPACKET_HEAD_SIZE = 0x6
DLC_TO_LEN = [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, 32, 48, 64]
LEN_TO_DLC = {length: dlc for (dlc, length) in enumerate(DLC_TO_LEN)}