Skip to content

Commit

Permalink
Update SNAPSHOT 0.9.0
Browse files Browse the repository at this point in the history
Restructured the program to use less RAM, using ArrayLists instead of set Lists

Converted many data objects to a new form, but it still needs restructuring.
  • Loading branch information
Rusettsten committed Oct 10, 2021
1 parent fe4937d commit 30beab1
Show file tree
Hide file tree
Showing 36 changed files with 1,816 additions and 787 deletions.
70 changes: 32 additions & 38 deletions photon/.classpath
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
6 changes: 3 additions & 3 deletions photon/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand All @@ -13,4 +13,4 @@ org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.8
5 changes: 5 additions & 0 deletions photon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<artifactId>guava</artifactId>
<version>30.0-jre</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
44 changes: 34 additions & 10 deletions photon/src/main/java/com/strikete/photon/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@
import org.apache.log4j.Logger;

import com.google.common.eventbus.Subscribe;
import com.strikete.photon.csv.CsvCueLevelParser;
import com.strikete.photon.events.ChannelCountUpdateEvent;
import com.strikete.photon.events.ChannelUpdateEvent;
import com.strikete.photon.objects.Channel;
import com.strikete.photon.objects.DmxAddress;
import com.strikete.photon.osc.OscInstance;
import com.strikete.photon.osc.OscInstance.OscFormat;
import com.strikete.photon.wtsahtsi.Wtsahtsi;

public class Main {

/*
* VARIABLES
*/

public static final String version = "SNAPSHOT 0.0.1";
public static final String version = "SNAPSHOT 0.9.0";
public static Logger log;

/*
Expand Down Expand Up @@ -63,29 +65,51 @@ public static void main(String[] args) throws IOException {
//Print welcome message
printWelcomeMessage();

OscInstance osc = new OscInstance(OscFormat.ETC_EOS,"192.168.10.109",6300,6301);
OscInstance osc = new OscInstance(OscFormat.ETC_EOS,"192.168.0.86",6300,6301);
Main main = new Main();
System.out.println(InetAddress.getLocalHost());

osc.init();
//osc.getEventHandler().register(main);
osc.getObjectUpdater().doBasicUpdate();
osc.getEventHandler().register(main);



try {
Thread.sleep(5000);
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

osc.getOscSender().sendOscMessage("/eos/out/active/chan");
System.out.println("message sent");

//osc.getOscSender().sendOscMessage(osc.getOscMap().KEY_BLIND);
//osc.getOscSender().selectChannel(1);
while(true) {
//osc.getOscSender().sendOscMessage(osc.getOscMap().GET_PATCH_COUNT);

osc.getObjectUpdater().doBasicUpdate();

//while(true) {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

//System.out.println(osc.getOscParser().getChannelSize());
//Wtsahtsi whut = new Wtsahtsi("/Users/rusettsten/Desktop/KC-ON YOUR FEET.csv",1,osc,1499);
printCueLabels(osc);


}
//}

public static void printCueLabels(OscInstance osc) {
int cueSize = osc.getOscParser().getCuelistFromIndex(0).getCueSize();
for(int x = 0; x < cueSize; x++) {
if(!osc.getOscParser().getCuelistFromIndex(0).getCue(x).getName().isEmpty() && !osc.getOscParser().getCuelistFromIndex(0).getCue(x).getName().contains("copy")) {
float cueNumber = osc.getOscParser().getCuelistFromIndex(0).getCue(x).getCueNumber();
String cueName = osc.getOscParser().getCuelistFromIndex(0).getCue(x).getName();
System.out.println("Q" + cueNumber + ": " + cueName);
}
}
}

Expand Down
43 changes: 0 additions & 43 deletions photon/src/main/java/com/strikete/photon/Table.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.strikete.photon.csv;

public enum CsvCueLevelHeaders {
TARGET_TYPE,
TARGET_TYPE_AS_TEXT,
TARGET_LIST_NUMBER,
TARGET_ID,
TARGET_PART_NUMBER,
CHANNEL,
PARAMETER_TYPE,
PARAMETER_TYPE_AS_TEXT,
LEVEL,
LEVEL_REFERENCE_TYPE,
LEVEL_REFERENCE_TYPE_AS_TEXT,
LEVEL_REFERENCE_LIST_NUMBER,
LEVEL_REFERENCE_ID,
FADE_TIME,
DELAY_TIME,
MARK_CUE,
TRACK_TYPE,
EFFECT
}
Loading

0 comments on commit 30beab1

Please sign in to comment.