summaryrefslogtreecommitdiff
path: root/Layout
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-12-11 10:18:02 -0600
committerMike Fiore <mfiore@multitech.com>2015-12-11 10:18:02 -0600
commitc28f3e07a6320f48476fd4dad5cca0011669e49f (patch)
tree063962dd2197419f62cd2555b8525df89db18ea1 /Layout
parenta1bb849d38853c79285665e702f9425770e74133 (diff)
parent279d4b746cb23dce634c968a86eaab0199f1d4af (diff)
downloadmtdot-box-evb-factory-firmware-c28f3e07a6320f48476fd4dad5cca0011669e49f.tar.gz
mtdot-box-evb-factory-firmware-c28f3e07a6320f48476fd4dad5cca0011669e49f.tar.bz2
mtdot-box-evb-factory-firmware-c28f3e07a6320f48476fd4dad5cca0011669e49f.zip
Merge branch 'link_check'
Conflicts: Layout/LayoutSurveySuccess.cpp Mode/Mode.cpp
Diffstat (limited to 'Layout')
-rw-r--r--Layout/LayoutSurveySuccess.cpp19
-rw-r--r--Layout/LayoutSurveySuccess.h5
2 files changed, 9 insertions, 15 deletions
diff --git a/Layout/LayoutSurveySuccess.cpp b/Layout/LayoutSurveySuccess.cpp
index be86b79..e59a754 100644
--- a/Layout/LayoutSurveySuccess.cpp
+++ b/Layout/LayoutSurveySuccess.cpp
@@ -6,13 +6,12 @@ LayoutSurveySuccess::LayoutSurveySuccess(DOGS102* lcd)
_lId(0, 0, "ID"),
_lDr(8, 0, "DR"),
_lPwr(13, 0, "P"),
- _lUp(0, 1, "UP"),
+ _lUp(0, 1, "UP Margin"),
_lDown(0, 2, "DWN"),
_fId(2, 0, 5),
_fDr(10, 0, 2),
_fPwr(14, 0, 2),
- _fUpRssi(3, 1, 7),
- _fUpSnr(11, 1, 5),
+ _fUpMargin(10, 1, 5),
_fDownRssi(4, 2, 7),
_fDownSnr(12, 2, 5),
_fGpsLat(0, 4, 17),
@@ -58,25 +57,21 @@ void LayoutSurveySuccess::updatePower(uint32_t power) {
writeField(_fPwr, buf, size, true);
}
-void LayoutSurveySuccess::updateStats(LoRaHandler::LoRaPing ping) {
+void LayoutSurveySuccess::updateStats(LoRaHandler::LoRaLink link) {
char buf[16];
size_t size;
startUpdate();
- size = snprintf(buf, sizeof(buf), "%3d dbm", ping.up.rssi);
- writeField(_fUpRssi, buf, size);
+ size = snprintf(buf, sizeof(buf), "%d", link.up.dBm);
+ writeField(_fUpMargin, buf, size);
memset(buf, 0, sizeof(buf));
- size = snprintf(buf, sizeof(buf), "%2.1f", (float)ping.up.snr / 10.0);
- writeField(_fUpSnr, buf, size);
-
- memset(buf, 0, sizeof(buf));
- size = snprintf(buf, sizeof(buf), "%3d dbm", ping.down.rssi);
+ size = snprintf(buf, sizeof(buf), "%3d dbm", link.down.rssi);
writeField(_fDownRssi, buf, size);
memset(buf, 0, sizeof(buf));
- size = snprintf(buf, sizeof(buf), "%2.1f", (float)ping.down.snr / 10.0);
+ size = snprintf(buf, sizeof(buf), "%2.1f", (float)link.down.snr / 10.0);
writeField(_fDownSnr, buf, size);
endUpdate();
diff --git a/Layout/LayoutSurveySuccess.h b/Layout/LayoutSurveySuccess.h
index 49113cb..a330c7f 100644
--- a/Layout/LayoutSurveySuccess.h
+++ b/Layout/LayoutSurveySuccess.h
@@ -14,7 +14,7 @@ class LayoutSurveySuccess : public Layout {
void updateId(uint32_t id);
void updateRate(std::string rate);
void updatePower(uint32_t power);
- void updateStats(LoRaHandler::LoRaPing ping);
+ void updateStats(LoRaHandler::LoRaLink link);
void updateGpsLatitude(GPSPARSER::latitude lat);
void updateGpsLatitude(std::string msg);
void updateGpsLongitude(GPSPARSER::longitude lon);
@@ -35,8 +35,7 @@ class LayoutSurveySuccess : public Layout {
Field _fId;
Field _fDr;
Field _fPwr;
- Field _fUpRssi;
- Field _fUpSnr;
+ Field _fUpMargin;
Field _fDownRssi;
Field _fDownSnr;
Field _fGpsLat;