Skip to content

Commit d064f84

Browse files
authored
update build-CI, badges, minor edits (#4)
1 parent e511437 commit d064f84

File tree

9 files changed

+40
-10
lines changed

9 files changed

+40
-10
lines changed

.arduino-ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ compile:
22
# Choosing to run compilation tests on 2 different Arduino platforms
33
platforms:
44
- uno
5-
- leonardo
6-
- due
7-
- zero
5+
# - due
6+
# - zero
7+
# - leonardo
8+
- m4
9+
- esp32
10+
# - esp8266
11+
# - mega2560

.github/workflows/arduino_test_runner.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ name: Arduino CI
44
on: [push, pull_request]
55

66
jobs:
7-
arduino_ci:
7+
runTest:
88
runs-on: ubuntu-latest
99

1010
steps:
1111
- uses: actions/checkout@v2
12-
- uses: Arduino-CI/action@master
13-
# Arduino-CI/action@v0.1.1
12+
- uses: ruby/setup-ruby@v1
13+
with:
14+
ruby-version: 2.6
15+
- run: |
16+
gem install arduino_ci
17+
arduino_ci.rb

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11

22
[![Arduino CI](https://github.com/RobTillaart/MultiMap/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
3+
[![Arduino-lint](https://github.com/RobTillaart/MultiMap/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/MultiMap/actions/workflows/arduino-lint.yml)
4+
[![JSON check](https://github.com/RobTillaart/MultiMap/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/MultiMap/actions/workflows/jsoncheck.yml)
35
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/MultiMap/blob/master/LICENSE)
46
[![GitHub release](https://img.shields.io/github/release/RobTillaart/MultiMap.svg?maxAge=3600)](https://github.com/RobTillaart/MultiMap/releases)
57

8+
69
# MultiMap
710

811
Arduino library for fast non-linear mapping or interpolation of values
@@ -44,6 +47,12 @@ See examples
4447
Please note the fail example as this shows that in the intern math overflow can happen.
4548

4649

47-
## TODO
50+
## Future
4851

49-
Investigate class implementation for performance.
52+
- Investigate class implementation for performance / footprint
53+
- flag if input value was "IN_MIN" < input < "IN_MAX",
54+
now it is constrained without user being informed.
55+
- should the lookup tables be merged into one array of pairs?
56+
- you cannot reuse e.g. the input array then.
57+
-
58+
-

examples/multimap_NTC/multimap_NTC.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// DATE: 2020-04-09
77
// (c) : MIT
88
//
9+
// example uses multiMap to calculate the temperature from an 10K NTC.
910

1011

1112
#include "MultiMap.h"
@@ -22,11 +23,13 @@ volatile float x, y, z;
2223
float in[] = {
2324
0, 1, 3, 8, 13, 20, 25, 32, 50, 60, 72, 85, 100, 145, 200, 250, 300, 400, 500, 600, 650, 700, 753, 800, 830, 870, 900, 936, 964, 985, 1000, 1017, 1023
2425
};
26+
2527
float out[] = {
2628
-273.15, -71.65, -60.69, -49.81, -43.97, -38.50, -35.54, -32.16, -25.72, -22.95, -20.08, -17.37, -14.62, -7.90, -1.43, 3.57,
2729
8.08, 16.34, 24.30, 32.64, 37.17, 42.13, 48.05, 54.19, 58.75, 66.03, 72.87, 83.85, 96.51, 111.46, 129.49, 182.82, 301.82
2830
};
2931

32+
3033
int sz = 33;
3134

3235

examples/multimap_NTC_int_FAIL/multimap_NTC_int_FAIL.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ volatile float x, y, z;
2727
int in[] = {
2828
0, 1, 3, 8, 13, 20, 25, 32, 50, 60, 72, 85, 100, 145, 200, 250, 300, 400, 500, 600, 650, 700, 753, 800, 830, 870, 900, 936, 964, 985, 1000, 1017, 1023
2929
};
30+
3031
int out[] = {
3132
-27315, -7165, -6069, -4981, -4397, -3850, -3554, -3216, -2572, -2295, -2008, -1737, -1462, -790, -143, 357, 808, 1634, 2430, 3264,
3233
3717, 4213, 4805, 5419, 5875, 6603, 7287, 8385, 9651, 11146, 12949, 18282, 30182

examples/multimap_distance/multimap_distance.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// PURPOSE: demo
66
// DATE: 2020-04-09
77
//
8+
// example simulates the lookup graph of a distance sensor
89

910

1011
#include "MultiMap.h"

examples/multimap_functions/multimap_functions.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// DATE: 2020-04-09
77
// (c) : MIT
88
//
9+
// example show use of multiMap to approximate some well known functions.
10+
911

1012

1113
#include "MultiMap.h"

examples/multimap_timing/multimap_timing.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// DATE: 2020-04-09
77
// (c) : MIT
88
//
9+
// example measures the performance of multiMap <int> vs <float>
910

1011

1112
#include "MultiMap.h"
@@ -30,15 +31,20 @@ void setup()
3031
start = micros();
3132
float x = multiMap<int>(12, in, out, 3);
3233
stop = micros();
34+
Serial.print("time <int>: \t");
3335
Serial.println(stop - start);
3436
Serial.println(x, 4);
3537
delay(10); // make sure print has ended
3638

3739
start = micros();
3840
float y = multiMap<float>(12, fin, fout, 3);
3941
stop = micros();
42+
Serial.print("time <float>: \t");
4043
Serial.println(stop - start);
4144
Serial.println(y, 4);
45+
delay(10); // make sure print has ended
46+
47+
Serial.println("\ndone...");
4248
}
4349

4450

keywords.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Syntax Coloring Map For multiMap
1+
# Syntax Colouring Map For multiMap
22

3-
# Datatypes (KEYWORD1)
3+
# Data types (KEYWORD1)
44

55

66
# Methods and Functions (KEYWORD2)

0 commit comments

Comments
 (0)