Commit Graph

182 Commits

Author SHA1 Message Date
penfold42 c179b86b8d fix LedDeviceWs2812SPI to compile on gcc 4.6 (#643)
* Removed -HUP so the default -TERM signal is sent instead.
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process

* reversing errant change to hyperion.systemd.sh

* cleaned up a couple of compiler warnings

* moved bitpair_to_byte initialiser to (hopefully) work with older GCC

* compiler warning in udp driver
removed some tabs in ws2812b.cpp

* formatting - spaces to tabs


Former-commit-id: 42cc7325177c9fcc3d1bd29cbfe72f02118d3233
2016-05-22 12:56:44 +02:00
recliq 8310a6d9d0 added simple TPM2.net support to UDP output (#627)
Former-commit-id: 59356ae53c90e178a4bc198c6babc5832bb15d12
2016-05-15 18:39:26 +02:00
penfold42 a960894d14 Another option for Ws2812 - direct spi from the pi with 1 wire (#631)
* Removed -HUP so the default -TERM signal is sent instead.
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process

* reversing errant change to hyperion.systemd.sh

* This add a new device type - ws2812spi.

I've (ab)used the SPI interface to send the correct timing pulses to keep the ws2812 happy.
THE RATE IS IMPORTANT!
A FIXED CORE_CLK IS IMPORTANT!

Attach the SPI MOSI pin on the Pi to the DIN pin on your ws2812

        "device" :
        {
                "name"       : "MyPi",
                "type"       : "ws2812spi",
                "colorOrder" : "grb",
                "output"     : "/dev/spidev0.0",
                "rate"       : 3800000
        },

* updated hyperiond.test-binary

* Updated default SPI speed to the "correct" value.
My Pi was undervolted so was dropping the core clock confusing everything

* Code cleanups
explicitly set the final 3 bytes to 0

* Removed latchtime option - not applicable

* updated test binary


Former-commit-id: d3c19c8374999f7a554bb25ca181a8a483f86289
2016-05-15 18:39:17 +02:00
penfold42 c17e4894d9 Apa102 fix if the led strip has more physical LEDs than you want to configure with hyperion (#626)
* Removed -HUP so the default -TERM signal is sent instead.
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process

* reversing errant change to hyperion.systemd.sh

* started bug fixes for APA strips with more physical leds than configured

* 1st cut of changes to APA102.

now looks at config for "leds" which is the # of hardware leds in the strip.
This enables us to write the correct trailer length in the packet.

Also fixed a bug where switchoff was writing the wrong # of leds

* removed commented out old code

removed debug printf

* included prebuild test binary for Pi2

* Second attempt at the fix.
BEFORE:
If you have more physcial LEDs than defined in the "leds" "index" section of the config there is random junk added to the end of the strip.

WITH THIS FIX:
In the "device" section specify the number of physical leds with:
 "leds" : 212,
If this is greater than the number of led indexes, additional LEDs are set to black
If this is smaller than the number of led indexes, it is ignored

* included test binary

* Clean exit if the device config is missing or a non-supported device type is specified

Former-commit-id: 8ae96188fa74d91b13a921e7d5faf6d6ac1c42ee
2016-05-10 12:16:19 +02:00
RickDB 3227a3125b AtmoOrb - removed skip same color change.
Former-commit-id: 399ad830d9ecad8bf8d1e62241744f15631f0515
2016-05-05 14:48:33 +02:00
penfold42 deed8066b0 Piblaster fix (#614)
* Removed -HUP so the default -TERM signal is sent instead.
- hyperiond only listens for TERM and INT. HUP is often used to get an exe to reread its config

Changed pgrep to add '-x' so it wont partial match on the exe name.
- I have multiple instances with multiple hyperiond-instance1 names
- this ensures the service script only kills the right process

* reversing errant change to hyperion.systemd.sh

* Experimental changes to piblaster code to work how i think it should

It is now assumed that the PWM pins in groups of 3 correspond to RGB channels of the led.
                "assignment"       : "rgbrgbrgb",
Would result in:
//Channel number    GPIO number   Led channel
//      0               4             0 red
//      1              17             0 green
//      2              18             0 blue
//      4              27             1 red
//      5              21             1 green
//      6              22             1 blue
//      7              23             2 red
//      8              24             2 green
//      9              25             2 blue

* Ammend pwm channel mapping comments to match the code

* 1st cut of the new more flexible piblaster pin mapping support

it works but is still rough

* removed old "assignment" handling
- prints an error messaage if found and terminates

fixed the switchoff method

* removing iPins hard coded list of valid GPIO pins

* removed iPins array for switchOff function

* code cleanups

input validation

* Handle catching (and ignoring) SIGPIPE.
You can now kill and restart pi-blaster daemon and hyperiond will gracefully recover

* added a binary for testing

* Added sample config and my modified pi-blaster version to support more GPIOs

* moved hyperiond

* removed testing binaries

move sample configuration to the configs directory

* re enabled device config display

* removed sample configuration


Former-commit-id: 95e4d4ea2fb7cb5439e8cd597883a638da61a574
2016-04-29 16:00:33 +02:00
Rick164 d4dda2dcc4 AtmoOrb LedDevice now only processes new color commands and skips identical, saves last send color per light id separately in Qmap. (#602)
Former-commit-id: 38873e5b718c73d95111abcb10cf148f6a6ab18b
2016-04-21 14:51:43 +02:00
Rick164 02fef83bb8 AtmoOrb smoothing additions
* Updated smoothing options for AtmoOrb, can now choose between Orb external or Hyperion's internal smoothing.
With skipSmoothingDif you can set the maximum allowed color difference before overriding / clearing Orb smoothing during faster color change like for instance color <-> black.

* Updated inline documentation.

* Fixed command type typo in AtmoOrb device.

* Corrected variable spelling in AtmoOrb device.

* Make smoothing also match equal values for AtmoOrb smoothing differential


Former-commit-id: 3eede43c2f76fa324f0144aeac0526b8125ad149
2016-04-02 00:07:28 +02:00
brindosch f332473b77 Merge remote-tracking branch 'refs/remotes/origin/Beta'
Former-commit-id: 5bdbda1406bb0ddb99440502584604b85b0f3063
2016-03-23 17:53:32 +01:00
brindosch fa66c3b2b5 Rework log messages
Former-commit-id: eac93c0fd78fdf353e940d08df3cabf0b962a3e2
2016-03-23 17:40:45 +01:00
penfold42 a3204ae6be LedDeviceFile now defaults to /dev/null if the output is omitted.
Former-commit-id: eff12ec16d08ffa00287ed68238ab6b397f1c53d
2016-03-23 21:28:31 +11:00
penfold42 7dce3ab798 renamed the "Test" device to be "File"
No functional changes, but
- files have been renamed
- the device name is now "file" not "test"


Former-commit-id: 3fbc03c3fe1d764654c1d28ebb80562ce6276ab1
2016-03-23 21:12:34 +11:00
penfold42 6143075365 1. changed default number of pwm LEDs to 256
2. Adds support for level shifters that invert the data
Config option - "invert" (integer)
if omitted, do not invert
if == 0, do not invert
if !=0, invert


Former-commit-id: fd5b2863a85b11ac3a8444d1e02822f852feb556
2016-03-22 23:50:14 +11:00
brindosch fb7445b545 Update
Former-commit-id: 3c6ac5d2f618cd7499c16bca950ff3d41f855318
2016-03-22 01:01:54 +01:00
brindosch 1f18073f00 Merge pull request #534 from AEtHeLsYn/master
Color correction

Former-commit-id: 7be726f1adb8698684a2b4726650082ed517901f
2016-03-22 00:56:41 +01:00
brindosch 2677304ec4 Merge pull request #553 from ntim/support_for_philips_hue
Improved validity checks and memory footprint for Philips Hue

Former-commit-id: 65b450ae730fd5e06006a8fe6ab3e3b6ce260c43
2016-03-22 00:56:27 +01:00
Mark Walker d2973ff20b Add ws281x driver parameter for PWM channel
The RPi 2 and 3 have two PWM channels and 3 PWM pins available to the
gpio header.  BCM18 and BCM12 run on PWM channel 0.  BCM13 runs on PWM
channel 1.  This change allows BCM13 to be used by allowing the PWM
channel to be specified.


Former-commit-id: 3693ab438c2b369e6307c262d32bba509409e5b9
2016-03-20 22:05:24 -07:00
ntim e0c3ece80d Deletion of qt network reply objects.
Former-commit-id: 258badb680014a187d76d9183080ea3de6895692
2016-03-20 13:33:41 +01:00
ntim 926f47fc1a Added more precise outputs on failures as well as some additional checks.
Former-commit-id: a0def586410d90abda002504d9c2ae88abc43088
2016-03-19 12:36:55 +01:00
ntim d75a88eb9f Retreived one light more than necessary.
Former-commit-id: 6ee5b0f4a86210fcf4bf3ee96b369aff20c25720
2016-03-17 09:06:28 +01:00
AEtHeLsYn 75991c16e1 Merge pull request #7 from tvdzwan/master
Up-to-date

Former-commit-id: ca05f264b29838c2444f2687ff1bf510bbf9d9af
2016-03-16 10:40:38 +01:00
RickDB 7adb339dea Updated orbIds config setting and sample config.
Former-commit-id: 350db40b53d04efbb43dc8c87c88bf2eb378fa6b
2016-03-15 18:37:55 +01:00
RickDB f783c59185 Corrected indenting in LedDeviceFactory.cpp.
Former-commit-id: 31713a4a0ce9bd25fd1e39969bbb481363a80167
2016-03-15 12:06:24 +01:00
RickDB e5545eaac0 Code reformatted.
Former-commit-id: 6f3688791602efb33389c3ba789e7a8a723ee290
2016-03-15 12:03:00 +01:00
RickDB dcc6a9b449 Make sure the byte array is empty before filling it.
Former-commit-id: 64f76fa358234e131377ecfabf196f3c7324e79f
2016-03-15 11:45:25 +01:00
RickDB 5be072be24 Added more inline documentation.
Simplified joinedMulticastgroup.
Removed non-required functions and includes.


Former-commit-id: 829b5c6f89ee1e9a4789dbe18f911b05e3b5d8e1
2016-03-15 11:10:04 +01:00
RickDB fdb164da0a Added multi Orb support, Orb ID should match that of leds index with a +1 offset (index 0 = Orb id 1 etc..)
Code cleanup.


Former-commit-id: af8a6df876f334c9a65b1a936b5bb85b380d86d1
2016-03-14 23:19:20 +01:00
RickDB 0d8c4ac5fb Correctly set buffer size based on number of leds so that it works with non-standard AtmoOrb setups.
Former-commit-id: 6aec2410d6e870c8489e565269f2990e3a9e1b85
2016-03-14 21:19:47 +01:00
RickDB bd1a45216a Initial AtmoOrb support including sample json config.
Former-commit-id: 51ad57afd39695095b5886966e8c71c4e47f269e
2016-03-14 20:19:19 +01:00
AEtHeLsYn 37c54d733d Merge remote-tracking branch 'refs/remotes/tvdzwan/master'
Former-commit-id: 59c1c363863c950e91ac57cc2ff39a722359634b
2016-03-13 11:49:49 +01:00
brindosch deb010cc22 fix leddevicephue
Former-commit-id: eb4f93bf7a59d496f83d8db534f99cf589c46bc9
2016-03-12 00:55:28 +01:00
brindosch e82643ff50 Merge pull request #533 from markwal/rpi_ws281x
Add new WS281x driver

Former-commit-id: 1264edf7f5e0bc29f091e72989ab7116b78056bf
2016-03-11 19:10:13 +01:00
brindosch 9e3b98dfc3 Merge pull request #538 from ntim/support_for_philips_hue
Reads hue light ids in case the user did not supply any.

Former-commit-id: 7dc1e6a14c0bd2b08439d13e7e2acf9f539cf1c1
2016-03-11 19:08:11 +01:00
brindosch 385d5a896d Cleanup and bugfixes
Former-commit-id: 8622ff7fb963eb7c52e816f1c779e9e9869ece53
2016-03-11 19:06:36 +01:00
ntim 7849e9f23e Reads hue light ids in case the user did not supply any.
Former-commit-id: 3323fe83e3bb5f42c4b6c98cbbb021fb929cf54d
2016-03-10 09:33:16 +01:00
AEtHeLsYn 9db45c0ffb Merge remote-tracking branch 'refs/remotes/tvdzwan/master'
# Conflicts:
#	include/hyperion/Hyperion.h
#	libsrc/hyperion/CMakeLists.txt
#	libsrc/hyperion/Hyperion.cpp


Former-commit-id: 1144520581d4531952038d2118cb11e01bebc10e
2016-03-09 19:25:04 +01:00
Mark Walker 78e606a1c4 Add new WS281x driver
Add a new WS281x driver which is a wrapper around jgarff's ws281x library which
works on Pi B+, Pi 2, Pi Zero and probably Pi 3 as well.

jgarff's ws281x library is included as a submodule


Former-commit-id: e473dfd36d31b14598da5e56e4b8bf9f2aa7bb24
2016-03-08 20:41:13 -08:00
brindosch 14fc1d9bb6 Merge pull request #514 from penfold42/master
add configuratble latch time for ws2801

Former-commit-id: cd226d63ebf4d158ce72cb88d49887d8e19a185c
2016-03-08 22:53:29 +01:00
penfold42 3be4ebe6dc clean up formatting
Former-commit-id: dc3a3c7597af42b8fb37f09011d52ebacffd8959
2016-02-25 22:33:13 +11:00
penfold42 c30879017c Merge branch 'master' of https://github.com/penfold42/hyperion
Former-commit-id: eb4dcbd95b97c70fd54a204a1028636237ddda0c
2016-02-25 22:25:19 +11:00
redpanther e667be5e0b Merge remote-tracking branch 'upstream/master' into proto_json_forwarder
Former-commit-id: 6eb800d3ed5badd831bd79fc8cfb66115df8ec28
2016-02-24 15:07:30 +01:00
tvdzwan 78b1c6fe39 Merge pull request #444 from penfold42/master
Add UDP protocol support

Former-commit-id: b2d91d3963e7eeacfc7d57a507cfc70f32ac9a5d
2016-02-23 21:02:39 +01:00
redpanther a9e8f0264a implement proto forwarding for osxgrabber and framebuffer. prepare forwarding in amlogic and dispmanx
Former-commit-id: d67fc2b7fe8877e6eadf31a8c76e4a68110c6680
2016-02-17 00:44:06 +01:00
penfold42 3bd03e73ff Merge branch 'master' of https://github.com/penfold42/hyperion
merge to local


Former-commit-id: ebba9a31b2139201b75dc098eba8c8ee9d630ebf
2016-02-13 23:01:04 +11:00
penfold42 ca24450618 added configurable latchtime for 2801 SPI driver
Former-commit-id: a10b0bd24a85580b021c735b30ebd2635180a514
2016-02-13 23:00:31 +11:00
wisc 773222192d fixed upd merge conflicts and fadecandy compiler warning
Former-commit-id: cb9506a68deff80a331f6455c3cb8fa783a2140e
2016-02-10 00:57:21 +01:00
wisc17 d6b5dc7ae6 Revert "Update LedDeviceAPA102.cpp by pcaffardi"
Former-commit-id: 493b32c03f922cc26d9fb4fce4778636f6a96e84
2016-02-09 20:21:49 +01:00
tvdzwan cf34f45daa Merge pull request #484 from wisc17/apa102
Update LedDeviceAPA102.cpp by pcaffardi

Former-commit-id: 0e586eda7636b4abb378fe8adf1b35145e63eb1f
2016-02-08 14:55:08 +01:00
tvdzwan 3280f7198d Merge pull request #469 from redPanther/fadecandy
fadecandy fix

Former-commit-id: 4686a0ead7ba44c13dbc4ac1f0f876d9a4d165c3
2016-02-08 14:52:48 +01:00
wisc 79dda5e840 Update LedDeviceAPA102.cpp by pcaffardi
Former-commit-id: e7efe8917fc10ceb860e44bbb37442cffa3512db
2016-02-07 17:40:24 +01:00