We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb07229 + 73b96c1 commit 2a4e481Copy full SHA for 2a4e481
features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp
@@ -97,10 +97,12 @@ CellularDevice *CellularDevice::get_default_instance()
97
98
nsapi_error_t QUECTEL_EC2X::press_power_button(uint32_t timeout)
99
{
100
- _pwr_key = _active_high;
101
- ThisThread::sleep_for(timeout);
102
- _pwr_key = !_active_high;
103
- ThisThread::sleep_for(100);
+ if (_pwr_key.is_connected()) {
+ _pwr_key = _active_high;
+ ThisThread::sleep_for(timeout);
+ _pwr_key = !_active_high;
104
+ ThisThread::sleep_for(100);
105
+ }
106
107
return NSAPI_ERROR_OK;
108
}
0 commit comments