Skip to content

Commit e6fb724

Browse files
committed
Reverted powerOff to PWRKEY procedure. Save HEX space and is as valid and safe as AT command
1 parent 46f3bca commit e6fb724

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/SIM808.Power.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,9 @@ bool SIM808::powerOnOff(bool power)
1515

1616
SIM808_PRINT_P("powerOnOff: %t", power);
1717

18-
if(power) {
19-
digitalWrite(_pwrKeyPin, LOW);
20-
delay(2000);
21-
digitalWrite(_pwrKeyPin, HIGH);
22-
} else {
23-
sendAT(S_F("+CPOWD=1"));
24-
waitResponse(S_F("NORMAL POWER DOWN"));
25-
}
18+
digitalWrite(_pwrKeyPin, LOW);
19+
delay(2000);
20+
digitalWrite(_pwrKeyPin, HIGH);
2621

2722
uint16_t timeout = 2000;
2823
do {

0 commit comments

Comments
 (0)