Don't use eval for converting strings
authorJoakim Söderberg <joakim.soderberg@gmail.com>
Tue, 7 Apr 2015 11:53:10 +0000 (13:53 +0200)
committerJoakim Söderberg <joakim.soderberg@gmail.com>
Tue, 7 Apr 2015 11:53:10 +0000 (13:53 +0200)
commit0a0466e91f5b90db39a614b635a0c971b4706faa
treef600dc8ac2d4b185a4d7f283e48499c6f1c89cd3
parent5638ec34f40fbf2ce46accf7ddb918aedcf39e6f
Don't use eval for converting strings

This is a more compact and safe way to convert from hexadecimal to binary without using `eval`.

Integer to bin string taken from this example: https://wiki.python.org/moin/BitManipulation
obd_sensors.py