h4r_x52_joyext
LED and MFD Control for Saitek X52 Pro
|
Classes | |
class | PairSortMod |
Public Member Functions | |
PublishMFD (ros::NodeHandle *n) | |
A char is interpreted as integer if this is 1 or as unsigned integer if this is 2 and as char on any other value. More... | |
~PublishMFD () | |
template<typename V > | |
std::string | get_value_string (V value) |
std::string | get_value_string (char value) |
template<typename V > | |
void | progressValue (V value) |
void | JoyCallback (const sensor_msgs::JoyConstPtr &msg) |
template<class MSGPTR > | |
void | Callback (const MSGPTR &msg) |
template<class MSG , class MSGPTR > | |
void | start () |
void | startJoy () |
Private Types | |
enum | { LEFT, CENTER, RIGHT } |
Private Attributes | |
std::set< PairSortMod > | ranges |
ros::NodeHandle * | n |
The node handler. More... | |
ros::Publisher | pub |
The publisher. More... | |
ros::Subscriber | sub |
The subscriber. More... | |
int | line |
The line where the string will be placed. More... | |
int | pos |
Position from the beginning of the line. More... | |
int | field_length |
Field length. More... | |
int | align |
Align of the text in the field, 0=Left, 1=Center, 2 (or anything else)=Right. More... | |
std::string | positive_oversize |
String to show if the integer part of a value is bigger then the size (positiv) More... | |
std::string | negative_oversize |
String to show if the integer part of a value is bigger then the size (negative) More... | |
bool | axis_or_button |
Joy topic addition. More... | |
int | axis_button |
The button or axis number if using Joy topic. More... | |
bool | stringprint |
If this is true, there will be strings instead of values. More... | |
std::string | stringprint_setup |
if stringprint is enabled, this will store the strings to be displayed More... | |
int | char_as_int |
Definition at line 185 of file mfd_writer.cpp.
|
private |
Enumerator | |
---|---|
LEFT | |
CENTER | |
RIGHT |
Definition at line 187 of file mfd_writer.cpp.
|
inline |
A char is interpreted as integer if this is 1 or as unsigned integer if this is 2 and as char on any other value.
Definition at line 220 of file mfd_writer.cpp.
References PublishMFD< T >::align, PublishMFD< T >::axis_button, PublishMFD< T >::axis_or_button, PublishMFD< T >::char_as_int, PublishMFD< T >::field_length, PublishMFD< T >::line, PublishMFD< T >::negative_oversize, PublishMFD< T >::pos, PublishMFD< T >::positive_oversize, PublishMFD< T >::pub, PublishMFD< T >::ranges, PublishMFD< T >::stringprint, and PublishMFD< T >::stringprint_setup.
|
inline |
Definition at line 314 of file mfd_writer.cpp.
|
inline |
Definition at line 494 of file mfd_writer.cpp.
References PublishMFD< T >::progressValue().
|
inline |
Definition at line 320 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue().
|
inline |
Definition at line 333 of file mfd_writer.cpp.
References PublishMFD< T >::char_as_int, and PublishMFD< T >::field_length.
|
inline |
Definition at line 465 of file mfd_writer.cpp.
References PublishMFD< T >::axis_button, and PublishMFD< T >::axis_or_button.
Definition at line 373 of file mfd_writer.cpp.
References PublishMFD< T >::align, PublishMFD< T >::CENTER, PublishMFD< T >::field_length, PublishMFD< T >::get_value_string(), PublishMFD< T >::LEFT, PublishMFD< T >::line, PublishMFD< T >::negative_oversize, PublishMFD< T >::pos, PublishMFD< T >::positive_oversize, PublishMFD< T >::pub, PublishMFD< T >::ranges, PublishMFD< T >::RIGHT, and PublishMFD< T >::stringprint.
Referenced by PublishMFD< T >::Callback().
Definition at line 500 of file mfd_writer.cpp.
References PublishMFD< T >::n, and PublishMFD< T >::sub.
|
inline |
Definition at line 507 of file mfd_writer.cpp.
References PublishMFD< T >::n, and PublishMFD< T >::sub.
Referenced by main().
|
private |
Align of the text in the field, 0=Left, 1=Center, 2 (or anything else)=Right.
Definition at line 210 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
The button or axis number if using Joy topic.
Definition at line 214 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::JoyCallback(), and PublishMFD< T >::PublishMFD().
|
private |
Joy topic addition.
Definition at line 213 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::JoyCallback(), and PublishMFD< T >::PublishMFD().
|
private |
Definition at line 217 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::get_value_string(), and PublishMFD< T >::PublishMFD().
|
private |
Field length.
Definition at line 209 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::get_value_string(), PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
The line where the string will be placed.
Definition at line 207 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
The node handler.
Definition at line 203 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::start(), and PublishMFD< T >::startJoy().
|
private |
String to show if the integer part of a value is bigger then the size (negative)
Definition at line 212 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
Position from the beginning of the line.
Definition at line 208 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
String to show if the integer part of a value is bigger then the size (positiv)
Definition at line 211 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
The publisher.
Definition at line 204 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
Definition at line 202 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
If this is true, there will be strings instead of values.
Definition at line 215 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::progressValue(), and PublishMFD< T >::PublishMFD().
|
private |
if stringprint is enabled, this will store the strings to be displayed
Definition at line 216 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::PublishMFD().
|
private |
The subscriber.
Definition at line 205 of file mfd_writer.cpp.
Referenced by PublishMFD< T >::start(), and PublishMFD< T >::startJoy().