Skip to content

Commit

Permalink
Updated menu logic for parent/child source sharing, closes #68. Fixed #…
Browse files Browse the repository at this point in the history
  • Loading branch information
adelyte-austin committed Mar 5, 2018
1 parent 6ffa427 commit 92dac2d
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 22 deletions.
Binary file modified program/Crescendo Loft.lpz
Binary file not shown.
Binary file modified program/Crescendo Theater.lpz
Binary file not shown.
Binary file modified program/Crescendo Theater.sig
Binary file not shown.
23 changes: 11 additions & 12 deletions program/Keypad.um2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version=1
[
ObjTp=FSgntr
Sgntr=UserMacro
RelVrs=4.05.04
RelVrs=4.06.01
IntStrVrs=2
MinSMWVrs=2.07.04
MinTIOVrs=0
Expand All @@ -16,14 +16,14 @@ S0Nd=1
S1Nd=2
SLNd=3
PrNm=Keypad.umc
DbVr=60.00.006.00
DvcDbVr=80.00.002.00
DbVr=61.06.001.00
DvcDbVr=82.00.002.00
PgmNm=Adelyte Company
CltNm=Keypad
Incl=362,378,380,405,407,408,409,478,522,537,554,586,590,611,624,767,830,883,1032,1062,1079,1134,1157,1199,1220,1222,1299,1348,1439,1472,1473,1499,1746,1803,1975,2229,2354,2514,2523,2532,3708,3902,3912,3918,3925,1766,2574,2651,2817,2886,2938,2947,3181,3197,3233,3710,3735,3736,3816,
McNm=Keypad
SmVr=1016
DvVr=1016
SmVr=1024
DvVr=1024
TpN1=1
TpN2=2
TpN3=3
Expand Down Expand Up @@ -702,7 +702,6 @@ n2I=308
n1O=453
Cmn1=C5[ID]h\\
mI=1071
I12=9
I212=196
I213=195
I214=197
Expand All @@ -725,7 +724,7 @@ I344=310
I345=311
mO=761
tO=1070
O1=9
O1=17
O321=55
O322=56
O323=57
Expand Down Expand Up @@ -1045,11 +1044,6 @@ Nm=__K__Room_Source_Route!...
]
[
ObjTp=Sg
H=9
Nm=__K__Source_Connected
]
[
ObjTp=Sg
H=10
Nm=//__K__Generic_Route
SgTp=2
Expand Down Expand Up @@ -1088,6 +1082,11 @@ SgTp=4
]
[
ObjTp=Sg
H=17
Nm=//__K__Source_Connected
]
[
ObjTp=Sg
H=18
Nm=//__K__Room_Connected
]
Expand Down
12 changes: 6 additions & 6 deletions program/Keypad.umc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version=1
[
ObjTp=FSgntr
Sgntr=UserMacro
RelVrs=4.06.01
RelVrs=4.09.04
IntStrVrs=2
MinSMWVrs=2.07.04
MinTIOVrs=0
Expand All @@ -16,14 +16,14 @@ S0Nd=1
S1Nd=2
SLNd=3
PrNm=Keypad.umc
DbVr=61.06.001.00
DvcDbVr=82.00.002.00
DbVr=66.00.002.00
DvcDbVr=90.05.002.00
PgmNm=Adelyte Company
CltNm=Keypad
Incl=362,378,380,405,407,408,409,478,522,537,554,586,590,611,624,767,830,883,1032,1062,1079,1134,1157,1199,1220,1222,1299,1348,1439,1472,1473,1499,1746,1803,1975,2229,2354,2514,2523,2532,3708,3902,3912,3918,3925,1766,2574,2651,2817,2886,2938,2947,3181,3197,3233,3710,3735,3736,3816,
McNm=Keypad
SmVr=1024
DvVr=1024
SmVr=1050
DvVr=1050
TpN1=1
TpN2=2
TpN3=3
Expand Down Expand Up @@ -987,7 +987,7 @@ O1=18
O33=89
O36=75
O46=15
O52=79
O53=79
O268=46
O284=76
O297=16
Expand Down
4 changes: 2 additions & 2 deletions program/Rooms-Sources Controller.ush
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
[BEGIN]
ObjTp=Symbol
Exclusions=1,19,20,21,88,89,167,168,179,213,214,215,216,217,225,226,248,249,266,267,310,718,756,854,
Exclusions_CDS=5
Inclusions_CDS=6
Exclusions_CDS=
Inclusions_CDS=5,6
Name=Rooms-Sources Controller
SmplCName=Rooms-Sources Controller.usp
Code=1
Expand Down
33 changes: 31 additions & 2 deletions program/Rooms-Sources Controller.usp
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,34 @@ PUSH Listen_Source
PUSH Share_Source
{
INTEGER share, room;
STRING __Sources__[#SOURCES_MAX];

share = GETLASTMODIFIEDARRAYINDEX();
room = ShareToRoom(share);

IF(room = 0) TERMINATEEVENT;

IF(Room_Sources_Is[room] = "")
{
__Sources__ = Default_Available_Sources;
}
ELSE IF(Room_Sources_Is[room] = "\x00")
{
__Sources__ = "";
}
ELSE
{
__Sources__ = Room_Sources_Is[room];
}

MAKESTRING(Room_Source[room], "\x50%c", Source_Is);
IF(FIND(CHR(Source_Is), __Sources__))
{
MAKESTRING(Room_Source[room], "\x50%c", Source_Is);
}
ELSE IF(FIND(CHR(#AUDIO_VIDEO_ID_OFFSET + Source_Is), __Sources__))
{
MAKESTRING(Room_Source[room], "\x50%c", #AUDIO_VIDEO_ID_OFFSET + Source_Is);
}
}

PUSH Share_Power_Off
Expand Down Expand Up @@ -753,13 +774,21 @@ FUNCTION UpdateShareVisible(INTEGER room)
RETURN;
}

IF(room = Room_Is)
IF(room = IdToIndex(Room_Is))
{
Share_Visible[share] = 0;
}
ELSE
{
Share_Visible[share] = FIND(CHR(Source_Is), __Sources__);

IF(Share_Visible[share] = 0)
{
IF(Source_Is < #AUDIO_VIDEO_ID_OFFSET)
{
Share_Visible[share] = FIND(CHR(#AUDIO_VIDEO_ID_OFFSET + Source_Is), __Sources__);
}
}
}
}

Expand Down

0 comments on commit 92dac2d

Please sign in to comment.