Fix - Nanoleaf crashes hyperion

This commit is contained in:
LordGrey 2020-04-23 19:05:27 +02:00
parent 3a2b58b571
commit 0c16293319
1 changed files with 11 additions and 4 deletions

View File

@ -256,11 +256,18 @@ int LedDeviceNanoleaf::open()
if ( init(_devConfig) )
{
if ( initLeds() )
if ( !initNetwork() )
{
_deviceReady = true;
setEnable(true);
retval = 0;
this->setInError( "UDP Network error!" );
}
else
{
if ( initLeds() )
{
_deviceReady = true;
setEnable(true);
retval = 0;
}
}
}
return retval;