Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MTS-Serial libmDot-mbed5
Fork of Dot-AT-Firmware by
CmdSnr.cpp
00001 #include "CmdSnr.h" 00002 00003 CmdSnr::CmdSnr() : 00004 Command("Signal To Noise Ratio", "AT+SNR", "Display signal to noise ratio of received packets: last, min, max, avg in dB", "(-20.0-20.0),(-20.0-20.0),(-20.0-20.0),(-20.0-20.0)") 00005 { 00006 _queryable = true; 00007 } 00008 00009 uint32_t CmdSnr::action(std::vector<std::string> args) 00010 { 00011 mDot::snr_stats stats = CommandTerminal::Dot()->getSnrStats(); 00012 CommandTerminal::Serial()->writef("%d.%d, %d.%d, %d.%d, %d.%d\r\n", stats.last / 10, abs(stats.last % 10), stats.min / 10, abs(stats.min % 10), stats.max / 10, abs(stats.max % 10), stats.avg / 10, abs(stats.avg % 10)); 00013 00014 return 0; 00015 }
Generated on Tue Jul 12 2022 20:40:04 by
