Commit Graph

355 Commits

Author SHA1 Message Date
songnannan
550d2bff32 feature: sensor: add set calibration interface for sensor driver.
Add standard sensor interface for setting calibartiion value.

Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-11-19 11:55:40 +01:00
Xiang Xiao
8e42f368ee sensors/wtgahrs2: Fix syslog format warning
sensors/wtgahrs2.c: In function 'wtgahrs2_gps_data':
Error: sensors/wtgahrs2.c:332:14: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  332 |       sninfo("Time : %llu utc_time: %llu\n",
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  333 |              rtdata->gps.timestamp, rtdata->gps.time_utc);
      |              ~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         uint64_t {aka long unsigned int}
sensors/wtgahrs2.c:332:25: note: format string is defined here
  332 |       sninfo("Time : %llu utc_time: %llu\n",
      |                      ~~~^
      |                         |
      |                         long long unsigned int
      |                      %lu
In file included from sensors/wtgahrs2.c:37:
Error: sensors/wtgahrs2.c:332:14: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
  332 |       sninfo("Time : %llu utc_time: %llu\n",
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  333 |              rtdata->gps.timestamp, rtdata->gps.time_utc);
      |                                     ~~~~~~~~~~~~~~~~~~~~
      |                                                |
      |                                                uint64_t {aka long unsigned int}
sensors/wtgahrs2.c:332:40: note: format string is defined here
  332 |       sninfo("Time : %llu utc_time: %llu\n",
      |                                     ~~~^
      |                                        |
      |                                        long long unsigned int
      |                                     %lu

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-18 09:58:51 -03:00
buyuer
fa90a3dfd4 Optimized GPS sensor and add gps satellite sensor.
Signed-off-by: buyuer <dingddding@163.com>
2021-11-17 08:59:40 -06:00
songnannan
1799994f2c feature: sensor: Add sensor type ots.
Add ots sensor type for ots sensor.

Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-11-16 14:51:57 -03:00
Alin Jerpelea
643d6153f2 drivers: Haltian Ltd: update licenses to Apache
Gregory Nutt has submitted the SGA
Haltian Ltd has submitted the SGA
Hexagon AB has submitted the SGA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-11-15 06:49:32 -06:00
raiden00pl
bf23abfbd5 drivers/qencoder: add an interface to configure the encoder index pin position 2021-11-07 03:52:48 -06:00
Jiuzhu Dong
f1f0bcc521 driver/sensor: support new sensor type:ECG,PPG,Imdepance
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-20 09:55:18 -05:00
丁欣童
26fedb2770 fakesensor: transform ddmm.mmmm to dd.mmmmmm.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-20 09:55:18 -05:00
Jiuzhu Dong
5ee16ee684 driver/sensor: support sensor_ops: selftest
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-10 08:28:49 -03:00
Alin Jerpelea
978c03df43 drivers: Omni Hoverboards: update licenses to Apache
Gregory Nutt has submitted the SGA
Omni Hoverboards has submitted the SGA
Paul Alexander Patience  has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-28 04:37:38 -07:00
Alin Jerpelea
48f92e6f1d author: Bill Gatliff : update licenses to Apache
Gregory Nutt has submitted the SGA
Bill Gatliff has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-16 21:56:08 -05:00
Alin Jerpelea
7b61de3a25 author: Augusto Fraga Giachero : update licenses to Apache
Gregory Nutt has submitted the SGA

Augusto Fraga Giachero has submitted the ICLA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-15 15:57:55 +08:00
Alin Jerpelea
0f8c8f20dc drivers: author: Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-15 11:56:41 +08:00
Alin Jerpelea
df088c39f0 author: Anthony Merlino : update licenses to Apache
Verge Aero has submitted the SGA

Anthony Merlino has submitted the SGA

Gregory Nutt has submitted the SGA

Sebastien Lorquet has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-06 20:38:14 +08:00
daviepeng
60b6199120 fix nxstyle 2021-08-30 02:52:30 +08:00
daviepeng
c7cda607f4 Adds driver for msa301 sensore module 2021-08-30 02:52:30 +08:00
yangjiukui
19beb307dd sensor: fix the bug that lsm6dsl selftest is invalid in nuttx.
Modified the logic of the selftest according to the ST manual.

Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
Change-Id: Id55139abf173728de4647533b26f7ab5e9a6b1fe
2021-08-28 17:35:10 -03:00
raiden00pl
b30f5e146d drivers/sensors: add an upper half 3-phase Hall effect sensor driver 2021-08-19 08:19:38 -07:00
SPRESENSE
38bfadbeb9 drivers/sensors/bmp280.c: Correct bmp280 driver
There were some mistakes in porting to the common sensors, and they
caused the following problems.

- Hardfault by bmp280_set_interval
- Read data always zero
2021-08-18 23:22:21 -07:00
raiden00pl
dca8c65331 drivers/qencoder: add command to set the maximum encoder position 2021-08-10 11:19:05 -03:00
Jiuzhu Dong
7837a21e4e sensor: directly return -ENOTSUP without the set_interval or batch
implementation for lowerhalf driver.

Change-Id: I7b02e0331e5f8b89b39896049a9e24ce30116f8a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-25 23:29:55 -07:00
buyuer
0d36b2d889 Fakesensor: support gps by read nema csv.
Currently, can only analyze GGA statement.

Signed-off-by: buyuer <dingddding@163.com>
2021-07-15 02:25:32 -07:00
Nathan Hartman
ee81b5a1d5 drivers/sensors/hyt271: Fix typos in comments and identifier
drivers/sensors/hyt271.c:

    * struct hyt271_dev_s: Identifier "lock_measure_cylce" was
      misspelled. Fix to "lock_measure_cycle" and update all instances
      in the file.

    * hyt271_mr(), hyt271_cmd(), hyt271_change_addr(),
      hyt271_measure_read(), hyt271_thread(): Update instances of the
      renamed "lock_measure_cycle" variable and fix various typos in
      comments.
2021-07-01 12:43:18 -05:00
buyuer
82f57bd3f9 driver/fakesensor: fix bugs.
1.fix crash casued by closing the handle during the reading.
2.fix set_interval fail sometime:When fakesensor was activated, csv file is not opened timely, so
the sensor->interval that set_interval() seted will be coverd by
interval form csv file.

Signed-off-by: buyuer <dingddding@163.com>
2021-07-01 01:34:45 -05:00
Xiang Xiao
2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Xiang Xiao
d7f96003cf Don't include debug.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
Alin Jerpelea
13e4f9b6b2 drivers: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-31 02:58:08 -05:00
Diego Herranz
a1c4ba379f drivers/sensors/hdc1008: add missing break
It was not possible to use the HDC1008_MEAS_T_AND_RH
operation mode since it was running the default case too.
2021-05-07 21:19:14 -03:00
Brennan Ashton
2c91805d8f boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 2021-05-04 10:17:44 -03:00
Brennan Ashton
e155af891a sensor: Fix bad bit mask macro in mpu60x0 2021-05-04 10:17:44 -03:00
Marco Krahl
05b889457e 1wire: Removes duplicate device information
Removes the family identifier from the device configuration, since the device
family is already part of the rom code and the underlying logic does know how
to extract this information.

include/nuttx/1wire drivers/sensors

stm32f103-minimim

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-15 02:28:42 -05:00
Marco Krahl
9f9d266f68 drivers/sensors: Adds new driver for ds18b20 sensore module
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-14 02:49:28 -05:00
Marco Krahl
7e8424903a drivers/sensors: Adds driver for hyt271 sensore module
This adds a sensor driver for the hyt271, hyt221, and hyt939 sensor module from
vendor iST (Innovative Sensor Technology). This sensor type is connected via i2c
bus and allows the measurement of relative humidity and temperature.

Each driver instance supports two different character device for each type
(/dev/sensor/tempX and /dev/sensor/humiX).

This driver also supports changing the i2c address of one connected sensor on
the bus. This requires a callback to the platform-specific board logic which
must ensure a power-on reset.

Optional the driver allows setting up a read interval for fetching sensor data.
This is done by a worker thread and can be useful when watching several sensors
via poll() by the userspace application.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2021-04-07 21:29:51 -05:00
Alin Jerpelea
e1d361eddf drivers: nxstyle fixes
Fixes for errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-05 07:31:45 -05:00
Xiang Xiao
5f3a98b5a8 libc/assert: Reference the expression in all case
to avoid the warning "defined but not used"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I55b7c092d0f2e5882fc1784987657c10cdf2d90b
2021-04-03 21:00:41 +01:00
Alin Jerpelea
5f5fae6b57 drivers: DS Automotion GmbH: update licenses to Apache
DS Automotion GmbH has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 09:36:43 -05:00
Alin Jerpelea
26fef3f6a1 NuttX: Fix nxtyle errors
Fix errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 04:20:31 -07:00
Alin Jerpelea
08e5378b11 NuttX: Gregory Nutt: update licenses to Apache
Several licenses were missed in the initial work

David Sidrane has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-03 04:20:31 -07:00
Alin Jerpelea
3631809e9d drivers: sensors: fix Mixed Case errors
Fix Mixed Case errors reposrted by nxstyle.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Alin Jerpelea
7a29e1f5fb drivers: Nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Alin Jerpelea
4505b8e143 drivers: sensors: Matous Pokorny: update licenses to Apache
Matous Pokorny has submitted the ICLA and we can migrate the licenses
 to Apache.

DataVision s.r.o. has submitted the SGA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Alin Jerpelea
b4a33b5ec0 NuttX: Uros Platise: update licenses to Apache
Uros Platise has submitted the ICLA and we can migrate the licenses
 to Apache.

David Sidrane has submitted the ICLA and we can migrate the licenses
 to Apache.

Bob Feretich has submitted the ICLA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Alin Jerpelea
a43ff0c93a NuttX: DS Automotion GmbH: update licenses to Apache
DS Automotion GmbH has submitted the SGA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Alin Jerpelea
89a10f9899 NuttX: Robert A. Feretich: update licenses to Apache
Robert A. Feretich has submitted the ICLA and we can migrate the licenses
 to Apache.

RAF Research LLC  has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Brennan Ashton
0a3b20e546 syslog: Drop extra carriage return from syslog calls 2021-03-28 21:24:00 -05:00
Alin Jerpelea
0abc1017ab drivers: nxstyle fixes
nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Alin Jerpelea
c798076084 drivers: Author Sebastien Lorquet: update licenses to Apache
Sebastien Lorquet has submitted the ICL and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Nathan Hartman
9eca886f26 drivers/sensors/qencoder.c - Remove bad sninfo() format string
drivers/sensors/qencoder.c:

    * qe_close(): Call to sninfo() contained extraneous "%d"
      format specifier. Removing it, as it appears there was
      never a matching argument.
2021-03-19 23:00:37 -07:00
Alin Jerpelea
d66d881b87 nxstyle fixes
nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-13 05:56:43 -08:00
Alin Jerpelea
5e6d58dd03 drivers: Alan Carvalho de Assis: update licenses to Apache
Alan Carvalho de Assis has submitted the SGA and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-13 05:56:43 -08:00