Skip to content

Commit dcbc9a9

Browse files
author
Minoru Tomobe
committed
Change method CAD(void) to channelActivityDetection(void).
1 parent 98b1259 commit dcbc9a9

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

API.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ void onCadDone(boolean signalDetected) {
261261
### Channel Activity detection mode
262262
Puts the radio in channel activity detection mode.
263263
```arduino
264-
LoRa.CAD();
264+
LoRa.channelActivityDetection();
265265
```
266266
## Other radio modes
267267

examples/LoRaCADCallback/LoRaCADCallback.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void setup() {
2121
// register the receive callback
2222
LoRa.onReceive(onReceive);
2323
// put the radio into CAD mode
24-
LoRa.CAD();
24+
LoRa.channelActivityDetection();
2525
}
2626

2727
void loop() {
@@ -36,7 +36,7 @@ void onCadDone(boolean signalDetected) {
3636
LoRa.receive();
3737
} else {
3838
// try next activity dectection
39-
LoRa.CAD();
39+
LoRa.channelActivityDetection();
4040
}
4141
}
4242

@@ -54,5 +54,5 @@ void onReceive(int packetSize) {
5454
Serial.println(LoRa.packetRssi());
5555

5656
// put the radio into CAD mode
57-
LoRa.CAD();
57+
LoRa.channelActivityDetection();
5858
}

keywords.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ flush KEYWORD2
3333
onReceive KEYWORD2
3434
onTxDone KEYWORD2
3535
onCadDone KEYWORD2
36-
CAD KEYWORD2
36+
channelActivityDetection KEYWORD2
3737
receive KEYWORD2
3838
idle KEYWORD2
3939
sleep KEYWORD2

src/LoRa.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ void LoRaClass::receive(int size)
423423
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_RX_CONTINUOUS);
424424
}
425425

426-
void LoRaClass::CAD(void)
426+
void LoRaClass::channelActivityDetection(void)
427427
{
428428
writeRegister(REG_DIO_MAPPING_1, 0x80);// DIO0 => CADDONE
429429
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_CAD);

src/LoRa.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class LoRaClass : public Stream {
6161
void onTxDone(void(*callback)());
6262

6363
void receive(int size = 0);
64-
void CAD(void);
64+
void channelActivityDetection(void);
6565
#endif
6666
void idle();
6767
void sleep();

0 commit comments

Comments
 (0)