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 2022/07/26 04:38:39 UTC

[incubator-nuttx-apps] branch master updated: testing/sensortest: fix compile break

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/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 45f2c2a26 testing/sensortest: fix compile break
45f2c2a26 is described below

commit 45f2c2a26d4a712a745c80e681e51f885dbd47d5
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Tue Jul 26 04:34:20 2022 +0000

    testing/sensortest: fix compile break
    
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 testing/sensortest/sensortest.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/testing/sensortest/sensortest.c b/testing/sensortest/sensortest.c
index 3ae8a6cef..da0ad026a 100644
--- a/testing/sensortest/sensortest.c
+++ b/testing/sensortest/sensortest.c
@@ -115,7 +115,7 @@ static const struct sensor_info g_sensor_info[] =
 
 static void print_vec3(const char *buffer, const char *name)
 {
-  struct sensor_event_accel *event = (struct sensor_event_accel *)buffer;
+  struct sensor_accel *event = (struct sensor_accel *)buffer;
   printf("%s: timestamp:%" PRIu64 " x:%.2f y:%.2f z:%.2f, "
          "temperature:%.2f\n",
          name, event->timestamp, event->x, event->y,
@@ -124,42 +124,42 @@ static void print_vec3(const char *buffer, const char *name)
 
 static void print_valb(const char *buffer, const char *name)
 {
-  struct sensor_event_hall *event = (struct sensor_event_hall *)buffer;
+  struct sensor_hall *event = (struct sensor_hall *)buffer;
   printf("%s: timestamp:%" PRIu64 " value:%d\n",
          name, event->timestamp, event->hall);
 }
 
 static void print_vali2(const char *buffer, const char *name)
 {
-  struct sensor_event_ots *event = (struct sensor_event_ots *)buffer;
+  struct sensor_ots *event = (struct sensor_ots *)buffer;
   printf("%s: timestamp:%" PRIu64 " value1:% " PRIi32 " value2:% " PRIi32
          "\n", name, event->timestamp, event->x, event->y);
 }
 
 static void print_valf(const char *buffer, const char *name)
 {
-  struct sensor_event_prox *event = (struct sensor_event_prox *)buffer;
+  struct sensor_prox *event = (struct sensor_prox *)buffer;
   printf("%s: timestamp:%" PRIu64 " value:%.2f\n",
          name, event->timestamp, event->proximity);
 }
 
 static void print_valf2(const char *buffer, const char *name)
 {
-  struct sensor_event_baro *event = (struct sensor_event_baro *)buffer;
+  struct sensor_baro *event = (struct sensor_baro *)buffer;
   printf("%s: timestamp:%" PRIu64 " value1:%.2f value2:%.2f\n",
          name, event->timestamp, event->pressure, event->temperature);
 }
 
 static void print_valf3(const char *buffer, const char *name)
 {
-  struct sensor_event_rgb *event = (struct sensor_event_rgb *)buffer;
+  struct sensor_rgb *event = (struct sensor_rgb *)buffer;
   printf("%s: timestamp:%" PRIu64 " value1:%.2f value2:%.2f, value3:%.2f\n",
          name, event->timestamp, event->r, event->g, event->b);
 }
 
 static void print_ppgd(const char *buffer, const char *name)
 {
-  struct sensor_event_ppgd *event = (struct sensor_event_ppgd *)buffer;
+  struct sensor_ppgd *event = (struct sensor_ppgd *)buffer;
   printf("%s: timestamp:%" PRIu64 " ppg1:%" PRIu32 " ppg2:%" PRIu32 " "
          "current:%" PRIu32 " gain1:%" PRIu16 " gain2:%" PRIu16 "\n",
          name, event->timestamp, event->ppg[0], event->ppg[1],
@@ -168,7 +168,7 @@ static void print_ppgd(const char *buffer, const char *name)
 
 static void print_ppgq(const char *buffer, const char *name)
 {
-  struct sensor_event_ppgq *event = (struct sensor_event_ppgq *)buffer;
+  struct sensor_ppgq *event = (struct sensor_ppgq *)buffer;
   printf("%s: timestamp:%" PRIu64 " ppg1:%" PRIu32 " ppg2:%" PRIu32 " "
          "ppg3:%" PRIu32 " ppg4:%" PRIu32 " current:%" PRIu32 " "
          "gain1:%" PRIu16 " gain2:%" PRIu16 " gain3:%" PRIu16 " "
@@ -180,7 +180,7 @@ static void print_ppgq(const char *buffer, const char *name)
 
 static void print_gps(const char *buffer, const char *name)
 {
-  struct sensor_event_gps *event = (struct sensor_event_gps *)buffer;
+  struct sensor_gps *event = (struct sensor_gps *)buffer;
 
   printf("%s: timestamp:%" PRIu64 " time_utc: %" PRIu64 " latitude: %f "
          "longitude: %f altitude: %f altitude_ellipsoid: %f eph: %f epv: %f "
@@ -194,8 +194,8 @@ static void print_gps(const char *buffer, const char *name)
 
 static void print_gps_satellite(FAR const char *buffer, FAR const char *name)
 {
-  FAR struct sensor_event_gps_satellite *event =
-        (struct sensor_event_gps_satellite *)buffer;
+  FAR struct sensor_gps_satellite *event =
+        (struct sensor_gps_satellite *)buffer;
 
   printf("%s: timestamp: %" PRIu64 " count: %" PRIu32
          " satellites: %" PRIu32 "\n",