mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-09-19 16:46:11 -04:00
0.3.4 PrintSize
This commit is contained in:
parent
4b028f2564
commit
f196e5164d
@ -6,12 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.3.4] - 2023-11-15
|
||||
- update readme.md
|
||||
|
||||
|
||||
## [0.3.3] - 2022-11-22
|
||||
- add changelog.md
|
||||
- add RP2040 to build-CI
|
||||
- minor edits
|
||||
|
||||
|
||||
## [0.3.2] - 2021-12-24
|
||||
- update library.json
|
||||
- update license
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: PrintSize.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.3.3
|
||||
// VERSION: 0.3.4
|
||||
// PURPOSE: Library to determine size of a printed variable.
|
||||
// DATE: 2017-12-09
|
||||
// URL: https://github.com/RobTillaart/PrintSize
|
||||
@ -11,7 +11,7 @@
|
||||
#include "Arduino.h"
|
||||
#include "Print.h"
|
||||
|
||||
#define PRINTSIZE_VERSION (F("0.3.3"))
|
||||
#define PRINTSIZE_VERSION (F("0.3.4"))
|
||||
|
||||
|
||||
class PrintSize: public Print
|
||||
|
@ -15,9 +15,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/PrintSize.git"
|
||||
},
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"headers": "PrintSize.h"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=PrintSize
|
||||
version=0.3.3
|
||||
version=0.3.4
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Library to determine size of a printed variable.
|
||||
|
@ -2,8 +2,11 @@
|
||||
[![Arduino CI](https://github.com/RobTillaart/PrintSize/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
||||
[![Arduino-lint](https://github.com/RobTillaart/PrintSize/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/PrintSize/actions/workflows/arduino-lint.yml)
|
||||
[![JSON check](https://github.com/RobTillaart/PrintSize/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/PrintSize/actions/workflows/jsoncheck.yml)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/PrintSize.svg)](https://github.com/RobTillaart/PrintSize/issues)
|
||||
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/PrintSize/blob/master/LICENSE)
|
||||
[![GitHub release](https://img.shields.io/github/release/RobTillaart/PrintSize.svg?maxAge=3600)](https://github.com/RobTillaart/PrintSize/releases)
|
||||
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/PrintSize.svg)](https://registry.platformio.org/libraries/robtillaart/PrintSize)
|
||||
|
||||
|
||||
# PrintSize
|
||||
@ -21,9 +24,27 @@ Works for **print()**, **println()** and if supported **printf()** e.g. ESP32.
|
||||
Finally since **0.2.0** it has a total counter to add up the characters "printed" since
|
||||
the last **reset()** call. (see example)
|
||||
|
||||
This library is related to
|
||||
- https://github.com/RobTillaart/PrintCharArray (captures data in a buffer)
|
||||
- https://github.com/RobTillaart/PrintSize. (captures data in a String)
|
||||
|
||||
#### Related
|
||||
|
||||
- https://github.com/RobTillaart/PrintCharArray (captures data in a char buffer)
|
||||
- https://github.com/RobTillaart/PrintSize (counts length of a number of print commands)
|
||||
- https://github.com/RobTillaart/PrintString (captures data in a String)
|
||||
|
||||
|
||||
## Interface
|
||||
|
||||
```cpp
|
||||
#include "PrintSize.h"
|
||||
```
|
||||
|
||||
- **PrintSize()** Constructor
|
||||
- **size_t write(uint8_t c)** core.
|
||||
Note: gives a warning unused parameter.
|
||||
- **size_t write(uint8_t \* str, uint8_t length)**
|
||||
Note: gives a warning unused parameter.
|
||||
- **void reset()** reset the total counter.
|
||||
- **uint32_t total()** total bytes "printed".
|
||||
|
||||
|
||||
## Operational
|
||||
@ -46,11 +67,30 @@ Can be used to calculate the needed space.
|
||||
|
||||
## Future
|
||||
|
||||
#### Must
|
||||
|
||||
#### Should
|
||||
|
||||
- add examples
|
||||
- add a function to handle **tab** char correctly e.g.
|
||||
could add more than one char. Interferes with the **write(str, length)**.
|
||||
- setTabSize(2,4,6, 8...);
|
||||
- setTabSize(2, 4, 6, 8...);
|
||||
- getTabSize();
|
||||
- uint8_t \_tabSize = 4;
|
||||
-
|
||||
|
||||
#### Could
|
||||
|
||||
- PRINTSIZE_LIB_VERSION ?
|
||||
|
||||
#### Wont
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
If you appreciate my libraries, you can support the development and maintenance.
|
||||
Improve the quality of the libraries by providing issues and Pull Requests, or
|
||||
donate through PayPal or GitHub sponsors.
|
||||
|
||||
Thank you,
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user