Commit Graph

29 Commits

Author SHA1 Message Date
Gustavo Henrique Nihei
f500c64962 Include missing headers throughout the repository
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-07 09:58:13 +08:00
Xiang Xiao
28d71b79a2 Fix sensortest.c:168:40: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 18:46:14 -03:00
Xiang Xiao
fea1b197d4 testing/sensortest: Fix the typo for ecg sensor
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 14:51:38 -03:00
liucheng5
bf140bcaae fix: sensor: support ECG event lead info
Lead info is added into sensor_ecg event struct. Uorb and sensortest shall be modified.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2023-02-02 22:49:22 +08:00
jinxudong
57af6174f0 fix: sensor: update hall data type
update hall data type to int32_t

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-02-02 22:49:22 +08:00
Xiang Xiao
79e4c66764 testing/sensortest: Keep g_sensor_info in order
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-15 10:49:34 +03:00
Xiang Xiao
3021b8d11e testing/sensortest: Add FAR for pointer type
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-15 10:49:34 +03:00
xiatian6
491f549d1c fix: sensor: add sensor type of cap
Increase the type of cap sensor, including
raw data and detection status.

Signed-off-by: xiatian6 <xiatian6@xiaomi.com>
2022-08-15 10:49:34 +03:00
Jiuzhu Dong
e04333c986 driver/sensor: rename /dev/sensor -> /dev/uorb
because this directory contains all topics by uorb using, not just sensors.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-08 23:11:37 +08:00
Lee Lup Yuen
8b43f9f9ca testing/sensortest: Update device path
Device paths are now named `/dev/sensor/sensor_...`: 3fdd036ba6/drivers/sensors/sensor.c (L49)
2022-08-08 13:31:18 +08:00
Jiuzhu Dong
eef03ad0a1 testing/sensortest: fix cmd argument mismatch(follow new sensor driver)
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-29 16:26:40 +03:00
Jiuzhu Dong
45f2c2a26d testing/sensortest: fix compile break
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-26 12:38:34 +08:00
Jiuzhu Dong
a06fa5ac27 testing/sensor_test: update sensortest according to enhance sensor driver
1.update prefix of sensor event structure to sensor_xxx.
2.remove activate cmd because of open will auto activate sensor.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-26 10:40:39 +08:00
liucheng5
93dbf8abe2 fix: sensor: modify sensortest for PPG
Modify sensortest for new sensor types PPGD and PPGQ instead old type PPG.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2022-01-28 14:08:16 +08:00
Xiang Xiao
fd2289a8a2 testing/sensortest: Fix printf format warning
sensortest.c: In function 'print_valu':
Error: sensortest.c:161:10: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  161 |   printf("%s: timestamp:%" PRIu64 " value:%u\n",
      |          ^~~~~~~~~~~~~~~~~
  162 |          name, event->timestamp, event->ppg);
      |                                  ~~~~~~~~~~
      |                                       |
      |                                       uint32_t {aka long unsigned int}
sensortest.c:161:44: note: format string is defined here
  161 |   printf("%s: timestamp:%" PRIu64 " value:%u\n",
      |                                           ~^
      |                                            |
      |                                            unsigned int
      |                                           %lu
sensortest.c: In function 'print_gps':
Error: sensortest.c:169:10: error: format '%u' expects argument of type 'unsigned int', but argument 15 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  169 |   printf("%s: timestamp:%" PRIu64 " time_utc: %" PRIu64 " latitude: %f "
      |          ^~~~~~~~~~~~~~~~~
......
  175 |          event->ground_speed, event->course, event->satellites_used);
      |                                              ~~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   uint32_t {aka long unsigned int}
sensortest.c:172:13: note: format string is defined here
  172 |          " %u\n", name, event->timestamp, event->time_utc, event->latitude,
      |            ~^
      |             |
      |             unsigned int
      |            %lu
sensortest.c: In function 'print_gps_satellite':
Error: sensortest.c:183:10: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |          ^~~~~~~~~~~~~~~~~~
  184 |          event->timestamp, event->count, event->satellites);
      |                            ~~~~~~~~~~~~
      |                                 |
      |                                 uint32_t {aka long unsigned int}
sensortest.c:183:46: note: format string is defined here
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |                                             ~^
      |                                              |
      |                                              unsigned int
      |                                             %lu
Error: sensortest.c:183:10: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |          ^~~~~~~~~~~~~~~~~~
  184 |          event->timestamp, event->count, event->satellites);
      |                                          ~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               uint32_t {aka long unsigned int}
sensortest.c:183:61: note: format string is defined here
  183 |   printf("%s: timestamp: %" PRIu64 " count: %u satellites: %u", name,
      |                                                            ~^
      |                                                             |
      |                                                             unsigned int
      |                                                            %lu

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-19 00:14:59 +08:00
Xiang Xiao
ea91e25558 testing/sensortest: Fix printf format warning
sensortest.c: In function 'print_gps':
Error: sensortest.c:169:29: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  169 |   printf("%s: timestamp: %llu time_utc: %llu latitude: %f longitude: %f "
      |                          ~~~^
      |                             |
      |                             long long unsigned int
      |                          %lu
......
  172 |          " %u\n", name, event->timestamp, event->time_utc, event->latitude,
      |                         ~~~~~~~~~~~~~~~~
      |                              |
      |                              uint64_t {aka long unsigned int}
Error: sensortest.c:169:44: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  169 |   printf("%s: timestamp: %llu time_utc: %llu latitude: %f longitude: %f "
      |                                         ~~~^
      |                                            |
      |                                            long long unsigned int
      |                                         %lu
......
  172 |          " %u\n", name, event->timestamp, event->time_utc, event->latitude,
      |                                           ~~~~~~~~~~~~~~~
      |                                                |
      |                                                uint64_t {aka long unsigned int}
sensortest.c: In function 'print_gps_satellite':
Error: sensortest.c:183:29: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  183 |   printf("%s: timestamp: %llu count: %u satellites: %u", name,
      |                          ~~~^
      |                             |
      |                             long long unsigned int
      |                          %lu
  184 |          event->timestamp, event->count, event->satellites);
      |          ~~~~~~~~~~~~~~~~
      |               |
      |               uint64_t {aka long unsigned int}

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-18 09:57:40 -03:00
丁欣童
0f58795f10 sensortest: support new gps struct and more sensor type.
Signed-off-by: buyuer <dingddding@163.com>
2021-11-17 08:59:43 -06:00
Jiuzhu Dong
293b89af44 sensortest: modify errno type when api not support
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-11 23:02:21 +02:00
Juha Niskanen
b283289986 apps: fix miscellaneous typos
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-08-26 11:39:28 -07:00
songnannan
f4b84c0ba7 fix(sensortest): move set_interval and batch before activate.
modify coding style err.

Change-Id: Ib820b81a9a774070b5c4778d11ecb70f1f7cd846
Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-07-22 13:05:20 +02:00
Jiuzhu Dong
993693d5f4 testing/sensor: fix bug about -h
MIRTOS-334

Change-Id: I1803ad1c769189f42d223111c7eb898e091eeccc
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-17 09:21:38 +01:00
Jiuzhu Dong
d838666844 sensortest: add '\n' for gps output debug log
MIRTOS-328

Change-Id: Iae2925beae2d63c3ce212875109c3a25cb941a90
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-17 09:21:38 +01:00
Alin Jerpelea
6f4dccdb64 testing: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
dongjiuzhu
89bceba6b0 testing/sensortest: fix bug because getopt and add debug log
Change-Id: Id9c3499dd56690c60b2f6579d128850ce7522a6e
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2020-12-31 23:53:08 +01:00
dongjiuzhu
89376af38d testing/sensortest: fix bug because of adding custom type
Change-Id: I69fc7881e3fa7f94b549b1a342339fe5a9ec13ab
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2020-12-31 23:53:08 +01:00
dongjiuzhu
a96867a65d test/sensor: fix test failed when some apis are NULL
N/A

Change-Id: Ieb40b3ce73240057a181ee0dd482564cf27f6afa
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-18 00:05:28 -08:00
YAMAMOTO Takashi
c1b11a1e35 testing/sensortest/sensortest.c: Fix a printf format warning 2020-11-16 00:38:24 -08:00
YAMAMOTO Takashi
2a74046c2d testing/sensortest/sensortest.c: Fix printf format warnings 2020-11-15 21:33:25 -08:00
dongjiuzhu
60342ec862 testing/sensortest: add sensor driver test
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-23 00:43:47 +08:00