Fix latchtime logic - it was always ignored (#368)

This commit is contained in:
penfold42 2017-01-19 11:55:06 +11:00 committed by redPanther
parent 8d7137136b
commit 8c2185b641
1 changed files with 1 additions and 1 deletions

View File

@ -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;