diff --git a/deploy/HyperCon.jar.REMOVED.git-id b/deploy/HyperCon.jar.REMOVED.git-id index 8e0da122..b045c0bd 100644 --- a/deploy/HyperCon.jar.REMOVED.git-id +++ b/deploy/HyperCon.jar.REMOVED.git-id @@ -1 +1 @@ -c8654fba4777ea4222897a55d1d24517cc636482 \ No newline at end of file +76f29d2a8a10e60629d08889f183d318dfee9f3f \ No newline at end of file diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_32.png b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_32.png new file mode 100644 index 00000000..c054e66a Binary files /dev/null and b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_32.png differ diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_64.png b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_64.png new file mode 100644 index 00000000..8f731d10 Binary files /dev/null and b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_64.png differ diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/LedString.java b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/LedString.java index ecb1ef15..a46b99c0 100644 --- a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/LedString.java +++ b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/LedString.java @@ -43,19 +43,19 @@ public class LedString { public void saveConfigFile(String mFilename) throws IOException { try (FileWriter fw = new FileWriter(mFilename)) { - fw.write("// Automatically generated configuration file for 'Hyperion'\n"); - fw.write("// Generated by: 'Hyperion configuration Tool\n"); + fw.write("// Automatically generated configuration file for 'Hyperion daemon'\n"); + fw.write("// Generated by: HyperCon (The Hyperion deamon configuration file builder\n"); fw.write("\n"); fw.write("{\n"); String deviceJson = mDeviceConfig.toJsonString(); - fw.write(deviceJson + ",\n"); + fw.write(deviceJson + ",\n\n"); String colorJson = mColorConfig.toJsonString(); - fw.write(colorJson + ",\n"); + fw.write(colorJson + ",\n\n"); String ledJson = ledToJsonString(); - fw.write(ledJson + ",\n"); + fw.write(ledJson + ",\n\n"); String miscJson = mMiscConfig.toJsonString(); fw.write(miscJson + "\n"); @@ -73,6 +73,17 @@ public class LedString { */ String ledToJsonString() { StringBuffer strBuf = new StringBuffer(); + + strBuf.append("\t/// The configuration for each individual led. This contains the specification of the area \n"); + strBuf.append("\t/// averaged of an input image for each led to determine its color. Each item in the list \n"); + strBuf.append("\t/// contains the following fields:\n"); + strBuf.append("\t/// * index: The index of the led. This determines its location in the string of leds; zero \n"); + strBuf.append("\t/// being the first led.\n"); + strBuf.append("\t/// * hscan: The fractional part of the image along the horizontal used for the averaging \n"); + strBuf.append("\t/// (minimum and maximum inclusive)\n"); + strBuf.append("\t/// * vscan: The fractional part of the image along the vertical used for the averaging \n"); + strBuf.append("\t/// (minimum and maximum inclusive)\n"); + strBuf.append("\t\"leds\" : \n"); strBuf.append("\t[\n"); diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/Main.java b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/Main.java index 721dd0c1..3bf0e40b 100644 --- a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/Main.java +++ b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/Main.java @@ -1,5 +1,6 @@ package org.hyperion.hypercon; +import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.UIManager; @@ -27,6 +28,7 @@ public class Main { frame.setTitle("Hyperion configuration Tool"); frame.setSize(1300, 600); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + frame.setIconImage(new ImageIcon(Main.class.getResource("HyperConIcon_64.png")).getImage()); // Add the HyperCon configuration panel frame.setContentPane(new ConfigPanel()); diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/ColorConfig.java b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/ColorConfig.java index 539659ec..afc91d98 100644 --- a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/ColorConfig.java +++ b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/ColorConfig.java @@ -46,6 +46,17 @@ public class ColorConfig { */ public String toJsonString() { StringBuffer strBuf = new StringBuffer(); + + strBuf.append("\t/// Color manipulation configuration used to tune the output colors to specific surroundings. Contains the following fields:\n"); + strBuf.append("\t/// * 'hsv' : The manipulation in the Hue-Saturation-Value color domain with the following tuning parameters:\n"); + strBuf.append("\t/// - 'saturationGain' The gain adjustement of the saturation\n"); + strBuf.append("\t/// - 'valueGain' The gain adjustement of the value\n"); + strBuf.append("\t/// * 'red'/'green'/'blue' : The manipulation in the Red-Green-Blue color domain with the following tuning parameters for each channel:\n"); + strBuf.append("\t/// - 'threshold' The minimum required input value for the channel to be on (else zero)\n"); + strBuf.append("\t/// - 'gamma' The gamma-curve correction factor\n"); + strBuf.append("\t/// - 'blacklevel' The lowest possible value (when the channel is black)\n"); + strBuf.append("\t/// - 'whitelevel' The highest possible value (when the channel is white)\n"); + strBuf.append("\t\"color\" :\n"); strBuf.append("\t{\n"); strBuf.append(hsvToJsonString() + ",\n"); @@ -65,7 +76,7 @@ public class ColorConfig { strBuf.append("\t\t\"hsv\" :\n"); strBuf.append("\t\t{\n"); strBuf.append(String.format(Locale.ROOT, "\t\t\tsaturationGain : %.4f,\n", mSaturationGain)); - strBuf.append(String.format(Locale.ROOT, "\t\t\tsaturationGain : %.4f\n", mValueGain)); + strBuf.append(String.format(Locale.ROOT, "\t\t\tvaluGain : %.4f\n", mValueGain)); strBuf.append("\t\t}"); return strBuf.toString(); diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/DeviceConfig.java b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/DeviceConfig.java index 58cef5c8..468ae126 100644 --- a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/DeviceConfig.java +++ b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/DeviceConfig.java @@ -21,6 +21,15 @@ public class DeviceConfig { */ public String toJsonString() { StringBuffer strBuf = new StringBuffer(); + + strBuf.append("\t/// Device configuration contains the following fields: \n"); + strBuf.append("\t/// * 'name' : The user friendly name of the device (only used for display purposes)\n"); + strBuf.append("\t/// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'test' and 'none')\n"); + strBuf.append("\t/// * 'output' : The output specification depends on selected device\n"); + strBuf.append("\t/// - 'ws2801' this is the device (eg '/dev/spidev0.0')\n"); + strBuf.append("\t/// - 'test' this is the file used to write test output (eg '/home/pi/hyperion.out')\n"); + strBuf.append("\t/// * 'rate' : The baudrate of the output to the device (only applicable for 'ws2801')\n"); + strBuf.append("\t\"device\" :\n"); strBuf.append("\t{\n"); diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/MiscConfig.java b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/MiscConfig.java index d31d7444..5c2bbea6 100644 --- a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/MiscConfig.java +++ b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/spec/MiscConfig.java @@ -40,24 +40,48 @@ public class MiscConfig { */ public String toJsonString() { StringBuffer strBuf = new StringBuffer(); + + strBuf.append("\t/// The configuration of the XBMC connection used to enable and disable the frame-grabber. Contains the following fields: \n"); + strBuf.append("\t/// * enable : Flag for enabling or disabling the XBMC-based frame grabbing\n"); + strBuf.append("\t/// * xbmcAddress : The IP address of the XBMC-host\n"); + strBuf.append("\t/// * xbmcTcpPort : The TCP-port of the XBMC-server\n"); + strBuf.append("\t/// * grabVideo : Flag indicating that the frame-grabber is on(true) during video playback\n"); + strBuf.append("\t/// * grabPictures : Flag indicating that the frame-grabber is on(true) during picture show\n"); + strBuf.append("\t/// * grabAudio : Flag indicating that the frame-grabber is on(true) during audio playback\n"); + strBuf.append("\t/// * grabMenu : Flag indicating that the frame-grabber is on(true) in the XBMC menu\n"); + + strBuf.append("\t\"xbmcVideoChecker\" :\n"); + strBuf.append("\t{\n"); + strBuf.append(String.format(Locale.ROOT, "\t\t\"enable\" : %s,\n", mXbmcChecker)); + strBuf.append(String.format(Locale.ROOT, "\t\t\"xbmcAddress\" : \"%s\",\n", mXbmcAddress)); + strBuf.append(String.format(Locale.ROOT, "\t\t\"xbmcTcpPort\" : %d,\n", mXbmcTcpPort)); + strBuf.append(String.format(Locale.ROOT, "\t\t\"grabVideo\" : %s,\n", mVideoOn)); + strBuf.append(String.format(Locale.ROOT, "\t\t\"grabPictures\" : %s,\n", mPictureOn)); + strBuf.append(String.format(Locale.ROOT, "\t\t\"grabAudio\" : %s,\n", mAudioOn)); + strBuf.append(String.format(Locale.ROOT, "\t\t\"grabMenu\" : %s\n", mMenuOn)); + strBuf.append("\t},\n"); + + strBuf.append("\t/// The boot-sequence configuration, contains the following items: \n"); + strBuf.append("\t/// * type : The type of the boot-sequence ('rainbow', 'knight_rider', 'none') \n"); + strBuf.append("\t/// * duration_ms : The length of the boot-sequence [ms]\n"); + strBuf.append("\t\"bootsequence\" :\n"); strBuf.append("\t{\n"); strBuf.append(String.format(Locale.ROOT, "\t\t\"type\" : \"%s\",\n", mBootSequence)); strBuf.append(String.format(Locale.ROOT, "\t\t\"duration_ms\" : %d\n", mBootSequenceLength_ms)); strBuf.append("\t},\n"); + + strBuf.append("\t/// The configuration for the frame-grabber, contains the following items: \n"); + strBuf.append("\t/// * width : The width of the grabbed frames [pixels]\n"); + strBuf.append("\t/// * height : The height of the grabbed frames [pixels]\n"); + strBuf.append("\t/// * frequency_Hz : The frequency of the frame grab [Hz]\n"); + strBuf.append("\t\"framegrabber\" :\n"); strBuf.append("\t{\n"); strBuf.append(String.format(Locale.ROOT, "\t\t\"width\" : %d,\n", mFrameGrabberWidth)); strBuf.append(String.format(Locale.ROOT, "\t\t\"height\" : %d,\n", mFrameGrabberHeight)); strBuf.append(String.format(Locale.ROOT, "\t\t\"frequency_Hz\" : %.1f\n", 1000.0/mFrameGrabberInterval_ms)); - strBuf.append("\t},\n"); - - strBuf.append("\t\"xbmcVideoChecker\" :\n"); - strBuf.append("\t{\n"); - strBuf.append(String.format(Locale.ROOT, "\t\t\"enable\" : %s,\n", mXbmcChecker)); - strBuf.append(String.format(Locale.ROOT, "\t\t\"xbmcAddress\" : \"%s\",\n", mXbmcAddress)); - strBuf.append(String.format(Locale.ROOT, "\t\t\"xbmcTcpPort\" : %d\n", mXbmcTcpPort)); strBuf.append("\t}"); return strBuf.toString();