AT terminal for the mDot using the USB debug port instead of the serial port.

Dependencies:   MTS-Serial libmDot-mbed5

Fork of Dot-AT-Firmware by MultiTech

CommandTerminal/CmdRssi.cpp

Committer:
pferland
Date:
2018-03-02
Revision:
18:f5d28d621bb0
Parent:
14:f9a77400b622

File content as of revision 18:f5d28d621bb0:

#include "CmdRssi.h"

CmdRssi::CmdRssi() :
        Command("Signal Strength", "AT+RSSI", "Displays signal strength information for received packets: last, min, max, avg in dB", "(-140-0),(-140-0),(-140-0),(-140-0)")
{
    _queryable = true;
}

uint32_t CmdRssi::action(std::vector<std::string> args)
{
    mDot::rssi_stats stats = CommandTerminal::Dot()->getRssiStats();
    CommandTerminal::Serial()->writef("%d, %d, %d, %d\r\n", stats.last, stats.min, stats.max, stats.avg);
    return 0;
}