Skip to content

Commit 1c96a08

Browse files
authored
update GitHub Actions (#19)
- update GitHub actions - update examples - minor edits
1 parent 5bc8571 commit 1c96a08

File tree

13 files changed

+62
-50
lines changed

13 files changed

+62
-50
lines changed

.github/workflows/arduino-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: arduino/arduino-lint-action@v1
9+
- uses: actions/checkout@v5
10+
- uses: arduino/arduino-lint-action@v2
1111
with:
1212
library-manager: update
1313
compliance: strict

.github/workflows/arduino_test_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
timeout-minutes: 20
99

1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- uses: ruby/setup-ruby@v1
1313
with:
1414
ruby-version: 2.6

.github/workflows/jsoncheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
paths:
66
- '**.json'
77
pull_request:
8+
paths:
9+
- '**.json'
810

911
jobs:
1012
test:
1113
runs-on: ubuntu-latest
1214
timeout-minutes: 5
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1517
- name: json-syntax-check
1618
uses: limitusus/json-syntax-check@v2
1719
with:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.4.2] - 2025-10-12
10+
- update GitHub actions
11+
- update examples
12+
- minor edits
13+
914
## [0.4.1] - 2024-10-31
1015
- fix #17, add more optimizations, kudos to nt314p
1116

FastShiftOut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: FastShiftOut.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.4.1
4+
// VERSION: 0.4.2
55
// PURPOSE: ShiftOut that implements the Print interface
66
// DATE: 2013-08-22
77
// URL: https://github.com/RobTillaart/FastShiftOut

FastShiftOut.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: FastShiftOut.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.4.1
5+
// VERSION: 0.4.2
66
// PURPOSE: shiftOut class that implements the Print interface
77
// DATE: 2013-08-22
88
// URL: https://github.com/RobTillaart/FastShiftOut
@@ -11,7 +11,7 @@
1111
#include "Arduino.h"
1212
#include "Print.h"
1313

14-
#define FASTSHIFTOUT_LIB_VERSION (F("0.4.1"))
14+
#define FASTSHIFTOUT_LIB_VERSION (F("0.4.2"))
1515

1616
// uncomment next line to get SPEED OPTIMIZED CODE
1717
// #define FASTSHIFTOUT_AVR_LOOP_UNROLLED 1

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2013-2024 Rob Tillaart
3+
Copyright (c) 2013-2025 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

examples/FastShiftOut_demo/FastShiftOut_demo.ino

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ FastShiftOut FSO(12, 13, LSBFIRST);
1313
void setup()
1414
{
1515
Serial.begin(115200);
16-
Serial.print(__FILE__);
17-
16+
Serial.println();
17+
Serial.println(__FILE__);
1818
Serial.print("FASTSHIFTOUT_LIB_VERSION: ");
1919
Serial.println(FASTSHIFTOUT_LIB_VERSION);
20+
Serial.println();
2021

2122
Serial.println("\nPerformance - time in us");
2223
uint32_t start = micros();
@@ -36,9 +37,9 @@ void setup()
3637
}
3738
uint32_t duration2 = micros() - start;
3839
Serial.print("FastShiftOut2: ");
39-
Serial.println(duration2 * 0.001);
40+
Serial.println(duration2 * 0.001f);
4041
Serial.print(" Delta: ");
41-
Serial.println((duration2 - duration1) * 0.001);
42+
Serial.println((duration2 - duration1) * 0.001f);
4243
Serial.println();
4344

4445
start = micros();
@@ -48,7 +49,7 @@ void setup()
4849
}
4950
duration1 = micros() - start;
5051
Serial.print("Standard shiftOut1: ");
51-
Serial.println(duration1 * 0.001);
52+
Serial.println(duration1 * 0.001f);
5253

5354
start = micros();
5455
for (int i = 0; i < 1000; i++)
@@ -58,9 +59,9 @@ void setup()
5859
}
5960
duration2 = micros() - start;
6061
Serial.print("Standard shiftOut2: ");
61-
Serial.println(duration2 * 0.001);
62+
Serial.println(duration2 * 0.001f);
6263
Serial.print(" Delta: ");
63-
Serial.println((duration2 - duration1) * 0.001);
64+
Serial.println((duration2 - duration1) * 0.001f);
6465
Serial.println();
6566

6667
Serial.println("\nTest print interface");
@@ -71,7 +72,7 @@ void setup()
7172
}
7273
duration1 = micros() - start;
7374
Serial.print("println(\"Hello world\"): \t");
74-
Serial.println(duration1 * 0.01);
75+
Serial.println(duration1 * 0.01f);
7576

