-
Notifications
You must be signed in to change notification settings - Fork 2
/
PWM_0_Command.ino
46 lines (34 loc) · 1.33 KB
/
PWM_0_Command.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
void cmdNoStrip(char var) {
displaySolid(BLACK);
cmdDisableOutput = true;
}
void cmd5VStrip(char var) { setStripSelect(true); }
void cmd12VStrip(char var) { setStripSelect(false); }
//void cmdIncreaseBrightness(char var) {}
//void cmdDecreaseBrightness(char var) {}
void cmdChangeColor1(char var) {
//COLOR1 = constrain(map(var, 78, 99, 0, ARRAY_SIZE(colorList)), 0, 21);
COLOR1 = constrain(map(var, 78, 99, 0, 21), 0, 21);
SetupCustomPalette(colorList[COLOR1], colorList[COLOR2]);
}
void cmdChangeColor2(char var) {
//COLOR2 = constrain(map(var, 78, 99, 0, ARRAY_SIZE(colorList)), 0, 21);
COLOR2 = constrain(map(var, 78, 99, 0, 21), 0, 21);
SetupCustomPalette(colorList[COLOR1], colorList[COLOR2]);
}
void cmdChangeDefaultPattern(char var){ noSignalPatternDisplay = var; }
//void cmdSaveSettings(char var){
//
// //EEPROM write takes 3.3ms
// if(writeEEPROM)
// {
// EEPROM.update(SS_EE, addressableStrip);
// EEPROM.update(COLOR1_EE, COLOR1);
// EEPROM.update(COLOR2_EE, COLOR2);
// EEPROM.update(LED_EE, stripLength);
// EEPROM.update(PATTERN_EE, noSignalPatternDisplay);
// }
//
//}
void cmdSetNoBlend(char var) { currentBlending = NOBLEND; }
void cmdSetLinearBlend(char var) { currentBlending = LINEARBLEND; }