changes playing to DTMF tones to be with each keypress rather than when call is placed

This commit is contained in:
Brendan Haines 2016-11-01 22:00:44 -06:00
parent f83a60802a
commit 4bee242c21

View File

@ -107,9 +107,6 @@ void beginCall() {
Serial.println("Starting Call"); Serial.println("Starting Call");
#endif #endif
fona.sendCheckReply( F("AT+STTONE=0"), F("OK") ); // End dialtone 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 ) ) { if ( fona.callPhone( phoneNumber ) ) {
#ifdef USB_DEBUG #ifdef USB_DEBUG
Serial.println("Call Started"); Serial.println("Call Started");
@ -180,6 +177,7 @@ void loop() {
if ( key != NO_KEY ) { if ( key != NO_KEY ) {
phoneNumber[ phoneNumberLength ] = key; phoneNumber[ phoneNumberLength ] = key;
phoneNumberLength = phoneNumberLength + 1; phoneNumberLength = phoneNumberLength + 1;
fona.playDTMF( key ); // Play DTMF tone
lastActiveTime = millis(); lastActiveTime = millis();
#ifdef USB_DEBUG #ifdef USB_DEBUG
int i; int i;