MCPcopy Create free account
hub / github.com/TeleHuman/TextOp / Button

Class Button

TextOpDeploy/src/textop_ctrl/include/common/gamepad.hpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49} REMOTE_DATA_RX;
50
51class Button {
52 public:
53 Button() {}
54
55 void update(bool state) {
56 on_press = state ? state != pressed : false;
57 on_release = state ? false : state != pressed;
58 pressed = state;
59 }
60
61 bool pressed = false;
62 bool on_press = false;
63 bool on_release = false;
64};
65
66class Gamepad {
67 public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected