202 Commits

Author SHA1 Message Date
Konrad
80d4fad624 DistanceSensorCheck: do not raise a distance sensor failure if the SFXX_MODE is set to 2 and we are in a VTOL FX flight phase 2024-09-03 15:53:09 +02:00
Silvan Fuhrer
33701aa3d5 BatteryStatus: remove voltage_filtered_a
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-03 16:41:49 +02:00
Silvan Fuhrer
c2ae6a7e24 BatteryStatus: remove current_filtered_a
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-07-03 16:41:49 +02:00
Jacob Dahl
ff1da2ba29 remove clip_limit contraint on INT16_MAX 2024-04-16 11:43:55 -04:00
Eric Katzfey
ccdf060393
Additions to the Serial UART API (#22953)
- Added an empty constructor, setPort, and validatePort functions for Serial API
- Changed GPS to not allocate Serial object dynamically
- Moved access check on serial port name into the Serial API
- Improved the Qurt platform validatePort Serial function to implement a more rigorous check. Added safety check
to the setPort Serial function to make sure it isn't called after the port has been already opened.
2024-04-01 12:27:59 -04:00
Matthias Grob
1c25d65a1e Add missing newline at the end of files 2023-12-01 13:11:00 -05:00
Roman Bapst
dd2322d622
Added PerformanceModel for fixed wing (#22091)
* created a Performance Model for fixed wing vehicle
- added compensation for maximum climbrate, minimum sinkrate, minimum airspeed and trim airspeed based on weight ratio and air density
- added atmosphere lib to standard atmosphere calculations


---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
2023-11-21 17:13:50 +01:00
Eric Katzfey
ac80dcd7a8
Voxl2: add qurt i2c driver support and first i2c driver voxlpm 2023-01-13 19:59:41 -05:00
Eric Katzfey
678607117a
Qurt UART ESC driver support (#20784) 2022-12-20 01:25:12 -05:00
Eric Katzfey
e17ddcc0e5
Qurt platform custom icm42688p IMU driver (#20753)
- first version of IMU driver for the VOXL 2 platform (Qurt)
 - this is a customized version of the Invensense ICM42688P driver, it is currently in the VOXL 2 board directory
2022-12-12 22:02:23 -05:00
Eric Katzfey
a5e4295029
lib/drivers: device drivers library for Qurt platform (#20741) 2022-12-10 19:31:06 -05:00
Daniel Agar
9010029e0d lib/drivers/device: Device.hpp fully init devid
- constructor use available setters
2022-10-09 13:49:39 -04:00
Ville Juven
59e86c490d Remove include <log.h> from defines.h
The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
2022-09-29 07:56:24 +02:00
Daniel Agar
a47895e809 [DO NOT MERGE] px4_i2c_device_external hacks 2022-09-20 10:31:26 +12:00
Daniel Agar
5fcdffc8c0 drivers/device/nuttx/I2C: only issue I2C_RESET() if retrying, and only before the next retry 2022-09-15 18:42:30 -04:00
Hamish Willee
e6eed43648
Spelling errors (#19935) 2022-07-27 14:33:16 +10:00
mcsauder
e8da98fd14 Add gyro clipping to mirror accel clipping monitoring instances. 2022-05-18 21:16:05 -04:00
Daniel Agar
f390f52058 drivers/differential_pressure: remove lib/drivers/airspeed dependency and cleanup
- split ms4525_airspeed into separate ms4515 and ms4525 drivers
2022-04-26 08:39:19 -04:00
Daniel Agar
258f558fea apply differential pressure calibration (SENS_DPRES_OFF) centrally
- remove drv_airspeed.h and ioctls
2022-04-26 08:39:19 -04:00
Daniel Agar
0c31f63896 sensors: add baro calibration and cleanup
- sensor_baro.msg use SI (pressure in Pascals)
 - update all barometer drivers to publish directly and remove PX4Barometer helper
 - introduce baro cal (offset) mainly as a mechanism to adjust
relative priority
 - commander: add simple baro cal that sets baro offsets to align with
GPS altitude (if available)
 - create new sensors_status.msg to generalize sensor reporting
2022-03-26 16:08:41 -04:00
Jukka Laitinen
9e999a39be Revert erroneous linking of drivers__device to px4_work_queue
This was a mistake in commit 91b812fc4265e6e7d342c0d878de3a4dcaf5137d

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -05:00
Jukka Laitinen
91b812fc42 link drivers__device to nuttx_karch instead of nuttx_arch in protected build
On protected/kernel build the library would be karch.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Daniel Agar
e731fcdbc0
sensors (accel/gyro/mag) determine if external with device id 2022-01-10 10:31:07 -05:00
Daniel Agar
d59d16a6cd drivers/accelerometer: adjust int16_t clipping threshold slightly
- consider data clipped/saturated if it's INT16_MIN/INT16_MAX or within 1
 - this accommodates rotated data (|INT16_MIN| = INT16_MAX + 1) and sensors that may re-use the lowest bit for other purposes (sync indicator, etc)
2021-12-15 12:45:58 -05:00
Daniel Agar
7b7b7acd36 i2c_spi_buses: respect CONFIG_I2C and CONFIG_SPI
- bmp280, dps310, and ms5611 barometers support boards without I2C
2021-11-15 15:57:33 -05:00
Jukka Laitinen
be1023f5e9 smbus_sbs: Define linker language for a header-only library
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-10 09:27:21 -05:00
Jukka Laitinen
d02a10b20f Remove src/lib/drivers/accelerometer and gyroscope linking to drivers__device
These are pure uORB publishers, they don't link to drivers__device.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-10 09:26:36 -05:00
Vatsal Asitkumar Joshi
ea1ae73526
Support for Raspberry PI RP2040 MCU (#18083) 2021-11-03 12:14:30 -04:00
Daniel Agar
089f96f800 lib/drivers/{accelerometer,gyroscope} skip obselete Vector3f construction
- FIFO clip count only check if value is INT16_MIN/MAX rather than abs() call
2021-10-08 17:33:27 -04:00
Daniel Agar
cb610caf1e drivers: minimize additional I2C retries 2021-08-17 09:54:50 -04:00
Daniel Agar
65745a3676 purge broken qurt support and atlflight boards 2021-07-16 08:53:36 -04:00
Daniel Agar
883624d915 lib/geo: move from ecl 2021-07-15 10:38:24 -04:00
Beat Küng
e644036325 drivers: use updated I2C SPI driver interface 2021-07-08 12:59:35 -04:00
Beat Küng
c5aef9d512 i2c_spi_buses: add support for multiple instances of the same device on a bus
This also simplifies the API a bit, since we anyway have to change the
drivers to pass additional information (the bus device index).

The orientation flag is merged with the rotation.
2021-07-08 12:59:35 -04:00
David Sidrane
b4ebc68a40 lib/drivers/nuttx/ I2C SPI:Use inttypes 2021-06-16 17:07:47 +02:00
David Sidrane
ff2748ba53 PX4Gyroscope:Fix types 2021-06-16 17:07:47 +02:00
David Sidrane
42e51b0215 PX4Accelerometer:Fix types 2021-06-16 17:07:47 +02:00
AlexKlimaj
dddd2c3297
drivers/distance_sensor: New Broadcom AFBR-S50LV85D distance sensor driver
* Basic Broadcom AFBR-S50 driver using vendor API and binary blob https://github.com/Broadcom/AFBR-S50-API
* fix ARK Flow paw3902 rotation
2021-06-15 12:12:24 -04:00
echoG
6bc09138c1
Adding BatMon smart battery as a module and refactoring SMBUS based SBS 1.1 spec to a library 2021-06-09 12:17:45 -04:00
Daniel Agar
8478d1ea37
sensors/vehicle_angular_velocity: properly handle filter reset on FIFO data scale changes
For the sake of efficiency (at 8 kHz) all filtering is performed on the raw data before the calibration and rotation is applied to only the final output. As a result we have to be a bit more careful when switching between sensors or in cases where the gyro scale factor changes (eg icm42688p 20 bit data rescaled to fit in int16 output).
2021-04-25 14:20:32 -04:00
Daniel Agar
047fb13922 IMU_GYRO_RATEMAX: enforce reasonable constraint and update metadata 2021-04-13 20:26:57 -04:00
Daniel Agar
e57aaaaa5e
rotate accel/gyro FIFO before publish and fix angular velocity filter resets
- rotates accel & gyro FIFO data before publication both to simplify downstream usage (including log review) and fix other issues
     - to best handle int16_t data rotations are now either performed with swaps if possible, otherwise promoted to float, rotated using the full rotation matrix, then rounded back to int16_t
 - fix sensors/vehicle_angular_velocity filter reset both with proper rotation and new calibration uncorrect helper
      - in FIFO case filtering is done before calibration is applied, but we need to handle a possible reset from a completely different sensor (vehicle body angular velocity -> sensor frame uncorrected data)
2021-03-22 12:01:12 -04:00
Dima Ponomarev
e660b50021
uavcan: add IMU sensor support 2021-03-17 18:04:12 -04:00
Daniel Agar
5f3e883f2c
sensors/vehicle_imu: vehicle_imu_status include accel/gyro full raw FIFO sample rate 2021-02-24 08:13:53 -05:00
Alex Mikhalev
6bd4dff51f drivers/smbus: Increase max block size to 34
batt_smbus for BQ40Z80 transfers up to 34 bytes (32 byte block + 2 byte
address), but this was overflowing and failing the PEC check.
So increase the buffer size

Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-02-18 07:52:26 -05:00
Daniel Agar
b30bd7f589 drivers: no longer any need to advertise immediately (baro, mag, rangefinder) 2021-01-31 11:35:46 +01:00
JacobCrabill
bf4ae81995 Device: Add MAVLINK bus type 2021-01-28 09:09:11 +01:00
JacobCrabill
01462ce627 Device: Add missing SERIAL enum to bus_string function 2021-01-27 17:02:20 -05:00
JacobCrabill
85796fbd84 Drivers: Distance Sensors: Add proper device IDs
Add new DeviceBusType_SERIAL to Device::DeviceId union
Add DRV_DIST_DEVTYPE's for all distance sensors
Change distance_sensor_s.id to distance_sensor_s.device_id
Modify all distance_sensor drivers to apply 'proper' device_id
2021-01-27 17:02:20 -05:00
Daniel Agar
a57b9f9381 delete drv_baro.h, drv_mag.h, drv_range_finder.h, drv_device.h and purge UAVCAN CDev usage 2021-01-12 22:04:52 -05:00