arduino / arduino/ArduinoCore-API
Add "streaming" syntax support to Print class
- Lingua principale
- C++
- Stelle
- 306
- Fork
- 150
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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"
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- api, embedded-iot
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100