firm newest

Dependencies:   MTS-Serial libmDot-dev-mbed5-deprecated

Committer:
nguyenhoang9x5555
Date:
Mon Oct 22 01:56:09 2018 +0000
Revision:
1:c1c6549b9333
Parent:
0:3c869a8cb8f8
hey

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nguyenhoang9x5555 0:3c869a8cb8f8 1 #include "CmdSnr.h"
nguyenhoang9x5555 0:3c869a8cb8f8 2
nguyenhoang9x5555 0:3c869a8cb8f8 3 CmdSnr::CmdSnr() :
nguyenhoang9x5555 0:3c869a8cb8f8 4 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)")
nguyenhoang9x5555 0:3c869a8cb8f8 5 {
nguyenhoang9x5555 0:3c869a8cb8f8 6 _queryable = true;
nguyenhoang9x5555 0:3c869a8cb8f8 7 }
nguyenhoang9x5555 0:3c869a8cb8f8 8
nguyenhoang9x5555 0:3c869a8cb8f8 9 uint32_t CmdSnr::action(std::vector<std::string> args)
nguyenhoang9x5555 0:3c869a8cb8f8 10 {
nguyenhoang9x5555 0:3c869a8cb8f8 11 mDot::snr_stats stats = CommandTerminal::Dot()->getSnrStats();
nguyenhoang9x5555 0:3c869a8cb8f8 12 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));
nguyenhoang9x5555 0:3c869a8cb8f8 13
nguyenhoang9x5555 0:3c869a8cb8f8 14 return 0;
nguyenhoang9x5555 0:3c869a8cb8f8 15 }