namespace Msp {
namespace Input {
-BinaryControl::BinaryControl():
- state(false),
- threshold(0.5)
-{ }
-
BinaryControl::BinaryControl(const ControlSource &s):
- Control(s),
- state(false),
- threshold(0.5)
+ Control(s)
{ }
BinaryControl::BinaryControl(Device &d, ControlSrcType t, unsigned i):
- Control(d, t, i),
- state(false),
- threshold(0.5)
+ Control(d, t, i)
+{ }
+
+BinaryControl::~BinaryControl()
{ }
void BinaryControl::set_threshold(float t)
if(!state)
{
state = true;
+ rising_edge = true;
signal_press.emit();
}
}
if(state)
{
state = false;
+ falling_edge = true;
signal_release.emit();
}
}