Commit Graph

8786 Commits

Author SHA1 Message Date
Lorenz Meier b1c6494ed7 MAVLink receiver: Do use correct multi-topic architecture
This prevents two inputs publishing to the same topic. Now if both RC and joystick are connected the first to be active gets control. This is not optimal but consistent and safe.
2017-01-25 07:43:45 +01:00
David Sidrane 5c239ffb0b logger uses board_get_uuid_formated32 instead of mcu_unique_id
Replace the creation of uuid string with the board common api
  board_get_uuid_formated32 as opposed to using mcu_unique_id
  and printf.
2017-01-25 07:43:11 +01:00
David Sidrane e6ba897b9a mavlink is using board_get_uuid_raw32 instead of mcu_unique_id 2017-01-25 07:43:11 +01:00
David Sidrane 63e3bbde07 gyro_calibration is using board_get_uuid_raw32 instead of mcu_unique_id 2017-01-25 07:43:11 +01:00
David Sidrane 5a5cfdbbe3 mcu_version remove mcu_unique_id
Using board cvommon UUID api thefore Removed mcu_unique_id
2017-01-25 07:43:11 +01:00
David Sidrane 4dc8e61612 uavcan uses common board api to interface with systemlib/board_serial 2017-01-25 07:43:11 +01:00
David Sidrane 24f5461402 systemlib/board_serial uses common board api for UUID 2017-01-25 07:43:11 +01:00
David Sidrane 1abd629461 Move common macros to systemlib/px4_macros.h 2017-01-24 21:18:28 +01:00
Julian Oes 4ceba407f2 commander: raise stack size
A stack usage of 3000 bytes was observed, therefore it's safer to raise
the commander's stack size by 400 bytes.
2017-01-21 16:04:43 +01:00
Lorenz Meier 42c5684a06 Fix temperature clipping for temperature calibration. Fixes #6412 2017-01-21 12:08:18 +01:00
Paul Riseborough 3a029e58c7 logger: Add mode for thermal calibration logging
Logs the IMU and baro data at 10Hz
2017-01-21 11:48:02 +01:00
David Sidrane 9665db3efc Use px4_config.h not board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane df6b46d0ba FMUV1 Moved magic numbers for battery V div and A per V to board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane 894b41e313 AEROCORE Moved magic numbers for battery V div and A per V to board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane f86a8c0e5e MINDPX_V2 Moved magic numbers for battery V div and A per V to board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane e0fa53f444 FMUV2 Moved magic numbers for battery V div and A per V to board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane 0baefec09f FMUV4 Moved magic numbers for battery V div and A per V to board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane e9ca626e19 TAP_V1 Moved magic numbers for battery V div and A per V to board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane fd25f0a594 AEROFC_V1 Moved magic numbers for battery V div and A per V to board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane 99902807c9 SITL Moved magic numbers for battery V div and A per V to px4_config.h 2017-01-21 11:45:36 +01:00
David Sidrane a8b9c906f6 Board_config.h will provide the BOARD_BATTERYx_V_DIV
Prep to distrubte the magic numbers assgined in parameters.cpp
  to the board_config.h

  common/board_common.h will define:
  1) BOARD_BATTERY[1|2]_V_DIV as 0.0f if not defined to ensure
      the missing default trips a low voltage lockdown

  2) BOARD_BATTERY[1|2]_A_PER_V as 0.0f if not defined to ensure
     the default leads to an unrealistic current value.
2017-01-21 11:45:36 +01:00
David Sidrane 1c3ebadb85 Removed unused defines AVIONICS_ERROR_VOLTAGE and AVIONICS_WARN_VOLTAGE 2017-01-21 11:45:36 +01:00
David Sidrane 0bb0e92378 gpio_led removed dependancy on CONFIG_ARCH_BOARD_xxxx
The gpio leg can use either the FMU GPIO_SERVO (Aux Pins)
  or the FMUv1 style IO pins.

  We define either LED_ON_SERVO_GPIO or LED_ON_EXT_GPIO_AND_PIO
  based on if the board_config provides GPIO_SERVO_1 or
  GPIO_EXT_1.

  For LED_ON_SERVO_GPIO we further define GPIO_MIN_SERVO_PIN and
  the GPIO_MAX_SERVO_PIN based on the highest GPIO_SERVO_x provided
  by the board_config

  When base the ability to use the PX4PIO not in the existance of
  the path but on the define BOARD_USES_PX4PIO
