Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/sensors/sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ static const struct sensor_meta_s g_sensor_meta[] =
{sizeof(struct sensor_pm25), "pm25"},
{sizeof(struct sensor_pm10), "pm10"},
{sizeof(struct sensor_uv), "uv"},
{sizeof(struct sensor_eng), "eng"},
};

static const struct file_operations g_sensor_fops =
Expand Down
19 changes: 17 additions & 2 deletions include/nuttx/uorb.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@
/* GNSS Geofence */

#define SENSOR_TYPE_GNSS_GEOFENCE 52

/* Velocity Sensor
* A sensor of this type measures the velocity as it is moving.
* The default unit velocity is meter by seconds m/s (SI).
Expand Down Expand Up @@ -511,11 +510,20 @@

#define SENSOR_TYPE_ULTRAVIOLET 57

/* ENG (Electroneurography)
* A sensor of this type measures the electrical activity of peripheral
* nerves. This neural electrical signal, generated by nerve impulses
* traveling through axons and captured by electrodes, provides valuable
* information about nervous system and muscle-nerve communication.
*/

#define SENSOR_TYPE_ENG 58

/* The total number of sensor
* please increase it if you added a new sensor type!
*/

#define SENSOR_TYPE_COUNT 58
#define SENSOR_TYPE_COUNT 59

/* The additional sensor open flags */

Expand Down Expand Up @@ -902,6 +910,13 @@ struct sensor_cap /* Type: Capacitance */
int32_t rawdata[4]; /* in SI units pF */
};

struct sensor_eng /* Type: ENG */
{
uint64_t timestamp; /* Unit is microseconds */
float voltage[4]; /* Voltage unit in mV */
uint32_t stat; /* Status. bit3:0 - value 3:0 is valid or not */
};

struct sensor_gnss /* Type: GNSS */
{
uint64_t timestamp; /* Time since system start, Units is microseconds */
Expand Down
Loading