[SX127x] Fixed typo
This commit is contained in:
parent
73e3da212a
commit
0de8ef6bce
1 changed files with 9 additions and 9 deletions
|
@ -48,7 +48,7 @@ void setFlag(void) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we sent aor received packet, set the flag
|
// we sent or received packet, set the flag
|
||||||
operationDone = true;
|
operationDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,17 +105,17 @@ void loop() {
|
||||||
if (transmissionState == RADIOLIB_ERR_NONE) {
|
if (transmissionState == RADIOLIB_ERR_NONE) {
|
||||||
// packet was successfully sent
|
// packet was successfully sent
|
||||||
Serial.println(F("transmission finished!"));
|
Serial.println(F("transmission finished!"));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Serial.print(F("failed, code "));
|
Serial.print(F("failed, code "));
|
||||||
Serial.println(transmissionState);
|
Serial.println(transmissionState);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// listen for response
|
// listen for response
|
||||||
radio.startReceive();
|
radio.startReceive();
|
||||||
transmitFlag = false;
|
transmitFlag = false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// the previous operation was reception
|
// the previous operation was reception
|
||||||
// print data and send another packet
|
// print data and send another packet
|
||||||
|
@ -125,21 +125,21 @@ void loop() {
|
||||||
if (state == RADIOLIB_ERR_NONE) {
|
if (state == RADIOLIB_ERR_NONE) {
|
||||||
// packet was successfully received
|
// packet was successfully received
|
||||||
Serial.println(F("[SX1278] Received packet!"));
|
Serial.println(F("[SX1278] Received packet!"));
|
||||||
|
|
||||||
// print data of the packet
|
// print data of the packet
|
||||||
Serial.print(F("[SX1278] Data:\t\t"));
|
Serial.print(F("[SX1278] Data:\t\t"));
|
||||||
Serial.println(str);
|
Serial.println(str);
|
||||||
|
|
||||||
// print RSSI (Received Signal Strength Indicator)
|
// print RSSI (Received Signal Strength Indicator)
|
||||||
Serial.print(F("[SX1278] RSSI:\t\t"));
|
Serial.print(F("[SX1278] RSSI:\t\t"));
|
||||||
Serial.print(radio.getRSSI());
|
Serial.print(radio.getRSSI());
|
||||||
Serial.println(F(" dBm"));
|
Serial.println(F(" dBm"));
|
||||||
|
|
||||||
// print SNR (Signal-to-Noise Ratio)
|
// print SNR (Signal-to-Noise Ratio)
|
||||||
Serial.print(F("[SX1278] SNR:\t\t"));
|
Serial.print(F("[SX1278] SNR:\t\t"));
|
||||||
Serial.print(radio.getSNR());
|
Serial.print(radio.getSNR());
|
||||||
Serial.println(F(" dB"));
|
Serial.println(F(" dB"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait a second before transmitting again
|
// wait a second before transmitting again
|
||||||
|
@ -154,6 +154,6 @@ void loop() {
|
||||||
// we're ready to process more packets,
|
// we're ready to process more packets,
|
||||||
// enable interrupt service routine
|
// enable interrupt service routine
|
||||||
enableInterrupt = true;
|
enableInterrupt = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue