X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fbinarycontrol.cpp;h=09efe40ac74f32500660030088b389076fdc5409;hb=7302a061c57602203895b616bf54d96269c677c6;hp=57c63427839bda9ac6c1d41f5c234e100790d87d;hpb=821cea8627597a5458c1cb02c0652384bb3431a4;p=libs%2Fgui.git diff --git a/source/input/binarycontrol.cpp b/source/input/binarycontrol.cpp index 57c6342..09efe40 100644 --- a/source/input/binarycontrol.cpp +++ b/source/input/binarycontrol.cpp @@ -21,6 +21,9 @@ BinaryControl::BinaryControl(Device &d, ControlSrcType t, unsigned i): threshold(0.5) { } +BinaryControl::~BinaryControl() +{ } + void BinaryControl::set_threshold(float t) { threshold = t; @@ -31,6 +34,7 @@ void BinaryControl::on_press() if(!state) { state = true; + rising_edge = true; signal_press.emit(); } } @@ -40,6 +44,7 @@ void BinaryControl::on_release() if(state) { state = false; + falling_edge = true; signal_release.emit(); } }