From 352d9f5652df3b9d72ae21fe2f98d3e216add819 Mon Sep 17 00:00:00 2001 From: "T. van der Zwan" Date: Tue, 1 Oct 2013 15:42:49 +0200 Subject: [PATCH] Added comment generation to configuration file writer. Added icon to main-frame. Update of jar. Former-commit-id: f620c0cae0f7bd26fa1ef3c5b10cb26d2975b2eb --- deploy/HyperCon.jar.REMOVED.git-id | 2 +- .../org/hyperion/hypercon/HyperConIcon_32.png | Bin 0 -> 2323 bytes .../org/hyperion/hypercon/HyperConIcon_64.png | Bin 0 -> 7642 bytes .../src/org/hyperion/hypercon/LedString.java | 21 +++++++--- .../src/org/hyperion/hypercon/Main.java | 2 + .../hyperion/hypercon/spec/ColorConfig.java | 13 +++++- .../hyperion/hypercon/spec/DeviceConfig.java | 9 +++++ .../hyperion/hypercon/spec/MiscConfig.java | 38 ++++++++++++++---- 8 files changed, 71 insertions(+), 14 deletions(-) create mode 100644 src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_32.png create mode 100644 src/config-tool/ConfigTool/src/org/hyperion/hypercon/HyperConIcon_64.png 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 0000000000000000000000000000000000000000..c054e66aea61ccded6fb5757bd48ae62b70e23ad GIT binary patch literal 2323 zcmV+u3GDWXP)CK{$3GnfDX03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00?(UL_t(o!*!S0jwQ!& zhQEl+tmP~{-Lp~zNlSzP1BNer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g3>ZBQ$FPpSu+9xBMtL_0ApHM6_O97sui%Ha zs{J~kGq3M1&9`eqpSNL*)(}>cmJZvsd*arig6iA28IiaWKbtehg`VEx=IRHS)29iLS#~wyFYeDsWAM z&9!`9G=PPbLv7~E){&?8iM70wg1FMRzHaCWP3_(xH0^cxMc$3+xG(Vc?@tW=XkN(? zaCCT9L^+CCX)9bO(yr$av{0=BFRh?~L)5W$N#0HBxWD7ob{&VjP6d57Bh&~f{IW+Q zU#L<1V?Xw84Z79`)ZTCpZ<8VI>`paOwAJ&dtvG1)EgJkhd-#ICTn8K46^gEN9_^pL z4$Qnc;XlSD+ZPD)58ZxK%(oS_R99D{_qH-y*W^8X6wkGQ) zoAtlW85C?aH&+7aThe_sMDMnC%}w4VX8#1-Uz@vRl!{SSZ*V>IkKP)x3dspU8$3R~ zvO?F1o$JK~BdqQ7##jBkwy-|h-pN7R{QJ4j_bsaOZaMZ(paRl@XX@+b^&Jteb8Gf) zhOH2aK~^J+Yi03uGE7WS>bh`Ud7A-`;@2%Us<&6j`pT;+Twn5D3f|0AS*54`LJj`m z+;8LA>ulP)qr6*xeJ7&|WI|SO;@Y(JwTq;U&((AdXWR;=EGP-+sQ6V1nmUwMwRmp> z%Icl3igI0Sq^?Bx$E(2GY`T)EZ4_%g^19*j76ZJhXU16gf4e+MfTnoQW&i*H07*qo IM6N<$f^p5RjsO4v literal 0 HcmV?d00001 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();