diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-12-03 11:42:00 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-12-03 11:42:00 -0600 |
commit | 2cd88147a991bed2e0e71bbc028078bd15838161 (patch) | |
tree | 8d8f88a1f66a4472bdd7ebdb920b25939ceb695e | |
parent | d5853121cf1d74f65a98a27080506455c9abedab (diff) | |
download | mtdot-box-evb-factory-firmware-2cd88147a991bed2e0e71bbc028078bd15838161.tar.gz mtdot-box-evb-factory-firmware-2cd88147a991bed2e0e71bbc028078bd15838161.tar.bz2 mtdot-box-evb-factory-firmware-2cd88147a991bed2e0e71bbc028078bd15838161.zip |
display data rate and power when entering Survey Single Mode
-rw-r--r-- | Mode/ModeSingle.cpp | 11 | ||||
-rw-r--r-- | Mode/ModeSingle.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Mode/ModeSingle.cpp b/Mode/ModeSingle.cpp index 326ba1d..bda6e12 100644 --- a/Mode/ModeSingle.cpp +++ b/Mode/ModeSingle.cpp @@ -65,7 +65,7 @@ bool ModeSingle::start() { break; case show_help: incrementRatePower(); - _help.updateMsg(formatNewRatePower()); + _help.updateMsg(formatRatePower()); logInfo("new data rate %u, power %lu", _data_rate, _power); break; case in_progress: @@ -73,14 +73,14 @@ bool ModeSingle::start() { break; case success: incrementRatePower(); - _success.updateInfo(formatNewRatePower()); + _success.updateInfo(formatRatePower()); logInfo("new data rate %u, power %lu", _data_rate, _power); break; case data: break; case failure: incrementRatePower(); - _failure.updateInfo(formatNewRatePower()); + _failure.updateInfo(formatRatePower()); logInfo("new data rate %u, power %lu", _data_rate, _power); break; } @@ -310,6 +310,7 @@ void ModeSingle::displayHelp() { _help.updateMode("Survey Single"); _help.updateSw1(" DR/PWR"); _help.updateSw2("Survey"); + _help.updateMsg(formatRatePower()); } void ModeSingle::displaySuccess() { @@ -334,13 +335,13 @@ void ModeSingle::displaySuccess() { } } -std::string ModeSingle::formatNewRatePower() { +std::string ModeSingle::formatRatePower() { std::string msg; char buf[8]; size_t size; memset(buf, 0, sizeof(buf)); - msg += "New DR="; + msg += "DR="; msg += _dot->DataRateStr(_data_rate).substr(3); msg += " P="; size = snprintf(buf, sizeof(buf), "%u", _power); diff --git a/Mode/ModeSingle.h b/Mode/ModeSingle.h index 4f7cdf3..1ddfc33 100644 --- a/Mode/ModeSingle.h +++ b/Mode/ModeSingle.h @@ -19,7 +19,7 @@ class ModeSingle : public Mode { private: void displayHelp(); void displaySuccess(); - std::string formatNewRatePower(); + std::string formatRatePower(); void incrementRatePower(); typedef enum { |