|
hyperion.ng
|
Implementation of the LedDevice interface for writing to LDP6803 led device. More...
#include <LedDeviceLpd6803.h>
Public Member Functions | |
| LedDeviceLpd6803 (const QJsonObject &deviceConfig) | |
| Constructs specific LedDevice. More... | |
| virtual bool | init (const QJsonObject &deviceConfig) |
| Sets configuration. More... | |
Public Member Functions inherited from ProviderSpi | |
| ProviderSpi () | |
| Constructs specific LedDevice. | |
| virtual | ~ProviderSpi () |
| Destructor of the LedDevice; closes the output device if it is open. | |
| int | open () |
| Opens and configures the output device. More... | |
Public Member Functions inherited from LedDevice | |
| LedDevice (const QJsonObject &config=QJsonObject(), QObject *parent=nullptr) | |
| virtual int | switchOff () |
| Switch the leds off (led hardware disable) | |
| virtual int | switchOn () |
| Switch the leds on (led hardware enable), used if reinitialization is required for the device implementation. | |
| virtual int | setLedValues (const std::vector< ColorRgb > &ledValues) |
| const QString & | getColorOrder () |
| Get color order of device. More... | |
| void | setActiveDevice (QString dev) |
| const QString & | getActiveDevice () |
| void | setLedCount (int ledCount) |
| int | getLedCount () |
| void | setEnable (bool enable) |
| bool | enabled () |
| int | getLatchTime () |
| bool | componentState () |
Static Public Member Functions | |
| static LedDevice * | construct (const QJsonObject &deviceConfig) |
| constructs leddevice | |
Additional Inherited Members | |
Public Slots inherited from LedDevice | |
| virtual void | start () |
| Is called on thread start, all construction tasks and init should run here. | |
Signals inherited from LedDevice | |
| void | enableStateChanged (bool newState) |
| Emits whenever the led device switches between on/off. More... | |
| void | visiblePriorityChanged (const quint8 &priority) |
| PIPER signal for Priority Muxer -> LedDevice. More... | |
Protected Slots inherited from LedDevice | |
| int | rewriteLeds () |
| Write the last data to the leds again. | |
Protected Member Functions inherited from ProviderSpi | |
| int | writeBytes (const unsigned size, const uint8_t *data) |
| Writes the given bytes/bits to the SPI-device and sleeps the latch time to ensure that the values are latched. More... | |
Protected Attributes inherited from ProviderSpi | |
| QString | _deviceName |
| The name of the output device. | |
| int | _baudRate_Hz |
| The used baudrate of the output device. | |
| int | _fid |
| The File Identifier of the opened output device (or -1 if not opened) | |
| int | _spiMode |
| which spi clock mode do we use? (0..3) | |
| bool | _spiDataInvert |
| 1=>invert the data pattern | |
| spi_ioc_transfer | _spi |
| The transfer structure for writing to the spi-device. | |
Protected Attributes inherited from LedDevice | |
| QJsonObject | _devConfig |
| Logger * | _log |
| The common Logger instance for all LedDevices. | |
| std::vector< uint8_t > | _ledBuffer |
| The buffer containing the packed RGB values. | |
| bool | _deviceReady |
| QString | _activeDevice |
| int | _ledCount |
| int | _ledRGBCount |
| int | _ledRGBWCount |
| QTimer | _refresh_timer |
| Timer object which makes sure that led data is written at a minimum rate e.g. More... | |
| unsigned int | _refresh_timer_interval |
| qint64 | _last_write_time |
| unsigned int | _latchTime_ms |
Implementation of the LedDevice interface for writing to LDP6803 led device.
00000000 00000000 00000000 00000000 1RRRRRGG GGGBBBBB 1RRRRRGG GGGBBBBB ... |------------------------------—| |------------—| |------------—| 32 zeros to start the frame Led1 Led2 ...
For each led, the first bit is always 1, and then you have 5 bits each for red, green and blue (R, G and B in the above illustration) making 16 bits per led. Total bytes = 4 + (2 x number of leds)
| LedDeviceLpd6803::LedDeviceLpd6803 | ( | const QJsonObject & | deviceConfig | ) |
Constructs specific LedDevice.
| deviceConfig | json device config |
|
virtual |
Sets configuration.
| deviceConfig | the json device config |
Reimplemented from ProviderSpi.
1.8.12