| 24 | return tickAnalog() > 0; |
| 25 | } |
| 26 | uint16_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 | } |
nothing calls this directly
no test coverage detected