From 7d354aa72da4539c1cde849eab229ed1cc5efb15 Mon Sep 17 00:00:00 2001 From: LordGrey Date: Thu, 11 Jun 2020 23:10:22 +0200 Subject: [PATCH] Fix LedDeviceLpd8806 --- libsrc/leddevice/dev_spi/LedDeviceLpd8806.cpp | 32 ------------------- libsrc/leddevice/dev_spi/LedDeviceLpd8806.h | 8 ----- 2 files changed, 40 deletions(-) diff --git a/libsrc/leddevice/dev_spi/LedDeviceLpd8806.cpp b/libsrc/leddevice/dev_spi/LedDeviceLpd8806.cpp index 42c17d96..e9e08851 100644 --- a/libsrc/leddevice/dev_spi/LedDeviceLpd8806.cpp +++ b/libsrc/leddevice/dev_spi/LedDeviceLpd8806.cpp @@ -24,38 +24,6 @@ bool LedDeviceLpd8806::init(const QJsonObject &deviceConfig) return isInitOK; } -int LedDeviceLpd8806::open() -{ - int retval = -1; - QString errortext; - _deviceReady = false; - - // General initialisation and configuration of LedDevice - if ( init(_devConfig) ) - { - // Perform an initial reset to start accepting data on the first led - - const unsigned clearSize = _ledCount/32+1; - if ( writeBytes(clearSize, _ledBuffer.data()) < 0 ) - { - errortext = QString ("Failed to do initial write"); - } - else - { - // Everything is OK -> enable device - _deviceReady = true; - setEnable(true); - retval = 0; - } - // On error/exceptions, set LedDevice in error - if ( retval < 0 ) - { - this->setInError( errortext ); - } - } - return retval; -} - int LedDeviceLpd8806::write(const std::vector &ledValues) { // Copy the colors from the ColorRgb vector to the Ldp8806 data vector diff --git a/libsrc/leddevice/dev_spi/LedDeviceLpd8806.h b/libsrc/leddevice/dev_spi/LedDeviceLpd8806.h index 95eb8c04..482ef299 100644 --- a/libsrc/leddevice/dev_spi/LedDeviceLpd8806.h +++ b/libsrc/leddevice/dev_spi/LedDeviceLpd8806.h @@ -95,14 +95,6 @@ public: /// @return true if success virtual bool init(const QJsonObject &deviceConfig) override; -protected: - /// - /// Opens and initiatialises the output device - /// - /// @return Zero on succes (i.e. device is ready and enabled) else negative - /// - virtual int open() override; - private: /// /// Writes the led color values to the led-device