Fix broken cellular_device test and delete commented code

pull/7304/head
Leon Lindenfelser 2018-09-27 14:21:57 -05:00
parent 97d6a91eb9
commit ff817de28c
3 changed files with 6 additions and 32 deletions

View File

@ -37,31 +37,13 @@ SARA4_PPP::~SARA4_PPP()
{
}
CellularNetwork *SARA4_PPP::open_network(FileHandle *fh)
AT_CellularNetwork *SARA4_PPP::open_network_impl(ATHandler &at)
{
if (!_network) {
ATHandler *atHandler = get_at_handler(fh);
if (atHandler) {
_network = new SARA4_PPP_CellularNetwork(*atHandler);
if (!_network) {
release_at_handler(atHandler);
}
}
}
return _network;
return new SARA4_PPP_CellularNetwork(at);
}
CellularPower *SARA4_PPP::open_power(FileHandle *fh)
AT_CellularPower *SARA4_PPP::open_power_impl(ATHandler &at)
{
if (!_power) {
ATHandler *atHandler = get_at_handler(fh);
if (atHandler) {
_power = new SARA4_PPP_CellularPower(*atHandler);
if (!_power) {
release_at_handler(atHandler);
}
}
}
return _power;
return new SARA4_PPP_CellularPower(at);
}

View File

@ -29,8 +29,8 @@ public:
virtual ~SARA4_PPP();
public: // CellularDevice
virtual CellularNetwork *open_network(FileHandle *fh);
virtual CellularPower *open_power(FileHandle *fh);
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
virtual AT_CellularPower *open_power_impl(ATHandler &at);
};
} // namespace mbed

View File

@ -34,15 +34,7 @@ bool SARA4_PPP_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_
AT_CellularNetwork::RegistrationMode SARA4_PPP_CellularNetwork::has_registration(RegistrationType reg_type)
{
//<<<<<<< HEAD
return (reg_type == C_REG || reg_type == C_GREG) ? RegistrationModeLAC : RegistrationModeDisable;
//=======
//#ifdef TARGET_DRAGONFLY_L471QG
// return (reg_type == C_REG || reg_type == C_EREG);
//#else
// return (reg_type == C_REG || reg_type == C_GREG || reg_type == C_EREG);
//#endif
//>>>>>>> Fixed spacing/tabs and clean up targets.json
}
nsapi_error_t SARA4_PPP_CellularNetwork::set_access_technology_impl(RadioAccessTechnology opRat)