mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.1.7 ANSI
This commit is contained in:
parent
6bd0bef1c0
commit
3ced6ab10e
@ -1,3 +1,18 @@
|
||||
platforms:
|
||||
rpipico:
|
||||
board: rp2040:rp2040:rpipico
|
||||
package: rp2040:rp2040
|
||||
gcc:
|
||||
features:
|
||||
defines:
|
||||
- ARDUINO_ARCH_RP2040
|
||||
warnings:
|
||||
flags:
|
||||
|
||||
packages:
|
||||
rp2040:rp2040:
|
||||
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
|
||||
|
||||
compile:
|
||||
# Choosing to run compilation tests on 2 different Arduino platforms
|
||||
platforms:
|
||||
@ -7,5 +22,7 @@ compile:
|
||||
# - leonardo
|
||||
- m4
|
||||
- esp32
|
||||
# - esp8266
|
||||
- esp8266
|
||||
# - mega2560
|
||||
- rpipico
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Change Log bitHelpers
|
||||
# Change Log ANSI
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
@ -6,57 +6,39 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.1.6] - 2022-04-11
|
||||
## [0.1.7] - 2022-110-28
|
||||
- add RP2040 to build-CI
|
||||
- minor edits
|
||||
- start simplifying changelog
|
||||
- minor change unit test
|
||||
|
||||
### Added
|
||||
|
||||
## [0.1.6] - 2022-04-11
|
||||
- add CHANGELOG.md
|
||||
- add **int deviceType()**
|
||||
|
||||
### Changed
|
||||
- edit README.md
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
## [0.1.5] - 2021-12-13
|
||||
|
||||
### Added
|
||||
- add write(array, length)
|
||||
|
||||
### Changed
|
||||
- update library.json, license, minor edits
|
||||
|
||||
|
||||
## [0.1.4] - 2021-10-18
|
||||
|
||||
### Changed
|
||||
- update build-CI (e.g. ESP32)
|
||||
- update examples
|
||||
|
||||
|
||||
## [0.1.3] - 2020-12-11
|
||||
|
||||
### Added
|
||||
- add Arduino-CI
|
||||
- add unit test (minimal)
|
||||
|
||||
|
||||
## [0.1.2] - 2020-07-08
|
||||
|
||||
### Added
|
||||
- add clearLine
|
||||
= add color support (thanks to airbornemint)
|
||||
|
||||
|
||||
## [0.1.1] - 2020-05-27
|
||||
|
||||
### Changed
|
||||
- update library.json
|
||||
|
||||
|
||||
## [0.1.0] - 2020-04-28
|
||||
|
||||
### Added
|
||||
- initial release
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: ansi.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.6
|
||||
// VERSION: 0.1.7
|
||||
// PURPOSE: Arduino library to send ANSI escape sequences
|
||||
// DATE: 2020-04-28
|
||||
// URL: https://github.com/RobTillaart/ANSI
|
||||
@ -51,7 +51,7 @@ void ANSI::clearLine(uint8_t clear)
|
||||
|
||||
|
||||
// ANSI has three different color spaces: 4-bit color, 8-bit color, and 24-bit color
|
||||
// The are rendered with SGR 30-37,90-97/40-47,100-107, SGR 38;5/48;5, and SGR 38;2/48;2, respectively
|
||||
// These are rendered with SGR 30-37,90-97/40-47,100-107, SGR 38;5/48;5, and SGR 38;2/48;2, respectively
|
||||
// The 4-bit color space is the most widely compatible and the most compactly transmitted
|
||||
enum {
|
||||
fg_normal = 30,
|
||||
@ -221,5 +221,6 @@ void ANSI::color8(uint8_t base, uint8_t color) {
|
||||
print("m");
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: ansi.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.6
|
||||
// VERSION: 0.1.7
|
||||
// PURPOSE: Arduino library to send ANSI escape sequences
|
||||
// DATE: 2020-04-28
|
||||
// URL: https://github.com/RobTillaart/ANSI
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#define ANSI_LIB_VERSION (F("0.1.6"))
|
||||
#define ANSI_LIB_VERSION (F("0.1.7"))
|
||||
|
||||
|
||||
class ANSI : public Stream
|
||||
@ -58,7 +58,8 @@ public:
|
||||
void foreground(uint8_t fgcolor);
|
||||
// Set background color
|
||||
void background(uint8_t bgcolor);
|
||||
// Set foreground and background color (for named colors, this is 25% faster than setting one then the other)
|
||||
// Set foreground and background color
|
||||
// (for named colors, this is 25% faster than setting one then the other)
|
||||
void color(uint8_t fgcolor, uint8_t bgcolor);
|
||||
|
||||
// Convert gray to ANSI 24-level gray in 4-bit colorspace
|
||||
@ -136,4 +137,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/ANSI.git"
|
||||
},
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=ANSI
|
||||
version=0.1.6
|
||||
version=0.1.7
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library to send ANSI escape sequences
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
unittest_setup()
|
||||
{
|
||||
fprintf(stderr, "ANSI_LIB_VERSION: %s\n", (char *) ANSI_LIB_VERSION);
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +39,6 @@ unittest_teardown()
|
||||
unittest(test_constructor)
|
||||
{
|
||||
ANSI ansi(&Serial);
|
||||
fprintf(stderr, "ANSI_LIB_VERSION: %s\n", (char *) ANSI_LIB_VERSION);
|
||||
|
||||
assertEqual(12, ansi.println("1234567890") );
|
||||
}
|
||||
@ -47,7 +47,6 @@ unittest(test_constructor)
|
||||
unittest(test_gray2color)
|
||||
{
|
||||
ANSI ansi(&Serial);
|
||||
fprintf(stderr, "ANSI_LIB_VERSION: %s\n", (char *) ANSI_LIB_VERSION);
|
||||
|
||||
for (int gray = 0; gray < 255; gray += 31)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user