You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/18 19:42:41 UTC

(nuttx-apps) 04/06: testing/sensortest: Rename GPS to GNSS

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 8764f502d5ac7094a337620b6d4c197e2d150332
Author: wangjianyu3 <wa...@xiaomi.com>
AuthorDate: Tue Jul 2 16:26:08 2024 +0800

    testing/sensortest: Rename GPS to GNSS
    
    Signed-off-by: wangjianyu3 <wa...@xiaomi.com>
---
 testing/sensortest/sensortest.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/testing/sensortest/sensortest.c b/testing/sensortest/sensortest.c
index 76c004b68..8544d67f0 100644
--- a/testing/sensortest/sensortest.c
+++ b/testing/sensortest/sensortest.c
@@ -71,9 +71,9 @@ static void print_force(FAR const char *buffer, FAR const char *name);
 static void print_ppgd(FAR const char *buffer, FAR const char *name);
 static void print_ppgq(FAR const char *buffer, FAR const char *name);
 static void print_cap(FAR const char *buffer, FAR const char *name);
-static void print_gps(FAR const char *buffer, FAR const char *name);
-static void print_gps_satellite(FAR const char *buffer,
-                                FAR const char *name);
+static void print_gnss(FAR const char *buffer, FAR const char *name);
+static void print_gnss_satellite(FAR const char *buffer,
+                                 FAR const char *name);
 
 /****************************************************************************
  * Private Data
@@ -90,9 +90,9 @@ static const struct sensor_info g_sensor_info[] =
   {print_valf,  sizeof(struct sensor_dust),  "dust"},
   {print_ecg,   sizeof(struct sensor_ecg),   "ecg"},
   {print_force, sizeof(struct sensor_force), "force"},
-  {print_gps,   sizeof(struct sensor_gps),   "gps"},
-  {print_gps_satellite,
-        sizeof(struct sensor_gps_satellite), "gps_satellite"},
+  {print_gnss,  sizeof(struct sensor_gnss),  "gnss"},
+  {print_gnss_satellite,
+       sizeof(struct sensor_gnss_satellite), "gnss_satellite"},
   {print_vec3,  sizeof(struct sensor_gyro),  "gyro"},
   {print_valb,  sizeof(struct sensor_hall),  "hall"},
   {print_valf,  sizeof(struct sensor_hbeat), "hbeat"},
@@ -212,9 +212,9 @@ static void print_cap(FAR const char *buffer, FAR const char *name)
          event->rawdata[1], event->rawdata[2], event->rawdata[3]);
 }
 
-static void print_gps(const char *buffer, const char *name)
+static void print_gnss(const char *buffer, const char *name)
 {
-  FAR struct sensor_gps *event = (FAR struct sensor_gps *)buffer;
+  FAR struct sensor_gnss *event = (FAR struct sensor_gnss *)buffer;
 
   printf("%s: timestamp:%" PRIu64 " time_utc: %" PRIu64 " latitude: %f "
          "longitude: %f altitude: %f altitude_ellipsoid: %f eph: %f epv: %f "
@@ -226,10 +226,11 @@ static void print_gps(const char *buffer, const char *name)
          event->ground_speed, event->course, event->satellites_used);
 }
 
-static void print_gps_satellite(FAR const char *buffer, FAR const char *name)
+static void print_gnss_satellite(FAR const char *buffer,
+                                 FAR const char *name)
 {
-  FAR FAR struct sensor_gps_satellite *event =
-        (FAR struct sensor_gps_satellite *)buffer;
+  FAR FAR struct sensor_gnss_satellite *event =
+        (FAR struct sensor_gnss_satellite *)buffer;
 
   printf("%s: timestamp: %" PRIu64 " count: %" PRIu32
          " satellites: %" PRIu32 "\n",