Advertisement
techmik

Untitled

Sep 27th, 2011
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. diff --git a/liblight/lights.c b/liblight/lights.c
  2. index 118fa66..4f692f9 100644
  3. --- a/liblight/lights.c
  4. +++ b/liblight/lights.c
  5. @@ -65,6 +65,21 @@ static int rgb_to_brightness(struct light_state_t const *stat
  6. + (150*((color>>8) & 0x00ff)) + (29*(color & 0x00ff))) >> 8;
  7. }
  8.  
  9. +static int
  10. +set_light_buttons(struct light_device_t* dev,
  11. + struct light_state_t const* state)
  12. +{
  13. + int err = 0;
  14. + int brightness = rgb_to_brightness(state);
  15. +
  16. + pthread_mutex_lock(&g_lock);
  17. +
  18. + pthread_mutex_unlock(&g_lock);
  19. +
  20. + return err;
  21. +
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement