Comments (5)
Thanks for your time.
since there was a comment in the example sketch : // Serial.println("Verified with - https://crccalc.com/\n");
i though that the default setting should match the output of that website.
Using:
crc.setPolynome(0x04C11DB7);
crc.setStartXOR(0xFFFFFFFF);
crc.setEndXOR(0xFFFFFFFF);
crc.setReverseIn(true);
crc.setReverseOut(true);
the output is CBF43926 as expected.
since many website use those setting (including https://crc32.online/ and other) maybe you should use it as default setting, or add the link to http://zorc.breitbandkatze.de/crc.html instead of https://crccalc.com in the sketch comment.
Anyways issue solved.
from crc.
I'll have a look
...
Got the same results as you (so it is at least consistent)
CRC32_test.ino
89A1897F
89A1897F
89A1897F
CDBAC17A
18
These are the settings, these are NOT in the table at crccalc.com
void CRC32::reset()
{
_polynome = CRC32_DEFAULT_POLYNOME; (== 0x04C11DB7)
_startMask = 0;
_endMask = 0;
_crc = 0;
_reverseIn = false;
_reverseOut = false;
_started = false;
_count = 0;
}
Checking with - http://zorc.breitbandkatze.de/crc.html
and values seems OK.
Think you missed the XOR with 0xFFFFFF at the end (in the crccalc table)
from crc.
CDBAC17A is the CRC-32 when adding the string 123456789 twice.
from crc.
Good point to use at least a setting that is in the table.
I'll make a note of it for a next release to improve the examples.
Might be useful to have a dump() function to print all settings at once. => easier to check them.
from crc.
FYI triggered by your question I created a 0.2.0 version
- Added getters for the parameters in the CRC classes so they become easier to verify programmatically.
- Reduced the calls to yield() in add(array, length) to improve performance.
now one in every 256 additions yield is called().. - minor edits.
from crc.
Related Issues (18)
- const Parameters? HOT 6
- how to get crc12? HOT 6
- Yield condition is not updated in loop HOT 6
- make it possible to enable / disable yield() HOT 15
- Add "ifndef ... define..." to prevent already defined errors HOT 26
- input content (uint8_t *array) as HEX HOT 8
- Add constructors with all parameters at once HOT 2
- Binary CRC8 HOT 17
- Hexa number as input HOT 5
- Use little endian by default HOT 17
- CRC16.h or crc16.h? HOT 2
- Discuss 1.0.0 HOT 7
- warning: 'deprecated' attribute directive ignored [-Wattributes] HOT 6
- CRC8 SAE J1850 From CAN Data HOT 13
- The CRC16-Modbus calculation with the bytes swapped for Dwin displays HOT 8
- fix classes 32 and 64 like issue #4 HOT 1
- Diverging CRC16 results HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crc.