diff options
author | Arkadiusz Bulski <arek.bulski@gmail.com> | 2018-02-18 13:44:05 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-03-17 14:41:40 +0100 |
commit | 5f8a6fcd22c2e0f5e3811f299247d17a97377084 (patch) | |
tree | 4dc9022db0d2b8b125c7d0f2103b98d6101bf855 | |
parent | corected timestamp comment (diff) | |
download | glucometerutils-5f8a6fcd22c2e0f5e3811f299247d17a97377084.tar glucometerutils-5f8a6fcd22c2e0f5e3811f299247d17a97377084.tar.gz glucometerutils-5f8a6fcd22c2e0f5e3811f299247d17a97377084.tar.bz2 glucometerutils-5f8a6fcd22c2e0f5e3811f299247d17a97377084.tar.lz glucometerutils-5f8a6fcd22c2e0f5e3811f299247d17a97377084.tar.xz glucometerutils-5f8a6fcd22c2e0f5e3811f299247d17a97377084.tar.zst glucometerutils-5f8a6fcd22c2e0f5e3811f299247d17a97377084.zip |
-rw-r--r-- | glucometerutils/drivers/otverio2015.py | 2 | ||||
-rw-r--r-- | glucometerutils/drivers/otverioiq.py | 2 | ||||
-rw-r--r-- | glucometerutils/drivers/sdcodefree.py | 4 | ||||
-rw-r--r-- | 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) |