Skip to content

[pluggable monitor] Add monitor --describe command #1493

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

Merged

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 5, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?
    This PR implements the monitor --describe command and set up the scaffolding for the future monitor command.
$ arduino-cli monitor
Error: required flag(s) "port" not set
Usage:
  arduino-cli monitor [flags]

Esempi:
  arduino-cli monitor -p /dev/ttyACM0
  arduino-cli monitor -p /dev/ttyACM0 --describe

Flags:
      --describe                     Show all the settings of the communication port.
      --discovery-timeout duration   Max time to wait for port discovery, e.g.: 30s, 1m (default 5s)
  -h, --help                         help for monitor
  -p, --port string                  Upload port address, e.g.: COM3 or /dev/ttyACM2
  -l, --protocol string              Upload port protocol, e.g: serial

Global Flags:
      --additional-urls strings   Comma-separated list of additional URLs for the Boards Manager.
      --config-file string        The custom config file (if not specified the default will be used).
      --format string             The output format for the logs, can be: text, json (default "text")
      --log-file string           Path to the file where logs will be written.
      --log-format string         The output format for the logs, can be: text, json
      --log-level string          Messages with this level and above will be logged. Valid levels are: trace, debug, info, warn, error, fatal, panic
      --no-color                  Disable colored output.
  -v, --verbose                   Print the logs on the standard output.

$ arduino-cli monitor -p /dev/ttyACM0 --describe
ID        Setting   Default Values                                                                                                              
baudrate  Baudrate  9600    300, 600, 750, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 921600, 1000000, 2000000
bits      Data bits 8       5, 6, 7, 8, 9                                                                                                       
parity    Parity    None    None, Even, Odd, Mark, Space                                                                                        
stop_bits Stop bits 1       1, 1.5, 2                                                                                                           

$ arduino-cli monitor -p /dev/ttyACM0
Monitor functionality not yet implemented
$ 

@cmaglie cmaglie requested a review from silvanocerza October 5, 2021 11:10
@cmaglie cmaglie force-pushed the pluggable-monitor-describe branch from 53b8747 to 6c107c8 Compare October 5, 2021 13:51
@cmaglie cmaglie merged commit 73b8aa0 into arduino:feature/pluggable-monitor Oct 5, 2021
@cmaglie cmaglie deleted the pluggable-monitor-describe branch October 5, 2021 13:55
d-a-v pushed a commit to d-a-v/arduino-cli that referenced this pull request Oct 14, 2021
* Resolve monitors from platform.txt

* Implementation of monitor --describe command

* fix i18n
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

Successfully merging this pull request may close these issues.

2 participants