From d02b05328a7c16dbc97dc01fefd8d5f24b4cbc97 Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Mon, 16 Dec 2024 21:45:18 +0800 Subject: [PATCH] uORB/sensor: Update macro of sensor_gnss format string Make it easier to extend the format of struct member Signed-off-by: wangjianyu3 --- system/uorb/sensor/gnss.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/system/uorb/sensor/gnss.c b/system/uorb/sensor/gnss.c index df97b77b645..00ffcd33911 100644 --- a/system/uorb/sensor/gnss.c +++ b/system/uorb/sensor/gnss.c @@ -29,10 +29,21 @@ ****************************************************************************/ #ifdef CONFIG_DEBUG_UORB -#define UORB_DEBUG_FORMAT_SENSOR_GNSS \ - "timestamp:%" PRIu64 ",time_utc:%" PRIu64 ",latitude:%hf,longitude:%hf," \ - "altitude:%hf,altitude_ellipsoid:%hf,eph:%hf,epv:%hf,hdop:%hf,pdop:%hf," \ - "vdop:%hf,ground_speed:%hf,course:%hf,satellites_used:%" PRIu32 "" +#define UORB_DEBUG_FORMAT_SENSOR_GNSS \ + "timestamp:%" PRIu64 \ + ",time_utc:%" PRIu64 \ + ",latitude:%hf" \ + ",longitude:%hf" \ + ",altitude:%hf" \ + ",altitude_ellipsoid:%hf" \ + ",eph:%hf" \ + ",epv:%hf" \ + ",hdop:%hf" \ + ",pdop:%hf" \ + ",vdop:%hf" \ + ",ground_speed:%hf" \ + ",course:%hf" \ + ",satellites_used:%" PRIu32 "" #define SENSOR_GNSS_SATELLITE_INFO_FORMAT(idx) \ ",svid" #idx ":%" PRIu32 \