Commit Graph

1567 Commits

Author SHA1 Message Date
Mark Charlebois 13d84ef17b Linux: I2C opens /dev/i2c-x
For now it uses the bus number as the id. Not sure how this should
actually be mapped.

Seems like the I2C devices come up in random order and have random
id but that a specific device can be found in the /sys/bus/i2c
interface.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois df53defca6 Linux: Add support for blinkm to test I2C layering
Running the blinkm device to test I2C

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois cd30b4d5ca Linux: added I2C class
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 2feeecdab1 Linux: Added config and stubs to compile I2C device for Linux
Not yet functional. Full implementation will provide an IOCTL interface to
do bi-directional transfer. will model the interface after Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 4a6bd4ddc0 Linux: replaced getopt in ms5611_linux.cpp
ms5611 uses getopt to parse args but the static variable
optind was not being properly updated.

Replaced use of external getopt call with simple parser;

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois 99399115f2 Linux: Minor fixes of error caught by gcc-4.9.1
- Missing static declarations for functions not used outside a file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois d013ac0927 Support for building more modules with Linux
Added more queue support to linux/px4_layer.

Use virt char devices for ms5611, and mavlink.

Added more HRT functionality. uORB latency test
now fails. Likely due to bad HRT impl for Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois 7b0783a070 Added MuORB based on virtual CDev implementation
uORB module now compiles and runs for Linux using the
virtual CDev implementation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:18 -07:00
Mark Charlebois 9718404d7f Added new file for virt dev posix-like functions and test case
Moved posix-like functions to vcdev_posix.cpp and updated the
copyright notice.

Added test case to make sure poll unblocks when a write occurs.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:17 -07:00
Mark Charlebois 97a72563b8 Fixes to compile again for NuttX
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:17 -07:00
Mark Charlebois f3596e555b Added
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Mark Charlebois bf429188b4 Reverted: Use OS independent API for task creation/deletion
Keep existing API use in code. Bind the use of the OS independent
implementation in the systemlib layer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois ddb32742eb Use OS independent API for task creation/deletion
Calls to task_delete and task_spawn_cmd are now
px4_task_delete and px4_task_spawn_cmd respectively.

The px4_tasks.h header was added to the affected files
and incusions of nuttx/config.h were removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Johan Jansen c5a178a777 Commander: Play startup tune if preflight checks are good, play alarm otherwise 2015-04-20 09:14:12 +02:00
Daniel Agar 2e824bbeea fix incorrect argc < 1 check for no arguments
-requiring arguments should be argc < 2
2015-04-18 12:02:58 +02:00
Lorenz Meier 3ee9b441c6 Add STM32F4 discovery config. 2015-04-16 22:51:08 +02:00
Simon Wilks 8fd6b3da21 Store the port so the in use port will be referenced when reopening. 2015-04-13 11:37:49 +02:00
Lorenz Meier ac6ffd36d9 Merge pull request #2008 from PX4/mixer_limit_publication
fixed publication of mixer limit flags
2015-04-12 23:37:45 +02:00
Lorenz Meier e659bbb777 Merge pull request #1992 from Zefz/gps-improvements
UBlox GNSS driver improvements
2015-04-11 00:58:57 +02:00
Roman Bapst 555e96a37a fixed publication of mixer limit flags 2015-04-10 20:26:38 +02:00
Johan Jansen 051b7b853e UBlox: Check valid time bit for NAV_TIMEUTC messages (used for Ublox 6 and earlier) 2015-04-10 09:56:05 +02:00
Randy Mackay 04863dc2d1 batt_smbus: add ioctl to return batt capacity
Also use full charge capacity instead of design capacity so that an old
battery's capacity will appear as lower than its original capacity but
it will still report 100% charged after charging
2015-04-10 14:17:25 +09:00
Andrew Tridgell 219d661888 hmc5883: read the temperature every 10 samples when enabled 2015-04-08 17:45:54 +02:00
Andrew Tridgell 02639411ba hmc5883: added -T option to enable temperature compensation
this also fixes the behaviour of the -C option
2015-04-08 17:45:54 +02:00
Andrew Tridgell e17936e237 hmc5883: try to cope with genuine 5883 parts
if we can't read the temperature registers 10 times then disable the
feature.
2015-04-08 17:45:54 +02:00
Andrew Tridgell 156a7915ae hmc5883: added support for temperature compensation
added "hmc5883 tempon" and "hmc5883 tempoff" to enable/disable
2015-04-08 17:45:53 +02:00
Andrew Tridgell dea97dd277 drv_mag: added ioctl to control temperature compensation 2015-04-08 17:45:53 +02:00
Lorenz Meier f8c8876642 Merge pull request #1819 from PX4/chan16
Support 16 channels on IO via S.BUS
2015-04-07 19:04:19 +02:00
Johan Jansen 891a7af509 UBlox: Only use time and date if flags are valid 2015-04-07 17:15:33 +02:00
Johan Jansen a121f6101f UBlox: Only use fix and velocity if flags are valid 2015-04-07 17:15:17 +02:00
Daniel Agar 8aae66b893 trivial code style cleanup round 2 2015-03-27 23:38:58 -04:00
Lorenz Meier 0b26671d62 Mag drivers: Temp support 2015-03-25 22:58:00 -07:00
Lorenz Meier 953cef9a9e HMC5883: Temp dummy value 2015-03-25 22:57:47 -07:00
Lorenz Meier b3c45e7178 LSM303D: Temp support 2015-03-25 22:57:32 -07:00
Lorenz Meier cb8e32f833 MPU6K: Temp support 2015-03-25 22:57:18 -07:00
Jonathan Challinger 89d5ae69d3 mpu6000: add set_accel_range 2015-03-25 22:02:05 -07:00
Lorenz Meier 1bbfe571fa Merge branch 'pullrequest-imu-temperature' of git://github.com/tridge/Firmware 2015-03-25 21:53:03 -07:00
philipoe 20f6fbd864 PX4IO driver: Add mapping of AUX1-3 channels, in case these are also used as control surface inputs 2015-03-24 12:50:48 +01:00
Lorenz Meier ecec2d76d9 Allow a bit more flexibility of PWM range 2015-03-20 21:57:54 +01:00
Lorenz Meier bb525d68a1 Merge pull request #1934 from rmackay9/smbus-batt-currdis
batt_smbus: calculate current discharged
2015-03-19 23:52:20 +01:00
Daniel Agar c2abb0f82a fix code style if trivial one line difference 2015-03-19 23:49:36 +01:00
Randy Mackay 4e83f43ea3 batt_smbus: remove usleep
Also restore I2C address after performing command line search for
devices
2015-03-19 12:09:40 +09:00
Randy Mackay 23075f6dab batt_smbus: calculate current discharged 2015-03-19 12:09:31 +09:00
Lorenz Meier 0cecb45d4e Merge pull request #1914 from UAVenture/gimbal_configuration
Gimbal MAVLink configuration and control support
2015-03-17 12:16:09 +01:00
Andrew Tridgell 9442fc13e4 mpu6000: show temperature in "mpu6000 info" 2015-03-17 13:44:53 +11:00
Andrew Tridgell 374c50cab8 lsm303d: support temperature readings in lsm303d
these are read at the same rate as the mag
2015-03-17 13:44:51 +11:00
Andreas Antener 6a7f12496e fix errors and flag comparison 2015-03-16 10:28:42 +01:00
Lorenz Meier ea5293b6fe PX4IO driver: Support 16 output channels 2015-03-15 17:39:43 +01:00
Lorenz Meier 92a52ea195 MPU6000 driver: Rotate before applying offsets. 2015-03-15 17:26:11 +01:00