Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

sniffer: make serial/socket command optional #38

Closed
wants to merge 4 commits into from

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jun 19, 2018

First of all: I know this is very hacky, but sadly there is no
straight-forward (and portable) way with argparse to make a
subcommand optional, like it is the case e.g. with many git
commands.

However, this allows now also do just type

./tools/sniffer /dev/ttyACM0 112500 26

Depends on #37

miri64 added 3 commits June 19, 2018 11:42
This is mainly a preparation step to make some arguments (namely
baudrate and the "serial/socket" argument) optional, to make it more
usable like the old `rftest2pcap` script for the econotag.
@miri64 miri64 requested a review from smlng June 19, 2018 10:29
First of all: I know this is very hacky, but sadly there is no
straight-forward (and portable) way with `argparse` to make a
subcommand optional, like it is the case e.g. with many `git`
commands.

However, this allows now also do just type

```sh
./tools/sniffer /dev/ttyACM0 112500 26
```
@miri64 miri64 force-pushed the sniffer/enh/serial-optional branch from 41fee3d to eee0d3f Compare June 19, 2018 10:30
miri64 added a commit to miri64/RIOT_applications that referenced this pull request Jun 19, 2018
The KISS approach alternative to RIOT-OS#38 (also includes RIOT-OS#39, because...).
Disadvantage: we loose backwards compatibility for this tool.
miri64 added a commit to miri64/RIOT_applications that referenced this pull request Jun 19, 2018
The KISS approach alternative to RIOT-OS#38 (also includes RIOT-OS#39, because...).
Disadvantage: we loose backwards compatibility for this tool.
smlng
smlng previously approved these changes Jul 13, 2018
Copy link
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

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

tested ACK, though it looks really hacky ...

@smlng
Copy link
Member

smlng commented Jul 13, 2018

please squash

@smlng
Copy link
Member

smlng commented Jul 13, 2018

and rebase after #37 was merged.

@smlng
Copy link
Member

smlng commented Jul 13, 2018

would prefer #40 though

@smlng smlng dismissed their stale review July 13, 2018 12:07

like #40 better

@miri64
Copy link
Member Author

miri64 commented Jul 13, 2018

Ok

@miri64 miri64 closed this Jul 13, 2018
@miri64 miri64 deleted the sniffer/enh/serial-optional branch July 13, 2018 14:04
miri64 added a commit to miri64/RIOT_applications that referenced this pull request Jul 13, 2018
The KISS approach alternative to RIOT-OS#38 (also includes RIOT-OS#39, because...).
Disadvantage: we loose backwards compatibility for this tool.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants