-#ifndef MSP_GBASE_BINARYCONTROL_H_
-#define MSP_GBASE_BINARYCONTROL_H_
+#ifndef MSP_INPUT_BINARYCONTROL_H_
+#define MSP_INPUT_BINARYCONTROL_H_
#include "control.h"
BinaryControl();
BinaryControl(const ControlSource &);
BinaryControl(Device &, ControlSrcType, unsigned);
+ virtual ~BinaryControl();
/** Sets the threshold between states for axis sources. No effect on button
sources */
void set_threshold(float);
bool get_state() const { return state; }
+ bool was_pressed() const { return rising_edge; }
+ bool was_released() const { return falling_edge; }
private:
virtual void on_press();