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

Method tickAnalog

src/input/cycle.cpp:26–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 return tickAnalog() > 0;
25}
26uint16_t CycleInput::tickAnalog()
27{
28 if (m_input)
29 {
30 if (m_input->tickDigital() && !m_last_state)
31 {
32 m_device->cycle(true);
33 }
34 m_last_state = m_input->tickDigital();
35 }
36 if (m_input_reverse)
37 {
38 if (m_input_reverse->tickDigital() && !m_last_state_reverse)
39 {
40 m_device->cycle(false);
41 }
42 m_last_state_reverse = m_input_reverse->tickDigital();
43 }
44 return m_device->get_value();
45}

Callers

nothing calls this directly

Calls 3

cycleMethod · 0.80
tickDigitalMethod · 0.45
get_valueMethod · 0.45

Tested by

no test coverage detected