/**
A control with two possible states. Button state is mapped directly. An axis
-is considered to be active when its value is within 10% of the end of the axis.
+is considered to be active when its value is above a threshold (0.5 by
+default).
*/
class BinaryControl: public Control
{
BinaryControl(const ControlSource &);
BinaryControl(Device &, ControlSrcType, unsigned);
- /**
- Sets the threshold between states for axis sources. No effect on button
- sources
- */
+ /** Sets the threshold between states for axis sources. No effect on button
+ sources */
void set_threshold(float);
bool get_state() const { return state; }
public:
Hub();
- /**
- Attaches an input device to the hub.
-
- @param dev Device to attach
-
- @return Index of the device within the hub
- */
+ /** Attaches an input device to the hub. Returns the index of the device
+ within the hub. */
unsigned attach(Device &dev);
virtual std::string get_button_name(unsigned) const;