Commit Graph

246 Commits

Author SHA1 Message Date
Rick van Hattem
ad785b9eba implemented bare providerudp constructor and made h801 use it 2016-09-22 00:18:46 +02:00
Rick van Hattem
37130f9c9b Merge remote-tracking branch 'redPanther/leddevice' into h801 2016-09-21 23:32:19 +02:00
Rick van Hattem
3feb905a00 reformatted code and added the new defaults from @redpanther 2016-09-21 23:32:17 +02:00
redpanther
a86b3a2335 add ability for default values in providerudp 2016-09-21 23:08:13 +02:00
Rick van Hattem
da6dfc8ed4 removed useless destructor 2016-09-21 23:07:14 +02:00
Rick van Hattem
c008f6c1bb Merge remote-tracking branch 'hyperion-project/master' into h801 2016-09-21 23:03:53 +02:00
Rick van Hattem
1fb2f6be0b initial version of h801 led device 2016-09-21 23:03:01 +02:00
brindosch
f349f4b0ee forms: horizontal layout and unit support (#245)
* update

* sync

[skip ci]

* always required

[skip ci]

* append support

* update schemas

[skip ci]

* typo

[skip ci]

* adjustment

* update

[skip ci]

* sync

[skip ci]

* slightly smaller logo

[skip ci]

* also for checkboxes

[skip ci]

* new connection lost page

[skip ci]

* update con_lost page

[skip ci]

* lost change

[skip ci]

* fix center position

[skip ci]
2016-09-17 23:37:44 +02:00
redPanther
eeb9b0f7da implement hyperion restart via webui (#242)
* first try

* implement hyperion restart. core function is good, but needs a beeter structuring- something for next refactoring session ;-)

* several fixes (including osx)
merge with upstream
some refactoring

* add some eye candy to webui
2016-09-15 20:42:58 +02:00
brindosch
a04f34eab7 update schemas | mod jsoneditor (#243)
* update

* sync

[skip ci]

* always required

[skip ci]
2016-09-15 19:06:21 +02:00
penfold42
52283b3257 Added debug logging of the Ada header bytes that are sent (#238)
[HYPERIOND LedDevice] <DEBUG> <LedDeviceAdalight.cpp:52:write()> Adalight header for 316 leds: Ada 0x01 0x3b 0x6f
2016-09-13 14:25:42 +02:00
redPanther
adfe2a4b23 effects included in hyperiond binary as qtResource (#237)
* implement effects included in hyperiond  binary

* cleanup

* remove install of effects dir. People who wants to develop effects has to copy them from github
effect params for initial effects can be changed in config permanently and other effect params can be changed
via json (currently only temporarily)

* fix schema of fadecandy
webui fix display of specific led options

* add leddevice write support

* cleanup

* webui: tune hue code

* when use json effect definition from putsiede hyperiond but want to use py script from inside hyperiond use ad a :
e.g. fade.py needs a fade.py near the json file, but :fade.py is taken from resource inside hyperiond

* add ability to di

* add abiloty to diable effcts via hyperion config

* use effect name instead of script in active effects and prio register

* finally solve open file handle during effect is playing. Now script is read before, then file closed and then t is run by python

* fix some webui things
- led config tabs
- inital loading screen

optimize qrc file generation
fix compile warning in hyperion.cpp

* cleanup

* more cleanup
2016-09-13 11:51:16 +02:00
redPanther
82611afa25 webui: some editor style tweaks (#234)
* initial support for leddevice options

* fix schema and editor init

* fix led editor labels and schema

* add some led schemas

* led config: insert current values. not yet perfect, but it works

* tune editor style
2016-09-10 23:30:05 +02:00
redPanther
2d88cdc2d3 webui: initial support for leddevice options (#232)
* initial support for leddevice options

* fix schema and editor init

* fix led editor labels and schema

* add some led schemas

* led config: insert current values. not yet perfect, but it works
2016-09-10 19:08:08 +02:00
penfold42
49d3d35de1 Ws2812spi and sk6812rgbw have wrong default rate (#221)
* Changed default baud rate in schema for ws2812spi and sk6812spi

* now sets the default baud_rate speed to 2800000 if omitted.
Previously it used the ProviderSPI default which was 1000000 and guaranteed not to work

* Added warnings if the SPI baud rate is likely out of range
Added some debug statements to ProviderSpi
2016-09-04 14:28:06 +02:00
penfold42
4968a11816 Tpm2net rewrite (#217)
* initial tpm2net rewrite - doesnt compile yet

* new tpm2.net drive compiles.
rename old tmp2net typos to tpm2net
fixed compiler warning in ws2812b

* added packetsize calculations and the end of frame character.
Output looks good on tcpdump

* removed old tpm2net driver
renamed tpm2netnew to tpm2net
2016-09-04 09:07:10 +02:00
redPanther
06c878e76f fix amlogic for newer kernels (#214)
* fix amlogic for newer kernels
crosscompile stay on 32bit aml with kernel 3.10

* add new platform amlogic64. This is used e.g. for new wetek boxes hub and play2
2016-09-02 07:41:27 +02:00
penfold42
44579f85eb changed debug to error 2016-08-31 17:51:50 +10:00
penfold42
fa152b4560 Added debug logging to ProviderSpi.cpp on writes.
If you have more leds configured than the SPI buffer can support you now get this:
[HYPERIOND LedDevice] <DEBUG> <ProviderSpi.cpp:92:writeBytes()> SPI failed to write. errno: 90, Message too long
2016-08-31 17:34:52 +10:00
brindosch
0603fadd21 Web: Centralize websocket, add json port changer and led schemas (#209)
* add comp test

* update web

* .

* typo

[skip ci]
2016-08-30 23:25:27 +02:00
penfold42
c13f2e20ec Added source and cid to e1.31 driver. (#207)
source defaults to "hyperion on <hostname>"
cid defautls to randomly generated on each startup

        "device" :
        {
                "name"       : "DMX_e131",
                "type"       : "e131",
                "universe"   : 1,
                "cid" : "{204b83c-efb5-4b23-b2d0-35939d561061}",
                "source-name": "This is my custom e1.31 source",
                "host"       : "239.255.0.1",
                "port"       : 5568,
                "colorOrder" : "rgb"
        },
2016-08-28 10:45:18 +02:00
penfold42
cc8185691a Renamed the lowlevel providers from LedXXXDevice to ProviderXXX (#206)
%s/LedUdpDevice/ProviderUdp/g
git mv LedUdpDevice.cpp ProviderUdp.cpp
git mv LedUdpDevice.h ProviderUdp.h

vi `grep -l LedHID *`
%s/LedHIDDevice/ProviderHID/g
git mv LedHIDDevice.cpp ProviderHID.cpp
git mv LedHIDDevice.h ProviderHID.h

vi `grep -l LedRs *`
%s/LedRs232Device/ProviderRs232/g
git mv LedRs232Device.cpp ProviderRs232.cpp
git mv LedRs232Device.h ProviderRs232.h

vi `grep -l LedSpi *`
%s/LedSpiDevice/ProviderSpi/g
git mv LedSpiDevice.cpp ProviderSpi.cpp
git mv LedSpiDevice.h ProviderSpi.h
2016-08-28 07:12:47 +02:00
penfold42
9cc3a2de2e LedUdpDevice now tries to parse the "host" as an IP address before trying to DNS resolve it (#205) 2016-08-27 14:05:09 +02:00
penfold42
cea4db8e60 Fix throw error in udp, fix default SPI device (#198)
* Fix throw error so it correctly fails on invalid output hostnames

* Fixed broken default /dev/spidev0.0 string

* UDP devices now use "host" and "port" rather than "output"
2016-08-24 06:05:00 +02:00
redPanther
d679affeb4 Leddevice rework2 (#193)
* commit debug code to save it due to merge

* migrate first devices to new device registry and configure on runtime

* fadecandy and rs232 resets device if config is set

* try to hunt crash on osx

* test commit if this works with osx

* refactor spi devices

* cleanup

* refactor leddevices file, tinkerforge and ws2812b

* refactor raw usb devices

* refactor udp devices

* - add tpm2net driver
- remove old udp driver from build (files left in place for reference for new udp driver)
- json serverinfo shows available leddevices

* finish rework part 2 of leddevices

* add schemas for leddevices.
currently only compiled in, but not usedx
2016-08-23 20:07:12 +02:00
penfold42
c8318ff0c7 support > 170 leds with E1.31 (#189)
* Add support for > 170 leds. These are send as multiple packets
Change default latchtime to be smaller

* code cleanup

* more code tidying
added *.swp to gitignore
2016-08-20 22:39:21 +02:00
penfold42
85e3f154d6 DMX512/sACN/E1.31 support (#184)
* Started on support for sACN/E1.31/DMX512
Just a clone of udpraw for now

* It's ALIVE!!
This adds somewhat working DMX512/sACN/E1.31 support.
I've tested it against an ESPixelStick but have no other "real" hardware
TODO:
configure universe#
configure universe and led offset
configure source names (all hard coded now...)

* oops.... forgot that dmx element 0 isnt rgb data but needs to be zero

* added universe support in the config
assorted code cleanups
2016-08-19 17:14:52 +02:00
redPanther
f6f7f55e92 fix warning 2016-08-16 18:14:36 +02:00
redPanther
97181fa83c leddevice refactoring. code style and extension of baseclass to avoid dups (#174) 2016-08-14 10:46:44 +02:00
penfold42
5a902add81 Added "invert" and "spimode" options to ws2801, ws2812spi and sk6812spi devices (#172)
* Added "invert" and "spimode" options to ws2801, ws2812spi and sk6812spi devices

* fixed test/TestSpi.cpp

* some coding style wish
2016-08-13 19:54:08 +02:00
redPanther
197af35de0 Clone single led color from other led (#157)
* start ledclone

* led cloning: clone scan areas from original led
main: show exceptions, better exit

* tune json schema for new option. somwe cleanup

* fix warnings and bug for framebuffer selection. thx to clang brought by new osx buikld on travis

* make ledclone feature work flawlessly for effects too. Effect sees the ledstring without cloned leds.
cloned leds will be inserted just before sending to leddevice

additional: remove warnings and fix code style

* fix warning
2016-08-08 00:17:00 +02:00
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