Update make_dcs.py

This commit is contained in:
BehleZebub 2022-10-30 00:03:07 +02:00 committed by GitHub
parent 6fc03a2651
commit 560c7143bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (C) 2016 Furrtek
#
@ -40,4 +40,4 @@ for c in range (0, 0x200): # DCS code is 9 bits
p10 = cb[3] ^ cb[5] ^ cb[6] ^ cb[8] ^ 1;
p11 = cb[0] ^ cb[1] ^ cb[2] ^ cb[3] ^ cb[6] ^ 1;
print ' 0b{0:011b}'.format((p11<<10) | (p10<<9) | (p9<<8) |(p8<<7) | (p7<<6) | (p6<<5) | (p5<<4) | (p4<<3) | (p3<<2) | (p2<<1) | (p1)) + ', // ' + str(c);
print(' 0b{0:011b}'.format((p11<<10) | (p10<<9) | (p9<<8) |(p8<<7) | (p7<<6) | (p6<<5) | (p5<<4) | (p4<<3) | (p3<<2) | (p2<<1) | (p1)) + ', // ' + str(c));