Skip to content

Commit 7b58884

Browse files
authored
update GitHub actions (#38)
- update GitHub actions - add define AVERAGE_MIN_SIZE so at least 1 element. - minor edits
1 parent 9f0be38 commit 7b58884

24 files changed

Lines changed: 28 additions & 32 deletions

File tree

.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@v6
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ jobs:
66
runTest:
77
runs-on: ubuntu-latest
88
timeout-minutes: 20
9-
109
steps:
11-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v6
1211
- uses: ruby/setup-ruby@v1
1312
with:
1413
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@v6
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.9] - 2026-03-19
10+
- update GitHub actions
11+
- add define AVERAGE_MIN_SIZE so at least 1 element.
12+
- minor edits
13+
914
## [0.4.8] - 2025-08-01
1015
- add array example
1116
- update examples

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) 2012-2025 Rob Tillaart
3+
Copyright (c) 2012-2026 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

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In version 0.2.16 a fix was added that uses the calculation of the sum in **getA
3131
update the internal **\_sum**.
3232

3333

34-
#### Related
34+
### Related
3535

3636
- https://github.com/RobTillaart/Correlation
3737
- https://github.com/RobTillaart/GST - Golden standard test metrics
@@ -40,6 +40,7 @@ update the internal **\_sum**.
4040
- https://github.com/RobTillaart/RunningAngle
4141
- https://github.com/RobTillaart/RunningAverage
4242
- https://github.com/RobTillaart/RunningMedian
43+
- https://github.com/RobTillaart/RunningMinMax
4344
- https://github.com/RobTillaart/statHelpers - combinations & permutations
4445
- https://github.com/RobTillaart/Statistic
4546
- https://github.com/RobTillaart/Student
@@ -173,11 +174,6 @@ Indicative performance on an UNO, see examples.
173174
| last functions | - | - | not tested
174175

175176

176-
## Operation
177-
178-
See examples
179-
180-
181177
## Future
182178

183179
#### Must

RunningAverage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: RunningAverage.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.4.8
4+
// VERSION: 0.4.9
55
// DATE: 2011-01-30
66
// PURPOSE: Arduino library to calculate the running average by means of a circular buffer
77
// URL: https://github.com/RobTillaart/RunningAverage
@@ -16,6 +16,7 @@
1616
RunningAverage::RunningAverage(const uint16_t size)
1717
{
1818
_size = size;
19+
if (_size < AVERAGE_MIN_SIZE) _size = AVERAGE_MIN_SIZE;
1920
_partial = _size;
2021
_array = (float*) malloc(_size * sizeof(float));
2122
if (_array == NULL) _size = 0;

RunningAverage.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: RunningAverage.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.4.8
5+
// VERSION: 0.4.9
66
// DATE: 2011-01-30
77
// PURPOSE: Arduino library to calculate the running average by means of a circular buffer
88
// URL: https://github.com/RobTillaart/RunningAverage
@@ -14,8 +14,12 @@
1414
#include "Arduino.h"
1515

1616

17-
#define RUNNINGAVERAGE_LIB_VERSION (F("0.4.8"))
17+
#define RUNNINGAVERAGE_LIB_VERSION (F("0.4.9"))
1818

19+
// AVERAGE_MIN_SIZE should at least be 1 to be practical,
20+
#ifndef AVERAGE_MIN_SIZE
21+
#define AVERAGE_MIN_SIZE 1
22+
#endif
1923

2024
class RunningAverage
2125
{

examples/fillValue/fillValue.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: fillValue.ino
33
// AUTHOR: Rob Tillaart
4-
// DATE: 2012-12-30
54
// PURPOSE: demo + timing of fillValue
65
// URL: https://github.com/RobTillaart/RunningAverage
76

examples/ra_300/ra_300.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// FILE: ra_300.ino
33
// AUTHOR: Rob Tillaart
4-
// DATE: 2021-05-26
54
// PURPOSE: demonstrate large (16 bit) buffer
65
// URL: https://github.com/RobTillaart/RunningAverage
76

0 commit comments

Comments
 (0)