Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13755 )

Change subject: trx_toolkit/data_msg.py: fix TOA256 MIN/MAX constants
......................................................................

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
---
M src/target/trx_toolkit/data_msg.py
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/target/trx_toolkit/data_msg.py 
b/src/target/trx_toolkit/data_msg.py
index 62fd29b..3393ddb 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -297,9 +297,9 @@
        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

--
To view, visit https://gerrit.osmocom.org/13755
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5d4e1fea9d07f2c49f01e6644d1c0d1dc8cf4e40
Gerrit-Change-Number: 13755
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>

Reply via email to