Add some sanity check / update readme with board

show how board is connected it Davinci
This commit is contained in:
luc
2015-10-29 13:24:59 +08:00
parent c3dc621e8d
commit 62eb43de8e
7 changed files with 19 additions and 5 deletions

View File

@@ -33,6 +33,15 @@ extern "C" {
extern DNSServer dnsServer;
#endif
WIFI_CONFIG::WIFI_CONFIG()
{
iweb_port=DEFAULT_WEB_PORT;
idata_port=DEFAULT_DATA_PORT;
baud_rate=DEFAULT_BAUD_RATE;
sleep_mode=DEFAULT_SLEEP_MODE;
_hostname[0]=0;
}
const char * WIFI_CONFIG::get_hostname(){
if (WiFi.hostname().length()==0)
{
@@ -152,7 +161,6 @@ bool WIFI_CONFIG::Setup()
if (!CONFIG::read_string(EP_HOSTNAME, hostname , MAX_HOSTNAME_LENGTH))strcpy(hostname,get_default_hostname());
//disconnect if connected
WiFi.disconnect();
current_mode=bflag;
//this is AP mode
if (bflag==AP_MODE)
{

View File

@@ -36,7 +36,7 @@ class WIFI_CONFIG
#ifdef MDNS_FEATURE
MDNSResponder mdns;
#endif
byte current_mode;
WIFI_CONFIG();
int iweb_port;
int idata_port;
long baud_rate;