Bonjour,
quand je tape "call" dans le terminal ce code rentre en action
// MAKE A CALL
if(!strcmp(inSerial,"call")){
#ifdef DEBUG
Serial.print(F("Starting Dialing "));
Serial.println(number);
#endif
if (inSerial.length()<5) //To call variable 'number' comand c
{
#ifdef DEBUG
Serial.print(F("Dialing "));
Serial.println(number);
#endif
call.Call(number);
}else{
}
Le truc c'est que j'aimerais pouvoir compter la longeur du text "call".
S'il est c'est bien call, execute un code, si c'est call1, ou call2 ou call3 etc, fait une autre partie du code
Simplement, là, ca ne marche pas j'ai un message d'erruer:
rquest from member 'length' in 'inSerial', which is of non-class type 'char[20]'
Ben en terme de code, je peux pas mettre plus en plus de ceci:
char inSerial[20];
// MAKE A CALL
if(!strcmp(inSerial,"call")){
#ifdef DEBUG
Serial.print(F("Starting Dialing "));
Serial.println(number);
#endif
if (inSerial.length()<5) //To call variable 'number' comand c
{
#ifdef DEBUG
Serial.print(F("Dialing "));
Serial.println(number);
#endif
call.Call(number);
}
/*
if (inStr.length()==5) //To call number in phone book position comand cx where x is the SIM position
{
error=call.GetPhoneNumber(inStr[1],number);
if (error!=0)
{
Serial.print("Calling ");
Serial.println(number);
call.Call(number);
}
else
{
Serial.print("No number in pos ");
Serial.println(inStr[1]);
}
}
*/
}