| 69 | } |
| 70 | |
| 71 | void IS_Button::runInterruptEnded() |
| 72 | { |
| 73 | //Serial.println("IS_Button: in runInterruptEnded()"); |
| 74 | //Serial.println(millis()); |
| 75 | //Serial.println(m_lTimeBtnPressed); |
| 76 | //Serial.println(m_lreqNumMillisHeld); |
| 77 | |
| 78 | if (!m_bFirstRun) //Prevent sending data to SmartThings during initial startup |
| 79 | { |
| 80 | if (millis() < (m_lTimeBtnPressed + m_lreqNumMillisHeld)) |
| 81 | { |
| 82 | //add the "pushed" event to the buffer to be queued for transfer to SmartThings |
| 83 | Everything::sendSmartString(getName() + F(" pushed")); |
| 84 | } |
| 85 | else if (millis() >= (m_lTimeBtnPressed + m_lreqNumMillisHeld)) |
| 86 | { |
| 87 | //add the "held" event to the buffer to be queued for transfer to SmartThings |
| 88 | Everything::sendSmartString(getName() + F(" held")); |
| 89 | } |
| 90 | } |
| 91 | else |
| 92 | { |
| 93 | m_bFirstRun = false; |
| 94 | } |
| 95 | |
| 96 | } |
| 97 | |
| 98 | } |
nothing calls this directly
no outgoing calls
no test coverage detected