MCPcopy Create free account
hub / github.com/Santroller/Santroller / tickDigital

Method tickDigital

src/input/toggle.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 m_input->setup();
20}
21bool ToggleInput::tickDigital()
22{
23 if (m_input)
24 {
25 if (m_input->tickDigital() && !m_last_state)
26 {
27 m_device->toggle();
28 }
29 m_last_state = m_input->tickDigital();
30 }
31 return m_device->get_value();
32}
33uint16_t ToggleInput::tickAnalog()
34{
35 return tickDigital() ? 65535 : 0;

Callers

nothing calls this directly

Calls 2

toggleMethod · 0.80
get_valueMethod · 0.45

Tested by

no test coverage detected