Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Commit 65339db

Browse files
committed
fix: to delete functions removed from library files
1 parent 5f40222 commit 65339db

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

examples/class_c_otaa_ack/class_c_otaa_ack.ino

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const unsigned long interval = 15 * 1000; // 10 s interval to send message
1212
unsigned long previousMillis = 0; // will store last time message sent
1313
unsigned int counter = 0; // message counter
1414

15-
bool sendack = false;
16-
1715
char myStr[50];
1816

1917
const sRFM_pins RFM_pins = {
@@ -23,31 +21,6 @@ const sRFM_pins RFM_pins = {
2321
.DIO1 = 19,
2422
};
2523

26-
void message(sBuffer *msg, bool isConfirmed, uint8_t fPort){
27-
28-
char Buff[255];
29-
int size = msg->Counter;
30-
31-
memset(Buff, 0x00, size + 1);
32-
memcpy(Buff, msg->Data, size);
33-
34-
Serial.println("--------------------");
35-
Serial.print("Msg size as bytes : ");
36-
Serial.println(msg->Counter);
37-
Serial.print("Message :");
38-
Serial.println(Buff);
39-
Serial.print("Port :");
40-
Serial.println(fPort);
41-
42-
if(isConfirmed){
43-
44-
Serial.println("ACK response Should be sent !");
45-
sendack = true;
46-
47-
}
48-
49-
}
50-
5124
void setup() {
5225
// Setup loraid access
5326
Serial.begin(115200);
@@ -69,9 +42,6 @@ void setup() {
6942
lora.setAppEUI(appEui);
7043
lora.setAppKey(appKey);
7144

72-
// Set Callback function
73-
lora.onMessage(message);
74-
7545
// Join procedure
7646
bool isJoined;
7747
do {
@@ -113,13 +83,6 @@ void loop() {
11383

11484
}
11585

116-
if (sendack) {
117-
118-
lora.sendACK();
119-
sendack = false;
120-
121-
}
122-
12386
lora.update();
12487

12588
if(lora.readAck()) Serial.println("ack received");

0 commit comments

Comments
 (0)