From b811f7e84ddf3aff28cd2b6bc8b3a890ae8bc474 Mon Sep 17 00:00:00 2001 From: Ari Parkkila Date: Thu, 1 Mar 2018 09:41:55 +0200 Subject: [PATCH] Fixed EasyCellularConnection to have debug flag --- features/cellular/easy_cellular/CellularConnectionFSM.cpp | 3 ++- features/cellular/easy_cellular/EasyCellularConnection.cpp | 5 +++-- features/cellular/easy_cellular/EasyCellularConnection.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/features/cellular/easy_cellular/CellularConnectionFSM.cpp b/features/cellular/easy_cellular/CellularConnectionFSM.cpp index 502ab5afba..432640e2d4 100644 --- a/features/cellular/easy_cellular/CellularConnectionFSM.cpp +++ b/features/cellular/easy_cellular/CellularConnectionFSM.cpp @@ -15,7 +15,8 @@ * limitations under the License. */ -#include +#include "CellularConnectionFSM.h" + #ifdef CELLULAR_DEVICE #ifndef MBED_TRACE_MAX_LEVEL diff --git a/features/cellular/easy_cellular/EasyCellularConnection.cpp b/features/cellular/easy_cellular/EasyCellularConnection.cpp index 5e21441118..733490ee90 100644 --- a/features/cellular/easy_cellular/EasyCellularConnection.cpp +++ b/features/cellular/easy_cellular/EasyCellularConnection.cpp @@ -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() diff --git a/features/cellular/easy_cellular/EasyCellularConnection.h b/features/cellular/easy_cellular/EasyCellularConnection.h index 601c9a2047..608858093e 100644 --- a/features/cellular/easy_cellular/EasyCellularConnection.h +++ b/features/cellular/easy_cellular/EasyCellularConnection.h @@ -35,7 +35,7 @@ class EasyCellularConnection: public CellularBase { public: - EasyCellularConnection(); + EasyCellularConnection(bool debug = false); virtual ~EasyCellularConnection(); public: