Anish updated the code to work with L152. RTC seems to causing issue. Will have to disable LSE.

Dependencies:   mbed LoRaWAN-lib SX1276Lib

Revision:
24:416a3fec29ea
Parent:
22:e36bf3b9776e
Child:
25:2902c751ee57
--- a/app/main.cpp	Tue Feb 05 13:48:33 2019 +0000
+++ b/app/main.cpp	Mon Mar 04 13:06:17 2019 +0000
@@ -341,7 +341,7 @@
     if (button1_enabled) { // Disabled while the button is bouncing
         button1_enabled = false;
         button1_pressed = true; // To be read by the main loop
-        button1_timeout.attach(callback(button1_enabled_cb), 0.15); // Debounce time 150 ms
+        button1_timeout.attach(callback(button1_enabled_cb), 0.2); // Debounce time 200 ms
     }
 }
 
@@ -919,8 +919,8 @@
 
 void button_options_handler(void)
 {
-    if (press_count >= 3) {
-        // Run long test
+    if (press_count >= 4) {
+        // Run long test if 4 or more clicks
         MessageType = MESSAGE_TYPE_LONG_TEST;
         
         startTest(measurements);
@@ -928,8 +928,8 @@
         running_test = true;
         test_start = current_time;
     }
-    if (press_count == 2) {
-        // Run short test
+    if (press_count == 2 || press_count == 3) {
+        // Run short test if 2 or 3 clicks
         MessageType = MESSAGE_TYPE_SHORT_TEST;
         
         startTest(measurements);