MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / writeStateToPin

Method writeStateToPin

Arduino/libraries/ST_Anything/EX_Alarm.cpp:40–59  ·  view source on GitHub ↗

private

Source from the content-addressed store, hash-verified

38{
39 //private
40 void EX_Alarm::writeStateToPin()
41 {
42 if (m_nCurrentAlarmState == both) {
43 digitalWrite(m_nPin, m_bInvertLogic ? LOW : HIGH);
44 if (m_bUseStrobe) { digitalWrite(m_nPinStrobe, m_bInvertLogic ? LOW : HIGH); }
45 }
46 else if(m_nCurrentAlarmState == siren) {
47 digitalWrite(m_nPin, m_bInvertLogic ? LOW : HIGH);
48 if (m_bUseStrobe) { digitalWrite(m_nPinStrobe, m_bInvertLogic ? HIGH : LOW); }
49 }
50 else if(m_nCurrentAlarmState == strobe) {
51 digitalWrite(m_nPin, m_bInvertLogic ? HIGH : LOW);
52 if (m_bUseStrobe) { digitalWrite(m_nPinStrobe, m_bInvertLogic ? LOW : HIGH); }
53 }
54 else if(m_nCurrentAlarmState == off) {
55 digitalWrite(m_nPin, m_bInvertLogic ? HIGH : LOW);
56 if (m_bUseStrobe) { digitalWrite(m_nPinStrobe, m_bInvertLogic ? HIGH : LOW); }
57 }
58
59 }
60
61 //public
62 //constructor

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected