x52_value2buttonColor_node

All supported message types can be seen in the following table, in a launch file, they are specified by the parameter "input_type"

input_type | Description -----------| ------------ 0a | float64 1 | float32 2 | int64 3 | int32 4 | int16 5 | int8 6 | uint64 7 | uint32 8 | uint16 9 | uint8 10 | bool 11b | Joy

b) Requires additional setup information, see following table:

Parameter | Description ---------------|---------- axis_or_button | Defines if the value being used comes from an axis(false) or a button(true) axis_button | Defines the axis or button number

The color LED can be selected with the color_led parameter

color_led | Description ----------|------------ 0 | LED FIRE 1 | LED A 2 | LED B 3 | LED D 4 | LED E 5 | LED T1/2 6 | LED T3/4 7 | LED T5/6 8 | LED POV 2 9 | LED I

Colors available:

Color-Char | Description -----------| ----------- O | Off G | Green/On c Y | Yellow R | Red

c) FIRE Button only supports On or Off because the color is controlled by the saftey cover, when closed it is green and when opened red.

For specifying what color the LED should be at which value the setup_string parameter must be supplied. It uses a special syntax. The first given color is set if the value is lower than any given value, the last one is set when the value is higher than any given value. In between the values are printed when the given value is exceeded.

Example:

R|-4|Y|3|G|6|Y


Example Results: Value | Result ------|------- -6 | Red -4 | Red 3 | Yellow 5 | Green 7 | Yellow


Example Conditions: String | Prints when ------- | ------------ Red | Value <=-4 Yellow | Value <=3 Green | Value <=6 Yellow | Value >6


Copy&Paste Launchfile Code:

<node pkg="x52_joyext" type="x52_value2buttonColor_node" name="Color_Button_0" output="screen">

Parameters:
input_type
Parameters:
joy_axis_button
Parameters:
joy_axis_or_button
Parameters:
color_led
Parameters:
setup_string<remap from="/Color_Button_0/in" to="/joy"> <remap from="/Color_Button_0/led" to="/x52/leds"> </node>
a) Standard value


x52_joyext
Author(s): Christian Holl
autogenerated on Mon Mar 2 2015 18:28:36