summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-12-10 15:45:15 -0600
committerMike Fiore <mfiore@multitech.com>2015-12-10 15:45:15 -0600
commit0ae5b17f7977f197e59110d5cf6450d49ae0ba24 (patch)
tree802a682d6ce70fbb75727750ef9405b8c18994ab
parent7cee146eab4f3666980e0688c1d5a96993517bfb (diff)
downloadmtdot-box-evb-factory-firmware-0ae5b17f7977f197e59110d5cf6450d49ae0ba24.tar.gz
mtdot-box-evb-factory-firmware-0ae5b17f7977f197e59110d5cf6450d49ae0ba24.tar.bz2
mtdot-box-evb-factory-firmware-0ae5b17f7977f197e59110d5cf6450d49ae0ba24.zip
update mdot-library to get SNR fix & update accordingly
-rw-r--r--Layout/LayoutSurveySuccess.cpp2
-rw-r--r--Mode/Mode.cpp4
m---------mdot-library0
3 files changed, 3 insertions, 3 deletions
diff --git a/Layout/LayoutSurveySuccess.cpp b/Layout/LayoutSurveySuccess.cpp
index 01a0c94..2f6a732 100644
--- a/Layout/LayoutSurveySuccess.cpp
+++ b/Layout/LayoutSurveySuccess.cpp
@@ -76,7 +76,7 @@ void LayoutSurveySuccess::updateStats(LoRaHandler::LoRaPing ping) {
writeField(_fDownRssi, buf, size);
memset(buf, 0, sizeof(buf));
- size = snprintf(buf, sizeof(buf), "%2.1f", (float)ping.down.snr / 4.0);
+ size = snprintf(buf, sizeof(buf), "%2.1f", (float)ping.down.snr / 10.0);
writeField(_fDownSnr, buf, size);
endUpdate();
diff --git a/Mode/Mode.cpp b/Mode/Mode.cpp
index 32f67ad..d05f4b0 100644
--- a/Mode/Mode.cpp
+++ b/Mode/Mode.cpp
@@ -103,7 +103,7 @@ bool Mode::appendDataFile(const DataItem& data) {
if (data.status) {
float up_snr = (float)data.ping.up.snr / 10.0;
- float down_snr = (float)data.ping.down.snr / 4.0;
+ float down_snr = (float)data.ping.down.snr / 10.0;
snprintf(stats_buf, sizeof(stats_buf), "%d,%2.1f,%d,%2.1f",
abs(data.ping.up.rssi),
up_snr,
@@ -258,7 +258,7 @@ std::vector<uint8_t> Mode::formatSurveyData(DataItem& data) {
convertS.f_s=data.ping.down.rssi;
send_data.push_back(convertS.t_u[1]);
send_data.push_back(convertS.t_u[0]);
- send_data.push_back(data.ping.down.snr);
+ send_data.push_back((data.ping.down.snr/10) & 0xFF);
// collect GPS data if GPS device detected
if (_gps->gpsDetected() && ((_data_rate != mDot::SF_10) || (_band == mDot::FB_868))){
diff --git a/mdot-library b/mdot-library
-Subproject 15174ec09a26d83f63ec196d460a3c501d16747
+Subproject 484571143900dc9a8d1e74b6f2a69a4154a8cb3