From f83a60802aa82e6803c9afb9f2afa9c1d29c7399 Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Tue, 1 Nov 2016 21:58:58 -0600 Subject: [PATCH] makes DTMF tones be played for all phone number digits rather than just first digit --- Hohm_Phone.ino | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Hohm_Phone.ino b/Hohm_Phone.ino index e472bae..fd8b1d4 100644 --- a/Hohm_Phone.ino +++ b/Hohm_Phone.ino @@ -109,17 +109,17 @@ void beginCall() { fona.sendCheckReply( F("AT+STTONE=0"), F("OK") ); // End dialtone for (int i = 0; i < phoneNumberLength; i++) { fona.playDTMF( phoneNumber[i] ); // Play DTMF tones - if ( fona.callPhone( phoneNumber ) ) { -#ifdef USB_DEBUG - Serial.println("Call Started"); -#endif - inCall(); - } - for ( int j = 0; j < phoneNumberLength; j++) { - phoneNumber[j] = 0; - } - phoneNumberLength = 0; } + if ( fona.callPhone( phoneNumber ) ) { +#ifdef USB_DEBUG + Serial.println("Call Started"); +#endif + inCall(); + } + for ( int j = 0; j < phoneNumberLength; j++) { + phoneNumber[j] = 0; + } + phoneNumberLength = 0; #ifdef USB_DEBUG Serial.println("Call ended"); #endif