Skip to content

Commit 9cf9b86

Browse files
Otpvondoiatsxiaoxiang781216
authored andcommitted
uorb: add generator tool.
e.g.: 1. uorb_generator -f /data/sensor/19700101000003/sensor_accel_uncal0.csv -t sensor_accel_uncal2 2. uorb_generator -s -r 5 -n 200 -t sensor_accel_uncal2 timestamp:1,x:-2.0,y:3,z:4,temperature:5 Signed-off-by: likun17 <likun17@xiaomi.com>
1 parent 1c769d1 commit 9cf9b86

File tree

4 files changed

+416
-0
lines changed

4 files changed

+416
-0
lines changed

system/uorb/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ if(CONFIG_UORB)
5151
uorb)
5252
endif()
5353

54+
if(CONFIG_UORB_GENERATOR)
55+
nuttx_add_application(
56+
NAME
57+
uorb_generator
58+
PRIORITY
59+
${CONFIG_UORB_PRIORITY}
60+
STACKSIZE
61+
${CONFIG_UORB_STACKSIZE}
62+
MODULE
63+
${CONFIG_UORB}
64+
SRCS
65+
generator.c
66+
DEPENDS
67+
uorb)
68+
endif()
69+
5470
if(CONFIG_UORB_TEST)
5571
nuttx_add_application(
5672
NAME

system/uorb/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ config UORB_LISTENER
2222
bool "uorb listener"
2323
default n
2424

25+
config UORB_GENERATOR
26+
bool "uorb generator"
27+
default n
28+
2529
config UORB_TESTS
2630
bool "uorb unit tests"
2731
default n

system/uorb/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ MAINSRC += listener.c
3636
PROGNAME += uorb_listener
3737
endif
3838

39+
ifneq ($(CONFIG_UORB_GENERATOR),)
40+
MAINSRC += generator.c
41+
PROGNAME += uorb_generator
42+
endif
43+
3944
ifneq ($(CONFIG_UORB_TESTS),)
4045
CSRCS += test/utility.c
4146
MAINSRC += test/unit_test.c

0 commit comments

Comments
 (0)