summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-12-09 22:13:44 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-18 05:47:11 +0700
commit1197382e8db5b52fa001dc16ec76389ccf1b6f53 (patch)
tree73f8f9efa4694d22dc6ccf749cb5f5bc3b85d125 /src
parente4cddb5ef10cb466d0b9a3a172c470629e48b28a (diff)
trx_toolkit/data_if.py: add optional legacy message coding flag
In I6b9a8b611ea1e9badc4d9ddf13aa9e237028e39a an optional legacy message coding mode was introduced. Let's add the corresponding argument to send_msg() and pass it to gen_msg(). Change-Id: I6b9a8b611ea1e9badc4d9ddf13aa9e237028e39a
Diffstat (limited to 'src')
-rw-r--r--src/target/trx_toolkit/data_if.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/trx_toolkit/data_if.py b/src/target/trx_toolkit/data_if.py
index 79584da..a773c04 100644
--- a/src/target/trx_toolkit/data_if.py
+++ b/src/target/trx_toolkit/data_if.py
@@ -62,13 +62,13 @@ class DATAInterface(UDPLink):
return msg
- def send_msg(self, msg):
+ def send_msg(self, msg, legacy = False):
# Validate a message
if not msg.validate():
raise ValueError("Message incomplete or incorrect")
# Generate TRX message
- payload = msg.gen_msg()
+ payload = msg.gen_msg(legacy)
# Send message
self.send(payload)