Created
November 14, 2019 02:11
-
-
Save gustavosinbandera1/4133c4386b92798340a33db49fd0cce7 to your computer and use it in GitHub Desktop.
el main trabaja bien con este code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" void app_main() | |
{ | |
// Initialize arduino as a component | |
initArduino(); | |
// Initialize NVS. | |
auto nvs_err = nvs::begin(); | |
wifi::DTOConfig wifi_params; | |
wifi::DTOConfig wifi_params2; | |
setDefaultWiFiParams(wifi_params); | |
std::ostringstream blob; | |
std::cout << "------------------------going to Serialized------------------------------" << std::endl; | |
std::cout << "------------------------WIFI_PARMS WORKING AS A SERILIZER------------------------------" << std::endl; | |
wifi_params.serialize(blob); | |
auto stream_in = std::istringstream(blob.str()); | |
std::cout << "------------------------going to Deserialized------------------------------" << std::endl; | |
std::cout << "------------------------WIFI_PARMS-2 WORKING AS A DESERILIZER------------------------------" << std::endl; | |
wifi_params2.deserialize(stream_in); | |
std::cout << "SSID: " << wifi_params2.apSSID.c_str() << std::endl; | |
std::cout << "PASSWORD: " << wifi_params2.apPassword.c_str() << std::endl; | |
std::cout << "APCHANNEL " << (int)wifi_params2.apChannel << std::endl; | |
std::cout << "apMACCONNECT " << (int)wifi_params2.apMaxConn<< std::endl; | |
std::cout << "ISOPEN " << wifi_params2.isOpen << std::endl; | |
std::cout << "WAPENABLED " << wifi_params2.WAP_enabled << std::endl; | |
std::cout << "WST ENABLED " << wifi_params2.WST_enabled << std::endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment