Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
imbeacon committed Dec 7, 2020
1 parent 1defb54 commit 9d99fd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

VERSION = "2.5.5.1"
VERSION = "2.5.5.2"

setup(
version=VERSION,
Expand Down
4 changes: 2 additions & 2 deletions thingsboard-gateway.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%define name thingsboard-gateway
%define version 2.5.5.1
%define unmangled_version 2.5.5.1
%define version 2.5.5.2
%define unmangled_version 2.5.5.2
%define release 1

Summary: Thingsboard Gateway for IoT devices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,19 @@ def convert(self, config, data):
try:
configuration = data[config_data][tag]["data_sent"]
response = data[config_data][tag]["input_data"]
byte_order = "LITTLE"
if config.get("byteOrder") is not None:
byte_order = config["byteOrder"]
else:
byte_order = configuration.get("byteOrder", "LITTLE")
if byte_order is None:
byte_order = "LITTLE"
if config.get("wordOrder") is not None:
word_order = config["wordOrder"]
else:
word_order = configuration.get("wordOrder", "BIG")
if word_order is None:
word_order = "BIG"
endian_order = Endian.Little if byte_order.upper() == "LITTLE" else Endian.Big
word_endian_order = Endian.Little if word_order.upper() == "LITTLE" else Endian.Big
decoded_data = None
Expand Down

0 comments on commit 9d99fd5

Please sign in to comment.