Skip to content

Commit 3f66f01

Browse files
committed
0.2.4 Complex
1 parent 0a5792b commit 3f66f01

File tree

9 files changed

+43
-26
lines changed

9 files changed

+43
-26
lines changed

libraries/Complex/.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

libraries/Complex/complex.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: Complex.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.2.3
5+
// VERSION: 0.2.4
66
// PURPOSE: Arduino library for Complex math
77
// URL: https://github.com/RobTillaart/Complex
88
// http://arduino.cc/playground/Main/ComplexMath
@@ -13,7 +13,7 @@
1313
#include "Printable.h"
1414

1515

16-
#define COMPLEX_LIB_VERSION "0.2.3"
16+
#define COMPLEX_LIB_VERSION (F("0.2.4"))
1717

1818

1919
class Complex: public Printable
@@ -108,6 +108,9 @@ class Complex: public Printable
108108
Complex gonioHelper2(const byte);
109109
};
110110

111+
111112
static Complex one(1, 0);
112113

114+
113115
// -- END OF FILE --
116+

libraries/Complex/examples/array/array.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
//
22
// FILE: array.ino
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.00
4+
// VERSION: 0.1.0
55
// DATE: 2015-10-18
66
//
77
// PUPROSE: example complex array
88
//
99

10+
1011
#include "Complex.h"
1112

1213
Complex samples[100];
1314

15+
1416
void setup()
1517
{
1618
Serial.begin(115200);
1719
Serial.println(__FILE__);
18-
Serial.println("\n Complex numbers array example");
19-
Serial.println(" Library version: ");
20+
Serial.print("\n Complex numbers array example: ");
2021
Serial.println(COMPLEX_LIB_VERSION);
2122

2223
Serial.println("\n1. Read into array");

libraries/Complex/examples/complex/complex.ino

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
//
88
// Serial.print(Complex) supported since 0.1.05
99

10+
1011
#include "Complex.h"
1112

13+
1214
void setup()
1315
{
1416
Serial.begin(115200);
@@ -225,9 +227,11 @@ void setup()
225227
Serial.println(one);
226228
}
227229

230+
228231
void loop()
229232
{
230233
}
231-
//
232-
// END OF FILE
233-
//
234+
235+
236+
// -- END OF FILE --
237+

libraries/Complex/examples/performance/performance.ino

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
//
88
// Serial.print(Complex) supported since 0.1.05
99

10+
1011
#include "Complex.h"
1112

1213
unsigned long start, stop, total;
1314
double re, im, m, p;
1415

16+
1517
void setup()
1618
{
1719
Serial.begin(115200);
@@ -421,9 +423,11 @@ void setup()
421423
Serial.println("\n.. Complex done");
422424
}
423425

426+
424427
void loop()
425428
{
426429
}
427-
//
428-
// END OF FILE
429-
//
430+
431+
432+
// -- END OF FILE --
433+

libraries/Complex/keywords.txt

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

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

66

@@ -54,11 +54,6 @@ c_acoth KEYWORD2
5454

5555

5656
# Constants (LITERAL1)
57-
BITARRAY_LIB_VERSION LITERAL1
58-
BA_ERR LITERAL1
59-
BA_OK LITERAL1
60-
BA_NO_MEMORY_ERR LITERAL1
61-
BA_IDX_RANGE_ERR LITERAL1
62-
BA_ELEMENT_SIZE_ERR LITERAL1
63-
BA_SIZE_ERR LITERAL1
57+
COMPLEX_LIB_VERSION LITERAL1
58+
6459

libraries/Complex/library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/Complex.git"
1717
},
18-
"version": "0.2.3",
18+
"version": "0.2.4",
1919
"license": "MIT",
2020
"frameworks": "arduino",
2121
"platforms": "*"

libraries/Complex/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Complex
2-
version=0.2.3
2+
version=0.2.4
33
author=Rob Tillaart <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=Arduino library for Complex math.

libraries/Complex/test/unit_test_001.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// assertNull(actual)
2121
// assertNotNull(actual)
2222

23+
2324
#include <ArduinoUnitTests.h>
2425

2526

@@ -31,13 +32,15 @@ unittest_setup()
3132
{
3233
}
3334

35+
3436
unittest_teardown()
3537
{
3638
}
3739

40+
3841
unittest(test_constructor)
3942
{
40-
fprintf(stderr, COMPLEX_LIB_VERSION);
43+
fprintf(stderr, "COMPLEX_LIB_VERSION: %s\n", (char *) COMPLEX_LIB_VERSION);
4144

4245
Complex c1(10.0, -2.0);
4346
Complex c2(3, 0);
@@ -66,6 +69,7 @@ unittest(test_constructor)
6669
assertEqualFloat(PI/4, c1.phase(), 0.0001);
6770
}
6871

72+
6973
unittest(test_basic_math)
7074
{
7175
Complex a(10.0, -2.5);
@@ -108,6 +112,7 @@ unittest(test_basic_math)
108112
assertEqual(-2.5, a.imag());
109113
}
110114

115+
111116
unittest(test_basic_functions)
112117
{
113118
Complex a;
@@ -180,6 +185,7 @@ unittest(test_power_functions)
180185
assertEqual(0, b.imag());
181186
}
182187

188+
183189
unittest(test_gonio_functions_I)
184190
{
185191
Complex a(3, 4);

0 commit comments

Comments
 (0)