aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahmoud Elsherif <moelsherif@google.com>2022-07-26 01:46:40 +0000
committerMahmoud Elsherif <moelsherif@google.com>2022-08-14 23:33:22 +0000
commit4792148533cc985a8abdd311d80ed75be272b365 (patch)
tree23eda9df62b966624c417d0882e954fa6edf781a
parentfa4266fb3963f00025fa53624ff1e80707abcf47 (diff)
downloadcuttlefish-4792148533cc985a8abdd311d80ed75be272b365.tar.gz
Refactor SendGps function for better readability.
Test: m Change-Id: Icfb00d59c4ea2a9539b564795e28835816ac5a44
-rw-r--r--host/commands/cvd_import_locations/main.cc2
-rw-r--r--host/commands/cvd_update_location/main.cc2
-rw-r--r--host/libs/location/GnssClient.cpp4
-rw-r--r--host/libs/location/GnssClient.h4
4 files changed, 6 insertions, 6 deletions
diff --git a/host/commands/cvd_import_locations/main.cc b/host/commands/cvd_import_locations/main.cc
index 0f5f9f5c2..10f0d9b93 100644
--- a/host/commands/cvd_import_locations/main.cc
+++ b/host/commands/cvd_import_locations/main.cc
@@ -111,7 +111,7 @@ int ImportLocationsCvdMain(int argc, char** argv) {
std::string formatted_location =
gpsclient.FormatGps(latitude, longitude, elevation);
- auto status = gpsclient.SendGps(formatted_location);
+ auto status = gpsclient.SendSingleGpsLoc(formatted_location);
CHECK(status.ok()) << "Failed to send gps location data \n";
if (!status.ok()) {
return 1;
diff --git a/host/commands/cvd_update_location/main.cc b/host/commands/cvd_update_location/main.cc
index dce9a48e2..e5ffe3027 100644
--- a/host/commands/cvd_update_location/main.cc
+++ b/host/commands/cvd_update_location/main.cc
@@ -48,7 +48,7 @@ int UpdateLocationCvdMain(int argc, char** argv) {
grpc::CreateChannel(socket_name, grpc::InsecureChannelCredentials()));
std::string formatted_location =
gpsclient.FormatGps(FLAGS_latitude, FLAGS_longitude, FLAGS_elevation);
- auto status = gpsclient.SendGps(formatted_location);
+ auto status = gpsclient.SendSingleGpsLoc(formatted_location);
CHECK(status.ok()) << "Failed to send gps location data \n";
if (!status.ok()) {
return 1;
diff --git a/host/libs/location/GnssClient.cpp b/host/libs/location/GnssClient.cpp
index 74787aeaa..b49a135af 100644
--- a/host/libs/location/GnssClient.cpp
+++ b/host/libs/location/GnssClient.cpp
@@ -30,9 +30,9 @@ namespace cuttlefish {
GnssClient::GnssClient(std::shared_ptr<grpc::Channel> channel)
: stub_(GnssGrpcProxy::NewStub(channel)) {}
-// Assambles the client's payload, sends it and presents the response back
+// Aseembles the client's payload, sends it and presents the response back
// from the server.
-Result<grpc::Status> GnssClient::SendGps(const std::string& user) {
+Result<grpc::Status> GnssClient::SendSingleGpsLoc(const std::string& user) {
// Data we are sending to the server.
SendGpsRequest request;
request.set_gps(user);
diff --git a/host/libs/location/GnssClient.h b/host/libs/location/GnssClient.h
index a79857b56..b606a0d35 100644
--- a/host/libs/location/GnssClient.h
+++ b/host/libs/location/GnssClient.h
@@ -27,9 +27,9 @@ class GnssClient {
public:
GnssClient(std::shared_ptr<grpc::Channel> channel);
- // Assambles the client's payload, sends it and presents the response back
+ // Aseembles the client's payload, sends it and presents the response back
// from the server.
- Result<grpc::Status> SendGps(const std::string& user);
+ Result<grpc::Status> SendSingleGpsLoc(const std::string& user);
std::string FormatGps(const std::string& latitude,
const std::string& longitude,
const std::string& elevation);