arduino / arduino/ArduinoCore-API

Add "streaming" syntax support to Print class

未关闭
#180 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
C++
星标
306
派生
150
PR 合并指标
30 天内没有已合并 PR

描述

I wrote a couple of lines of helper code to allow for easy printing. If anyone is interested, I could incorporate it in `Stream.h` and open a pull request.

Usage:

```cpp
int a {9};
int b {10};
Serial << "You have " << a << " out of " << b << " retries left.\n";
// Prints: "You have 9 out of 10 retries left."
Serial << makePair(1.2, 4) << ' ' << makePair(12, BIN) << '\n';
// Prints: "1.2000 1100"
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by reading Stream.h and the Print class, then compare the requested << usage examples with the existing printing API. Done means the shown string, integer, character, and makePair examples are supported and produce the documented output.

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
api, embedded-iot
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。