Skip to content

Commit fe70c6c

Browse files
committed
fix CI build
1 parent 9ab768a commit fe70c6c

11 files changed

Lines changed: 47 additions & 11 deletions

File tree

.github/workflows/arduino-lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Arduino-lint
2+
13
on: [push, pull_request]
24
jobs:
35
lint:

MultiMap.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: MultiMap.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.1.3
5+
// VERSION: 0.1.4
66
// DATE: 2011-01-26
77
// PURPOSE: Arduino library for fast non-linear mapping or interpolation of values
88
// URL: https://github.com/RobTillaart/MultiMap
@@ -15,9 +15,11 @@
1515
// 0.1.1 2020-04-09
1616
// 0.1.2 2020-06-19 fix library.json
1717
// 0.1.3 2021-01-02 add arduino-CI
18-
//
18+
// 0.1.4 2021-05-27 fix arduino-lint
19+
20+
21+
#define MULTIMAP_LIB_VERSION (F("0.1.4"))
1922

20-
#define MULTIMAP_LIB_VERSION "0.1.3"
2123

2224
#include "Arduino.h"
2325

@@ -90,4 +92,5 @@ T multiMap(T val, T* _in, T* _out, uint8_t size)
9092
}
9193
*/
9294

95+
9396
// -- END OF FILE --

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
Arduino library for fast non-linear mapping or interpolation of values
99

10+
1011
## Description
1112

1213
In Arduino applications often the value of a sensor is mapped upon a more
@@ -35,12 +36,14 @@ points of the output\[\] array.
3536
there is no such restriction for the **output\[\]** array.
3637
- **Multimap()** automatically constrains the output to the first and last value in the **output\[\]** array.
3738

39+
3840
## Operation
3941

4042
See examples
4143

4244
Please note the fail example as this shows that in the intern math overflow can happen.
4345

46+
4447
## TODO
4548

4649
Investigate class implementation for performance.

examples/multimap_NTC/multimap_NTC.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// (c) : MIT
88
//
99

10+
1011
#include "MultiMap.h"
1112

1213
uint32_t start;
@@ -17,6 +18,7 @@ volatile float x, y, z;
1718
// Note this is a bit an extreme example,
1819
// normally you only make a multimap of the working range
1920

21+
2022
float in[] = {
2123
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
2224
};
@@ -27,6 +29,7 @@ float out[] = {
2729

2830
int sz = 33;
2931

32+
3033
void setup()
3134
{
3235
Serial.begin(115200);
@@ -64,10 +67,12 @@ void setup()
6467

6568
}
6669

70+
6771
void loop()
6872
{
6973
}
7074

75+
7176
// NTC formula
7277
float val(int sensorValueA1)
7378
{
@@ -80,4 +85,5 @@ float val(int sensorValueA1)
8085
return Temp;
8186
}
8287

88+
8389
// -- END OF FILE --

examples/multimap_NTC_int_FAIL/multimap_NTC_int_FAIL.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ uint32_t stop;
2323

2424
volatile float x, y, z;
2525

26+
2627
int in[] = {
2728
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
2829
};
@@ -33,6 +34,7 @@ int out[] = {
3334

3435
int sz = 33;
3536

37+
3638
void setup()
3739
{
3840
Serial.begin(115200);
@@ -67,13 +69,14 @@ void setup()
6769
Serial.print(z);
6870
Serial.println();
6971
}
70-
7172
}
7273

74+
7375
void loop()
7476
{
7577
}
7678

79+
7780
// NTC formula
7881
float val(int sensorValueA1)
7982
{
@@ -86,4 +89,5 @@ float val(int sensorValueA1)
8689
return Temp;
8790
}
8891

89-
// -- END OF FILE --
92+
93+
// -- END OF FILE --

examples/multimap_distance/multimap_distance.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
//
32
// FILE: multimap_distance.ino
43
// AUTHOR: Rob Tillaart
@@ -7,8 +6,10 @@
76
// DATE: 2020-04-09
87
//
98

9+
1010
#include "MultiMap.h"
1111

12+
1213
void setup()
1314
{
1415
Serial.begin(115200);
@@ -26,6 +27,7 @@ void setup()
2627
Serial.println("Done...");
2728
}
2829

30+
2931
void loop()
3032
{
3133
}
@@ -44,4 +46,5 @@ float sharp2cm(int val)
4446
return dist;
4547
}
4648

49+
4750
// -- END OF FILE --

examples/multimap_functions/multimap_functions.ino

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include "MultiMap.h"
1212

13+
1314
void setup()
1415
{
1516
Serial.begin(115200);
@@ -27,11 +28,12 @@ void setup()
2728
Serial.println("\nDone...");
2829
}
2930

31+
3032
void loop()
3133
{
32-
3334
}
3435

36+
3537
void test_normal_distribution()
3638
{
3739
// sort of normal distribution
@@ -48,6 +50,7 @@ void test_normal_distribution()
4850
}
4951
}
5052

53+
5154
void test_sinus()
5255
{
5356
// one sinus wave, amplitudo 1023
@@ -64,6 +67,7 @@ void test_sinus()
6467
}
6568
}
6669

70+
6771
void lest_log10()
6872
{
6973
// log10 * 100
@@ -80,6 +84,7 @@ void lest_log10()
8084
}
8185
}
8286

87+
8388
void test_exp2()
8489
{
8590
// 2^x
@@ -96,6 +101,7 @@ void test_exp2()
96101
}
97102
}
98103

104+
99105
void test_exp3()
100106
{
101107
// 3^x
@@ -112,6 +118,7 @@ void test_exp3()
112118
}
113119
}
114120

121+
115122
void test_sawtooth()
116123
{
117124
long sawtooth[] = { 0, 1000, 0, -1000, 0, 1000, -1000, 0 }; // size 8
@@ -127,4 +134,5 @@ void test_sawtooth()
127134
}
128135
}
129136

137+
130138
// -- END OF FILE --

examples/multimap_timing/multimap_timing.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ float fout[] = {111, 222, 555};
1919
uint32_t start;
2020
uint32_t stop;
2121

22+
2223
void setup()
2324
{
2425
Serial.begin(115200);
@@ -40,9 +41,10 @@ void setup()
4041
Serial.println(y, 4);
4142
}
4243

44+
4345
void loop()
4446
{
45-
4647
}
4748

49+
4850
// -- END OF FILE --

library.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/MultiMap.git"
1717
},
18-
"version":"0.1.3",
18+
"version": "0.1.4",
19+
"license": "MIT",
1920
"frameworks": "arduino",
2021
"platforms": "*"
2122
}

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name=MultiMap
2-
version=0.1.3
2+
version=0.1.4
33
author=Rob Tillaart <rob.tillaart@gmail.com>
44
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
55
sentence=Library for fast non-linear interpolation by means of two arrays.
66
paragraph=
77
category=Data Processing
8-
url=https://github.com/RobTillaart/Arduino/MultiMap
8+
url=https://github.com/RobTillaart/MultiMap
99
architectures=*
1010
includes=MultiMap.h
1111
depends=

0 commit comments

Comments
 (0)