Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix TOA256 MIN/MAX constants

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Wed Apr 24 12:17:33 UTC 2019


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 <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190424/bbb81e11/attachment.htm>


More information about the gerrit-log mailing list