|
20 | 20 |
|
21 | 21 | try: |
22 | 22 |
|
23 | | - device_versions = [ HyperPyCon.HyperPyCon.ws2801 , HyperPyCon.HyperPyCon.adalight ] |
| 23 | + device_versions = [ HyperPyCon.HyperPyCon.ws2801 , HyperPyCon.HyperPyCon.adalight, HyperPyCon.HyperPyCon.apa102] |
24 | 24 | selected_device = xbmcgui.Dialog().select("Select your led device:",device_versions) |
25 | 25 | if selected_device == 0: |
26 | 26 | if "spidev" not in subprocess.check_output(['ls','/dev']): |
|
34 | 34 |
|
35 | 35 | hyperion_configuration = HyperPyCon.HyperPyCon(int(nol_horizontal), int(nol_vertical)) |
36 | 36 | hyperion_configuration.set_device_type(device_versions[selected_device]) |
37 | | - |
| 37 | + hyperion_configuration.set_device_rate(int(addon.getSetting("rate"))) |
| 38 | + hyperion_configuration.set_color_values(float(addon.getSetting("redThreshold")), float(addon.getSetting("redGamma")),float(addon.getSetting("redBlacklevel")),float(addon.getSetting("redWhitelevel")),"RED") |
| 39 | + hyperion_configuration.set_color_values(float(addon.getSetting("greenThreshold")), float(addon.getSetting("greenGamma")),float(addon.getSetting("greenBlacklevel")),float(addon.getSetting("greenWhitelevel")),"GREEN") |
| 40 | + hyperion_configuration.set_color_values(float(addon.getSetting("blueThreshold")), float(addon.getSetting("blueGamma")),float(addon.getSetting("blueBlacklevel")),float(addon.getSetting("blueWhitelevel")),"BLUE") |
| 41 | + hyperion_configuration.set_smoothing(addon.getSetting("smoothingType"),int(addon.getSetting("smoothingTime")),int(addon.getSetting("smoothingFreq"))) |
| 42 | + hyperion_configuration.set_blackborderdetection((addon.getSetting("bbdEnabled") == "true"), float(addon.getSetting("bbdThreshold"))) |
| 43 | + |
38 | 44 | options = ["Right/bottom corner and goes up","Left/bottom corner and goes up","Center/bottom and goes right","Center/bottom and goes left"] |
39 | 45 | selected_index = xbmcgui.Dialog().select("Select where the led chain starts:",options) |
40 | 46 |
|
|
70 | 76 | hyperion_configuration.save_config_file(hyperion_configuration.create_config(grabber),"/storage/.config/","hyperion.config.new") |
71 | 77 | hyperion_configuration.restart_hyperion("hyperion.config.new") |
72 | 78 | if not xbmcgui.Dialog().yesno(addonname, "Have you seen the rainbow swirl?"): |
73 | | - xbmcgui.Dialog().ok(addonname, "Something went wrong... Please try running hyperion from command line to see the error...") |
| 79 | + xbmcgui.Dialog().ok(addonname, "Something went wrong... Please try running hyperion from command line to see the error... (on openelec: /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.new)") |
74 | 80 | sys.exit() |
75 | 81 | else: |
76 | 82 | xbmcgui.Dialog().ok(addonname, "For the next 10 seconds you will see test image and leds should adjust to that image. Check if the leds are showing the right colors in the right places."+ |
|
92 | 98 | elif xbmcgui.Dialog().yesno(addonname, "Hyperion is now running with the newly created config. Would you like to restart hyperion with previous config?"): |
93 | 99 | hyperion_configuration.restart_hyperion("hyperion.config.json") |
94 | 100 |
|
95 | | - xbmcgui.Dialog().ok(addonname, "That\'s all Folks! :) . Enjoy!") |
| 101 | + xbmcgui.Dialog().ok(addonname, "That\'s all Folks! :) . Enjoy!", "If you'd like to fine tune advanced parameters, please modify addon settings before running it") |
96 | 102 |
|
97 | 103 | except Exception, e: |
98 | | - xbmcgui.Dialog().ok(addonname, repr(e)) |
| 104 | + xbmcgui.Dialog().ok(addonname, repr(e),"Please report an error at github issue list") |
99 | 105 |
|
100 | 106 |
|
0 commit comments