Added new `monitor_encoding` project configuration option // Resolve #4350

This commit is contained in:
Ivan Kravets
2022-07-11 13:26:43 +03:00
parent 5844c536a4
commit 236c4570cf
4 changed files with 13 additions and 4 deletions

View File

@ -16,6 +16,7 @@ PlatformIO Core 6
6.1.1 (2022-??-??)
~~~~~~~~~~~~~~~~~~
* Added new ``monitor_encoding`` project configuration option to configure `Device Monitor <https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html>`__ (`issue #4350 <https://github.com/platformio/platformio-core/issues/4350>`_)
* Allowed specifying project environments for `pio ci <https://docs.platformio.org/en/latest/core/userguide/cmd_ci.html>`__ command (`issue #4347 <https://github.com/platformio/platformio-core/issues/4347>`_)
* Show "TimeoutError" only in the verbose mode when can not find a serial port
* Fixed an issue when a serial port was not automatically detected if the board has predefined HWIDs

2
docs

Submodule docs updated: 31b7d077be...d2d72c9a4e

View File

@ -56,9 +56,11 @@ from platformio.project.options import ProjectOptions
@click.option("--echo", is_flag=True, help="Enable local echo")
@click.option(
"--encoding",
default="UTF-8",
show_default=True,
help="Set the encoding for the serial port (e.g. hexlify, Latin1, UTF-8)",
help=(
"Set the encoding for the serial port "
"(e.g. hexlify, Latin1, UTF-8) [default=%s]"
% ProjectOptions["env.monitor_encoding"].default
),
)
@click.option(
"-f",

View File

@ -567,6 +567,12 @@ ProjectOptions = OrderedDict(
type=click.BOOL,
default=False,
),
ConfigEnvOption(
group="monitor",
name="monitor_encoding",
description="Custom encoding (e.g. hexlify, Latin1, UTF-8)",
default="UTF-8",
),
# Library
ConfigEnvOption(
group="library",