// Called by the controller to associate the LED with a controller. // The controller tells us what the first slot the LED is in is. public void SetNotificationCallback(int firstSlot, ILedChangeListener callback) { m_firstSlot = firstSlot; m_controller = callback; // Also register for animation if needed if(m_animationTickListener != null) { m_controller.ResigerForAnimationCallbacks(m_animationTickListener); } }
// Called by the controller to remove the association. public void RemoveNotificationCallback() { m_firstSlot = -1; m_controller = null; }