Sodaq_AT_Device.cpp
bool Sodaq_AT_Device::on()
{
    _startOn = millis();

    if (!isOn()) {
        if (_onoff) {
            _onoff->on();
        }
    }

    // wait for power up
    bool timeout = true;

    for (uint8_t i = 0; i < 10; i++) {
        if (isAlive()) {
            timeout = false;
            break;
        }
    }

    if (timeout) {
        debugPrintLn("Error: No Reply from Modem");
        return false;
    }

    return isOn(); // this essentially means isOn() && isAlive()
}
// Turns the modem on and returns true if successful.
Turns the modem on and returns true if successful.
Turns the modem on and returns true if successful .
bool Sodaq_AT_Device::on()
{
    _startOn = millis();
    if (!isOn()) {
        if (_onoff) {
            _onoff->on();
        }
    }
    bool timeout = true;
    for (uint8_t i = 0; i < 10; i++) {
        if (isAlive()) {
            timeout = false;
            break;
        }
    }
    if (timeout) {
        debugPrintLn("Error: No Reply from Modem");
        return false;
    }
    return isOn(); 
}
bool Sodaq_AT_Device :: on ( ) { _startOn = millis ( ) ; if ( ! isOn ( ) ) { if ( _onoff ) { _onoff -> on ( ) ; } } bool timeout = true ; for ( uint8_t i = 0 ; i < 10 ; i ++ ) { if ( isAlive ( ) ) { timeout = false ; break ; } } if ( timeout ) { debugPrintLn ( " " ) ; return false ; } return isOn ( ) ; }
Turns the modem on and returns true if successful.
Turns the modem on and returns true if successful .
// wait for power up // this essentially means isOn() && isAlive()