mirror of
https://github.com/brendanhaines/Hohm-Phone.git
synced 2024-11-09 21:14:44 -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
|
// Handle Incoming Call
|
||||||
if ( !digitalRead(GSM_RING) ) {
|
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) ) {
|
if ( !digitalRead(BUT_ANS) ) {
|
||||||
fona.pickUp();
|
fona.pickUp();
|
||||||
delay(100);
|
delay(100);
|
||||||
inCall();
|
inCall();
|
||||||
|
} else if( !digitalRead(BUT_END) ) {
|
||||||
|
fona.hangUp();
|
||||||
|
clearPhoneNumber();
|
||||||
|
startDialtone = true;
|
||||||
|
delay(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user