7677

7778
start = micros();
@@ -81,17 +82,17 @@ void setup()
8182
}
8283
duration1 = micros() - start;
8384
Serial.print("println(1357): \t\t\t");
84-
Serial.println(duration1 * 0.01);
85+
Serial.println(duration1 * 0.01f);
8586

8687

8788
start = micros();
8889
for (int i = 0; i < 100; i++)
8990
{
90-
FSO.println(3.14159265, 4);
91+
FSO.println(3.14159265f, 4);
9192
}
9293
duration1 = micros() - start;
9394
Serial.print("println(3.14159265, 4): \t");
94-
Serial.println(duration1 * 0.01);
95+
Serial.println(duration1 * 0.01f);
9596

9697
Serial.println("\ndone ...");
9798
}
@@ -102,4 +103,4 @@ void loop()
102103
}
103104

104105

105-
// -- END OF FILE --
106+
// -- END OF FILE --

examples/FastShiftOut_scope_test/FastShiftOut_scope_test.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// AUTHOR: Rob Tillaart
44
// PURPOSE: test sketch for scope
55
// URL: https://github.com/RobTillaart/FastShiftOut
6+
//
7+
// Connect scope to pins mentioned in constructor (12, 13)
68

79
#include "FastShiftOut.h"
810

@@ -14,6 +16,7 @@ uint32_t start, duration1, duration2;
1416
void setup()
1517
{
1618
Serial.begin(115200);
19+
Serial.println();
1720
Serial.println(__FILE__);
1821
Serial.print("FASTSHIFTOUT_LIB_VERSION: ");
1922
Serial.println(FASTSHIFTOUT_LIB_VERSION);

examples/FastShiftOut_test/FastShiftOut_test.ino

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ uint32_t start, duration1, duration2;
1414
void setup()
1515
{
1616
Serial.begin(115200);
17+
Serial.println();
1718
Serial.println(__FILE__);
18-
1919
Serial.print("FASTSHIFTOUT_LIB_VERSION: ");
2020
Serial.println(FASTSHIFTOUT_LIB_VERSION);
21+
Serial.println();
2122

2223
Serial.println("\nPerformance - time in us");
2324
test1();
@@ -42,7 +43,7 @@ void test1()
4243
}
4344
duration1 = micros() - start;
4445
Serial.print(" write: ");
45-
Serial.println(duration1 * 0.001);
46+
Serial.println(duration1 * 0.001f);
4647
delay(100);
4748

4849
start = micros();
@@ -53,9 +54,9 @@ void test1()
5354
}
5455
duration2 = micros() - start;
5556
Serial.print(" write: ");
56-
Serial.println(duration2 * 0.001);
57+
Serial.println(duration2 * 0.001f);
5758
Serial.print(" Delta: ");
58-
Serial.println((duration2 - duration1) * 0.001);
59+
Serial.println((duration2 - duration1) * 0.001f);
5960
Serial.println();
6061
delay(100);
6162
}
@@ -70,7 +71,7 @@ void test2()
7071
}
7172
duration1 = micros() - start;
7273
Serial.print("writeLSBFIRST: ");
73-
Serial.println(duration1 * 0.001);
74+
Serial.println(duration1 * 0.001f);
7475
delay(100);
7576

7677
start = micros();
@@ -81,9 +82,9 @@ void test2()
8182
}
8283
duration2 = micros() - start;
8384
Serial.print("writeLSBFIRST: ");
84-
Serial.println(duration2 * 0.001);
85+
Serial.println(duration2 * 0.001f);
8586
Serial.print(" Delta: ");
86-
Serial.println((duration2 - duration1) * 0.001);
87+
Serial.println((duration2 - duration1) * 0.001f);
8788
Serial.println();
8889
delay(100);
8990
}
@@ -98,7 +99,7 @@ void test3()
9899
}
99100
duration1 = micros() - start;
100101
Serial.print("writeMSBFIRST: ");
101-
Serial.println(duration1 * 0.001);
102+
Serial.println(duration1 * 0.001f);
102103
delay(100);
103104

