testing/sensortest: fix compile break
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
a06fa5ac27
commit
45f2c2a26d
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user