2017-01-21 11:45:36 +01:00
Lorenz Meier 084e714f62 Mixer: Fix yaw throttle adjustment
When a motor hits a limit we only want to lower the collective throttle as much as the total limit, not per motor hitting the limit.
2017-01-21 08:33:51 +01:00
Paul Riseborough 1d66d4b051 sensors: Allow for difference in temperature readings across sensors
We need to track the temperature change in each sensor instance individually when using it as basis for publication.
2017-01-21 08:31:56 +01:00
Larry Wang 1beb2911e2 init shmem early to avoid random crash in fastrpc (#6407)
* init shmem early to avoid possible crash

* fix_code_style

* Keep the initialziation to NULL, remove the duplicate memory allocation
2017-01-21 08:30:46 +01:00
Beat Küng c1b1d03515 mc_att_control: use a maximum of 3 gyros 2017-01-19 19:24:52 +01:00
Beat Küng 21a3e4d36a mc_att_control: fix out-of-bounds access if system has multiple gyros 2017-01-19 19:24:52 +01:00
Beat Küng ab9e0aa524 sensors temp compensation: do an orb_copy to get the driver ID
This removes the necessity, that the driver class ID matches the uorb topic
instance.

Also improve error handling & reporting
2017-01-19 19:24:52 +01:00
Beat Küng 41d220ac2d sensors: reorder initialization calls
needed for the next commit
2017-01-19 19:24:52 +01:00
Beat Küng f6f145cbe8 sensors & mc_att_control: increase stack sizes due to recent changes 2017-01-19 19:24:52 +01:00
Beat Küng fd48d9c190 sensors: print status of temp compensation with 'sensors status' 2017-01-19 19:24:52 +01:00
Beat Küng 916a04bc56 sensors temp compensation: use SENSOR_COUNT_MAX instead of just 3 2017-01-19 19:24:52 +01:00
Beat Küng 117826a31f sensors temp compensation: refactor into a separate class
- reduces some code duplication
- provides clear API & separation for temp compensation

additional changes:
- added timestamp to sensor_correction topic
- reduced its publication rate, to only when voting index or scales or
  offsets change (if there is more than 1deg change in temperature)
2017-01-19 19:24:52 +01:00
Beat Küng 23d278cc43 sensors temp compensation: minor cleanup 2017-01-19 19:24:52 +01:00
Beat Küng f38843278d voted_sensors_update: make msl_pressure static const 2017-01-19 19:24:52 +01:00
Beat Küng e1ff6af792 mc_att_control_main: initialize _sensor_corrections properly 2017-01-19 19:24:52 +01:00
Beat Küng 535b1ea0dd voted_sensors_update: simplify accel & gyro poll methods 2017-01-19 19:24:52 +01:00
Beat Küng 7d5cd02c70 mc_att_control_main: fix bound check for gyro instance 2017-01-19 19:24:52 +01:00
Beat Küng bbd47389e0 voted_sensors_update: fix copy paste naming mistake 2017-01-19 19:24:52 +01:00
Beat Küng 0765ed552c sensor_correction.msg rename {gyro,accel,baro}_select to match uORB convention 2017-01-19 19:24:52 +01:00
Lorenz Meier 00d26b75e9 MC att control: Harden against incorrect indices 2017-01-19 19:24:52 +01:00
Lorenz Meier 905c091f8c MAVLink receiver: Use fake device ID 2017-01-19 19:24:52 +01:00
Paul Riseborough eac6dfed3c mc_att_control: Sync attitude loops to gyro data
Sync the attitude controller to the raw gyro data to remove the latency in the rate loops caused by the sensor and estimator modules.
Attitude data latency will increase as it will be from the previous EKF update, however attitude loops are less latency sensitive.
Thermal compensation and bias data will be from the previous frame.
2017-01-19 19:24:52 +01:00
Paul Riseborough 0485c2b94a sensors: add baro pressure temperature compensation and reporting 2017-01-19 19:24:52 +01:00
Paul Riseborough 0ba31b521c uavcan: Populate baro device ID
TODO - use unique HW ID
2017-01-19 19:24:52 +01:00
Paul Riseborough 677616ed83 mavlink: Populate baro device ID
TODO - use unique HW ID
2017-01-19 19:24:52 +01:00
Paul Riseborough c2fc283fdb sensors: Update single axis temp comp method to 5th order
This allows future use with baro sensors that require a higher fit order
2017-01-19 19:24:52 +01:00
Paul Riseborough f8cef1e9ab attitude_estimator_q: populate control state gyro bias data
Populate with zeros.
TODO provide estimate.
2017-01-19 19:24:52 +01:00
Paul Riseborough 27e6f07485 ekf2: publish control state gyro bias data 2017-01-19 19:24:52 +01:00