mirror of
https://github.com/sandeepmistry/arduino-LoRa.git
synced 2025-04-19 13:02:14 +03:00
Change method CAD(void) to channelActivityDetection(void).
This commit is contained in:
parent
98b1259032
commit
dcbc9a9995
2
API.md
2
API.md
@ -261,7 +261,7 @@ void onCadDone(boolean signalDetected) {
|
||||
### Channel Activity detection mode
|
||||
Puts the radio in channel activity detection mode.
|
||||
```arduino
|
||||
LoRa.CAD();
|
||||
LoRa.channelActivityDetection();
|
||||
```
|
||||
## Other radio modes
|
||||
|
||||
|
@ -21,7 +21,7 @@ void setup() {
|
||||
// register the receive callback
|
||||
LoRa.onReceive(onReceive);
|
||||
// put the radio into CAD mode
|
||||
LoRa.CAD();
|
||||
LoRa.channelActivityDetection();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
@ -36,7 +36,7 @@ void onCadDone(boolean signalDetected) {
|
||||
LoRa.receive();
|
||||
} else {
|
||||
// try next activity dectection
|
||||
LoRa.CAD();
|
||||
LoRa.channelActivityDetection();
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,5 +54,5 @@ void onReceive(int packetSize) {
|
||||
Serial.println(LoRa.packetRssi());
|
||||
|
||||
// put the radio into CAD mode
|
||||
LoRa.CAD();
|
||||
LoRa.channelActivityDetection();
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ flush KEYWORD2
|
||||
onReceive KEYWORD2
|
||||
onTxDone KEYWORD2
|
||||
onCadDone KEYWORD2
|
||||
CAD KEYWORD2
|
||||
channelActivityDetection KEYWORD2
|
||||
receive KEYWORD2
|
||||
idle KEYWORD2
|
||||
sleep KEYWORD2
|
||||
|
@ -423,7 +423,7 @@ void LoRaClass::receive(int size)
|
||||
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_RX_CONTINUOUS);
|
||||
}
|
||||
|
||||
void LoRaClass::CAD(void)
|
||||
void LoRaClass::channelActivityDetection(void)
|
||||
{
|
||||
writeRegister(REG_DIO_MAPPING_1, 0x80);// DIO0 => CADDONE
|
||||
writeRegister(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_CAD);
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
void onTxDone(void(*callback)());
|
||||
|
||||
void receive(int size = 0);
|
||||
void CAD(void);
|
||||
void channelActivityDetection(void);
|
||||
#endif
|
||||
void idle();
|
||||
void sleep();
|
||||
|
Loading…
x
Reference in New Issue
Block a user