summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2020-07-17 09:16:32 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2020-07-17 17:17:40 +0200
commitc32de941d4eafc6b773b3d8e26e6befe88d580b7 (patch)
tree46e90e7a639e7cac824d83755d03f98be55854b3 /decoders
parentf138ba194e11d517d7b2c8a4a7861f71a8773128 (diff)
downloadlibsigrokdecode-c32de941d4eafc6b773b3d8e26e6befe88d580b7.tar.gz
libsigrokdecode-c32de941d4eafc6b773b3d8e26e6befe88d580b7.zip
pjon: comment nits, typo fix
Diffstat (limited to 'decoders')
-rw-r--r--decoders/pjon/pd.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/decoders/pjon/pd.py b/decoders/pjon/pd.py
index f9634e1..b23cfb8 100644
--- a/decoders/pjon/pd.py
+++ b/decoders/pjon/pd.py
@@ -130,6 +130,7 @@ class Decoder(srd.Decoder):
return
# Emit "communication relation" details.
+ # TODO Include the service ID (port number) as well?
text = []
if self.frame_rx_id is not None:
text.append("RX {}".format(self.frame_rx_id[-1]))
@@ -236,7 +237,7 @@ class Decoder(srd.Decoder):
text.append('svc_id' if self.cfg_port else '-') # port aka service ID
text.append('ack_mode' if self.cfg_async_ack else '-') # async response
text.append('ack' if self.cfg_sync_ack else '-') # synchronous response
- text.append('tx_info' if self.cfg_tx_info else '-')
+ text.append('tx_info' if self.cfg_tx_info else '-') # sender address
text.append('bus_id' if self.cfg_shared else '-') # "shared" vs "local"
text = ' '.join(text)
bits = '{:08b}'.format(b)
@@ -255,7 +256,7 @@ class Decoder(srd.Decoder):
# Get the size of variable width fields, to calculate the size
# of the packet overhead (the part that is not the payload data).
# This lets us derive the payload length when we later receive
- # the packet length.
+ # the frame's total length.
u8_fmt = '>B'
u16_fmt = '>H'
u32_fmt = '>L'
@@ -339,7 +340,7 @@ class Decoder(srd.Decoder):
# The wire communicates the total packet length. Some of it is
# overhead (non-payload data), while its volume is variable in
- # size (dpends on the header configuration).
+ # size (depends on the header configuration).
#
# Derive the payload size from previously observed flags. Update
# the previously registered field description (the second last