Registered new view + other small things
This commit is contained in:
parent
f2a75745cc
commit
0271d1607c
@ -14,7 +14,7 @@ volatile boolean ioStateChange(false);
|
||||
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()};
|
||||
ViewSTAPacket vstap = {sab.getConnectivityManager().macAddress(), sab.getConnectivityManager().localIP(), sab.getConnectivityManager().RSSI()};
|
||||
ViewIoInfoPacket vio = {{0}};
|
||||
ViewIoInfoPacket vio = {{0},{0}};
|
||||
SdCardApiPacket sdCardApiPacket = {NULL, NULL};
|
||||
|
||||
void setup()
|
||||
@ -42,8 +42,9 @@ void setup()
|
||||
sab.getScreenManager().addView(&(view_3), &vstap, 2);
|
||||
sab.getScreenManager().addView(&(memInfo), NULL, 3);
|
||||
sab.getScreenManager().addView(&(ioInfo), &vio, 4);
|
||||
sab.getScreenManager().addView(NULL, NULL, 5); //for testing purposes
|
||||
sab.getScreenManager().addView(&(dummy), NULL, 6); //for testing purposes
|
||||
sab.getScreenManager().addView(&(sysErrorInfo), &sab, 5);
|
||||
sab.getScreenManager().addView(NULL, NULL, 6); //for testing purposes
|
||||
sab.getScreenManager().addView(&(dummy), NULL, 7); //for testing purposes
|
||||
|
||||
sab.getScreenManager().displayView(0);
|
||||
if(sab.getRtcManager().hasLostPower())
|
||||
@ -80,7 +81,7 @@ void setup()
|
||||
void loop()
|
||||
{
|
||||
|
||||
if(millis() - currentMs > 1000 || ioStateChange)
|
||||
if(millis() - currentMs >= 1000 || ioStateChange)
|
||||
{
|
||||
currentMs = millis();
|
||||
v1p.dateTime = sab.getRtcManager().getDateTime();
|
||||
@ -93,16 +94,20 @@ void loop()
|
||||
vstap.sigStrength = sab.getConnectivityManager().RSSI();
|
||||
|
||||
sab.getIoManager().getPcf().digitalReadAll(vio.ioState);
|
||||
sab.getIoManager().getPcf().getPinModeAll(vio.ioMode);
|
||||
|
||||
sab.getScreenManager().displayView();
|
||||
|
||||
ioStateChange = false;
|
||||
}
|
||||
|
||||
if(millis() - batteryMs > 10000)
|
||||
if(millis() - batteryMs >= 10000)
|
||||
{
|
||||
batteryMs = millis();
|
||||
v1p.powerInfo = sab.getPowerInfo();
|
||||
#ifdef DEBUG
|
||||
Serial.print(F("Running : "));Serial.println(millis()/1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user