add senet packet format

Dependencies:   Senet_Packet mDot_X_NUCLEO_IKS01A1 libmDot-dev-mbed5-deprecated

Fork of mDot-IKS01A1 by Peter Ferland

Files at this revision

API Documentation at this revision

Comitter:
pferland
Date:
Thu Dec 15 23:50:05 2016 +0000
Parent:
6:9e6ac13de3e9
Child:
8:bfbc3dd47166
Commit message:
Changed sleep mode from RTC+interrupt to RTC only

Changed in this revision

dot_util.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/dot_util.cpp	Thu Dec 15 16:22:10 2016 +0000
+++ b/dot_util.cpp	Thu Dec 15 23:50:05 2016 +0000
@@ -297,8 +297,8 @@
     // in some frequency bands we need to wait until another channel is available before transmitting again
     // wait at least 10s between transmissions
     uint32_t delay_s = dot->getNextTxMs() / 1000;
-    if (delay_s < 10) {
-        delay_s = 10;
+    if (delay_s < 30) {
+        delay_s = 30;
     }
     
     logInfo("%ssleeping %lus", deepsleep ? "deep" : "", delay_s);
--- a/main.cpp	Thu Dec 15 16:22:10 2016 +0000
+++ b/main.cpp	Thu Dec 15 23:50:05 2016 +0000
@@ -53,11 +53,9 @@
 
     /* Initialize mDot */
     dot = mDot::getInstance();
+    dot->setAdr(true);
     mts::MTSLog::setLogLevel(mts::MTSLog::INFO_LEVEL);
     dot->setEvents(&events);
-
-
-
     
 
     if (!dot->getStandbyFlag()) {
@@ -113,7 +111,7 @@
         if (!dot->getNetworkJoinStatus()) {
             join_network();
         }
-        // Retrieve sensor data and prepare the packet.
+
         //temp floats
         float value1, value2;