Skip to main content Link Menu Expand (external link) Document Search Copy Copied

bool pressing()

Returns true when the button is first pressed (ie the latch is set to true).

Example

controller Controller = controller(primary);
ButtonLatch upLatch = ButtonLatch(Controller.ButtonUp);

while(true){
    if(upLatch.pressing()){
        cout << "Up button pressed" << endl;
    }
}