kopia lustrzana https://github.com/jgromes/RadioLib
[SX127x] Fixed typos
rodzic
f1f995e9d8
commit
caa05f8ad8
|
@ -59,11 +59,11 @@ void loop() {
|
|||
|
||||
if (state == PREAMBLE_DETECTED) {
|
||||
// LoRa preamble was detected
|
||||
Serial.println(F(" detected preamble!"));
|
||||
Serial.println(F("detected preamble!"));
|
||||
|
||||
} else if (state == CHANNEL_FREE) {
|
||||
// no preamble was detected, channel is free
|
||||
Serial.println(F(" channel is free!"));
|
||||
Serial.println(F("channel is free!"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -97,8 +97,8 @@ void loop() {
|
|||
// transmit FSK packet
|
||||
int state = fsk.transmit("Hello World!");
|
||||
/*
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x56,
|
||||
0x78, 0xAB, 0xCD, 0xEF};
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x67,
|
||||
0x89, 0xAB, 0xCD, 0xEF};
|
||||
int state = lora.transmit(byteArr, 8);
|
||||
*/
|
||||
if (state == ERR_NONE) {
|
||||
|
@ -151,7 +151,7 @@ void loop() {
|
|||
|
||||
// address filtering can also be disabled
|
||||
// NOTE: calling this method will also erase previously set
|
||||
// node and broadcast address
|
||||
// node and broadcast address
|
||||
/*
|
||||
state = fsk.disableAddressFiltering();
|
||||
if (state != ERR_NONE) {
|
||||
|
|
|
@ -118,7 +118,7 @@ void loop() {
|
|||
// you can also read received data as byte array
|
||||
/*
|
||||
byte byteArr[8];
|
||||
int state = lora.receive(byteArr, 8);
|
||||
int state = lora.readData(byteArr, 8);
|
||||
*/
|
||||
|
||||
if (state == ERR_NONE) {
|
||||
|
|
|
@ -91,9 +91,6 @@ void setup() {
|
|||
// you can also change the settings at runtime
|
||||
// and check if the configuration was changed successfully
|
||||
|
||||
// different modules accept different parameters
|
||||
// see https://github.com/jgromes/LoRaLib/wiki/Supported-LoRa-modules
|
||||
|
||||
// set carrier frequency to 433.5 MHz
|
||||
if (loraSX1278.setFrequency(433.5) == ERR_INVALID_FREQUENCY) {
|
||||
Serial.println(F("Selected frequency is invalid for this module!"));
|
||||
|
@ -147,14 +144,14 @@ void setup() {
|
|||
}
|
||||
|
||||
// set amplifier gain to 1 (accepted range is 1 - 6, where 1 is maximum gain)
|
||||
// NOTE: set value to 0 to enable autmatic gain control
|
||||
// NOTE: set value to 0 to enable automatic gain control
|
||||
// leave at 0 unless you know what you're doing
|
||||
if (loraSX1278.setGain(1) == ERR_INVALID_GAIN) {
|
||||
Serial.println(F("Selected gain is invalid for this module!"));
|
||||
while (true);
|
||||
}
|
||||
|
||||
Serial.println(F("All settings succesfully changed!"));
|
||||
Serial.println(F("All settings successfully changed!"));
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
|
|
@ -63,7 +63,7 @@ void loop() {
|
|||
|
||||
// you can also transmit byte array up to 256 bytes long
|
||||
/*
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x56, 0x78, 0xAB, 0xCD, 0xEF};
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
|
||||
int state = lora.transmit(byteArr, 8);
|
||||
*/
|
||||
|
||||
|
@ -78,11 +78,11 @@ void loop() {
|
|||
|
||||
} else if (state == ERR_PACKET_TOO_LONG) {
|
||||
// the supplied packet was longer than 256 bytes
|
||||
Serial.println(F(" too long!"));
|
||||
Serial.println(F("too long!"));
|
||||
|
||||
} else if (state == ERR_TX_TIMEOUT) {
|
||||
// timeout occured while transmitting packet
|
||||
Serial.println(F(" timeout!"));
|
||||
// timeout occurred while transmitting packet
|
||||
Serial.println(F("timeout!"));
|
||||
|
||||
} else {
|
||||
// some other error occurred
|
||||
|
|
|
@ -67,9 +67,9 @@ void setup() {
|
|||
|
||||
// you can also transmit byte array up to 256 bytes long
|
||||
/*
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x56,
|
||||
0x78, 0xAB, 0xCD, 0xEF};
|
||||
state = lora.transmit(byteArr, 8);
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x67,
|
||||
0x89, 0xAB, 0xCD, 0xEF};
|
||||
state = lora.startTransmit(byteArr, 8);
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -129,9 +129,9 @@ void loop() {
|
|||
|
||||
// you can also transmit byte array up to 256 bytes long
|
||||
/*
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x56,
|
||||
0x78, 0xAB, 0xCD, 0xEF};
|
||||
int state = lora.transmit(byteArr, 8);
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x67,
|
||||
0x89, 0xAB, 0xCD, 0xEF};
|
||||
int state = lora.startTransmit(byteArr, 8);
|
||||
*/
|
||||
|
||||
// we're ready to send more packets,
|
||||
|
|
|
@ -43,7 +43,7 @@ int16_t SX127x::begin(uint8_t chipVersion, uint8_t syncWord, uint8_t currentLimi
|
|||
state = SX127x::setPreambleLength(preambleLength);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// initalize internal variables
|
||||
// initialize internal variables
|
||||
_dataRate = 0.0;
|
||||
|
||||
return(state);
|
||||
|
|
|
@ -480,7 +480,7 @@
|
|||
#define SX127X_FLAG_TX_READY 0b00100000 // 5 5 transmission ready (after PA ramp-up)
|
||||
#define SX127X_FLAG_PLL_LOCK 0b00010000 // 4 4 PLL locked
|
||||
#define SX127X_FLAG_RSSI 0b00001000 // 3 3 RSSI value exceeds RSSI threshold
|
||||
#define SX127X_FLAG_TIMEOUT 0b00000100 // 2 2 timeout occured
|
||||
#define SX127X_FLAG_TIMEOUT 0b00000100 // 2 2 timeout occurred
|
||||
#define SX127X_FLAG_PREAMBLE_DETECT 0b00000010 // 1 1 valid preamble was detected
|
||||
#define SX127X_FLAG_SYNC_ADDRESS_MATCH 0b00000001 // 0 0 sync address matched
|
||||
|
||||
|
@ -488,7 +488,7 @@
|
|||
#define SX127X_FLAG_FIFO_FULL 0b10000000 // 7 7 FIFO is full
|
||||
#define SX127X_FLAG_FIFO_EMPTY 0b01000000 // 6 6 FIFO is empty
|
||||
#define SX127X_FLAG_FIFO_LEVEL 0b00100000 // 5 5 number of bytes in FIFO exceeds FIFO_THRESHOLD
|
||||
#define SX127X_FLAG_FIFO_OVERRUN 0b00010000 // 4 4 FIFO overrun occured
|
||||
#define SX127X_FLAG_FIFO_OVERRUN 0b00010000 // 4 4 FIFO overrun occurred
|
||||
#define SX127X_FLAG_PACKET_SENT 0b00001000 // 3 3 packet was successfully sent
|
||||
#define SX127X_FLAG_PAYLOAD_READY 0b00000100 // 2 2 packet was successfully received
|
||||
#define SX127X_FLAG_CRC_OK 0b00000010 // 1 1 CRC check passed
|
||||
|
@ -565,7 +565,7 @@ class SX127x: public PhysicalLayer {
|
|||
int16_t begin(uint8_t chipVersion, uint8_t syncWord, uint8_t currentLimit, uint16_t preambleLength);
|
||||
|
||||
/*!
|
||||
\brief Reset method. Will reset the chip to the default state using RST pin. Declared pure virtual since SX1272 and SX1278 implmentations differ.
|
||||
\brief Reset method. Will reset the chip to the default state using RST pin. Declared pure virtual since SX1272 and SX1278 implementations differ.
|
||||
*/
|
||||
virtual void reset() = 0;
|
||||
|
||||
|
@ -663,7 +663,6 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
int16_t packetMode();
|
||||
|
||||
|
||||
// interrupt methods
|
||||
|
||||
/*!
|
||||
|
@ -880,7 +879,7 @@ class SX127x: public PhysicalLayer {
|
|||
/*!
|
||||
\brief Sets RSSI measurement configuration in FSK mode.
|
||||
|
||||
\param smoothingSamples Number of samples taken to avergae the RSSI result.
|
||||
\param smoothingSamples Number of samples taken to average the RSSI result.
|
||||
numSamples = 2 ^ (1 + smoothingSamples), allowed values are in range 0 (2 samples) - 7 (256 samples)
|
||||
|
||||
\param offset Signed RSSI offset that will be automatically compensated. 1 dB per LSB, defaults to 0, allowed values are in range -16 dB to +15 dB.
|
||||
|
|
Ładowanie…
Reference in New Issue