summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-04-23 22:36:49 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-04-24 15:12:03 +0700
commitcca67cfe94ab47f07ab7e40e9612c1f99b99c113 (patch)
tree1ef5c123c1759d734aeff21e3931171434599d15
parent4dd92e2520d228a80cde10c439ad041ddfc93fdd (diff)
trx_toolkit/data_msg.py: fix TOA256 MIN/MAX constants
The old TOA256 range was bigger than we can actually store: struct.error: 'h' format requires -32768 <= number <= 32767 Change-Id: I5d4e1fea9d07f2c49f01e6644d1c0d1dc8cf4e40
-rw-r--r--src/target/trx_toolkit/data_msg.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py
index 62fd29b5..3393ddb8 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -297,9 +297,9 @@ class DATAMSG_TRX2L1(DATAMSG):
RSSI_MIN = -120
RSSI_MAX = -50
- # TODO: verify this range
- TOA256_MIN = -256 * 200
- TOA256_MAX = 256 * 200
+ # Min and max values of int16_t
+ TOA256_MIN = -32768
+ TOA256_MAX = 32767
# Specific message fields
rssi = None