Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp / count don't always catch newlines? :( #30

Open
ppannuto opened this issue May 26, 2018 · 1 comment
Open

Timestamp / count don't always catch newlines? :( #30

ppannuto opened this issue May 26, 2018 · 1 comment

Comments

@ppannuto
Copy link
Member

Posting for later investigation, but a device printing like this:

        printf("\r");
        for (j=0; j<adv.dlen; j++) {
          printf("%02x", adv.data[j]);
        }
        printf("\n");

doesn't result in the timestamp / count option working, which is a bit surprising as I'd expect that lone '\n' at the end to make things happy

@ppannuto
Copy link
Member Author

It also gets unhappy when corrupt (probably interpreted as serial control things) characters come through, resulting in an empty message:

[2018-05-27 17:41:24.914210] [ 80623] Disconnected. Attempting to reconnect
[2018-05-28 12:27:09.009476] [ 80624] ␀`␀F␀␀␅D�␀,␡��.&��~R�␀ ␀␀␀␄␀�␁␀␀ ␀�#@�␑��␂�␃␀␀Q���␀␄␞�␀@�␀␁o�"␀␁␀␀␀�␀Exception in thread rx:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/site-packages/pyserial-3.2.1-py3.6.egg/serial/tools/miniterm.py", line 459, in reader
    text = transformation.rx(text)
  File "/Volumes/code/helena-project/tockloader/tockloader/bootloader_serial.py", line 726, in rx
    self.last = text[-1]
IndexError: string index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant