mirror of
https://github.com/brendanhaines/Hohm-Phone.git
synced 2024-12-25 10:27:03 -07:00
allows incoming call to not be answered
This commit is contained in:
parent
0c703101a3
commit
dff7c4745f
|
@ -132,11 +132,16 @@ void loop() {
|
|||
|
||||
// Handle Incoming Call
|
||||
if ( !digitalRead(GSM_RING) ) {
|
||||
while ( digitalRead(BUT_ANS) & !digitalRead(GSM_RING) ) delay(10); // Wait for answer button or end ring/call
|
||||
while ( digitalRead(BUT_ANS) & digitalRead(BUT_END) & !digitalRead(GSM_RING) ) delay(10); // Wait for answer button or end ring/call
|
||||
if ( !digitalRead(BUT_ANS) ) {
|
||||
fona.pickUp();
|
||||
delay(100);
|
||||
inCall();
|
||||
} else if( !digitalRead(BUT_END) ) {
|
||||
fona.hangUp();
|
||||
clearPhoneNumber();
|
||||
startDialtone = true;
|
||||
delay(100);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user