commented out NVstore.getDimTime() until can properly define in menus. Tends to head toward 0 when trying other branches - defeating the dim function!
This commit is contained in:
parent
e5db792179
commit
9007f0856b
2 changed files with 14 additions and 9 deletions
|
@ -23,9 +23,10 @@
|
|||
#include "KeyPad.h"
|
||||
#include "../Protocol/helpers.h"
|
||||
#include "../Wifi/BTCWifi.h"
|
||||
#include "fonts/Tahoma8.h"
|
||||
#include "fonts/FranklinGothic.h"
|
||||
#include "fonts/Arial.h"
|
||||
// #include "fonts/Tahoma8.h"
|
||||
// #include "fonts/FranklinGothic.h"
|
||||
// #include "fonts/Arial.h"
|
||||
#include "../Utility/NVstorage.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -47,10 +48,6 @@ CScreen4::show()
|
|||
{
|
||||
CScreenHeader::show();
|
||||
|
||||
// CTransientFont tmp(_display, &tahoma_8ptFontInfo);
|
||||
// CTransientFont tmp(_display, &franklinGothicMediumCond_8ptFontInfo);
|
||||
// CTransientFont tmp(_display, &arial_8ptFontInfo);
|
||||
|
||||
int yPos = 16;
|
||||
if(isWifiConnected() || isWifiAP()) {
|
||||
if(isWifiAP()) {
|
||||
|
@ -66,6 +63,10 @@ CScreen4::show()
|
|||
else {
|
||||
_printInverted(0, yPos, " WiFi Inactive ", true);
|
||||
}
|
||||
yPos += _display.textHeight() + 2;
|
||||
char msg[32];
|
||||
sprintf(msg, "Display Dim: %d mins", NVstore.getDimTime());
|
||||
_printMenuText(0, yPos, msg);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ CScreenManager::checkUpdate()
|
|||
if(_DimTime) {
|
||||
long tDelta = millis() - _DimTime;
|
||||
if(tDelta > 0) {
|
||||
if(NVstore.getDimTime())
|
||||
// if(NVstore.getDimTime())
|
||||
_pDisplay->dim(true);
|
||||
_DimTime = 0;
|
||||
}
|
||||
|
@ -229,7 +229,11 @@ CScreenManager::keyHandler(uint8_t event)
|
|||
|
||||
if(_DimTime == 0)
|
||||
_pDisplay->dim(false);
|
||||
_DimTime = millis() + NVstore.getDimTime();
|
||||
// _DimTime = millis() + NVstore.getDimTime();
|
||||
_DimTime = millis() + 60000;
|
||||
if(_DimTime == 0)
|
||||
_DimTime = 1;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue