Added getPacketLength to examples (#214)

This commit is contained in:
jgromes 2023-07-15 19:36:23 +02:00
parent 498c5d5e22
commit 5f2e5a1997
9 changed files with 18 additions and 9 deletions

View file

@ -100,7 +100,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -92,7 +92,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -120,7 +120,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -105,7 +105,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -123,7 +123,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -102,7 +102,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -103,7 +103,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -94,7 +94,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {

View file

@ -112,7 +112,8 @@ void loop() {
// you can also read received data as byte array
/*
byte byteArr[8];
int state = radio.readData(byteArr, 8);
int numBytes = radio.getPacketLength();
int state = radio.readData(byteArr, numBytes);
*/
if (state == RADIOLIB_ERR_NONE) {