forked from Rhoban/Metabot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleds.h
More file actions
38 lines (31 loc) · 695 Bytes
/
leds.h
File metadata and controls
38 lines (31 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef _METABOT_LEDS_H
#define _METABOT_LEDS_H
#define LED_R (1<<2)
#define LED_G (1<<1)
#define LED_B (1<<0)
/**
* Setting a led of a specific servo to a specific color
* @param index The servo index
* @param value The color
* @param custom Is it a custom setting
*/
void led_set(int index, int value, bool custom=false);
/**
* Set all the leds to a given color
* @param value A color
* @param custom Is it a custom setting
*/
void led_set_all(int value, bool custom=false);
/**
* Streams the led state
*/
void led_stream_state();
/**
* Are the leds customized by the user?
*/
bool leds_are_custom();
/**
* Stops customizing LEDs
*/
void leds_decustom();
#endif