MTDOT-BOX-EVB-Factory-Firmware

Dependencies:   NCP5623B GpsParser ISL29011 libmDot-mbed5 MTS-Serial MMA845x DOGS102 MPL3115A2

CommandTerminal/CmdTxFrequency.cpp

Committer:
jenkins@jenkinsdm1
Date:
2019-03-14
Revision:
16:e76cec0eec43
Parent:
7:a31236c2e75c

File content as of revision 16:e76cec0eec43:

#include "CmdTxFrequency.h"
#include <climits>


CmdTxFrequency::CmdTxFrequency(mDot* dot) :
    Command(dot, "Tx Frequency", "AT+TXF", "Set Tx frequency") {
}

uint32_t CmdTxFrequency::action(std::vector<std::string> args)
{
    if (args.size() == 2)
    {
        int frequency = 0;

        sscanf(args[1].c_str(), "%d", &frequency);
        _dot->setTxFrequency(frequency);
    }

    return 0;
}

bool CmdTxFrequency::verify(std::vector<std::string> args)
{
    return true;
}