|
11 | 11 | //#include "configs/v5-6tube.h" //UNDB v5, 6 tubes
|
12 | 12 | //#include "configs/v5-6tube-rotary.h" //UNDB v5, 6 tubes, rotary encoder instead of buttons
|
13 | 13 | //#include "configs/v5-4tube.h" //UNDB v5, 4 tubes
|
14 |
| -#include "configs/v8-6tube-relayswitch.h" //UNDB v8, 6 tubes, switching relay |
| 14 | +#include "configs/v8-6tube.h" //UNDB v8 before modification, no LED or relay support |
| 15 | +//#include "configs/v8a-6tube-relayswitch.h" //UNDB v8 after modification A (Select=A1, Adj=A6/A7, Alt=A0, LED=A2, Relay=A3) |
| 16 | +//#include "configs/v8b-6tube-relayswitch.h" //UNDB v8 after modification A (Select=A6, Adj=A0/A1, Alt=A7, LED=A2, Relay=A3) |
15 | 17 |
|
16 | 18 |
|
17 | 19 | ////////// Other includes, global consts, and vars //////////
|
@@ -68,11 +70,11 @@ Some are skipped when they wouldn't apply to a given clock's hardware config, se
|
68 | 70 | //Option numbers/order can be changed (though try to avoid for user convenience);
|
69 | 71 | //but option locs should be maintained so EEPROM doesn't have to be reset after an upgrade.
|
70 | 72 | // General Alarm Timer Strike Night-off and day-off
|
71 |
| -const byte optsNum[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13, 20,21,22, 30,31,32, 40, 41, 42,43,44,45, 46, 47}; |
72 |
| -const byte optsLoc[] = {16,17,18,19,20,22,26,45,46, 23,42,39,24, 25,43,40, 21,44,41, 27, 28, 30,32,33,34, 35, 37}; |
73 |
| -const word optsDef[] = { 2, 1, 0, 0, 5, 0, 1, 0, 0, 0, 0,61, 9, 0, 0,61, 0, 0,61, 0,1320, 360, 0, 1, 5, 480,1020}; |
74 |
| -const word optsMin[] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,49, 0, 0, 0,49, 0, 0,49, 0, 0, 0, 0, 0, 0, 0, 0}; |
75 |
| -const word optsMax[] = { 2, 5, 3, 1,20, 6, 4, 1, 3, 2, 1,88,60, 1, 1,88, 4, 1,88, 2,1439,1439, 2, 6, 6,1439,1439}; |
| 73 | +const byte optsNum[] = { 1, 2, 3, 4, 5, 6, 7, 8, 10,11,12,13, 20,21,22, 30,31,32, 40, 41, 42,43,44,45, 46, 47}; // 9, |
| 74 | +const byte optsLoc[] = {16,17,18,19,20,22,26,45, 23,42,39,24, 25,43,40, 21,44,41, 27, 28, 30,32,33,34, 35, 37}; //46, |
| 75 | +const word optsDef[] = { 2, 1, 0, 0, 5, 0, 1, 0, 0, 0,61, 9, 0, 0,61, 0, 0,61, 0,1320, 360, 0, 1, 5, 480,1020}; // 0, |
| 76 | +const word optsMin[] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,49, 0, 0, 0,49, 0, 0,49, 0, 0, 0, 0, 0, 0, 0, 0}; // 0, |
| 77 | +const word optsMax[] = { 2, 5, 3, 1,20, 6, 4, 1, 2, 1,88,60, 1, 1,88, 4, 1,88, 2,1439,1439, 2, 6, 6,1439,1439}; // 3, |
76 | 78 |
|
77 | 79 | //RTC objects
|
78 | 80 | DS3231 ds3231; //an object to access the ds3231 specifically (temp, etc)
|
@@ -169,10 +171,10 @@ void loop(){
|
169 | 171 |
|
170 | 172 | void initInputs(){
|
171 | 173 | //TODO are there no "loose" pins left floating after this? per https://electronics.stackexchange.com/q/37696/151805
|
172 |
| - pinMode(A0, INPUT_PULLUP); |
173 |
| - pinMode(A1, INPUT_PULLUP); |
174 |
| - //pinMode(A2, INPUT_PULLUP); |
175 |
| - //pinMode(A3, INPUT_PULLUP); |
| 174 | + pinMode(mainSel, INPUT_PULLUP); |
| 175 | + pinMode(mainAdjUp, INPUT_PULLUP); |
| 176 | + pinMode(mainAdjDn, INPUT_PULLUP); |
| 177 | + pinMode(altSel, INPUT_PULLUP); |
176 | 178 | //rotary encoder init
|
177 | 179 | if(mainAdjType==2) AdaEncoder mainRot = AdaEncoder('a',mainAdjUp,mainAdjDn);
|
178 | 180 | }
|
|
0 commit comments