Skip to content

Commit 17f1a1e

Browse files
committed
Upgraded to Arduino 1.5.x+ library specifications.
1 parent 8a1a72e commit 17f1a1e

18 files changed

+57
-65
lines changed

.gitignore

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
1-
# Compiled Object files
2-
*.slo
3-
*.lo
4-
*.o
5-
*.obj
6-
7-
# Precompiled Headers
8-
*.gch
9-
*.pch
10-
11-
# Compiled Dynamic libraries
12-
*.so
13-
*.dylib
14-
*.dll
15-
16-
# Fortran module files
17-
*.mod
18-
19-
# Compiled Static libraries
20-
*.lai
21-
*.la
22-
*.a
23-
*.lib
24-
25-
# Executables
26-
*.exe
27-
*.out
28-
*.app
1+
.DS_Store
2+
/.idea
3+
/build
4+
/bin
5+
/lib
6+
/sftp-config.json
7+
.tags
8+
.tags_sorted_by_file

examples/AdvancedArrayTester/AdvancedArrayTester.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include "Arduino.h"
2-
#include "Streaming.h"
3-
#include "Array.h"
1+
#include <Arduino.h>
2+
#include <Streaming.h>
3+
#include <Array.h>
44

55

6-
const unsigned int BAUDRATE = 9600;
6+
const long BAUDRATE = 115200;
77
const unsigned int MAX_SIZE = 10;
88

99
Array<int, MAX_SIZE> array;

examples/ArrayTester/ArrayTester.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include "Arduino.h"
2-
#include "Streaming.h"
3-
#include "Array.h"
1+
#include <Arduino.h>
2+
#include <Streaming.h>
3+
#include <Array.h>
44

55

6-
const int BAUDRATE = 9600;
6+
const long BAUDRATE = 115200;
77

88
const int ELEMENT_COUNT = 5;
99

examples/MultiArrayPrinter/Constants.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace constants
55
{
6-
const unsigned int baudrate = 9600;
6+
const long baudrate = 115200;
77

88
const int x_default[] = {10};
99
const int y_default[] = {11,12};

examples/MultiArrayPrinter/Constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum {RESERVED_X_COUNT=3};
1212
enum {RESERVED_Y_COUNT=0};
1313
enum {RESERVED_Z_COUNT=1};
1414

15-
extern const unsigned int baudrate;
15+
extern const long baudrate;
1616

1717
extern const int x_default[X_SIZE];
1818
extern const int y_default[Y_SIZE];

examples/MultiArrayPrinter/MultiArrayPrinter.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#include "Arduino.h"
2-
#include "Streaming.h"
3-
#include "Array.h"
1+
#include <Arduino.h>
2+
#include <Streaming.h>
3+
#include <Array.h>
4+
45
#include "Constants.h"
56
#include "Device.h"
67

examples/MultiArrayPrinter/Server.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
// ----------------------------------------------------------------------------
88
#ifndef SERVER_H
99
#define SERVER_H
10-
#include "Arduino.h"
11-
#include "Streaming.h"
12-
#include "Array.h"
10+
#include <Arduino.h>
11+
#include <Streaming.h>
12+
#include <Array.h>
13+
1314
#include "Constants.h"
1415

1516

examples/MultiArrayPrinter/ServerDefinitions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifndef SERVER_DEFINITIONS_H
99
#define SERVER_DEFINITIONS_H
1010

11+
1112
template <typename T,
1213
unsigned int X_SIZE,
1314
unsigned int Y_SIZE,

examples/MultiArrayTester/Constants.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace constants
55
{
6-
const unsigned int baudrate = 9600;
6+
const long baudrate = 115200;
77

88
const int x_default[] = {1,2,3};
99
const int y_default[] = {4,5,6,7};

examples/MultiArrayTester/Constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ enum {X_SIZE=3};
88
enum {Y_SIZE=4};
99
enum {Z_SIZE=5};
1010

11-
extern const unsigned int baudrate;
11+
extern const long baudrate;
1212

1313
extern const int x_default[X_SIZE];
1414
extern const int y_default[Y_SIZE];

examples/MultiArrayTester/MultiArray.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
// ----------------------------------------------------------------------------
88
#ifndef MULTI_ARRAY_H
99
#define MULTI_ARRAY_H
10-
#include "Arduino.h"
11-
#include "Streaming.h"
12-
#include "Array.h"
10+
#include <Arduino.h>
11+
#include <Streaming.h>
12+
#include <Array.h>
13+
1314
#include "Constants.h"
1415

16+
1517
class MultiArray
1618
{
1719
public:

examples/MultiArrayTester/MultiArrayTester.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#include "Arduino.h"
2-
#include "Streaming.h"
3-
#include "Array.h"
1+
#include <Arduino.h>
2+
#include <Streaming.h>
3+
#include <Array.h>
4+
45
#include "Constants.h"
56
#include "MultiArray.h"
67
#include "TemplatedMultiArray.h"

examples/MultiArrayTester/TemplatedMultiArray.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// ----------------------------------------------------------------------------
88
#ifndef TEMPLATED_MULTI_ARRAY_H
99
#define TEMPLATED_MULTI_ARRAY_H
10-
#include "Arduino.h"
11-
#include "Streaming.h"
12-
#include "Array.h"
10+
#include <Arduino.h>
11+
#include <Streaming.h>
12+
#include <Array.h>
1313

1414

1515
template <typename T,

examples/MultiArrayTester/TemplatedMultiArrayDefinitions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifndef TEMPLATED_MULTI_ARRAY_DEFINITIONS_H
99
#define TEMPLATED_MULTI_ARRAY_DEFINITIONS_H
1010

11+
1112
template <typename T,
1213
unsigned int X_SIZE,
1314
unsigned int Y_SIZE,

library.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Array
2+
version=1.0.0
3+
author=Peter Polidoro <polidorop@janelia.hhmi.org>
4+
maintainer=Peter Polidoro <polidorop@janelia.hhmi.org>
5+
sentence=An array container similar to the C++ std::array
6+
paragraph=Like this project? Please star it on GitHub!
7+
category=Data Storage
8+
url=https://github.com/janelia-arduino/Array.git
9+
architectures=*

Array.h renamed to src/Array.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
#define ARRAY_H
1010

1111
#ifdef ARDUINO
12-
#if ARDUINO >= 100
13-
#include <Arduino.h>
14-
#else
15-
#include <WProgram.h>
16-
#endif
12+
#include <Arduino.h>
1713
#else
18-
#include <cstddef>
14+
#include <cstddef>
1915
#endif
2016

17+
2118
template <typename T, size_t MAX_SIZE>
2219
class Array
2320
{
@@ -75,6 +72,6 @@ inline Print & operator <<(Print & stream, Array<T,MAX_SIZE> & array)
7572
return stream;
7673
}
7774

78-
#include "ArrayDefinitions.h"
75+
#include "Array/ArrayDefinitions.h"
7976

8077
#endif

Array.cpp renamed to src/Array/Array.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55
// Authors:
66
// Peter Polidoro polidorop@janelia.hhmi.org
77
// ----------------------------------------------------------------------------
8-
#include "Array.h"
9-
10-
8+
#include "../Array.h"

ArrayDefinitions.h renamed to src/Array/ArrayDefinitions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <cstring>
1313
#endif
1414

15+
1516
template <typename T, size_t MAX_SIZE>
1617
Array<T, MAX_SIZE>::Array()
1718
{

0 commit comments

Comments
 (0)