You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,8 @@ The calendar cycles through several displays, before returning to the time of da
30
30
***The date.**[Several formats](#optionsgeneral) are available. When setting, it will ask for the year, then the month, then the date.
31
31
***Day counter.** This will count down to, or up from, a date of your choice, repeating every year. When setting, it will ask for the month, then the date, then the direction (0 = count down, 1 = count up).
32
32
* TIP: To display the day of the year, set it to count up from December 31.
33
-
***Sunrise/sunset.** These two displays show the previous and next apparent sunrise/sunset times (indicated by `1` or `0` on the seconds tubes – during the day, it shows sunrise then sunset; at night, sunset then sunrise). The times are calculated using the latitude, longitude, UTC offset, and auto DST rule specified in the [options](#optionsgeography), and shown in the same 12h/24h format as the time of day.
33
+
***Sunrise/sunset.** These two displays show the previous and next apparent sunrise/sunset times (indicated by `1` or `0` on the seconds tubes – during the day, it shows sunrise then sunset; at night, sunset then sunrise), in the same 12h/24h format as the time of day.
34
+
* Specify your latitude, longitude, and UTC offset in the [options menu](#optionsgeography). (From v1.8.1, sunrise/sunset is not displayed if latitude/longitude are left at 0.)
34
35
* NOTE: At this writing, the times may be incorrect by a few minutes, depending on [your longitude and time of year](https://docs.google.com/spreadsheets/d/1dYchVCJAuhvosrCdtEeHLT3ZXcLZK8X0UtENItZR32M/edit#gid=0). I believe this to be a rounding error(s) in the [Dusk2Dawn library](https://github.com/dmkishi/Dusk2Dawn) (compared to the [NOAA Solar Calculator](https://www.esrl.noaa.gov/gmd/grad/solcalc/) it’s based on) and plan to investigate.
35
36
36
37
## Alarm
@@ -90,7 +91,7 @@ This feature can count up (chrono) or down (timer), up to 100 hours each way. Wh
90
91
| 3 | Display date during time? | 0 = never<br/>1 = date instead of seconds<br/>2 = full date each minute at :30 seconds<br/>3 = same as 2, but scrolls in and out |
91
92
| 4 | Leading zeros | 0 = no<br/>1 = yes |
92
93
| 5 | Digit fade | 0–20 (in hundredths of a second) |
93
-
| 6 | Auto DST | Add 1h for daylight saving time between these dates (at 2am):<br/>0 = off<br/>1 = second Sunday in March to first Sunday in November (US/CA)<br/>2 = last Sunday in March to last Sunday in October (UK/EU)<br/>3 = first Sunday in April to last Sunday in October (MX)<br/>4 = last Sunday in September to first Sunday in April (NZ)<br/>5 = first Sunday in October to first Sunday in April (AU)<br/>6 = third Sunday in October to third Sunday in February (BZ)<br/>If the clock is not powered at the time, it will correct itself when powered up. |
94
+
| 6 | Auto DST | Add 1h for daylight saving time between these dates (at 2am):<br/>0 = off<br/>1 = second Sunday in March to first Sunday in November (US/CA)<br/>2 = last Sunday in March to last Sunday in October (UK/EU)<br/>3 = first Sunday in April to last Sunday in October (MX)<br/>4 = last Sunday in September to first Sunday in April (NZ)<br/>5 = first Sunday in October to first Sunday in April (AU)<br/>6 = third Sunday in October to third Sunday in February (BZ)<br/>If the clock is not powered at the time, it will correct itself when powered up.<br/>If you observe DST but your locale’s rules are not represented here, leave this set to 0 and set the clock manually (and the [DST offset](#optionsgeography) if applicable).|
94
95
| 7 | LED behavior | 0 = always off<br/>1 = always on<br/>2 = on, but follow night/away shutoff if enabled<br/>3 = off, but on when alarm/timer sounds</br>4 = off, but on with switched relay (if equipped)<br/>(Clocks with LED lighting only) |
95
96
| 8 | Anti-cathode poisoning | Briefly cycles all digits to prevent [cathode poisoning](http://www.tube-tester.com/sites/nixie/different/cathode%20poisoning/cathode-poisoning.htm)<br/>0 = once a day, either at midnight or when night shutoff starts (if enabled)<br/>1 = at the top of every hour<br/>2 = at the top of every minute<br/>(Will not trigger during night/away shutoff) |
96
97
|| <aname="optionsalarm"></a>**Alarm**||
@@ -121,7 +122,7 @@ This feature can count up (chrono) or down (timer), up to 100 hours each way. Wh
121
122
|| <aname="optionsgeography"></a>**Geography**||
122
123
| 50 | Latitude | Your latitude, in tenths of a degree; negative (south) values are indicated with leading zeroes. (Example: Dallas is at 32.8°N, set as `328`.) |
123
124
| 51 | Longitude | Your longitude, in tenths of a degree; negative (west) values are indicated with leading zeroes. (Example: Dallas is at 96.7°W, set as `00967`.) |
124
-
| 52 | UTC offset | Your time zone’s offset from UTC (non-DST), in hours and minutes; negative (west) values are indicated with leading zeroes. (Example: Dallas is UTC–6, set as `0600`.) |
125
+
| 52 | UTC offset | Your time zone’s offset from UTC (non-DST), in hours and minutes; negative (west) values are indicated with leading zeroes. (Example: Dallas is UTC–6, set as `0600`.)<br/>If you observe DST but set the clock manually rather than using the [auto DST feature](#optionsgeneral), you must add an hour to the UTC offset during DST, or the sunrise/sunset times will be an hour early.|
125
126
126
127
To reset the clock to “factory” defaults, hold **Select** while powering up the clock.
//If a scroll is waiting to scroll out, cancel it, and let the button event do what it will
319
+
if(scrollRemain==-128 && evt==1){
320
+
scrollRemain = 0;
321
+
}
322
+
//If a scroll is going, fast-forward to end of scroll in/out - see also checkRTC
323
+
elseif(scrollRemain!=0 && evt==1){
324
+
btnStop();
325
+
if(scrollRemain>0) scrollRemain = 1;
326
+
else scrollRemain = -1;
327
+
checkEffects(true);
328
+
return;
329
+
}
330
+
//If the version display is going, any press should cancel it, with a display update
331
+
if(versionRemain>0 && evt==1){
332
+
versionRemain = 0;
333
+
btnStop();
334
+
updateDisplay();
335
+
return;
336
+
}
337
337
338
338
//Is it a press for an un-off?
339
339
unoffRemain = unoffDur; //always do this so continued button presses during an unoff keep it alive
@@ -757,10 +757,10 @@ void initEEPROM(bool hard){
757
757
btnCur = mainSel; btnStop();
758
758
//If a hard init, set the clock
759
759
if(hard) {
760
-
ds3231.setYear(18);
760
+
ds3231.setYear(20);
761
761
ds3231.setMonth(1);
762
762
ds3231.setDate(1);
763
-
ds3231.setDoW(1); //2018-01-01 is Monday. DS3231 will keep count from here
763
+
ds3231.setDoW(3); //2020-01-01 is Wednesday. DS3231 will keep count from here
764
764
ds3231.setHour(0);
765
765
ds3231.setMinute(0);
766
766
ds3231.setSecond(0);
@@ -774,7 +774,7 @@ void initEEPROM(bool hard){
774
774
if(hard) writeEEPROM(7,0,false); //7: Alt function preset
775
775
//8: TODO functions/pages enabled (bitmask)
776
776
//9: free
777
-
//15: DST on flag (will be set at first RTC check)
777
+
if(hard) writeEEPROM(15,0,false); //15: last known DST on flag - clear on hard reset (to match the reset RTC/auto DST/anti-poisoning settings to trigger midnight tubes as a tube test)
778
778
//then the options menu defaults
779
779
bool isInt = false;
780
780
for(byte opt=0; opt<sizeof(optsLoc); opt++) {
@@ -845,9 +845,18 @@ void checkRTC(bool force){
845
845
}
846
846
//Paged-display function timeout //TODO change fnIsDate to consts? //TODO timeoutPageFn var
847
847
elseif(fn==fnIsDate && (unsignedlong)(now-inputLast)>=3000) { //3sec per date page
848
+
//If a scroll in is going, fast-forward to end - see also ctrlEvt
849
+
if(scrollRemain>0) {
850
+
scrollRemain = 1;
851
+
checkEffects(true);
852
+
}
848
853
//Here we just have to increment the page and decide when to reset. updateDisplay() will do the rendering
849
854
fnPg++; inputLast+=3000; //but leave inputLastTODMins alone so the subsequent page displays will be based on the same TOD
if(fnPg >= fnDatePages){ fnPg = 0; fn = fnIsTime; } // when we run out of pages, go back to time. When the half-minute date is triggered, fnPg is set to 254, so it will be 255 here and be cancelled after just the one page.
851
860
force=true;
852
861
}
853
862
//Temporary-display function timeout: if we're *not* in a permanent one (time, or running/signaling timer)
@@ -918,7 +927,7 @@ void checkRTC(bool force){
918
927
} //end alarm trigger
919
928
}
920
929
//At bottom of minute, see if we should show the date
Copy file name to clipboardExpand all lines: arduino-nixie/configs/v5-4tube.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ const word velThreshold = 0; //ms
67
67
68
68
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
69
69
constwordcleanSpeed=200; //ms
70
-
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
70
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30
71
71
72
72
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
Copy file name to clipboardExpand all lines: arduino-nixie/configs/v5-6tube.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ const word velThreshold = 0; //ms
67
67
68
68
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
69
69
constwordcleanSpeed=200; //ms
70
-
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
70
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30
71
71
72
72
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
Copy file name to clipboardExpand all lines: arduino-nixie/configs/v8-4tube.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ const word velThreshold = 0; //ms
73
73
74
74
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
75
75
constwordcleanSpeed=200; //ms
76
-
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
76
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30
77
77
78
78
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
Copy file name to clipboardExpand all lines: arduino-nixie/configs/v8-6tube.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ const word velThreshold = 0; //ms
73
73
74
74
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
75
75
constwordcleanSpeed=200; //ms
76
-
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
76
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30
77
77
78
78
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
Copy file name to clipboardExpand all lines: arduino-nixie/configs/v9-6tube-relay.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ const word velThreshold = 0; //ms
74
74
75
75
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
76
76
constwordcleanSpeed=200; //ms
77
-
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
77
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30
78
78
79
79
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
Copy file name to clipboardExpand all lines: arduino-nixie/configs/v9-6tube.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ const word velThreshold = 0; //ms
74
74
75
75
// What is the "frame rate" of the tube cleaning and display scrolling? up to 65535 ms
76
76
constwordcleanSpeed=200; //ms
77
-
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30 - to give the illusion of a slow scroll that doesn't pause, use (timeoutTempFn*1000)/(displaySize+1) - e.g. 714 for displaySize=6 and timeoutTempFn=5
77
+
constwordscrollSpeed=100; //ms - e.g. scroll-in-and-out date at :30
78
78
79
79
// What are the timeouts for setting and temporarily-displayed functions? up to 65535 sec
0 commit comments