Basic xdot code to check how many memory is available for user APP after initializing libxdot lorawan stack

Revision:
29:9e2c0d990ace
Parent:
25:56f7775c702f
Child:
30:2f5ae37e6c47
--- a/examples/src/dot_util.cpp	Thu Mar 15 08:31:22 2018 -0500
+++ b/examples/src/dot_util.cpp	Fri Apr 20 14:42:46 2018 -0500
@@ -24,17 +24,7 @@
     if (lora::ChannelPlan::IsPlanFixed(dot->getFrequencyBand())) {
         logInfo("frequency sub band ------- %u", dot->getFrequencySubBand());
     }
-
-    std::string network_mode_str("Undefined");
-    uint8_t network_mode = dot->getPublicNetwork();
-    if (network_mode == lora::PRIVATE_MTS)
-        network_mode_str = "Private MTS";
-    else if (network_mode == lora::PUBLIC_LORAWAN)
-        network_mode_str = "Public LoRaWAN";
-    else if (network_mode == lora::PRIVATE_LORAWAN)
-        network_mode_str = "Private LoRaWAN";
-    logInfo("public network ----------- %s", network_mode_str.c_str());
-    
+   
     logInfo("=========================");
     logInfo("credentials configuration");
     logInfo("=========================");
@@ -68,7 +58,7 @@
     }
 }
 
-void update_ota_config_name_phrase(std::string network_name, std::string network_passphrase, uint8_t frequency_sub_band, lora::NetworkType network_type, uint8_t ack) {
+void update_ota_config_name_phrase(std::string network_name, std::string network_passphrase, uint8_t frequency_sub_band, uint8_t ack) {
     std::string current_network_name = dot->getNetworkName();
     std::string current_network_passphrase = dot->getNetworkPassphrase();
     uint8_t current_frequency_sub_band = dot->getFrequencySubBand();
@@ -97,14 +87,7 @@
 	    }
 	}
     }
-    
-    if (current_network_type != network_type) {
-        logInfo("changing public network from %d to %d", current_network_type, network_type);
-        if (dot->setPublicNetwork(network_type) != mDot::MDOT_OK) {
-            logError("failed to set public network to %d", network_type);
-        }
-    }
-    
+       
     if (current_ack != ack) {
         logInfo("changing acks from %u to %u", current_ack, ack);
         if (dot->setAck(ack) != mDot::MDOT_OK) {