Skip to content

Commit 16e1425

Browse files
committed
Update example
1 parent 15bf60b commit 16e1425

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: examples/SlimLoRa-erase-session/erase-session.ino renamed to examples/SlimLoRa-erase-session/SlimLoRa-erase-session.ino

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/*
2-
* This sketch tests eeprom of SlimLoRA. I use it to debug the arduino style eeprom store.
2+
* This sketch ERASES eeprom of SlimLoRA. I use it to debug the arduino style eeprom store.
3+
* change the EEPROM_OFFSET in SlimLoRa.h to erase the session.
4+
*
5+
* Yes, you can use multiple sessions / networks with some hacking with SlimLoRa.
36
*/
47

58
#include <stdint.h>
@@ -23,9 +26,11 @@ void setup() {
2326
// TEST EEPROM data of SlimLoRa
2427
lora.SetHasJoined(0);
2528
Serial.print("HasJoined: ");Serial.println(lora.GetHasJoined());
26-
lora.SetTxFrameCounter(0);
29+
lora.tx_frame_counter_ = 0;
30+
lora.SetTxFrameCounter();
2731
Serial.print("TxFrameCounter: ");Serial.println(lora.GetTxFrameCounter());
28-
lora.SetRxFrameCounter(0);
32+
lora.rx_frame_counter_ = 0;
33+
lora.SetRxFrameCounter();
2934
Serial.print("RxFrameCounter: ");Serial.println(lora.GetRxFrameCounter());
3035
lora.SetRx1DataRateOffset(0);
3136
Serial.print("Rx1DataRateOffset: ");Serial.println(lora.GetRx1DataRateOffset());

0 commit comments

Comments
 (0)