Skip to content

Commit

Permalink
Add define for open RX scan mode channel
Browse files Browse the repository at this point in the history
Open RX always uses channel 0 according to the documentation
  • Loading branch information
cujomalainey committed Jul 4, 2019
1 parent 99c676c commit 22a1359
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/RSSIScan/RSSIScan.ino
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ void setup()
ant.send(snk);
parseMessage();

ac.setChannel(0);
ac.setChannel(OPEN_RX_SCAN_MODE_CHANNEL);
ac.setChannelType(CHANNEL_TYPE_BIDIRECTIONAL_RECEIVE); //can't wildcard this
ac.setChannelNetwork(0);
ant.send(ac);
parseMessage();

ci.setChannel(0);
ci.setChannel(OPEN_RX_SCAN_MODE_CHANNEL);
ci.setDeviceNumber(0);
ci.setDeviceType(0);
ci.setTransmissionType(0);
Expand All @@ -58,7 +58,7 @@ void setup()
ant.send(lb);
parseMessage();

crf.setChannel(0);
crf.setChannel(OPEN_RX_SCAN_MODE_CHANNEL);
crf.setRfFrequency(0); //can't wildcard this
ant.send(crf);
parseMessage();
Expand Down
5 changes: 5 additions & 0 deletions src/ANT_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
#define CHANNEL_TYPE_SHARED_RECEIVE 0x20
#define CHANNEL_TYPE_SHARED_TRANSMIT 0x30

/**
* Open Rx Scan Mode information
*/
#define OPEN_RX_SCAN_MODE_CHANNEL 0

/**
* Channel Response Message Codes
*/
Expand Down

0 comments on commit 22a1359

Please sign in to comment.