Skip to content

Commit

Permalink
Bilder, Menus, refs #4, #5, #8
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowballThrower committed Feb 15, 2016
1 parent da7563f commit a94902b
Show file tree
Hide file tree
Showing 16 changed files with 377 additions and 115 deletions.
79 changes: 46 additions & 33 deletions DMXSoftware/Data/DeviceTypes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Name>"AmericanDJ"</Name>
<Type>"Par"</Type>
<Power>"36"</Power>
<Symbol>"http://static.americandj.eu/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/3/0/304155_2.jpg"</Symbol>
<Symbol>"/Pictures/ADJ_Par.png"</Symbol>

<Channels No="7">

Expand Down Expand Up @@ -68,7 +68,7 @@


<Channel Nr="5" F="Param1">
<ChName>"Speed/Sens"</ChName>
<ChName>"Speed/Sens/Strobe"</ChName>
<Values case="0">
<conditions>
<condition Channel="6">
Expand All @@ -86,17 +86,37 @@
</condition>
</conditions>
<Name>"Sensitivity"</Name>

</Values>

<Values case="2">
<conditions>
<condition Channel="6">
<range min="0" max="15"></range>
</condition>
</conditions>
<Name>"Strobe"</Name>
</Values>
</Channel>

<Channel Nr="6" F="Program">
<ChName>"Program"</ChName>
<Values case="0">
<conditions></conditions>
<Name>"Program"</Name>
<Value low="0" high="15">"Color Mix"</Value>
<Value low="16" high="30">"Blink1"</Value>
<Value low="31" high="45">"Blink2"</Value>
<Value low="46" high="60">"Blink3"</Value>
<Value low="61" high="75">"Jump"</Value>
<Value low="76" high="90">"Fade"</Value>
</Values>
</Channel>

<Channel Nr="7" F="Dimmer">
<ChName>"Dimmer"</ChName>
<Values case="0">
<conditions>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>

Expand All @@ -122,7 +142,6 @@
<range min="0" max="15"></range>
</condition>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>
</Channels>
Expand All @@ -132,7 +151,7 @@
<Name>"Renkforce RDM Par_10"</Name>
<Type>"Par"</Type>
<Power>"60"</Power>
<Symbol>"https://www.conrad.de/medias/global/ce/6000_6999/6400/6440/6448/1301624_LB_00_FB.EPS_1000.jpg"</Symbol>
<Symbol>"/Pictures/Renkforce RDM.jpg"</Symbol>

<Channels No="10">

Expand All @@ -141,7 +160,6 @@
<Values case="0">
<conditions>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>

Expand All @@ -150,7 +168,6 @@
<Values case="0">
<conditions>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>

Expand All @@ -159,31 +176,27 @@
<Values case="0">
<conditions>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>
<Channel Nr="4" F="Blue">
<ChName>"Blue"</ChName>
<Values case="0">
<conditions>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>
<Channel Nr="5" F="White">
<ChName>"White"</ChName>
<Values case="0">
<conditions>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>
<Channel Nr="6" F="Amber">
<ChName>"Amber"</ChName>
<Values case="0">
<conditions>
</conditions>
<Value low="0" high="255">"1:1"</Value>
</Values>
</Channel>
</Channels>
Expand All @@ -194,7 +207,7 @@
<Name>"Stairville LED Bar 24"</Name>
<Type>"Bar"</Type>
<Power>"36"</Power>
<Symbol>"https://www.thomann.de/pics/bdb/294835/6519071_800.jpg"</Symbol>
<Symbol>"/Pictures/Stairville Bar.jpg"</Symbol>

