fix: sensor: update hall data type

update hall data type to int32_t

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
This commit is contained in:
jinxudong 2022-09-06 11:27:14 +08:00 committed by GUIDINGLI
parent c375f3e6fc
commit 57af6174f0
2 changed files with 3 additions and 2 deletions

View File

@ -35,7 +35,8 @@ static void print_sensor_hall_message(FAR const struct orb_metadata *meta,
FAR const struct sensor_hall *message = buffer;
const orb_abstime now = orb_absolute_time();
uorbinfo_raw("%s:\ttimestamp: %" PRIu64 " (%" PRIu64 " us ago) hall: %d",
uorbinfo_raw("%s:\ttimestamp: %" PRIu64 " (%" PRIu64 " us ago) "
"hall: %" PRIi32 "",
meta->o_name, message->timestamp, now - message->timestamp,
message->hall);
}

View File

@ -128,7 +128,7 @@ static void print_vec3(const char *buffer, const char *name)
static void print_valb(const char *buffer, const char *name)
{
FAR struct sensor_hall *event = (FAR struct sensor_hall *)buffer;
printf("%s: timestamp:%" PRIu64 " value:%d\n",
printf("%s: timestamp:%" PRIu64 " value:%" PRIi32 "\n",
name, event->timestamp, event->hall);
}