@@ -150,6 +150,7 @@ bool isDSTByHour(int y, byte m, byte d, byte h, bool setFlag); //used by network
150
150
void calcSun (); // used by rtc
151
151
void ctrlEvt (byte ctrl, byte evt); // used by input
152
152
void updateDisplay (); // used by network
153
+ void goToFn (byte thefn); // used by network
153
154
154
155
// These cpp files contain code that is conditionally included
155
156
// based on the available hardware and settings in the config file.
@@ -618,6 +619,9 @@ void fnOptScroll(byte dir){
618
619
fnOptScroll (dir);
619
620
}
620
621
}
622
+ void goToFn (byte thefn){ // A shortcut that also sets inputLast per human activity
623
+ fn = thefn; inputLast = millis (); inputLastTODMins = rtcGetHour ()*60 +rtcGetMinute ();
624
+ }
621
625
622
626
void switchAlarm (byte dir){
623
627
// 0=down, 1=up, 2=toggle
@@ -833,7 +837,7 @@ void checkRTC(bool force){
833
837
}
834
838
// At bottom of minute, see if we should show the date
835
839
if (rtcGetSecond ()==30 && fn==fnIsTime && fnSetPg==0 && unoffRemain==0 && versionRemain==0 ) { /* cleanRemain==0 && scrollRemain==0 && */
836
- if (readEEPROM (18 ,false )>=2 ) { fn = fnIsDate; inputLast = now; inputLastTODMins = rtcGetHour ()* 60 + rtcGetMinute ( ); fnPg = 254 ; updateDisplay (); }
840
+ if (readEEPROM (18 ,false )>=2 ) { goToFn (fnIsDate ); fnPg = 254 ; updateDisplay (); }
837
841
// if(readEEPROM(18,false)==3) { startScroll(); }
838
842
}
839
843
// Anti-poisoning routine triggering: start when applicable, and not at night, during setting, or after a button press (unoff)
@@ -1346,6 +1350,7 @@ void updateDisplay(){
1346
1350
break ; // end fnIsDate
1347
1351
// fnIsDayCount removed in favor of paginated calendar
1348
1352
case fnIsAlarm: // alarm
1353
+ displayDim = (readEEPROM (2 ,false )?2 :1 ); // status bright/dim
1349
1354
word almTime; almTime = readEEPROM (0 ,true );
1350
1355
editDisplay (almTime/60 , 0 , 1 , readEEPROM (19 ,false ), true ); // hours with leading zero
1351
1356
editDisplay (almTime%60 , 2 , 3 , true , true );
@@ -1355,7 +1360,6 @@ void updateDisplay(){
1355
1360
editDisplay (readEEPROM (2 ,false ),4 ,4 ,false ,true );
1356
1361
blankDisplay (5 ,5 ,true );
1357
1362
}
1358
- displayDim = (readEEPROM (2 ,false )?2 :1 ); // status bright/dim
1359
1363
break ;
1360
1364
case fnIsTimer: // timer - display time
1361
1365
unsigned long td; td = (!(timerState&1 )? timerTime: // If stopped, use stored duration
0 commit comments