phone seems to work. places call to correct number. receiving calls untested

This commit is contained in:
Brendan Haines 2016-11-01 21:42:56 -06:00
parent 035f9af99a
commit 705e279bba

View File

@ -169,6 +169,7 @@ void loop() {
} }
} }
} }
if ( startDialtone ) { if ( startDialtone ) {
//fona.sendCheckReply( F("AT+STTONE=1,20,5000" ), F("OK") ); // Start tone //fona.sendCheckReply( F("AT+STTONE=1,20,5000" ), F("OK") ); // Start tone
startDialtone = false; startDialtone = false;
@ -186,7 +187,6 @@ void loop() {
Serial.print(phoneNumber[i]); Serial.print(phoneNumber[i]);
Serial.print(", "); Serial.print(", ");
} }
Serial.println();
Serial.println(phoneNumberLength); Serial.println(phoneNumberLength);
#endif #endif
// Check for complete phone number (including +1 country code) // Check for complete phone number (including +1 country code)
@ -195,6 +195,17 @@ void loop() {
} }
} }
// Clear stored phone number on press of end button
if ( !digitalRead(BUT_END) ) {
for ( int j = 0; j < phoneNumberLength; j++) {
phoneNumber[j] = 0;
}
phoneNumberLength = 0;
#ifdef USB_DEBUG
Serial.println( phoneNumberLength );
#endif
}
#ifdef SLEEP #ifdef SLEEP
// Autoshutdown if inactive for extended period // Autoshutdown if inactive for extended period
// Typecast to long avoids "rollover" issues // Typecast to long avoids "rollover" issues