Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Implement ultra-verbosity for showing all bytes sent/received over serial #121

Merged
merged 3 commits into from
Feb 27, 2018

Conversation

IvanSanchez
Copy link
Contributor

I've been debugging some bits of the DFU protocol, and I found it very useful to increase the available verbosity levels, adding a custom level for displaying all bytes.

A bit hackish (should this define a new logging level at a global level?), but the changes are small and useful.

@@ -166,7 +166,7 @@ def convert(self, value, param, ctx):

@click.group()
@click.option('-v', '--verbose',
help='Show verbose information.',
help='Increase verbosity of output. Can be specified more than once (up to -v -v -v -v).',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest writing as -vvvv

@@ -115,6 +115,7 @@ def __init__(self, serial_port):

def send_message(self, data):
packet = Slip.encode(data)
logger.log(5, 'SLIP: --> ' + str(data))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic number. Suggest using a named variable. Lines 118 and 136.

@mrodem mrodem merged commit eba1b53 into master Feb 27, 2018
@mrodem mrodem deleted the superverbose branch February 27, 2018 08:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants