Removed verbose option from travis
This commit is contained in:
parent
750261d205
commit
78f301d503
@ -32,4 +32,4 @@ install:
|
|||||||
- pip install -U platformio
|
- pip install -U platformio
|
||||||
- platformio update
|
- platformio update
|
||||||
script:
|
script:
|
||||||
- platformio ci --project-conf=./platformio.ini -v
|
- platformio ci --project-conf=./platformio.ini
|
||||||
|
@ -39,7 +39,7 @@ uint8_t knownMode = 0;
|
|||||||
uint8_t knownPalette = 0;
|
uint8_t knownPalette = 0;
|
||||||
|
|
||||||
long lastUpdate = 0;
|
long lastUpdate = 0;
|
||||||
long startupTimestamp = millis();
|
long lastRedraw = 0;
|
||||||
bool displayTurnedOff = false;
|
bool displayTurnedOff = false;
|
||||||
// How often we are redrawing screen
|
// How often we are redrawing screen
|
||||||
#define USER_LOOP_REFRESH_RATE_MS 5000
|
#define USER_LOOP_REFRESH_RATE_MS 5000
|
||||||
@ -51,14 +51,15 @@ void userLoop() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastUpdate = millis();
|
lastUpdate = millis();
|
||||||
// Turn off display after 5 minutes from powering.
|
|
||||||
if( !displayTurnedOff && millis() - startupTimestamp > 5*60*1000) {
|
// Turn off display after 3 minutes with no change.
|
||||||
|
if(!displayTurnedOff && millis() - lastRedraw > 3*60*1000) {
|
||||||
u8x8.setPowerSave(1);
|
u8x8.setPowerSave(1);
|
||||||
displayTurnedOff = true;
|
displayTurnedOff = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if values which are shown on display changed from the last tiem.
|
// Check if values which are shown on display changed from the last time.
|
||||||
if ((apActive == true ? String(apSSID) : WiFi.SSID()) != knownSsid) {
|
if (((apActive) ? String(apSSID) : WiFi.SSID()) != knownSsid) {
|
||||||
needRedraw = true;
|
needRedraw = true;
|
||||||
} else if (knownIp != (apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP())) {
|
} else if (knownIp != (apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP())) {
|
||||||
needRedraw = true;
|
needRedraw = true;
|
||||||
@ -75,6 +76,13 @@ void userLoop() {
|
|||||||
}
|
}
|
||||||
needRedraw = false;
|
needRedraw = false;
|
||||||
|
|
||||||
|
if (displayTurnedOff)
|
||||||
|
{
|
||||||
|
u8x8.setPowerSave(0);
|
||||||
|
displayTurnedOff = false;
|
||||||
|
}
|
||||||
|
lastRedraw = millis();
|
||||||
|
|
||||||
// Update last known values.
|
// Update last known values.
|
||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
knownSsid = apActive ? WiFi.softAPSSID() : WiFi.SSID();
|
knownSsid = apActive ? WiFi.softAPSSID() : WiFi.SSID();
|
||||||
|
Loading…
Reference in New Issue
Block a user