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
The following commit(s) were added to refs/heads/master by this push:
new 296a6b3ca gas.c:Adapt to uORB new macro definition content.
296a6b3ca is described below
commit 296a6b3cac4df3a1fcb52b997795e74ac7c6549f
Author: likun17 <[email protected]>
AuthorDate: Fri Sep 20 14:05:41 2024 +0800
gas.c:Adapt to uORB new macro definition content.
Signed-off-by: likun17 <[email protected]>
---
system/uorb/sensor/gas.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/system/uorb/sensor/gas.c b/system/uorb/sensor/gas.c
index 6f5d65f71..72fd0e51c 100644
--- a/system/uorb/sensor/gas.c
+++ b/system/uorb/sensor/gas.c
@@ -29,21 +29,12 @@
****************************************************************************/
#ifdef CONFIG_DEBUG_UORB
-static void print_sensor_gas_message(FAR const struct orb_metadata *meta,
- FAR const void *buffer)
-{
- FAR const struct sensor_gas *message = buffer;
- const orb_abstime now = orb_absolute_time();
-
- uorbinfo_raw("%s:\ttimestamp: %" PRIu64 " (%" PRIu64 " us ago) "
- "value: %.4f",
- meta->o_name, message->timestamp, now - message->timestamp,
- message->gas_resistance);
-}
+static const char sensor_gas_format[] =
+ "timestamp:%" PRIu64 ",gas_resistance:%hf";
#endif
/****************************************************************************
* Public Data
****************************************************************************/
-ORB_DEFINE(sensor_gas, struct sensor_gas, print_sensor_gas_message);
+ORB_DEFINE(sensor_gas, struct sensor_gas, sensor_gas_format);