104105
start = micros();
@@ -109,9 +110,9 @@ void test3()
109110
}
110111
duration2 = micros() - start;
111112
Serial.print("writeMSBFIRST: ");
112-
Serial.println(duration2 * 0.001);
113+
Serial.println(duration2 * 0.001f);
113114
Serial.print(" Delta: ");
114-
Serial.println((duration2 - duration1) * 0.001);
115+
Serial.println((duration2 - duration1) * 0.001f);
115116
Serial.println();
116117
delay(100);
117118
}
@@ -126,7 +127,7 @@ void test4()
126127
}
127128
duration1 = micros() - start;
128129
Serial.print("Standard shiftOut1: ");
129-
Serial.println(duration1 * 0.001);
130+
Serial.println(duration1 * 0.001f);
130131
delay(100);
131132

132133
start = micros();
@@ -137,9 +138,9 @@ void test4()
137138
}
138139
duration2 = micros() - start;
139140
Serial.print("Standard shiftOut2: ");
140-
Serial.println(duration2 * 0.001);
141+
Serial.println(duration2 * 0.001f);
141142
Serial.print(" Delta: ");
142-
Serial.println((duration2 - duration1) * 0.001);
143+
Serial.println((duration2 - duration1) * 0.001f);
143144
Serial.println();
144145
delay(100);
145146
}
@@ -154,7 +155,7 @@ void test5()
154155
}
155156
duration1 = micros() - start;
156157
Serial.print(" write16: ");
157-
Serial.println(duration1 * 0.001);
158+
Serial.println(duration1 * 0.001f);
158159
delay(100);
159160

160161
start = micros();
@@ -165,9 +166,9 @@ void test5()
165166
}
166167
duration2 = micros() - start;
167168
Serial.print(" write16: ");
168-
Serial.println(duration2 * 0.001);
169+
Serial.println(duration2 * 0.001f);
169170
Serial.print(" Delta: ");
170-
Serial.println((duration2 - duration1) * 0.001);
171+
Serial.println((duration2 - duration1) * 0.001f);
171172
Serial.println();
172173
delay(100);
173174
}
@@ -182,7 +183,7 @@ void test6()
182183
}
183184
duration1 = micros() - start;
184185
Serial.print(" write24: ");
185-
Serial.println(duration1 * 0.001);
186+
Serial.println(duration1 * 0.001f);
186187
delay(100);
187188

188189
start = micros();
@@ -193,9 +194,9 @@ void test6()
193194
}
194195
duration2 = micros() - start;
195196
Serial.print(" write24: ");
196-
Serial.println(duration2 * 0.001);
197+
Serial.println(duration2 * 0.001f);
197198
Serial.print(" Delta: ");
198-
Serial.println((duration2 - duration1) * 0.001);
199+
Serial.println((duration2 - duration1) * 0.001f);
199200
Serial.println();
200201
delay(100);
201202
}
@@ -210,7 +211,7 @@ void test7()
210211
}
211212
duration1 = micros() - start;
212213
Serial.print(" write32: ");
213-
Serial.println(duration1 * 0.001);
214+
Serial.println(duration1 * 0.001f);
214215
delay(100);
215216

216217
start = micros();
@@ -221,9 +222,9 @@ void test7()
221222
}
222223
duration2 = micros() - start;
223224
Serial.print(" write32: ");
224-
Serial.println(duration2 * 0.001);
225+
Serial.println(duration2 * 0.001f);
225226
Serial.print(" Delta: ");
226-
Serial.println((duration2 - duration1) * 0.001);
227+
Serial.println((duration2 - duration1) * 0.001f);
227228
Serial.println();
228229
delay(100);
229230
}
@@ -239,7 +240,7 @@ void test8()
239240
}
240241
duration1 = micros() - start;
241242
Serial.print("println(\"Hello world\"): \t");
242-
Serial.println(duration1 * 0.01);
243+
Serial.println(duration1 * 0.01f);
243244
delay(100);
244245

245246
start = micros();
@@ -249,17 +250,17 @@ void test8()
249250
}
250251
duration1 = micros() - start;
251252
Serial.print("println(1357): \t\t\t");
252-
Serial.println(duration1 * 0.01);
253+
Serial.println(duration1 * 0.01f);
253254
delay(100);
254255

255256
start = micros();
256257
for (int i = 0; i < 100; i++)
257258
{
258-
FSO.println(3.14159265, 4);
259+
FSO.println(3.14159265f, 4);
259260
}
260261
duration1 = micros() - start;
261262
Serial.print("println(3.14159265, 4): \t");
262-
Serial.println(duration1 * 0.01);
263+
Serial.println(duration1 * 0.01f);
263264
Serial.println();
264265
delay(100);
265266
}
@@ -270,4 +271,4 @@ void loop()
270271
}
271272

272273

273-
// -- END OF FILE --
274+
// -- END OF FILE --

0 commit comments

Comments
 (0)