summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsdesai <sdesai@multitech.com>2023-03-24 17:40:31 -0500
committersdesai <sdesai@multitech.com>2023-03-24 17:40:31 -0500
commit23f75ed608922db0c22a01d74f1b38f0bfed43dd (patch)
treed468631edc3380470167075e768c3141152cfc4e
parenta7c338b07cbdb706998ccead56673a3dd1cbdb0e (diff)
downloadlibmts-io-23f75ed608922db0c22a01d74f1b38f0bfed43dd.tar.gz
libmts-io-23f75ed608922db0c22a01d74f1b38f0bfed43dd.tar.bz2
libmts-io-23f75ed608922db0c22a01d74f1b38f0bfed43dd.zip
Support Portal Case #5086148: use Cellular Radio time as alternative to GPS or NTP
-rw-r--r--src/MTS_IO_SequansRadio.cpp24
-rw-r--r--src/MTS_IO_TelitRadio.cpp4
2 files changed, 5 insertions, 23 deletions
diff --git a/src/MTS_IO_SequansRadio.cpp b/src/MTS_IO_SequansRadio.cpp
index d2a2efb..5f85b58 100644
--- a/src/MTS_IO_SequansRadio.cpp
+++ b/src/MTS_IO_SequansRadio.cpp
@@ -570,24 +570,6 @@ const std::vector<std::string>& SequansRadio::getDiagCommands(bool) {
}
ICellularRadio::CODE SequansRadio::setTimeFormat() {
- printTrace("%s| Set standard time format", getName().c_str());
- ICellularRadio::CODE rc;
- // Set year format in YYYY first, in case it is in YY format to get accurate year
- std::string sCmdCSDF("AT+CSDF=1,2");
- rc = sendBasicCommand(sCmdCSDF);
-
- if (rc != SUCCESS) {
- printError("%s| Unable to set year format for radio using command [%s]", getName().c_str(), sCmdCSDF.c_str());
- return rc;
- }
-
- // Set command enables the automatic time zone update
- std::string sCmdCTZU("AT+CTZU=1");
- rc = sendBasicCommand(sCmdCTZU);
-
- if (rc != SUCCESS) {
- printError("%s| Unable to set automatic time zone update for radio using command [%s]", getName().c_str(), sCmdCTZU.c_str());
- return rc;
- }
- return SUCCESS;
-} \ No newline at end of file
+ // AT+CSDF does not work on CB610L. Also, since CB610L does not return the correct time anyway.
+ return NOT_APPLICABLE;
+}
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp
index d73dc0a..be307e6 100644
--- a/src/MTS_IO_TelitRadio.cpp
+++ b/src/MTS_IO_TelitRadio.cpp
@@ -1213,7 +1213,7 @@ const std::vector<std::string>& TelitRadio::getDiagCommands(bool) {
return vCommands;
}
-ICellularRadio::CODE TelitRadio::setTimeFormat(void) {
+ICellularRadio::CODE TelitRadio::setTimeFormat() {
printTrace("%s| Set standard time format", getName().c_str());
ICellularRadio::CODE rc;
// Set year format in YYYY first, in case it is in YY format to get accurate year
@@ -1234,4 +1234,4 @@ ICellularRadio::CODE TelitRadio::setTimeFormat(void) {
return rc;
}
return SUCCESS;
-} \ No newline at end of file
+}