From 8c2185b6417c98f675a6f8a180c2f6f30e75e0e7 Mon Sep 17 00:00:00 2001 From: penfold42 Date: Thu, 19 Jan 2017 11:55:06 +1100 Subject: [PATCH] Fix latchtime logic - it was always ignored (#368) --- libsrc/leddevice/ProviderSpi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/leddevice/ProviderSpi.cpp b/libsrc/leddevice/ProviderSpi.cpp index 7f4eccbb..e7d59e14 100644 --- a/libsrc/leddevice/ProviderSpi.cpp +++ b/libsrc/leddevice/ProviderSpi.cpp @@ -99,7 +99,7 @@ int ProviderSpi::writeBytes(const unsigned size, const uint8_t * data) int retVal = ioctl(_fid, SPI_IOC_MESSAGE(1), &_spi); ErrorIf((retVal < 0), _log, "SPI failed to write. errno: %d, %s", errno, strerror(errno) ); - if (retVal == 0 && _latchTime_ns > 0) + if (retVal >= 0 && _latchTime_ns > 0) { // The 'latch' time for latching the shifted-value into the leds timespec latchTime;