0.2.2 PrintString

This commit is contained in:
rob tillaart 2021-12-24 14:47:57 +01:00
parent 6444416eb4
commit 96178090eb
7 changed files with 18 additions and 19 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 20017-2021 Rob Tillaart
Copyright (c) 2017-2022 Rob Tillaart
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -2,7 +2,7 @@
//
// FILE: PrintString.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.1
// VERSION: 0.2.2
// PURPOSE: Class that captures prints into a String
// DATE: 2017-12-09
// URL: https://github.com/RobTillaart/PrintString
@ -13,13 +13,14 @@
// 0.2.0 2021-01-06 add Arduino-CI + unit test
// 0.2.1 2021-11-14 update Arduino-CI, readme.md
// add write(char * str, uint8_t length) Print interface.
// 0.2.2 2021-12-24 update library.json, license, minor edits
#include "Arduino.h"
#include "Print.h"
#define PRINTSTRING_VERSION (F("0.2.1"))
#define PRINTSTRING_VERSION (F("0.2.2"))
class PrintString: public Print

View File

@ -22,7 +22,7 @@ This String can be requested to process later.
use to prevent "display line overflow"
(e.g. floats)
There is a relation to https://github.com/RobTillaart/PrintCharArray
There is a relation to https://github.com/RobTillaart/PrintCharArray and https://github.com/RobTillaart/PrintSize.
## Interface
@ -37,14 +37,15 @@ There is a relation to https://github.com/RobTillaart/PrintCharArray
## Operational
See examples
See examples.
## Future
- testing
- add examples
- rename examples
- examples
- add new ones
- rename examples
- add functions like **repeat(char c)** to inject e.g. 7 spaces etc.
- add error flag
-

View File

@ -1,14 +1,8 @@
//
// FILE: printString.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.1
// PURPOSE: demo experimental
// URL: https://github.com/RobTillaart/PrintString
//
// HISTORY:
// 0.1.0 2017-12-09 initial version
// 0.1.1 2020-04-30 align demo with latest XMLWriter lib
//
#include "PrintString.h"

View File

@ -15,8 +15,9 @@
"type": "git",
"url": "https://github.com/RobTillaart/PrintString.git"
},
"version": "0.2.1",
"version": "0.2.2",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*"
"platforms": "*",
"headers": "PrintString.h"
}

View File

@ -1,5 +1,5 @@
name=PrintString
version=0.2.1
version=0.2.2
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library to capture prints into a String.

View File

@ -41,8 +41,10 @@ char buffer[100];
unittest_setup()
{
fprintf(stderr, "PRINTSTRING_VERSION: %s\n", (char *) PRINTSTRING_VERSION);
}
unittest_teardown()
{
}
@ -50,8 +52,6 @@ unittest_teardown()
unittest(test_constructor)
{
fprintf(stderr, "VERSION: %s\n", (char *) PRINTSTRING_VERSION);
PrintString ps;
assertEqual(0, ps.size());
@ -68,9 +68,11 @@ unittest(test_constructor)
assertEqual(20, ps.size());
ps.clear();
assertEqual(0, ps.size());
assertEqual(0, ps.size());
}
unittest_main()
// --------