summaryrefslogtreecommitdiff
path: root/decoders/nrf24l01/__init__.py
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2023-07-17 18:37:37 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2023-07-18 21:09:40 +0200
commit5eb664089f9123a91841f66535ffb1689d9ddd98 (patch)
treea938733e6519822dc661851c87f41138988c755b /decoders/nrf24l01/__init__.py
parent01416b9810ceb759e3088bad174d89621704a210 (diff)
downloadlibsigrokdecode-5eb664089f9123a91841f66535ffb1689d9ddd98.tar.gz
libsigrokdecode-5eb664089f9123a91841f66535ffb1689d9ddd98.zip
i2c: improve reliability of bitrate estimation (throughput, meta)
The I2C decoder used to track the bitrate of the observed traffic (number of address and data bits in a transfer). It's uncertain where this output went (is meta still supported, are applications using it?), and it appears to not be covered in tests. Improve the logic still. Adjust the location of the emitted annotation. It used to start at the most recently observed data byte, which looks suspicious. Output was attempted when STOP was seen, even if the start was not observed. The calculation dropped data before a repeated start. The implementation kept data around after it became obsolete. Break a long formula across several text lines. Use the fact that Python division yields floating point results. Add a comment in the ACK/NAK bit handler. It references data which was gathered when accumulating data bits. Could be acceptable but must be remained aware of.
Diffstat (limited to 'decoders/nrf24l01/__init__.py')
0 files changed, 0 insertions, 0 deletions