Skip to content

Commit a4a752e

Browse files
committed
Merge branch 'develop'
merge in release v2.0.0
2 parents a5b73d7 + b73dc4d commit a4a752e

File tree

158 files changed

+1953
-772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+1953
-772
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/deploy.sh
33
.DS_Store
44
.pioenvs
5+
.pio
56
tags
67

78
# ignore any soft device source for testing
@@ -18,3 +19,9 @@ ant_interface.h
1819

1920
# ignore main file for testing
2021
src/main.cpp
22+
.pio/build/project.checksum
23+
.vscode/c_cpp_properties.json
24+
.vscode/extensions.json
25+
.vscode/launch.json
26+
/*.cpp
27+
/zephyr

.travis.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ cache:
2929
- "~/.platformio"
3030

3131
env:
32-
- PLATFORMIO_CI_SRC=examples/AntVersion/AntVersion.ino
33-
- PLATFORMIO_CI_SRC=examples/Callbacks/Callbacks.ino
34-
- PLATFORMIO_CI_SRC=examples/OpenChannel/OpenChannel.ino
35-
- PLATFORMIO_CI_SRC=examples/ProximitySearch/ProximitySearch.ino
36-
- PLATFORMIO_CI_SRC=examples/RSSIScan/RSSIScan.ino
37-
- PLATFORMIO_CI_SRC=examples/SearchList/SearchList.ino
38-
- PLATFORMIO_CI_SRC=examples/SoftwareSerialOpenChannel/SoftwareSerialOpenChannel.ino
39-
- PLATFORMIO_CI_SRC=examples/TxCounter/TxCounter.ino
32+
- PLATFORMIO_CI_SRC=examples/Arduino/AntVersion/AntVersion.ino
33+
- PLATFORMIO_CI_SRC=examples/Arduino/Callbacks/Callbacks.ino
34+
- PLATFORMIO_CI_SRC=examples/Arduino/OpenChannel/OpenChannel.ino
35+
- PLATFORMIO_CI_SRC=examples/Arduino/ProximitySearch/ProximitySearch.ino
36+
- PLATFORMIO_CI_SRC=examples/Arduino/RSSIScan/RSSIScan.ino
37+
- PLATFORMIO_CI_SRC=examples/Arduino/SearchList/SearchList.ino
38+
- PLATFORMIO_CI_SRC=examples/Arduino/SoftwareSerialOpenChannel/SoftwareSerialOpenChannel.ino
39+
- PLATFORMIO_CI_SRC=examples/Arduino/TxCounter/TxCounter.ino
4040

4141
install:
4242
- pip install -U platformio

COPYING

100755100644
File mode changed.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Arduino library for communicating with ANT radios, with support for nRF51 device
66

77
[![Build Status](https://travis-ci.org/cujomalainey/ant-arduino.svg?branch=master)](https://travis-ci.org/cujomalainey/ant-arduino)
88
[![Test Status](https://img.shields.io/circleci/build/github/cujomalainey/ant-arduino?label=test)](https://circleci.com/gh/cujomalainey/ant-arduino)
9-
[![BCH compliance](https://bettercodehub.com/edge/badge/cujomalainey/ant-arduino?branch=master)](https://bettercodehub.com/)
109

1110
## News
1211

12+
* 06/28/2020 ant-arduino v2.0.0 released with mbed support
1313
* 10/01/2017 [Antplus-arduino](https://github.com/cujomalainey/antplus-arduino) released
1414
* 09/30/2017 Callback system complete, v1.0.0 released
1515
* 09/10/2017 System refactor complete

examples/AntVersion/AntVersion.ino examples/Arduino/AntVersion/AntVersion.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "ANT.h"
1111
#define BAUD_RATE 9600
12-
Ant ant = Ant();
12+
ArduinoSerialAnt ant;
1313

1414
void parseMessage();
1515
void parseEventMessage(uint8_t code);

examples/Callbacks/Callbacks.ino examples/Arduino/Callbacks/Callbacks.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "ANT.h"
1111
#define BAUD_RATE 9600
12-
AntWithCallbacks ant = AntWithCallbacks();
12+
ArduinoSerialAntWithCallbacks ant;
1313

1414
// Arbitrary key, if you want to connect to ANT+, you must get the key from thisisant.com
1515
const uint8_t NETWORK_KEY[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};
@@ -166,4 +166,4 @@ void handleChannelEventResponse(ChannelEventResponse& cer, uintptr_t data) {
166166
bool itsAlive(StartUpMessage& sm, uintptr_t data) {
167167
Serial.println("Radio Reset!");
168168
return true;
169-
}
169+
}

examples/OpenChannel/OpenChannel.ino examples/Arduino/OpenChannel/OpenChannel.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include "ANT.h"
1414
#define BAUD_RATE 9600
15-
Ant ant = Ant();
15+
ArduinoSerialAnt ant;
1616

1717
// Arbitrary key, if you want to connect to ANT+, you must get the key from thisisant.com
1818
const uint8_t NETWORK_KEY[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};

examples/ProximitySearch/ProximitySearch.ino examples/Arduino/ProximitySearch/ProximitySearch.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include "ANT.h"
1414
#define BAUD_RATE 9600
15-
Ant ant = Ant();
15+
ArduinoSerialAnt ant;
1616

1717
// Arbitrary key, if you want to connect to ANT+, you must get the key from thisisant.com
1818
const uint8_t NETWORK_KEY[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};

examples/RSSIScan/RSSIScan.ino examples/Arduino/RSSIScan/RSSIScan.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include "ANT.h"
1212
#define BAUD_RATE 9600
13-
Ant ant = Ant();
13+
ArduinoSerialAnt ant;
1414

1515
const uint8_t NETWORK_KEY[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};
1616

@@ -41,13 +41,13 @@ void setup()
4141
ant.send(snk);
4242
parseMessage();
4343

44-
ac.setChannel(0);
44+
ac.setChannel(OPEN_RX_SCAN_MODE_CHANNEL);
4545
ac.setChannelType(CHANNEL_TYPE_BIDIRECTIONAL_RECEIVE); //can't wildcard this
4646
ac.setChannelNetwork(0);
4747
ant.send(ac);
4848
parseMessage();
4949

50-
ci.setChannel(0);
50+
ci.setChannel(OPEN_RX_SCAN_MODE_CHANNEL);
5151
ci.setDeviceNumber(0);
5252
ci.setDeviceType(0);
5353
ci.setTransmissionType(0);
@@ -58,7 +58,7 @@ void setup()
5858
ant.send(lb);
5959
parseMessage();
6060

61-
crf.setChannel(0);
61+
crf.setChannel(OPEN_RX_SCAN_MODE_CHANNEL);
6262
crf.setRfFrequency(0); //can't wildcard this
6363
ant.send(crf);
6464
parseMessage();

examples/SearchList/SearchList.ino examples/Arduino/SearchList/SearchList.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define DEVICE_TYPE_HR 120
2424
#define ANTPLUS_FREQUENCY 57
2525

26-
Ant ant = Ant();
26+
ArduinoSerialAnt ant;
2727

2828
// Arbitrary key, if you want to connect to ANT+, you must get the key from thisisant.com
2929
const uint8_t NETWORK_KEY[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};
@@ -68,12 +68,12 @@ void setup()
6868
snk.setKey((uint8_t*)NETWORK_KEY);
6969
ant.send(snk);
7070
parseMessage();
71-
71+
7272
// open all channels
7373
for (uint8_t i = 0; i < maxChannels; i++) {
7474
ac = AssignChannel();
7575
ac.setChannel(i);
76-
ac.setChannelType(CHANNEL_TYPE_BIDIRECTIONAL_RECEIVE);
76+
ac.setChannelType(CHANNEL_TYPE_BIDIRECTIONAL_RECEIVE);
7777
ac.setChannelNetwork(0);
7878
ant.send(ac);
7979
parseMessage();

examples/SoftwareSerialOpenChannel/SoftwareSerialOpenChannel.ino examples/Arduino/SoftwareSerialOpenChannel/SoftwareSerialOpenChannel.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define BAUD_RATE 9600
1616
#define SOFT_RX_PIN 2
1717
#define SOFT_TX_PIN 3
18-
Ant ant = Ant();
18+
ArduinoSerialAnt ant;
1919
SoftwareSerial soft(SOFT_RX_PIN, SOFT_TX_PIN);
2020

2121
// Arbitrary key, if you want to connect to ANT+, you must get the key from thisisant.com

0 commit comments

Comments
 (0)