MCPcopy Create free account
hub / github.com/Atarity/Lightpack / SetBacklight

Method SetBacklight

Software/src/LightpackPluginInterface.cpp:445–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445bool LightpackPluginInterface::SetBacklight(QString sessionKey, int backlight)
446{
447 if (lockSessionKeys.isEmpty()) return false;
448 if (lockSessionKeys[0]!=sessionKey) return false;
449 Lightpack::Mode status = Lightpack::UnknownMode;
450
451 if (backlight == 1)
452 status = Lightpack::AmbilightMode;
453 else if (backlight == 2)
454 status = Lightpack::MoodLampMode;
455
456 if (status != Lightpack::UnknownMode)
457 {
458 DEBUG_LOW_LEVEL << Q_FUNC_INFO << "OK:" << status;
459
460 emit updateBacklight(status);
461 return true;
462 }
463 return false;
464}
465
466bool LightpackPluginInterface::SetCountLeds(QString sessionKey, int countLeds)
467{

Callers 1

clientProcessCommandsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected