Commit Graph

33 Commits

Author SHA1 Message Date
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
Peter van der Perk d5e3e9a7bc [Kconfig] Decompose Kconfig, now each module has its own Kconfig
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Daniel Agar cb610caf1e drivers: minimize additional I2C retries 2021-08-17 09:54:50 -04:00
Beat Küng e644036325 drivers: use updated I2C SPI driver interface 2021-07-08 12:59:35 -04:00
Daniel Agar f55ed0992c accel and gyro calibration refactor and cleanup
- remove all remaining IOCTLs for accel and gyro and handle all calibration entirely in sensors module with parameters
 - sensor_accel and sensor_gyro are now always raw sensor data
 - calibration procedures no longer need to first clear existing values before starting
 - temperature calibration (TC) remove all scale (SCL) parameters
    - gyro and baro scale are completely unused
    - regular accel calibration scale can be used (CAL_ACC*_xSCALE) instead of TC scale
2020-06-17 22:50:09 -04:00
mcsauder 6548fde024 Whitespace cleanup to quiet new blank line at EOF git hook. 2020-04-15 23:00:39 -04:00
Daniel Agar 02f4ad61ec I2C/SPI require device type in constructor 2020-04-01 12:24:22 -04:00
Beat Küng d6bb5b3b9e i2c spi buses: enforce drivers to set default SPI/I2C bus frequency
Not a lot of drivers use the global default, which is somewhat arbitrary.
2020-03-17 23:31:17 -04:00
Beat Küng dc5ffb43a3 refactor mpl3115a2: use driver base class 2020-03-17 23:31:17 -04:00
Daniel Agar 16bd1088fa mpl3115a2: move to PX4Barometer and cleanup 2020-01-03 16:53:09 -05:00
Beat Küng 3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar 26364d44c9 px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
Daniel Agar 78ef8aab2d STACK_MAIN increase default 1024 -> 2048 2019-08-30 19:11:51 -07:00
Beat Küng f8e0441e7b src/platforms/common: move to platforms/common
Script to update include paths:
for i in $(grep -rl 'include <px4_work_queue' src platforms); do sed -i 's/#include <px4_work_queue/#include <px4_platform_common\/px4_work_queue/' $i; done
2019-08-30 07:59:44 +02:00
mcsauder d1e46737a3 Organize, alphabetize, and deprecate unneeded #includes from the barometer drivers. 2019-07-08 21:32:52 -04:00
Daniel Agar e73dd73ea7 mpl3115a2 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar b35d048566 cmake enable -Wcast-align and disable per module 2019-03-16 11:47:15 -04:00
bazooka joe 922c19aa9c using only px4_getopt() and never the unsafe getopt()
using only <px4_getopt.h> as include, cleanup related includes
added check that all the option are valid (myoptind >= argc). if there are invalid options on some script that might now lead not to run commands
2019-02-21 09:45:45 +01:00
David Sidrane 53a127beb9 Oversampling rate for MPL3115A2 pressure sensor (#11332)
As reported by @LeoMustafaNXP in https://github.com/PX4/Firmware/issues/11296
2019-01-29 11:41:58 -05:00
Daniel Agar dd0baaee91 delete IOCTL SENSORIOCSQUEUEDEPTH
- only used in test routines
2018-11-06 07:43:43 +08:00
Daniel Agar d2ed091a1d delete IOCTL SENSOR_POLLRATE_MAX
- only SENSOR_POLLRATE_DEFAULT is needed
2018-11-06 07:43:43 +08:00
Daniel Agar 556a9422b5 delete IOCTL SENSOR_POLLRATE_MANUAL
- only used in self tests
2018-11-06 07:43:43 +08:00
Daniel Agar 8dfd55fc9e delete unused IOCTL SENSORIOCGPOLLRATE 2018-11-06 07:43:43 +08:00
Daniel Agar 571364c617 delete baro_report (alias for sensor_baro_s) 2018-11-06 07:43:43 +08:00
Daniel Agar f59f0d4b2d delete unused IOCTL SENSOR_POLLRATE_EXTERNAL 2018-11-06 07:43:43 +08:00
Daniel Agar 1a5ffb3173 mpl3115a2 cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
David Sidrane 678627d783 mpl3115a2 - removed old comment 2018-08-14 09:38:15 -04:00
Daniel Agar 02d4405a62 c++11 default destructors 2018-06-30 19:55:08 -04:00
DanielePettenuzzo 7a760ee501 fmu-v5: add PX4_I2C_BUS_EXPANSION1 and 2 to all drivers that check all the busses 2018-06-06 17:31:33 +02:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Daniel Agar 5dc23def2a move pressure altitude from baros to sensors module 2018-04-11 23:26:58 -04:00
Daniel Agar 5fba1f38b2 drivers start using uORB message print instead of custom 2018-03-28 09:15:41 -04:00
Daniel Agar c20594cd0e move all barometers to the same folder 2018-01-16 23:46:45 -05:00