Updated main app accordingly
This commit is contained in:
parent
05d388b59c
commit
aa2c4b0e48
@ -7,10 +7,8 @@
|
|||||||
SAB sab;
|
SAB sab;
|
||||||
|
|
||||||
unsigned long currentMs = 0, batteryMs = 0, buttonMs = 0;
|
unsigned long currentMs = 0, batteryMs = 0, buttonMs = 0;
|
||||||
int mySize = 3;
|
|
||||||
View1Packet v1p = {sab.getRtcManager().getDateTime(), sab.getSdCardManager().getSize(GBYTE), sab.getPowerInfo(),0};
|
View1Packet v1p = {sab.getRtcManager().getDateTime(), sab.getSdCardManager().getSize(GBYTE), sab.getPowerInfo(),0};
|
||||||
ViewAPPacket vap = {sab.getConnectivityManager().softAPmacAddress(), sab.getConnectivityManager().softAPSSID(), sab.getConnectivityManager().softAPIP(), sab.getConnectivityManager().softAPgetStationNum()};
|
ViewAPPacket vap = {sab.getConnectivityManager().softAPmacAddress(), sab.getConnectivityManager().softAPSSID(), sab.getConnectivityManager().softAPIP(), sab.getConnectivityManager().softAPgetStationNum()};
|
||||||
CFGDictionary dico;
|
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
@ -26,7 +24,6 @@ void setup()
|
|||||||
Serial.println("Clock lost power");
|
Serial.println("Clock lost power");
|
||||||
sab.getRtcManager().setDateTime(DateTime(F(__DATE__), F(__TIME__)));
|
sab.getRtcManager().setDateTime(DateTime(F(__DATE__), F(__TIME__)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.println("End setup");
|
Serial.println("End setup");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,24 +40,17 @@ void loop()
|
|||||||
vap.nbOfCon = sab.getConnectivityManager().softAPgetStationNum();
|
vap.nbOfCon = sab.getConnectivityManager().softAPgetStationNum();
|
||||||
|
|
||||||
sab.getScreenManager().displayView();
|
sab.getScreenManager().displayView();
|
||||||
Serial.print(F("View count : "));Serial.println(sab.getScreenManager().getViewCount());
|
|
||||||
|
|
||||||
//Dico test
|
CFGFileParser cfgFileParser(sab.getSdCardManager(), AP_CFG_FILE);
|
||||||
dico.addParameter("SSID", "ESP8266SwissArmyBoard");
|
CFGDictionary *cfgDictionary = (CFGDictionary *) cfgFileParser.parseFile();
|
||||||
dico.addParameter("PASSWORD", "APassWord");
|
|
||||||
dico.deleteParameter("OTHER");
|
delete cfgDictionary;
|
||||||
Serial.print(F("SSID "));Serial.println(dico("SSID").stringValue());
|
|
||||||
Serial.print(F("PASSWORD "));Serial.println(dico("PASSWORD").stringValue());
|
|
||||||
Serial.print(F("OTHER "));Serial.println(dico("OTHER").stringValue());
|
|
||||||
Serial.print(F("Dico count : "));Serial.println(dico.count());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(millis() - batteryMs > 10000)
|
if(millis() - batteryMs > 10000)
|
||||||
{
|
{
|
||||||
batteryMs = millis();
|
batteryMs = millis();
|
||||||
v1p.powerInfo = sab.getPowerInfo();
|
v1p.powerInfo = sab.getPowerInfo();
|
||||||
//Dico test
|
|
||||||
dico.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user