arduino / arduino/ArduinoCore-API
Add "streaming" syntax support to Print class
- Langage dominant
- C++
- Étoiles
- 306
- Forks
- 150
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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"
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp
- Domaine
- api, embedded-iot
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100