gas.c:Adapt to uORB new macro definition content.
Signed-off-by: likun17 <likun17@xiaomi.com>
This commit is contained in:
parent
21f5bc9b70
commit
296a6b3cac
@ -29,21 +29,12 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_UORB
|
#ifdef CONFIG_DEBUG_UORB
|
||||||
static void print_sensor_gas_message(FAR const struct orb_metadata *meta,
|
static const char sensor_gas_format[] =
|
||||||
FAR const void *buffer)
|
"timestamp:%" PRIu64 ",gas_resistance:%hf";
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
ORB_DEFINE(sensor_gas, struct sensor_gas, print_sensor_gas_message);
|
ORB_DEFINE(sensor_gas, struct sensor_gas, sensor_gas_format);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user