firm newest
Dependencies: MTS-Serial libmDot-dev-mbed5-deprecated
Diff: CommandTerminal/CmdRssi.cpp
- Revision:
- 0:3c869a8cb8f8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CommandTerminal/CmdRssi.cpp Thu Oct 18 04:18:48 2018 +0000 @@ -0,0 +1,15 @@ +#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; +} +