25 Commits

Author SHA1 Message Date
wangjianyu3
0fbeae7f0d uORB/sensor: Add timestamp for GNSS data
Add timestamp for GNSS measurements and clock, for matching.

When recovering the combination of `GnssMeasurement` and `GnssClock` into
[GnssData](https://android.googlesource.com/platform/hardware/libhardware/+/
           refs/heads/android14-release/include/hardware/gps.h#1748),
the reason for splitting is that the uORB buffer is not large enough to
accommodate `GnssData`, since different topics cannot guarantee the
same timing when publishing and subscribing data, we need an index to match.

WARNING: A new member "timestamp" of type uint64_t has been added at
the beginning of the struct "sensor_gnss_measurement" and "sensor_gnss_clock".

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-05-12 16:22:10 +08:00
Alin Jerpelea
66e8296230 system: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-30 18:02:50 +08:00
wangjianyu3
d02b05328a uORB/sensor: Update macro of sensor_gnss format string
Make it easier to extend the format of struct member

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-20 15:29:06 +08:00
wangjianyu3
ba0a8fbcb2 uORB/sensor: Add carrier frequency for GNSS Satellite
The `struct sensor_gnss_satellite.cf` may be parsed from `GSV.signal_id`(e.g. NMEA 0183 v4.11) and `struct sensor_gnss_satellite.constellation`

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-20 15:29:06 +08:00
wangjianyu3
7e77ab29e5 uORB/sensor: Add macro for satellite format string
Make it easier to extend the format of struct member

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-18 09:38:54 +08:00
wangjianyu3
40a5e47d5c uORB/sensor: Add GNSS firmware version for sensor_gnss_format
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-06 21:20:41 +08:00
likun17
06181f0b00 uorb:Fixed the abnormal issue of printing uint16 with PRIu16.
The PRIu16 macro in the system is defined as "u", and "hu" is required.
In Linux and Nuttx, PRIu32 PRIu16 PRIu8 are all defined as "u", but %pB
prints the structure and needs its offset. %pB gets the offset through
sizeof(short int)

Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-18 19:56:58 +08:00
dongjiuzhu1
5b729162ad system/uorb: support build in aosp
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:48:47 +08:00
likun17
d2214c28c5 uorb:Added 6dof motion and gesture related types.
For details,see: https://developer.android.com/reference/android/hardware/SensorEvent#values

Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-27 13:59:30 +08:00
likun17
296a6b3cac gas.c:Adapt to uORB new macro definition content.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-21 10:55:24 +08:00
dongjiuzhu1
abdcb33f14 uORB/uORB; using array to save path for sensor_reginfo_s
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-19 11:45:49 +08:00
wangjianyu3
d94aa77e19 uORB/sensor: Add GNSS Geofence, Measurement & Clock.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:42:31 +08:00
wangjianyu3
2f280f4dc8 uORB/sensor: Rename GPS to GNSS
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:42:31 +08:00
likun17
027ded4d4e sensor:Add sensor gas log output.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-19 03:42:31 +08:00
likun17
d0e15a7450 uorb:Adapt to new macro definition content.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-19 03:42:31 +08:00
jinxudong
6bea926ef2 sensor: add force sensor
A sensor of this type measures the force on it, and additionally
compares the force with one or more specified thresholds. The sensor
can output the force value directly. Moreover, it's usually applied
as a press key. In that case, when it detects a force greater than
some given threshold, a corresponding event is reported.

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-08-10 03:33:22 +08:00
haopengxiang
bdedf648c5 uorb/topics: update delicated match of listener topics
bug: if user input obr_topic is sensor_gps_sate(wrong topic, which does not exist), the using of `strncmp` will assign idx=8 (as sesnor_gps) in the first.

However, there is no match in the `g_sensor_list`, hence idx=8 will give  out value of `sensor_gps` as output(wrong).

Change: This update aims to match the whole value of sensor name in `g_sensor_list`, while keeping `sensor_name+number` match in this condition.

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 02:01:09 +08:00
haopengxiang
6b5038ef7a uorb/sensor/gps: fix uorinfo_raw print error
[   15.979300] [24] [  INFO] [ap] sensor_gps_satellite: timestamp: 15979200 (100 us ago)
[   15.979400] [24] [  INFO] [ap] sensor_gps_satellite: number:0 svid: 13elevation: 54azimuth: 253 snr: 0
[   15.979600] [24] [  INFO] [ap] sensor_gps_satellite: number:1 svid: 21elevation: 43azimuth: 77 snr: 0
[   15.979700] [24] [  INFO] [ap] sensor_gps_satellite: number:2 svid: 22elevation: 9azimuth: 35 snr: 0
[   15.979800] [24] [  INFO] [ap] sensor_gps_satellite: number:3 svid: 23elevation: 23azimuth: 268 snr: 0

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 02:01:09 +08:00
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
a29d9ea9da fsutils/examples: Include unistd.h explicitly
to get the prototypes or macros are defined in it

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-05 08:46:59 +02: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
Jiuzhu Dong
6fceb913a2 system/uorb: optimize stack used
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
4ec3f70f1d apps/system/uorb: support orb_get_meta by name string
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
46c98420b7 system/uorb: add builtin sensor topics
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00