-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a94902b
commit daf6a7b
Showing
13 changed files
with
153 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pictures-Ordner nach target/classes |
40 changes: 40 additions & 0 deletions
40
DMXSoftware/src/main/java/SnowballThrower/dmxsoftware/Database/Channels.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package SnowballThrower.dmxsoftware.Database; | ||
|
||
import SnowballThrower.dmxsoftware.Processing.Manage; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* | ||
* @author Sven | ||
*/ | ||
public class Channels { | ||
|
||
DMXChannel[] channels; | ||
Manage manager; | ||
|
||
public Channels(Manage manager) { | ||
channels = new DMXChannel[600]; | ||
} | ||
|
||
public Channels(Manage manager, List<Device> devices) { | ||
channels = new DMXChannel[600]; | ||
for (Device device : devices) { | ||
for (DMXChannel channel : device.getChannels()) { | ||
if (channel != null) { | ||
channel.addManager(manager); | ||
channels[channel.adress] = channel; | ||
} | ||
} | ||
} | ||
} | ||
|
||
public DMXChannel[] getAll() { | ||
return channels; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
DMXSoftware/src/main/java/SnowballThrower/dmxsoftware/Database/ControlChannel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package SnowballThrower.dmxsoftware.Database; | ||
|
||
/** | ||
* | ||
* @author Sven | ||
*/ | ||
public class ControlChannel extends Channel{ | ||
|
||
public ControlChannel(TypeChannel ch) { | ||
super(ch); | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
DMXSoftware/src/main/java/SnowballThrower/dmxsoftware/Database/DMXChannel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package SnowballThrower.dmxsoftware.Database; | ||
|
||
import SnowballThrower.dmxsoftware.Processing.Manage; | ||
import java.util.List; | ||
|
||
/** | ||
* | ||
* @author Sven | ||
*/ | ||
public class DMXChannel extends Channel { | ||
|
||
Device device; | ||
List<ControlChannel> controls; | ||
int adress; | ||
private Manage manager; | ||
|
||
public DMXChannel(TypeChannel ch) { | ||
super(ch); | ||
this.number = ch.getNumber(); | ||
} | ||
|
||
public DMXChannel(TypeChannel ch, Device dev) { | ||
super(ch); | ||
this.number = ch.getNumber(); | ||
this.device = dev; | ||
this.adress = device.getStartCh() + number - 1; | ||
} | ||
|
||
@Override | ||
public void setValue(int value) { | ||
super.setValue(value); | ||
if (device != null) { | ||
device.act(); | ||
|
||
} | ||
manager.handle(adress, value); | ||
} | ||
|
||
public int getAdress() { | ||
return adress; | ||
} | ||
|
||
public Device getDevice() { | ||
return device; | ||
} | ||
|
||
void addManager(Manage manager) { | ||
this.manager = manager; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,8 @@ public void startMidi() { | |
System.out.println("Error in startMidi"); | ||
} | ||
} | ||
|
||
public void barExtend(){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.