Skip to content

Commit

Permalink
update GitHub action (#24)
Browse files Browse the repository at this point in the history
- update GitHub actions
- minor edits
  • Loading branch information
RobTillaart committed Apr 6, 2024
1 parent e7ffb51 commit 058f70e
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 41 deletions.
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# These are supported funding model platforms

github: RobTillaart
github: RobTillaart
custom: "https://www.paypal.me/robtillaart"

4 changes: 2 additions & 2 deletions .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

name: Arduino-lint

on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/arduino_test_runner.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Arduino CI

on: [push, pull_request]

jobs:
runTest:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/jsoncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
uses: limitusus/json-syntax-check@v2
with:
pattern: "\\.json$"

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.3.2] - 2024-04-06
- update GitHub actions
- minor edits


## [0.3.1] - 2023-11-13
- added experimental functions (to get feedback)
- if these work depends on terminal (app) used.
Expand All @@ -14,7 +19,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- add initial version of **supportMatrix.md**
- updated keywords.txt


## [0.3.0] - 2023-11-09
- fix missing 0 in normal (#19, Kudos to d0m1n1qu3)
- fix basic escape strings write length (normal, bold etc eating one char).
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 Rob Tillaart
Copyright (c) 2020-2024 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
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The set of codes is large, however not all terminal types do support all codes.
Sending these ANSI codes to a simple ASCII only terminal like the one in the Arduino
IDE might result in garbage. So use with care.


#### Breaking change 0.2.0

The **gotoXY(x, y)** has changed as the X and Y coordinates were swapped.
Expand All @@ -34,7 +35,8 @@ The code has been updated to explicitly mention which is row and which is column

#### Related

https://en.wikipedia.org/wiki/ANSI_escape_code
- https://en.wikipedia.org/wiki/ANSI_escape_code
- https://github.com/RobTillaart/LineFormatter


## Terminals tested
Expand Down Expand Up @@ -229,10 +231,11 @@ Although it are small improvements these add up.
- move code from .h to .cpp
- more derived classes


#### Wont

- move static strings to PROGMEM? as defines?
roughly ~20 bytes progmem for 4 bytes RAM...
roughly ~20 bytes PROGMEM for 4 bytes RAM...


## Support
Expand Down
2 changes: 1 addition & 1 deletion ansi.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: ansi.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.3.1
// VERSION: 0.3.2
// PURPOSE: Arduino library to send ANSI escape sequences
// DATE: 2020-04-28
// URL: https://github.com/RobTillaart/ANSI
Expand Down
6 changes: 3 additions & 3 deletions ansi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
//
// FILE: ansi.h
// AUTHOR: Rob Tillaart
// VERSION: 0.3.1
// VERSION: 0.3.2
// PURPOSE: Arduino library to send ANSI escape sequences
// DATE: 2020-04-28
// URL: https://github.com/RobTillaart/ANSI


#include "Arduino.h"

#define ANSI_LIB_VERSION (F("0.3.1"))
#define ANSI_LIB_VERSION (F("0.3.2"))


class ANSI : public Stream
Expand Down Expand Up @@ -115,7 +115,7 @@ class ANSI : public Stream
int deviceType(uint32_t timeout = 100);


// SCREENSIZE
// SCREENSIZE
// - https://github.com/RobTillaart/ANSI/pull/16
bool readCursorPosition(uint16_t &w, uint16_t &h, uint32_t timeout = 100);
bool getScreenSize(uint16_t &w, uint16_t &h, uint32_t timeout = 100);
Expand Down
8 changes: 4 additions & 4 deletions examples/ansiDemo01/ansiDemo01.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void setup()
delay(1000);

ansi.clearScreen();
// 4 bit color test
// 4 bit color test
for (int color = 0; color < 16; ++color) {
ansi.foreground(color);
ansi.print("foreground");
Expand All @@ -70,7 +70,7 @@ void setup()
delay(1000);

ansi.clearScreen();
// 8 bit color test
// 8 bit color test
ansi.foreground(ansi.rgb2color(180, 0, 158));
ansi.print("foreground");
ansi.normal();
Expand Down Expand Up @@ -100,8 +100,8 @@ void setup()
ansi.strikeThrough();
ansi.println("strikethrough");
ansi.normal();
// RGB color test

// RGB color test
ansi.println("Experimental");
ansi.setRGBforeground(180, 0, 158);
ansi.print("foreground");
Expand Down
16 changes: 8 additions & 8 deletions examples/ansiDemo02/ansiDemo02.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void setup()
{
Serial.begin(115200);

// SPLASH SCREEN
// SPLASH SCREEN
ansi.clearScreen();
ansi.gotoXY(10, 8);
ansi.bold();
Expand All @@ -30,7 +30,7 @@ void setup()

void loop()
{
// DISPLAY TEMPERATURE (dummy)
// DISPLAY TEMPERATURE (dummy)
ansi.gotoXY(10, 6);
ansi.print("TEMP: ");
ansi.gotoXY(16, 6);
Expand All @@ -39,7 +39,7 @@ void loop()
ansi.print(t);
ansi.foreground(ansi.white);

// DISPLAY HUMIDITY (dummy)
// DISPLAY HUMIDITY (dummy)
ansi.gotoXY(10, 7);
ansi.print(" HUM: ");
ansi.gotoXY(16, 7);
Expand All @@ -48,7 +48,7 @@ void loop()
ansi.print(t);
ansi.foreground(ansi.white);

// DISPLAY UV (dummy)
// DISPLAY UV (dummy)
ansi.gotoXY(10, 8);
ansi.print(" UV: ");
ansi.gotoXY(16, 8);
Expand All @@ -59,18 +59,18 @@ void loop()
ansi.print(d, 2);
ansi.foreground(ansi.white);

// DISPLAY bargraph (dummy)
// DISPLAY bar graph (dummy)
ansi.gotoXY(10, 10);
ansi.print(" BAR:");
ansi.gotoXY(16, 10);
int x = random(10);
for (int i = 0; i < 10; i++) ansi.print(i <= x ? ">" : " ");

// DISPLAY password (dummy)
// DISPLAY password (dummy)
ansi.gotoXY(10, 12);
ansi.print("PASS:");
char buffer[20];
for (int i = 0; i < 16; i++)
for (int i = 0; i < 16; i++)
{
int x = random(62);
if (x < 26) buffer[i] = 'A' + random(26);
Expand All @@ -81,7 +81,7 @@ void loop()
ansi.gotoXY(16, 12);
ansi.print(buffer);

// DISPLAY TIME (dummy)
// DISPLAY TIME (dummy)
ansi.gotoXY(10, 2);
ansi.print("TIME: ");
ansi.gotoXY(16, 2);
Expand Down
3 changes: 1 addition & 2 deletions examples/ansi_clock/ansi_clock.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// AUTHOR: Rob Tillaart
// PURPOSE: demo clock
// URL: https://github.com/RobTillaart/ANSI
// (c) : MIT
//
// use Tera Term to view 'different' clocks.

Expand All @@ -19,7 +18,7 @@ void setup()
{
Serial.begin(115200);

// SPLASH SCREEN
// SPLASH SCREEN
ansi.clearScreen();
ansi.gotoXY(8, 10);
ansi.bold();
Expand Down
2 changes: 1 addition & 1 deletion examples/ansi_deviceType/ansi_deviceType.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// URL: https://github.com/RobTillaart/ANSI/issues/9

// NOT TESTED
// - WITH REAL TERMINAL
// - with real terminal
// - with dummies

#include "ansi.h"
Expand Down
1 change: 1 addition & 0 deletions examples/ansi_performance/ansi_performance.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("ANSI_LIB_VERSION: ");
Serial.println(ANSI_LIB_VERSION);
Serial.println();
delay(100);
Expand Down
18 changes: 9 additions & 9 deletions examples/ansi_screenSize/ansi_screenSize.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
// PURPOSE: demo of screen size detection
// URL: https://github.com/RobTillaart/ANSI
//
// These terminal emulators can report screen size:
// * Linux, minicom
// * Windows, PuTTY
// * Windows, TeraTerm
// * Windows, MobaXterm
// These terminal emulators can report screen size:
// * Linux, minicom
// * Windows, PuTTY
// * Windows, TeraTerm
// * Windows, MobaXterm
//
// UTF-8: To draw boxes with other than ASCII characters
// an extra font has to be added.
// UTF-8: To draw boxes with other than ASCII characters
// an extra font has to be added.

#include "ansi.h"

Expand All @@ -29,7 +29,7 @@ uint16_t w, h;
void setup() {
Serial.begin(115200);

ansi.print(" "); // some bug, first character written is missing
ansi.print(" "); // some bug, first character written is missing

if (!ansi.getScreenSize(w, h, 100)) {
ansi.println(F("\n\n### ANSI escape codes not detected ###\n"
Expand All @@ -53,7 +53,7 @@ void setup() {
ansi.print("\nUTF-8 test. Your should see at least one emoji here?: 🐛 🖥 ☎ ❤ ❣ ✂ ✈");
delay(1000);

// Draw border
// Draw border
ansi.color(ansi.yellow, ansi.blue);
for (uint16_t y = 1; y <= ansi.screenHeight(); y++) {
ansi.gotoXY(1, y);
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/ANSI.git"
},
"version": "0.3.1",
"version": "0.3.2",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ANSI
version=0.3.1
version=0.3.2
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library to send ANSI escape sequences.
Expand Down

0 comments on commit 058f70e

Please sign in to comment.