Skip to content

Commit e48e07c

Browse files
author
JordySkyLab
committed
v1.5.4
Fixed interval value not always loading correctly after reboot.
1 parent 379f6e4 commit e48e07c

File tree

4 files changed

+54
-8
lines changed

4 files changed

+54
-8
lines changed

Code/libraries/SkyLab_LoRa_Edge/examples/BasicLoRaA/BasicLoRaA.ino

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Information on serial monitor.
77
Radio beacon implemented.
88
Motion detection interrupt implemented.
9-
v1.5.3
9+
v1.5.4
1010
*/
1111

1212
#include <skylabLR.h>
@@ -34,7 +34,7 @@ bool alcSyncEnable = 0; //enable alc sync service on port 202 to sync time. not
3434

3535
/*Interval options*/
3636
uint16_t intervalTime = 15; //default interval, in minutes
37-
uint16_t controlTime = 1415; // default control interval, in minutes, control message in a bit less than every 24h
37+
uint16_t controlTime = 1415; //default control interval, in minutes, control message in a bit less than every 24h
3838
uint16_t motionIntervalTime = 1; //interval when motion detected and motionActivation is on.
3939
uint16_t timeInMotionInterval = 5; //time to use motion interval since last motion detection, after this amount of minutes the system goes back to the normal intervalTime
4040

@@ -153,6 +153,8 @@ void setup() {
153153
delay(10);
154154
/*Init EEPROM values*/
155155
read_config_flashEEPROM();
156+
intervalCurrent = intervalTime; //set current interval to interval from EEPROM
157+
counter = intervalTime; //set counter to intervalTime to send first message within minute after startup
156158
/*Join network*/
157159
LR1110_join();
158160
if (ledActivation == 1) {
@@ -194,7 +196,7 @@ void beacon_function() { //function that activates beacon
194196
Serial.println(modem_response_code); //print command response from last packet
195197
counter3++; //add 1 to counter 3
196198
Serial.print("Beacon timer: ");
197-
Serial.print(counter3); // print counter 3
199+
Serial.print(counter3); //print counter 3
198200
Serial.println(" secondes");
199201
rtc.setSeconds(5); //set time to 5 second so that interrupt occurs again next second
200202
digitalWrite(LEDG, HIGH); //turn the led off
@@ -675,7 +677,7 @@ void LR1110_event_flush() { //function flushes the open events in the LR1110 and
675677
void LR1110_WiFi_scan() { //function to do a Wi-Fi scan
676678
lr1110_modem_response_code_t modem_response_code;
677679
wifi.settings.enabled = true;
678-
wifi.settings.channels = 0x3FFF; // by default enable all channels
680+
wifi.settings.channels = 0x3FFF; //by default enable all channels
679681
wifi.settings.types = LR1110_MODEM_WIFI_TYPE_SCAN_B_G_N;
680682
wifi.settings.scan_mode = LR1110_MODEM_WIFI_SCAN_MODE_BEACON_AND_PACKET;
681683
wifi.settings.nbr_retrials = 5;
@@ -998,9 +1000,9 @@ void BME280_init() { //start BME280 sensor
9981000
Wire.begin(); //start i2c
9991001
status = bme.begin(0x77); //adress BME280 onboard
10001002
bme.setSampling(Adafruit_BME280::MODE_FORCED, //forced mode
1001-
Adafruit_BME280::SAMPLING_X1, // temperature sampling
1002-
Adafruit_BME280::SAMPLING_X1, // pressure sampling
1003-
Adafruit_BME280::SAMPLING_X1, // humidity sampling
1003+
Adafruit_BME280::SAMPLING_X1, //temperature sampling
1004+
Adafruit_BME280::SAMPLING_X1, //pressure sampling
1005+
Adafruit_BME280::SAMPLING_X1, //humidity sampling
10041006
Adafruit_BME280::FILTER_OFF ); //no filter
10051007
Wire.end(); //stop i2c
10061008
}

Code/platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
2121

2222
name=SkyLab Boards
23-
version=1.5.3
23+
version=1.5.4
2424

2525
# Compile variables
2626
# -----------------

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,6 @@ Version | Changes
201201
1.5.1 | Padded EUI / keys with zeros on serial monitor for easier copying. LoRaWAN, firmware and bootloader versions now print in HEX on serial monitor.
202202
1.5.2 | Fixed not sending first payload after startup and after first motion detection.
203203
1.5.3 | Added downlink function for requesting settings. Fixed bug in motion interval timer.
204+
1.5.4 | Fixed interval value not always loading correctly after reboot.
204205

205206

package_skylab_index.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,49 @@
77
"websiteURL": "https://skylab.nl",
88
"platforms":
99
[
10+
{
11+
"name": "SkyLab_Boards",
12+
"architecture": "samd",
13+
"version": "1.5.4",
14+
"category": "Contributed",
15+
"url": "https://github.com/SkyLabIoT/LoRaEdge_BasicTracking/releases/download/v1.5.4/SkyLab_Boards1.5.4.zip",
16+
"archiveFileName": "SkyLab_Boards1.5.4.zip",
17+
"checksum": "SHA-256:64cd8fbb01fe1aeb39e179120cd7ec2315b03c6cadc65a03ccab756780689654",
18+
"size": "4759552",
19+
"boards": [
20+
{
21+
"name": "SkyLab LoRa Edge"
22+
}
23+
],
24+
"toolsDependencies":
25+
[
26+
{
27+
"packager": "arduino",
28+
"name": "arm-none-eabi-gcc",
29+
"version": "7-2017q4"
30+
},
31+
{
32+
"packager": "arduino",
33+
"name": "bossac",
34+
"version": "1.8.0-48-gb176eee"
35+
},
36+
{
37+
"packager": "arduino",
38+
"name": "openocd",
39+
"version": "0.10.0-arduino9"
40+
},
41+
{
42+
"packager": "arduino",
43+
"name": "CMSIS",
44+
"version": "4.5.0"
45+
},
46+
{
47+
"packager": "arduino",
48+
"name": "CMSIS-Atmel",
49+
"version": "1.2.0"
50+
}
51+
]
52+
},
1053
{
1154
"name": "SkyLab_Boards",
1255
"architecture": "samd",

0 commit comments

Comments
 (0)