From 5f8a6fcd22c2e0f5e3811f299247d17a97377084 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bulski Date: Sun, 18 Feb 2018 13:44:05 +0100 Subject: SymmetricMapping was renamed to Mapping --- glucometerutils/drivers/otverio2015.py | 2 +- glucometerutils/drivers/otverioiq.py | 2 +- glucometerutils/drivers/sdcodefree.py | 4 ++-- glucometerutils/support/lifescan_binary_protocol.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py index 833ad43..1fe630a 100644 --- a/glucometerutils/drivers/otverio2015.py +++ b/glucometerutils/drivers/otverio2015.py @@ -108,7 +108,7 @@ _READ_RECORD_RESPONSE = construct.Struct( 'lifetime_counter' / construct.Int16ul, 'timestamp' / lifescan_binary_protocol.VERIO_TIMESTAMP, 'value' / construct.Int16ul, - 'meal' / construct.SymmetricMapping( + 'meal' / construct.Mapping( construct.Byte, _MEAL_FLAG), construct.Padding(4), ) diff --git a/glucometerutils/drivers/otverioiq.py b/glucometerutils/drivers/otverioiq.py index cecac4e..ead19a9 100644 --- a/glucometerutils/drivers/otverioiq.py +++ b/glucometerutils/drivers/otverioiq.py @@ -97,7 +97,7 @@ _READING_RESPONSE = construct.Struct( 'timestamp' / lifescan_binary_protocol.VERIO_TIMESTAMP, 'value' / construct.Int16ul, 'control_test' / construct.Flag, - 'meal' / construct.SymmetricMapping( + 'meal' / construct.Mapping( construct.Byte, _MEAL_FLAG), construct.Padding(2), # unknown ) diff --git a/glucometerutils/drivers/sdcodefree.py b/glucometerutils/drivers/sdcodefree.py index 55c0bf1..5bc76fb 100644 --- a/glucometerutils/drivers/sdcodefree.py +++ b/glucometerutils/drivers/sdcodefree.py @@ -41,7 +41,7 @@ class Direction(enum.Enum): _PACKET = construct.Struct( 'stx' / construct.Const(0x53, construct.Byte), - 'direction' / construct.SymmetricMapping( + 'direction' / construct.Mapping( construct.Byte, {e: e.value for e in Direction}), 'length' / construct.Rebuild( @@ -82,7 +82,7 @@ _READING = construct.Struct( 'hour' / construct.Byte, 'minute' / construct.Byte, 'value' / construct.Int16ub, - 'meal' / construct.SymmetricMapping( + 'meal' / construct.Mapping( construct.Byte, _MEAL_FLAG), construct.Byte[7], ) diff --git a/glucometerutils/support/lifescan_binary_protocol.py b/glucometerutils/support/lifescan_binary_protocol.py index 7b1fbec..9bdb220 100644 --- a/glucometerutils/support/lifescan_binary_protocol.py +++ b/glucometerutils/support/lifescan_binary_protocol.py @@ -62,5 +62,5 @@ _GLUCOSE_UNIT_MAPPING_TABLE = { common.Unit.MMOL_L: 0x01, } -GLUCOSE_UNIT = construct.SymmetricMapping( +GLUCOSE_UNIT = construct.Mapping( construct.Byte, _GLUCOSE_UNIT_MAPPING_TABLE) -- cgit v1.2.3