Fixed EasyCellularConnection to have debug flag

pull/6082/head
Ari Parkkila 2018-03-01 09:41:55 +02:00
parent 81738acfb4
commit b811f7e84d
3 changed files with 6 additions and 4 deletions

View File

@ -15,7 +15,8 @@
* limitations under the License.
*/
#include <CellularConnectionFSM.h>
#include "CellularConnectionFSM.h"
#ifdef CELLULAR_DEVICE
#ifndef MBED_TRACE_MAX_LEVEL

View File

@ -53,15 +53,16 @@ bool EasyCellularConnection::cellular_status(int state, int next_state)
return true;
}
EasyCellularConnection::EasyCellularConnection() :
EasyCellularConnection::EasyCellularConnection(bool debug) :
_is_connected(false), _is_initialized(false), _target_state(CellularConnectionFSM::STATE_POWER_ON), _cellularSerial(
MDMTXD, MDMRXD, MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE), _cellularSemaphore(0), _cellularConnectionFSM(), _credentials_err(
NSAPI_ERROR_OK)
{
tr_info("EasyCellularConnection()");
#if MBED_CONF_CELLULAR_USE_APN_LOOKUP || MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP
_credentials_set = false;
#endif // #if MBED_CONF_CELLULAR_USE_APN_LOOKUP || MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP
tr_info("EasyCellularConnection()");
modem_debug_on(debug);
}
EasyCellularConnection::~EasyCellularConnection()

View File

@ -35,7 +35,7 @@ class EasyCellularConnection: public CellularBase
{
public:
EasyCellularConnection();
EasyCellularConnection(bool debug = false);
virtual ~EasyCellularConnection();
public: