crc

Gribi par to parunāt? Vienīgā vieta, kur drīkst runāt ne tikai par spēlēm
Post Reply
Message
Author
User avatar
vecais_dumais_laacis
Guru
Guru
Posts: 109
Joined: 06 Dec 2010, 19:48
Contact:

crc

#1 Post by vecais_dumais_laacis » 17 Apr 2013, 11:44

kaadam mok ir iekaariens uzmest aci shim un pateikt kas par crc tiek izmantots?
fails ir eeprom configs touchscreenam
teorijaa vajadzeetu buut 0x8005 crc16 visai rindai( 141 baits ) bet nu man nekaadiigi nekas sakariigs nesanaak
...un ja bites buutu laachi...

spicausis
Posts: 13
Joined: 14 Jan 2011, 08:57

Re: crc

#2 Post by spicausis » 18 Apr 2013, 00:36

crc16-buypass no pitona crcmod atbilst, e.g

Code: Select all

#!/usr/bin/env python2
import binascii
import crcmod

l = '$03000100005554555...(snip)...0000000000000000B8E'

b = binascii.unhexlify(l[1:])

crc = crcmod.predefined.mkCrcFun('crc16-buypass')

print '%04x' % crc(b[0:139])
# 8e0b

spicausis
Posts: 13
Joined: 14 Jan 2011, 08:57

Re: crc

#3 Post by spicausis » 18 Apr 2013, 00:47

Skatoties viņa implementāciju, https://bitbucket.org/cmcqueen1975/crcm ... defined.py tas ir tas pats crc16, bet viņš bitus ēd otrādā secībā.

User avatar
vecais_dumais_laacis
Guru
Guru
Posts: 109
Joined: 06 Dec 2010, 19:48
Contact:

Re: crc

#4 Post by vecais_dumais_laacis » 18 Apr 2013, 08:53

wiiiii - alus no manis
bitu fignja bija taa kas neljaava atrast risinaajumu
...un ja bites buutu laachi...

Post Reply

Return to “Pļāpātuve / Offtopic”