Project

General

Profile

Statistics
| Branch: | Revision:

root / scout / libscout / src / libheadlights.h @ 3ec16d35

History | View | Annotate | Download (1.96 KB)

1
/**
2
 * Copyright (c) 2011 Colony Project
3
 * 
4
 * Permission is hereby granted, free of charge, to any person
5
 * obtaining a copy of this software and associated documentation
6
 * files (the "Software"), to deal in the Software without
7
 * restriction, including without limitation the rights to use,
8
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
9
 * copies of the Software, and to permit persons to whom the
10
 * Software is furnished to do so, subject to the following
11
 * conditions:
12
 * 
13
 * The above copyright notice and this permission notice shall be
14
 * included in all copies or substantial portions of the Software.
15
 * 
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
 * OTHER DEALINGS IN THE SOFTWARE.
24
 **/
25

    
26

    
27
/**
28
 * @file libheadlights.h
29
 * @brief Contains headlights declarations and functions
30
 * 
31
 * Contains functions and definitions for the use of
32
 * headlights
33
 *
34
 * @author Colony Project, CMU Robotics Club
35
 * @author Ben Wasserman
36
 **/
37

    
38
#include "ros/ros.h"
39
#include "constants.h"
40
#include "headlights/set_headlights.h"
41

    
42
#ifndef _LIBheadlights_H_
43
#define _LIBheadlights_H_
44

    
45
/* Defines */
46
#define WHITE                0xFFFFFF
47
#define OFF                        0x000000
48
#define RED                 0xFF0000
49
#define GREEN         0x00FF00
50
#define BLUE                0x0000FF
51
#define YELLOW        0xFFFF00
52
#define CYAN                0x00FFFF
53
#define PINK                0xFF00FF
54

    
55
#define HL_RIGHT        0x1
56
#define HL_LEFT                0x2
57
#define HL_BOTH                0x3
58

    
59
#define NO_SET        -1
60

    
61
#define REDSHIFT                 16
62
#define GREENSHIFT          8
63
#define BLUESHIFT                 0
64

    
65
void libheadlights_init();
66
int headlights_set(int color, int which);
67
int headlights_set_rgb(int red, int green, int blue, int which);
68

    
69
#endif
70