mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.2.2 PrintString
This commit is contained in:
parent
6444416eb4
commit
96178090eb
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// FILE: PrintString.h
|
// FILE: PrintString.h
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.2.1
|
// VERSION: 0.2.2
|
||||||
// PURPOSE: Class that captures prints into a String
|
// PURPOSE: Class that captures prints into a String
|
||||||
// DATE: 2017-12-09
|
// DATE: 2017-12-09
|
||||||
// URL: https://github.com/RobTillaart/PrintString
|
// URL: https://github.com/RobTillaart/PrintString
|
||||||
@ -13,13 +13,14 @@
|
|||||||
// 0.2.0 2021-01-06 add Arduino-CI + unit test
|
// 0.2.0 2021-01-06 add Arduino-CI + unit test
|
||||||
// 0.2.1 2021-11-14 update Arduino-CI, readme.md
|
// 0.2.1 2021-11-14 update Arduino-CI, readme.md
|
||||||
// add write(char * str, uint8_t length) Print interface.
|
// 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 "Arduino.h"
|
||||||
#include "Print.h"
|
#include "Print.h"
|
||||||
|
|
||||||
|
|
||||||
#define PRINTSTRING_VERSION (F("0.2.1"))
|
#define PRINTSTRING_VERSION (F("0.2.2"))
|
||||||
|
|
||||||
|
|
||||||
class PrintString: public Print
|
class PrintString: public Print
|
||||||
|
@ -22,7 +22,7 @@ This String can be requested to process later.
|
|||||||
use to prevent "display line overflow"
|
use to prevent "display line overflow"
|
||||||
(e.g. floats)
|
(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
|
## Interface
|
||||||
@ -37,14 +37,15 @@ There is a relation to https://github.com/RobTillaart/PrintCharArray
|
|||||||
|
|
||||||
## Operational
|
## Operational
|
||||||
|
|
||||||
See examples
|
See examples.
|
||||||
|
|
||||||
|
|
||||||
## Future
|
## Future
|
||||||
|
|
||||||
- testing
|
- testing
|
||||||
- add examples
|
- examples
|
||||||
- rename examples
|
- add new ones
|
||||||
|
- rename examples
|
||||||
- add functions like **repeat(char c)** to inject e.g. 7 spaces etc.
|
- add functions like **repeat(char c)** to inject e.g. 7 spaces etc.
|
||||||
- add error flag
|
- add error flag
|
||||||
-
|
-
|
||||||
|
@ -1,14 +1,8 @@
|
|||||||
//
|
//
|
||||||
// FILE: printString.ino
|
// FILE: printString.ino
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.1.1
|
|
||||||
// PURPOSE: demo experimental
|
// PURPOSE: demo experimental
|
||||||
// URL: https://github.com/RobTillaart/PrintString
|
// 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"
|
#include "PrintString.h"
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/RobTillaart/PrintString.git"
|
"url": "https://github.com/RobTillaart/PrintString.git"
|
||||||
},
|
},
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"frameworks": "arduino",
|
"frameworks": "arduino",
|
||||||
"platforms": "*"
|
"platforms": "*",
|
||||||
|
"headers": "PrintString.h"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=PrintString
|
name=PrintString
|
||||||
version=0.2.1
|
version=0.2.2
|
||||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
sentence=Library to capture prints into a String.
|
sentence=Library to capture prints into a String.
|
||||||
|
@ -41,8 +41,10 @@ char buffer[100];
|
|||||||
|
|
||||||
unittest_setup()
|
unittest_setup()
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "PRINTSTRING_VERSION: %s\n", (char *) PRINTSTRING_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unittest_teardown()
|
unittest_teardown()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -50,8 +52,6 @@ unittest_teardown()
|
|||||||
|
|
||||||
unittest(test_constructor)
|
unittest(test_constructor)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "VERSION: %s\n", (char *) PRINTSTRING_VERSION);
|
|
||||||
|
|
||||||
PrintString ps;
|
PrintString ps;
|
||||||
|
|
||||||
assertEqual(0, ps.size());
|
assertEqual(0, ps.size());
|
||||||
@ -68,9 +68,11 @@ unittest(test_constructor)
|
|||||||
assertEqual(20, ps.size());
|
assertEqual(20, ps.size());
|
||||||
|
|
||||||
ps.clear();
|
ps.clear();
|
||||||
assertEqual(0, ps.size());
|
assertEqual(0, ps.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unittest_main()
|
unittest_main()
|
||||||
|
|
||||||
|
|
||||||
// --------
|
// --------
|
||||||
|
Loading…
Reference in New Issue
Block a user