From 98281d3bda9fae91c265e0b626782ebbaaab7bdf Mon Sep 17 00:00:00 2001 From: Bijoy Anose Date: Tue, 3 Nov 2015 10:03:25 -0600 Subject: [IN001490] libmts-io: Implementing setRxDiversity function for applicable radio models --- src/MTS_IO_LE910Radio.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/MTS_IO_LE910Radio.cpp') diff --git a/src/MTS_IO_LE910Radio.cpp b/src/MTS_IO_LE910Radio.cpp index 66a074e..33719f2 100644 --- a/src/MTS_IO_LE910Radio.cpp +++ b/src/MTS_IO_LE910Radio.cpp @@ -37,3 +37,16 @@ LE910Radio::LE910Radio(const std::string& sLE910Model, const std::string& sPort) } +CellularRadio::CODE LE910Radio::setRxDiversity(const Json::Value& jArgs) { +/* Command string for LAT1,LVW2,LEU1 radios: "AT#RXDIV=" */ +/* Setting needs to append ",1" to the 0/1 value */ + if (jArgs["enabled"].asString() != "1" && jArgs["enabled"].asString() != "0") + { + return FAILURE; + } + std::string sCmd = "AT#RXDIV="; + sCmd += jArgs["enabled"].asString(); + sCmd += ",1"; + + return CellularRadio::sendBasicCommand(sCmd); +} -- cgit v1.2.3