<Channels No="24">
<Channel Nr="1" F="Red">
Expand Down Expand Up @@ -240,126 +253,126 @@
</Values>
</Channel>
<Channel Nr="7" F="Red">
<ChName>"Red2"</ChName>
<ChName>"Red3"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="8" F="Green">
<ChName>"Green2"</ChName>
<ChName>"Green3"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="9" F="Blue">
<ChName>"Blue2"</ChName>
<ChName>"Blue3"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="10" F="Red">
<ChName>"Red2"</ChName>
<ChName>"Red4"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="11" F="Green">
<ChName>"Green2"</ChName>
<ChName>"Green4"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="12" F="Blue">
<ChName>"Blue2"</ChName>
<ChName>"Blue4"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="13" F="Red">
<ChName>"Red2"</ChName>
<ChName>"Red5"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="14" F="Green">
<ChName>"Green2"</ChName>
<ChName>"Green5"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="15" F="Blue">
<ChName>"Blue2"</ChName>
<ChName>"Blue5"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="16" F="Red">
<ChName>"Red2"</ChName>
<ChName>"Red6"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="17" F="Green">
<ChName>"Green2"</ChName>
<ChName>"Green6"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="18" F="Blue">
<ChName>"Blue2"</ChName>
<ChName>"Blue6"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="19" F="Red">
<ChName>"Red2"</ChName>
<ChName>"Red7"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="20" F="Green">
<ChName>"Green2"</ChName>
<ChName>"Green7"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="21" F="Blue">
<ChName>"Blue2"</ChName>
<ChName>"Blue7"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="22" F="Red">
<ChName>"Red2"</ChName>
<ChName>"Red8"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="23" F="Green">
<ChName>"Green2"</ChName>
<ChName>"Green8"</ChName>
<Values case="0">
<conditions>
</conditions>
</Values>
</Channel>
<Channel Nr="24" F="Blue">
<ChName>"Blue2"</ChName>
<ChName>"Blue8"</ChName>
<Values case="0">
<conditions>
</conditions>
Expand All @@ -372,7 +385,7 @@
<Name>"Outdoor"</Name>
<Type>"Par"</Type>
<Power>"120"</Power>
<Symbol>"https://www.thomann.de/pics/bdb/305314/7974151_800.jpg"</Symbol>
<Symbol>"/Pictures/Outdoor.jpg"</Symbol>

<Channels No="7">

Expand Down Expand Up @@ -423,7 +436,7 @@
<Name>"Cameo"</Name>
<Type>"Par"</Type>
<Power>"144"</Power>
<Symbol>"http://www.cameolight.com/out/pictures/generated/product/1/1000_1000_80/CLPST64RGBWAU12W_1.jpg"</Symbol>
<Symbol>"/Pictures/Cameo Par.jpg"</Symbol>

<Channels No="9">

Expand Down
Empty file removed DMXSoftware/Data/Pictures/ADJ.png
Empty file.
Binary file removed DMXSoftware/Data/Pictures/ADJ_Par.jpg
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,61 @@
*/
package SnowballThrower.dmxsoftware.Database;

import SnowballThrower.dmxsoftware.Surface.Fader;
import java.util.LinkedList;
import java.util.List;
import javafx.scene.text.Text;

/**
*
* @author Sven
*/
public class Channel {
public abstract class Channel {

String name;
int number;
Function function;
List<Meaning> meanings;

String getMeaning(int value, int[] values) {
int i;
for (i = 0; i < meanings.size(); i++) {
if (meanings.get(i).met(values)) {
return meanings.get(i).getMeaning(value);
}
int value;
TypeChannel typeCh;
private final Function function;
List<Fader> faders;
List<Channel> channels;

public void setValue(int value) {
this.value = value;
for (Fader fader : faders) {
fader.act();
}
return value + "";
}

public String getStandardMeaning(int value) {
if (meanings != null) {
if (meanings.get(0) != null) {
return meanings.get(0).getMeaning(value);
}
public void act() {
for (Fader fader : faders) {
fader.act();
}
return null;
}

public int getValue() {
return this.value;
}

public TypeChannel getchType() {
return typeCh;
}

public Function getFunction() {
return function;
}

public Channel(TypeChannel ch) {
faders = new LinkedList<Fader>();
value = 0;
typeCh = ch;
function = ch.getFunction();
number = 0;
}

public int getNumber() {
return this.number;
}

public void register(Fader aThis) {
faders.add(aThis);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
*/
class Condition {

int Channel;
int channel;
List<Range> ranges;
boolean met;

boolean met(int[] values) {
if (Channel > 0 && Channel < values.length) {
if (channel > 0 && channel <= values.length) {
for (int count = 0; count < ranges.size(); count++) {
if ((values[Channel] >= ranges.get(count).min && values[Channel] <= ranges.get(count).max)) {
if ((values[channel - 1] >= ranges.get(count).min && values[channel - 1] <= ranges.get(count).max)) {
return true;
}
}
Expand Down
Loading

0 comments on commit a94902b

Please sign in to comment.