From a2f8b396d76d084ccda90e376a484ba561a84df1 Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Tue, 1 Nov 2016 21:56:32 -0600 Subject: [PATCH] fixes handling of other caller ending call --- Hohm_Phone.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Hohm_Phone.ino b/Hohm_Phone.ino index a0063bc..e472bae 100644 --- a/Hohm_Phone.ino +++ b/Hohm_Phone.ino @@ -90,14 +90,14 @@ void goToSleep() { void inCall() { while (1) { - if ( !digitalRead(BUT_END) ) { // End button pressed - if ( fona.hangUp() ) { + if ( !digitalRead(BUT_END) || fona.getCallStatus() < 3 ) { // End button pressed + fona.hangUp(); #ifdef USB_DEBUG - Serial.println("Hanging up"); + Serial.println("Hanging up"); #endif - break; - } + break; } + // numpad stuff } } @@ -171,7 +171,7 @@ void loop() { } if ( startDialtone ) { - //fona.sendCheckReply( F("AT+STTONE=1,20,5000" ), F("OK") ); // Start tone + fona.sendCheckReply( F("AT+STTONE=1,20,500" ), F("OK") ); // Start tone startDialtone = false; }