-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILDERS.ino
executable file
·131 lines (98 loc) · 3.83 KB
/
BUILDERS.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// LIGHT DELTA
/////////////////////////////////////////////////////////////////////////////////////////////
void osm_MASTER_BUILDER
(volatile byte MMAselect, volatile byte mmAxis, int AccelCounter, int Accel865xSensitivity,
volatile byte PrimeA, volatile int ColorTimeA, volatile int BlankTimeA, volatile int Val1A, volatile int Val2A, volatile boolean VPA,
volatile byte PrimeB, volatile int ColorTimeB, volatile int BlankTimeB, volatile int Val1B, volatile int Val2B, volatile boolean VPB)
{
if (JUSTONCE)
{// if JUSTONCE
Debouncer = 0;
PMMAselect = MMAselect;
PmmAxis = mmAxis;
PAccelCounterDebouncer = AccelCounter*10;
PAccelSensitivity = Accel865xSensitivity;
PrimeType[0] = PrimeA;
PrimeType[1] = PrimeB;
ColorTime[0] = ColorTimeA;
ColorTime[1] = ColorTimeB;
BlankTime[0] = BlankTimeA;
BlankTime[1] = BlankTimeB;
Val1[0] = Val1A;
Val1[1] = Val1B;
Val2[0] = Val2A;
Val2[1] = Val2B;
Preview[0]= VPA;
Preview[1]= VPB;
AUTOCHANGE=UserBPM[(CurrentUserBundle*2)];
BPM_Selector = UserBPM[((CurrentUserBundle*2)+1)];
FloatResult = BPM_Bars(BPM_Selector,2);
BPM_Factor = FloatResult;
SetSelection(PMMAselect,PmmAxis,PrimeType[0],PrimeType[1]);
}// fi JUSTONCE
ToBorNotToB = 1;
JustOnceModeSet();
while ((STATE == 1) && (GLOBALCHANGE) && (ToBorNotToB) )// Modes
{// while STATE 1
ToBorNotToB = 1;
PRIMER(PrimeType[VARIATION]);
PushYed();
}// elihw STATE 1
if (STATE == 2)
{// IF STATE 2
SetSelection(MMAselect,mmAxis,PrimeA,PrimeB);
}// FI STATE 2
ToBorNotToB = 1;
while ( (STATE == 2) && (GLOBALCHANGE) )// Color Change
{// state 2
PRIMERCOLOR(PrimeType[VARIATION]);
PushYcolors();
}// state 2
}
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
void SetSelection(volatile byte MMAselect, volatile byte mmAxis, volatile byte PrimeA, volatile byte PrimeB)
{
#if defined(VISUAL)
if (!ONEMODE)
{// if !ONEMODE
Serial.println();Serial.println();
PrintThis(0,0,85,1);//byte PrintSpace, byte PrintEqual, byte PrintAsterisch, boolean LineEnd);
Serial.print(F("> Mode# "));
Serial.print(Mode);
if (STATE != 2)
{// if STATE !=2
Serial.print(F(" , ("));
PrintAccel(MMAselect);// NO ACCELEROMTER / TILT / SHAKE
if (MMAselect == 1) { PrintAxis(mmAxis); Serial.print(F(" Axis")); }
if (MMAselect>0) { Serial.print(F(" ) , from: "));}
SetModeExtras(0,0,PrimeType[0]); // (byte LNstart, byte LNend, byte Message)
Serial.print(F(" (")); Serial.print(ColorTime[0]);Serial.print(F(","));Serial.print(BlankTime[0]);Serial.print(F(")"));
if (MMAselect>0)
{
Serial.print(F(" to ")); SetModeExtras(0,0,PrimeType[1]);
Serial.print(F(" (")); Serial.print(ColorTime[1]);Serial.print(F(","));Serial.print(BlankTime[1]);Serial.print(F(")"));
{Serial.println();}
}
else {Serial.println();}
PrintThis(0,0,85,1);//byte PrintSpace, byte PrintEqual, byte PrintAsterisch, boolean LineEnd);
}// fi STATE !=2
}// if !ONEMODE
if (STATE == 2)
{// IF STATE 2
Serial.print(F(" , EDIT COLORS OF PRIME "));
if (VARIATION == 0)
{// if VARIATION 0
Serial.print(F("A / "));
SetModeExtras(0,0,PrimeType[0]); // (byte LNstart, byte LNend, byte Message)
Serial.print(F(" (")); Serial.print(ColorTime[0]);Serial.print(F(","));Serial.print(BlankTime[0]);Serial.print(F(")"));Serial.println();
}// fi VARIATION 0
if (VARIATION == 1)
{// if VARIATION 1
Serial.print(F("B / "));
SetModeExtras(0,0,PrimeType[1]); // (byte LNstart, byte LNend, byte Message)
Serial.print(F(" (")); Serial.print(ColorTime[1]);Serial.print(F(","));Serial.print(BlankTime[1]);Serial.print(F(")"));Serial.println();
}// fi VARIATION 1
}// FI STATE 2
#endif
}// DIOV SETSELECTION