Check or Calculate SDI-12 CRC

ok, txt, crc = sdi12.crc(line)

Verify the CRC for SDI-12 responses.

Parameter Type Description
line string The SDI-12 Response, including CRC. Append '---' if generating CRC.
Returns Type Description
ok boolean True if CRC matches
txt string The data
crc string The CRC part
Note

The COM Port object is not needed for this call.

e.g.

_, txt, crc = sdi12.crc('1Testing---') -- calculate CRC
txt = txt .. crc -- add the CRC --> txt = '1TestingDU}'

ok = sdi12.crc(txt)