Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
roombajoy_thread.h
1
2
/***************************************************************************
3
* roombajoy_thread.h - Roomba joystick control thread
4
*
5
* Created: Sat Jan 29 14:34:11 2011
6
* Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
#ifndef __PLUGINS_ROOMBAJOY_THREAD_H_
24
#define __PLUGINS_ROOMBAJOY_THREAD_H_
25
26
#include <core/threading/thread.h>
27
#include <aspect/blocked_timing.h>
28
#include <aspect/logging.h>
29
#include <aspect/configurable.h>
30
#include <aspect/clock.h>
31
#include <aspect/blackboard.h>
32
33
namespace
fawkes {
34
class
Roomba500Interface;
35
class
JoystickInterface;
36
}
37
38
class
RoombaJoystickThread
39
:
public
fawkes::Thread
,
40
public
fawkes::BlockedTimingAspect
,
41
public
fawkes::LoggingAspect
,
42
public
fawkes::ConfigurableAspect
,
43
public
fawkes::ClockAspect
,
44
public
fawkes::BlackBoardAspect
45
{
46
public
:
47
RoombaJoystickThread
();
48
49
virtual
void
init
();
50
virtual
void
finalize
();
51
virtual
void
loop
();
52
53
private
:
54
void
stop();
55
unsigned
int
confval(
const
char
*path,
unsigned
int
default_value);
56
57
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
58
protected
:
virtual
void
run
() {
Thread::run
(); }
59
60
private
:
61
fawkes::JoystickInterface
*__joy_if;
62
fawkes::Roomba500Interface
*__roomba500_if;
63
64
int
__last_velo;
65
66
bool
__strong_rumble;
67
bool
__weak_rumble;
68
69
bool
__main_brush_enabled;
70
bool
__side_brush_enabled;
71
bool
__vacuuming_enabled;
72
73
unsigned
int
__cfg_but_main_brush;
74
unsigned
int
__cfg_but_side_brush;
75
unsigned
int
__cfg_but_vacuuming;
76
unsigned
int
__cfg_but_dock;
77
unsigned
int
__cfg_but_spot;
78
unsigned
int
__cfg_but_mode;
79
80
unsigned
int
__cfg_axis_forward;
81
unsigned
int
__cfg_axis_sideward;
82
unsigned
int
__cfg_axis_speed;
83
84
unsigned
int
__cfg_min_radius;
85
unsigned
int
__cfg_max_radius;
86
unsigned
int
__cfg_max_velocity;
87
};
88
89
#endif
src
plugins
roomba
roombajoy_thread.h
Generated by
1.8.1.2