delete no use code
This commit is contained in:
parent
df96b1eb0d
commit
a899f6c7cb
|
@ -15,35 +15,6 @@ bool SIM7000::begin(Stream &port)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool SIM7000::checkSIMStatus(void)
|
||||
{
|
||||
int count = 0;
|
||||
while(count < 3){
|
||||
if(check_send_cmd("AT\r\n","OK")){
|
||||
break;
|
||||
}else{
|
||||
count++;
|
||||
delay(300);
|
||||
}
|
||||
}
|
||||
if(count == 3){
|
||||
return false;
|
||||
}
|
||||
count = 0;
|
||||
while(count < 3){
|
||||
if(check_send_cmd("AT+CPIN?\r\n","READY")){
|
||||
break;
|
||||
}else{
|
||||
count++;
|
||||
delay(300);
|
||||
}
|
||||
}
|
||||
if(count == 3){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SIM7000::check_send_cmd(const char* cmd, const char* resp, unsigned int timeout, unsigned int chartimeout)
|
||||
{
|
||||
char SIMbuffer[100];
|
||||
|
|
|
@ -9,15 +9,11 @@
|
|||
class SIM7000
|
||||
{
|
||||
public:
|
||||
bool begin(Stream &port);
|
||||
bool check_send_cmd(const char* cmd, const char* resp, unsigned int timeout = DEFAULT_TIMEOUT, unsigned int chartimeout = DEFAULT_INTERCHAR_TIMEOUT);
|
||||
void sendCmd(const char* cmd);
|
||||
int readBuffer(char *buffer, int count, unsigned int timeout = DEFAULT_TIMEOUT, unsigned int chartimeout = DEFAULT_INTERCHAR_TIMEOUT);
|
||||
bool setBaudRate(long rate);
|
||||
bool checkSIMStatus(void);
|
||||
bool begin(Stream &port);
|
||||
private:
|
||||
char latitude[8];
|
||||
char longitude[8];
|
||||
SoftwareSerial* mySerial;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue