Commit Graph

215 Commits

Author SHA1 Message Date
penfold42 84c041a6fb updated more incorrect logging types (%s vs %d) (#156) 2016-08-07 07:06:56 +02:00
penfold42 d90a36d911 chealup of udp device. (#153)
left over unneeded spi include
variable cleanup
2016-08-06 08:58:41 +02:00
penfold42 6b04c1571c Fix segmentation fault in usbasp led driver (#152) 2016-08-05 09:14:40 +02:00
redPanther 108e06ed46 LedDevicePhilipsHue: fix isNan sometimes not compile
sometime <cmath> is add automaticly, sometimes not. This leads to compile errors. Including <cmath> should fix this.

info taken from here:
http://en.cppreference.com/w/cpp/numeric/math/isnan
2016-07-24 22:43:26 +02:00
redPanther 30b9c20611 new frame grabber handling (#137)
* - implement framegrabber type option
- framegrabber autoselect
- integrate x11 grabber in hyperiond

* add doxy

* v4l: select device by name
hyperiond: fix x11 grabber connection to kodichecker
config: tune default prios of boblight and v4l

* make v4l name finding case insensitive
2016-07-24 15:18:34 +02:00
redPanther fff42f370c fix serial port device crash (#134)
* fix resourceerror in serialport implemention and  extend error output

* cleanup

* fix json schema

* remove some nerd setting
2016-07-20 23:26:47 +02:00
redPanther b1d9a041d4 various fixes (#129)
* various fixes:
- add folder for firmware known as working with hyperion
- rs232: add debug message for close and do not repeat "port not found" message more than neccessary
- v4l2: fix grabber started on creation when set to disabled
- cmake: add new platform x86-dev - this as most code coverage and is usefull for test/development. This is not for release

* add hints for effect-args
2016-07-20 16:04:56 +02:00
redPanther 946f9fc603 compile fix (#114)
* multi fix commit

- refactoring leddevicefactory
- adalight: default for "delayAfterConnect" is 1s now - needed for most arduino's because of there special behaviour on open
- fadecandy: new option for disabling configuration send - if you want to keep your fadecandy defaults
- Hyperion.cpp: simplify createSmoothing discussed in #105
- smoothing:
-- add option for continuous output
-- when updatedelay>0 and continousOutput is disabled, buffer is flushed correctly after no input is detected

* add doxygen to travis

* fix code

* fix compile fir ws281x pwm

* remove git merge stuff

* fix compile
2016-07-13 16:19:19 +02:00
redPanther 5a2ef6c4a3 multi fix commit (#112)
* multi fix commit

- refactoring leddevicefactory
- adalight: default for "delayAfterConnect" is 1s now - needed for most arduino's because of there special behaviour on open
- fadecandy: new option for disabling configuration send - if you want to keep your fadecandy defaults
- Hyperion.cpp: simplify createSmoothing discussed in #105
- smoothing:
-- add option for continuous output
-- when updatedelay>0 and continousOutput is disabled, buffer is flushed correctly after no input is detected

* add doxygen to travis
2016-07-13 11:18:12 +02:00
redPanther 48d20529d3 extend Fadecandy driver (#109)
* add functions to send sysEx (not working correctly atm)

* make new values avail via config
2016-07-12 22:37:45 +02:00
penfold42 7b9b9bcdef logging migration of blackborder and grabber (#108)
* logging migration of blackborder and grabber

* change to "Debug" for noise blackborder log messages
2016-07-12 15:13:06 +02:00
penfold42 d4635bba4e Sk6812rgbwfix (#95)
* sk6812rgbw bug fix and rename device to sk6812rgbw-spi

* Added white_algorithm support to sk6812rgbw-spi device type
2016-07-10 17:07:19 +02:00
redPanther 36b4d072c5 common ledbuffer for color transform (#77)
* common ledbuffer for color transform

hyperion class uses a common buffer for all operations on ledColors got from muxer
all color transforms uses new ledBuffer instead of making copies of ledbuffer

other fixes:
fix compile bug in profiler
update doxygen config

* migrate logging for color transform classes

* prepare new logger in hyperion class

* implement hwledcount

* Update Hyperion.cpp

Fix off color

* remove ledscount equivalent from apa102
migrate logging in hyperion.cpp
remove unused and duuplicate colorcorrection - but same is available through tempertature

* remove colorcorrection completly
fix compile

* set colororder back to static

* in remote: using correction is the same as using temperature - correction is obsolete, command not delete atm for compat reasons
2016-07-01 23:20:41 +02:00
penfold42 faf5110558 More logging migration. (#74)
Cleaned up old commented out printf statements.

The piblaster stuff probably needs to be moved out of the devicefactory but Ill have to do that later
2016-06-29 16:49:05 +02:00
penfold42 96037da1cf Added support for sk6812RGBW leds (ab)using the SPI interface. (#61)
right now it only uses RGB - white is set to zero
2016-06-27 22:43:35 +02:00
penfold42 2fff9ae4fc Remove unused constructors (#60) 2016-06-27 22:43:28 +02:00
redPanther e486b10aa6 Logging leds (#52)
* switch to new logger for folowing led devices:
LedDeviceAtmo
LedDeviceFactory
LedDeviceFadeCandy
LedDeviceHyperionUsbasp
LedDeviceLightpack-hidapi
LedDevicePiBlaster
LedDeviceWS281x
LedRs232Device

leddevice base class defines logger already as protected member _log

* migrate to new logger for led devices.
still todo:
LedDeviceWS2812b
LedDeviceWs2812SPI
LedDeviceTinkerforge
LedDeviceLightpack
LedDeviceMultiLightpack

* migrate leddevice tinkerforge to new logger

* migrate Lightpack and MultiLightpack to new logger
2016-06-26 11:53:16 +02:00
redPanther 4033de85ec Logging leds (#50)
* switch to new logger for folowing led devices:
LedDeviceAtmo
LedDeviceFactory
LedDeviceFadeCandy
LedDeviceHyperionUsbasp
LedDeviceLightpack-hidapi
LedDevicePiBlaster
LedDeviceWS281x
LedRs232Device

leddevice base class defines logger already as protected member _log

* migrate to new logger for led devices.
still todo:
LedDeviceWS2812b
LedDeviceWs2812SPI
LedDeviceTinkerforge
LedDeviceLightpack
LedDeviceMultiLightpack
2016-06-25 22:08:17 +02:00
penfold42 33f1ef457b More logging cleanup on led devices (#47) 2016-06-25 14:44:52 +02:00
penfold42 a6e1b89724 cleanup for compiler warning "Note: No relevant classes found. No output generated." (#42)
* Fixed compile error when no grabbers are defined

* Remove stupid avahi warning...

* Started on the new integrated UDP listener to replace the python effect.

Cloned boblight server and rename it to be UDP listener
It compiles!, It starts! it seems to work as a second boblight protocol server...

* moving from the exsting TCP to UDP.
i can catch packets now.. need to consider ditching the connection handling

* It kinda works right now.
UDP packets are received, led data is sent and hyperion displays them.
.... for a moment before going back to what it was doing

* It works!

looks like the default priority of 900 was fighting with something else that was also 900

commented out some udp packet debugging

* oops, forgot to add the changes the the previous commit

* resolving merge conflicts

* Fixed random http port due to uninitialized _port

* cleaning up compiler warning

* cleaned up CMakeLists to remove warning:
Note: No relevant classes found. No output generated.
2016-06-24 17:46:30 +02:00
penfold42 b6a0b7261d logging migration for ws281x and LedUdpDevice (#45) 2016-06-24 17:46:23 +02:00
redPanther 93e3981df1 Serialport (#36)
* migrate serialport to qt5 serialport

* remove old serialport
add logging to serialport

* remove try catch - qt serialport uses plain return values

* tiny fix, but not working atm

* make it work, tested with adalight
2016-06-23 00:11:09 +02:00
penfold42 48134d0aef Remove widgets (#35)
* Trying to remove dependency on Widget
removed unused bonjour example source

* forgot the modified files
2016-06-21 23:34:57 +02:00
brindosch 065e65b8e0 cleanup: remove ambiled and fix typo (#13)
* cleanup: remove ambiled device

as written at the forum this is no longer supported. All people should move to adalight. They just need to flash a new sketch.

* fix typo
2016-06-19 17:18:11 +02:00
redPanther 88fbc4dfde refactoring and cleanup (#2)
* make hyperion to singelton.
remove arguments for config and hyperion - both are gettable via Hyperion::getInstance

* refactor hyperiond

* remove qt4 comapt
make zeroconf mandatory
refactor hyperiond

* xbmcchecker is now a singleton

* cleanup in hyperiond
zeroconf switchable between static and shared linking

* fix xbmcchecker
2016-06-17 01:25:40 +02:00
redPanther 614131ebe6 compile fix, cleanup (#684)
* implement make install
set CMAKE_INSTALL_PREFIX e.g. to /opt to install to /opt/hyperion
set ENABLE_SYSTEM_INSTALL to ON to activate installation
after compiling use
make install
or
make install/strip
(for performance/size optimized binaries - compile in Release to get best performance)

* cleanup cmake files
use
cmake -DINSTALL_PREFIX=/opt/hyperion ..
to install all files to hyperion or
cmake -DINSTALL_PREFIX=/usr/
to install to usr. install folders are linux standard. bin go to bin folder and additionals (effects) go to share/hyperion

* add uninstall target - be patient with that, this will remove files from your system
install service files to share/hyperion - if you want to use them you have to make a symlink to your location of service files

* optimize build release script
install service files into hyperion share folder (services not activated, this must be done by distribution package script)
initial support of cmake option -DPLATFORM= option. This selects platform specific cmake flags. no need for -DENABLE_... options (unless you want some special things)
automatic detect for apple build

* update submodule

* fix cmake error when no platform is given

* initial support for deb,rpm and tgz packages - no usefull content atm!

* make packeages contain usefull stuff

* add license
make packes more functional. package specific install missing yet

* implement debian postinstall

* disable rpm generation until it has a working state

* add hypercon compat

* add posibility for multiple config files. first one found is taken

* remove hyperion comaptlayer
services is not started automaticly

* rework debian postinstall:
- remove /opt compatibility complety. This makes more trouble as it is usefull
- when hyperiond already started, restart it
- cleanup

* add deb package dependencies

* wipe out last support for /opt installation

* change default effect path in config to /usr

* revert service files and config files

* remove last occurences of ENABLE_PROTOBUF
fix cmake warnings and make it ready for cmake 3
fix refactoring of hyperiond.cpp creates no objects for network services

* all arguments via reference ...

* fix xbmcchecker not working

* add logger class

* - profiler must be activated with ENABLE_PROFILER, otherwise an error will raise
-> this should prevent profiler gets into release code

* fix profiler

* make logger compat with older/partial c++11 versions (r.g. debian wheezy)
fix description of optionparser
fix atmoorb not compile for qt4. now it should compile for qt5 and 4

* make logger compiles with qt5 too
fix compiler warnings

* remove debug code


Former-commit-id: 6aa41351667caed712b1f28010dbedfca8a6a5a0
2016-06-07 22:24:29 +02:00
brindosch ad65ca2983 atmoorb qt5 fix (#683)
Former-commit-id: 64ce9cd676059d5225493a97c89b83f589f68417
2016-06-07 13:17:40 +02:00
penfold42 e8207cfe31 fix more "dos" line endings (#673)
* 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

* moved rpi_281x to tag sk6812-v1.0

* moving to my fork of rpi_281x

* removed dos line endings

* Found some more "dos" line ending files


Former-commit-id: c756e3ccc153fd36e23a26eff37a1230bdd4b9b4
2016-06-03 16:46:45 +02:00
penfold42 d5ce395e8e Add sk6812rgbw support (#666)
* 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

* adding support for SK6812 - not working yet

* Changed rpi_ws281x submodule to be penfold42's fork

* Set White to zero for now

* starting on the code to make the White led do stuff

* Added some basic whie led calculation
white = min(r,g,b)
r-=w, g-=w, b-=w

* cleaned up a couple of compiler warnings

* updated strip type to use corrected RGBW strip type
(the SK6812RGBW datasheet is wrong)

* 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

* moved rpi_281x to tag sk6812-v1.0

* attempt #3 at migrating the rpi_281x submodule to my fork/branch

* moving to my fork of rpi_281x

* Started implementing multiple RGB to RGBW conversion options

a quick hack has been implemented inside WS281x.cpp but ive started
moving this to RgbToRgbw.cpp for reuse by other led device types

* migrated RGB to RGBW conversion to RgbToRgbw.cpp


Former-commit-id: ff8e9038c4bb8203b71b42d12bf23be4abcc0b3b
2016-05-31 22:55:56 +02:00
ntim 03cee33784 Fix for Philips Hue flickering when switchOffOnBlack is set true (#668)
* Improved switch off on black feature.

* Changed "isnan" to "std::isnan"


Former-commit-id: 5db2b97674661e4e19f796a91dd443a501268e27
2016-05-31 22:54:47 +02:00
penfold42 6f43fe1196 New QT based udp driver (#662)
* 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

* moved rpi_281x to tag sk6812-v1.0

* moving to my fork of rpi_281x

* half way thru re merging the newudp support

* Whoops.... dont know how it compiled before..

* Removed debugging that was commented out


Former-commit-id: ac4330422f93f3d594dfcba5593759288298d25e
2016-05-30 23:58:31 +02:00
tpmodding 019d4ba6d8 Update LedDevicePhilipsHue.cpp
Changed "isnan" to "std::isnan"

Former-commit-id: 528f02452762fade16b84d17dc7692de9129559c
2016-05-27 11:16:42 +02:00
redPanther 945f3d1c5b big code cleanup. mostly line endings and indentions (#659)
No functional changes - except protobuffer is mandatory and not optional now.

Former-commit-id: 1e6347e708707cc388cdedb8d0352a9f017030b8
2016-05-26 23:44:27 +02:00
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