fix(#765): bench script prints radio names with emoji on the Windows console

The console code page cannot encode them and the run crashed after the
identity check. Output is now UTF-8 with replacement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pull/801/head
diffwireauto 2 months ago committed by Benjamin Wiechel
parent 102b144eb8
commit 4c352102e6

@ -98,6 +98,8 @@ def main():
ap.add_argument("--pulls", type=int, default=3)
ap.add_argument("--settle", type=float, default=10.0, help="seconds between pulls")
args = ap.parse_args()
# Radio names can carry emoji the Windows console code page cannot print.
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
ser = serial.Serial(args.port, 115200, timeout=0.05)
try:

Loading…
Cancel
Save

Powered by TurnKey Linux.