From f507bb35dcd72a147f4f795464e034dfac929d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sat, 13 Feb 2016 00:08:32 +0000 Subject: otultraeasy: move the crc function to lifescan_common. The same CRC-CCITT function is used in Verio 2015 devices, so prepare to reuse it by moving it to the common module. --- test/test_otultraeasy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_otultraeasy.py') diff --git a/test/test_otultraeasy.py b/test/test_otultraeasy.py index 326aeea..f263f12 100644 --- a/test/test_otultraeasy.py +++ b/test/test_otultraeasy.py @@ -31,12 +31,12 @@ class TestOTUltraMini(unittest.TestCase): def testCrc(self): self.assertEqual( 0x41cd, - otultraeasy._Packet._crc(b'\x02\x06\x06\x03')) + lifescan_common.crc_ccitt(b'\x02\x06\x06\x03')) cmd_array = array.array('B', b'\x02\x06\x08\x03') self.assertEqual( 0x62C2, - otultraeasy._Packet._crc(cmd_array)) + lifescan_common.crc_ccitt(cmd_array)) def testPacketUpdateChecksum(self): packet = otultraeasy._Packet() -- cgit v1.2.3