Skip to content

Commit 6bb290c

Browse files
authored
Merge pull request #12 from Arduino-DMX-512-Tester-and-Controller/v0.5
Update DMX_Controller.ino
2 parents 24fb8e0 + abbf7ec commit 6bb290c

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

DMX_Controller/DMX_Controller.ino

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// ** **
44
// ** Arduino DMX-512 Tester Controller **
55
// ** **
6-
// ** - Firmware v0.4 **
6+
// ** - Firmware v0.5 **
77
// ** - Hardware v0.0 - v0.2 **
88
// ** **
99
// ** - Compilado en Arduino IDE v1.0.6 **
@@ -178,7 +178,7 @@ void Back_Light_En()
178178
void GUI_About()
179179
{
180180
byte Firm_Ver_Ent = 0;
181-
byte Firm_Ver_Dec = 4;
181+
byte Firm_Ver_Dec = 5;
182182
byte Hard_Ver_Ent = 0;
183183
byte Hard_Ver_Dec = 0;
184184
byte ID = 20;
@@ -294,6 +294,7 @@ void GUI_Control_Matrix()
294294
{
295295
Num_Row_Pos = 0;
296296
Num_Col_Pos = 13;
297+
Num_Val = Inicial; // para dejar el numero que estaba si no se cambia
297298
Numerico_Calc(0);
298299
if (Num_Val > 498) // limite de matriz
299300
{
@@ -304,26 +305,28 @@ void GUI_Control_Matrix()
304305
Num_Val = 1;
305306
}
306307
Inicial = Num_Val;
307-
goto inicio;
308+
goto Banco;
308309
}
309310
// Banco Final
310311
if (LCD_Col_Pos == 16 && LCD_Row_Pos == 0)
311312
{
312313
Num_Row_Pos = 0;
313314
Num_Col_Pos = 17;
315+
if (Inicial == 1)
316+
Num_Val = 15;
317+
else
318+
Num_Val = Inicial - 14; // para dejar el numero que estaba si no se cambia
314319
Numerico_Calc(0);
315-
if (Num_Val > 512) // limite de matriz
320+
if (Num_Val > 512) // limite de matriz
316321
{
317322
Inicial = 498;
318-
goto inicio;
319323
}
320-
if (Num_Val < 15) // limite de matriz
324+
if (Num_Val < 15) // limite de matriz
321325
{
322326
Inicial = 1;
323-
goto inicio;
324327
}
325328
Inicial = Num_Val - 14;
326-
goto inicio;
329+
goto Banco;
327330
}
328331
// posicion 1
329332
if (LCD_Col_Pos == 0 && LCD_Row_Pos == 1)
@@ -418,6 +421,7 @@ void GUI_Control_Matrix()
418421
Salida_DMX:
419422
Num_Row_Pos = LCD_Row_Pos;
420423
Num_Col_Pos = LCD_Col_Pos + 1;
424+
Num_Val = DMX_Values[Canal_Actual]; // para dejar el numero que estaba si no se cambia
421425
Numerico_Calc(1);
422426
if (Num_Val == 612) // ubicar
423427
{
@@ -1015,7 +1019,6 @@ void GUI_Config()
10151019
Num_Val = 255;
10161020
Numerico_Write (255, 16, 2);
10171021
}
1018-
EEPROM.write(513, Num_Val); // guardar valor nuevo
10191022
analogWrite(Back_Light_PWM, Num_Val);
10201023
if (Num_Val == 0)
10211024
{
@@ -1061,7 +1064,7 @@ void GUI_Config()
10611064

10621065
void GUI_Control_Multiply()
10631066
{
1064-
int First_Channel = 1;
1067+
int First_Channel = 1;
10651068
long Multiply = 0;
10661069
long Quantity = 0;
10671070
int Value = 255;
@@ -1153,6 +1156,7 @@ void GUI_Control_Multiply()
11531156
{
11541157
Num_Row_Pos = 1;
11551158
Num_Col_Pos = 9;
1159+
Num_Val = First_Channel; // para dejar el numero que estaba si no se cambia
11561160
Numerico_Calc(0);
11571161
First_Channel = Num_Val;
11581162
if (First_Channel == 0)
@@ -1171,6 +1175,7 @@ void GUI_Control_Multiply()
11711175
{
11721176
Num_Row_Pos = 2;
11731177
Num_Col_Pos = 9;
1178+
Num_Val = Multiply; // para dejar el numero que estaba si no se cambia
11741179
Numerico_Calc(0);
11751180
Multiply = Num_Val;
11761181
if (Multiply == 0)
@@ -1189,6 +1194,7 @@ void GUI_Control_Multiply()
11891194
{
11901195
Num_Row_Pos = 3;
11911196
Num_Col_Pos = 9;
1197+
Num_Val = Quantity; // para dejar el numero que estaba si no se cambia
11921198
Numerico_Calc(0);
11931199
Quantity = Num_Val;
11941200
if (Quantity == 0)
@@ -1207,6 +1213,7 @@ void GUI_Control_Multiply()
12071213
{
12081214
Num_Row_Pos = 0;
12091215
Num_Col_Pos = 9;
1216+
Num_Val = Value; // para dejar el numero que estaba si no se cambia
12101217
Numerico_Calc(1);
12111218
Value = Num_Val;
12121219
if (Value > 255)
@@ -1310,6 +1317,7 @@ void GUI_Control_Chaser()
13101317
{
13111318
Num_Row_Pos = 1;
13121319
Num_Col_Pos = 9;
1320+
Num_Val = Delay; // para dejar el numero que estaba si no se cambia
13131321
Numerico_Calc(0);
13141322
Delay = Num_Val;
13151323
}
@@ -1318,6 +1326,7 @@ void GUI_Control_Chaser()
13181326
{
13191327
Num_Row_Pos = 2;
13201328
Num_Col_Pos = 9;
1329+
Num_Val = First; // para dejar el numero que estaba si no se cambia
13211330
Numerico_Calc(0);
13221331
First = Num_Val;
13231332
if (First == 0)
@@ -1336,6 +1345,7 @@ void GUI_Control_Chaser()
13361345
{
13371346
Num_Row_Pos = 3;
13381347
Num_Col_Pos = 9;
1348+
Num_Val = Final; // para dejar el numero que estaba si no se cambia
13391349
Numerico_Calc(0);
13401350
Final = Num_Val;
13411351
if (Final == 0)
@@ -1409,6 +1419,7 @@ void GUI_Control_Unit()
14091419
Numerico_Write(Canal_Actual, 9, 2);
14101420
Num_Row_Pos = 2;
14111421
Num_Col_Pos = 9;
1422+
Num_Val = Canal_Actual; // para dejar el numero que estaba si no se cambia
14121423
Numerico_Calc (0);
14131424
if (Num_Val > 512)
14141425
{
@@ -1429,8 +1440,9 @@ void GUI_Control_Unit()
14291440
{
14301441
Num_Row_Pos = 3;
14311442
Num_Col_Pos = 9;
1443+
Num_Val = DMX_Values[Canal_Actual]; // para dejar el numero que estaba si no se cambia
14321444
Numerico_Calc (1);
1433-
if (Num_Val == 612) // ubicar
1445+
if (Num_Val == 612) // ubicar
14341446
{
14351447
Ubicar();
14361448
}
@@ -1485,7 +1497,7 @@ void Numerico_Calc(byte value)
14851497
lcd.setCursor (Num_Col_Pos, Num_Row_Pos);
14861498
lcd.print("___");
14871499
lcd.blink(); // mostrar cursor
1488-
Num_Val = 0;
1500+
//Num_Val = 0;
14891501
Num_Col_Pos = Num_Col_Pos + 2;
14901502
lcd.setCursor (Num_Col_Pos, Num_Row_Pos);
14911503
// primer numero

0 commit comments

Comments
 (0)