20992 Commits

Author SHA1 Message Date
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
93bc8f6467 Combined ifdess and made positive logic
We still allow CONFIG_ARCH_BOARD_SITL in the code base, but
  use positive logic and less #ifdefs
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
David Sidrane
07d7ff5f38 Removed all CONFIG_ARCH_BOARD_xxx usage in drv_gpio.h
Removed remaining entries that had no fmu or pio GPIO
  defined
2017-01-21 11:45:36 +01:00
David Sidrane
0fe915bdfd aerofc-v1 Removed empty GPIO table
aerofc-v1 does not used any user GPIO via the FMU Driver
2017-01-21 11:45:36 +01:00
David Sidrane
cf893b6e89 TAP_V1 removed unused GPIO defines
Removed GPIO pins defines that were never user GPIO.
  Removed the camera_trigger driver as it depends on
  GPIO that are not on the TAP V1 HW
2017-01-21 11:45:36 +01:00
David Sidrane
d0f2d5e07f crazyflie removed unused GPIO defines 2017-01-21 11:45:36 +01:00
David Sidrane
aaf1b9c617 mindpx-v2: moved GPIO defines to mindpx-v2/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
acb0684a4e aerocore **corrected** and moved GPIO defines to aerocore/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
1d4d0656c6 PX4FMUV1: moved GPIO defines to px4fmu-v1/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
fe0f3bc557 PX4FMUV4PRO: moved GPIO defines to px4fmu-v4pro/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
356911ab0d PX4FMUV4: moved GPIO defines to px4fmu-v4/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
58a5ac78d9 PX4NUCLEOF767ZI_V1 **corrected** and moved GPIO defines to px4nucleoF767ZI-v1/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
0b89088065 PX4FMUV5 **corrected** and moved GPIO defines to px4fmu-v5/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
62dee7d096 PX4FMUV2: moved GPIO defines to px4fmu-v2/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
b74d049e89 AUAVX21 **corrected** and moved GPIO defines to auav-x21/board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane
9416ae670b Bring the board config into drv_gpio under nuttx 2017-01-21 11:45:36 +01:00
David Sidrane
955f2d7701 make device paths not board specific 2017-01-21 11:45:36 +01:00
David Sidrane
5d263776f2 Placed dependancy on BOARD_USES_PX4IO not path (PX4IO_DEVICE_PATH)
Code was conditionaly included based on #define PX4IO_DEVICE_PATH
    in drivers/drv_gpio.h depanedent on board #ifdef CONFIG_ARCH_BOARDxxxx
    Now that dependancy comes from board_common.h as BOARD_USES_PX4IO defined
    when a board config provides PX4IO_SERIAL_DEVICE.
2017-01-21 11:45:36 +01:00
David Sidrane
33486d5047 FMU gpio operations now conditional on BOARD_FMU_GPIO_TAB in board_config
return -EINVAL on any GPIO ioctl operation when there are
       no GPIO pins defined in the board config. I.E.
       BOARD_FMU_GPIO_TAB is not defined.

       BOARD_FMU_GPIO_TAB is now optional and if it is defined
       then the logical BOARD_HAS_FMU_GPIO is defined and
       will enable the px4fmu driver to perform the physical GPIO
       operations.
2017-01-21 11:45:36 +01:00
David Sidrane
216ec6513a Removed CONFIG_ARCH_BOARD_AEROFC_V1 from tap_esc
Changed the CONFIG_ARCH_BOARD_AEROFC_V1 in tap_esc.cpp to
   TAP_ESC_NO_VERIFY_CONFIG to maintian the commitment to not
   have CONFIG_ARCH_BOARD_xxxx ifdef litter in the PX4 code base.
   TAP_ESC_NO_VERIFY_CONFIG will be removed (see todo) in
   aerofc-v1/board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
fa6ad99aba Enable MEAS Airspeed voltage_correction based on ADC_SCALED_V5_SENSE not CONFIG_ARCH_BOARD_xxx
ADC_SCALED_V5_SENSE is defined and derived based on HW that provides
    and adc input that samples the V5 Rail or in the case of FMUv5 the
    V5 supply.
2017-01-21 11:45:36 +01:00
David Sidrane
26b1e1fe0c Use HW independant overrideable defines to condition ADC V5 sensing & publishing
Use ADC_SCALED_V5_SENSE as apposed to legasy ADC_5V_RAIL_SENSE to populate
    voltage5V_v
    Then Scale the DN based on an overridable ADC_V5_V_FULL_SCALE value
2017-01-21 11:45:36 +01:00
David Sidrane
a5ec920756 Provide overridable default ADC Full scale Voltage and Scaling factors
This add the ability to override the defaults ADC values by
   defining values in board_config.h
2017-01-21 11:45:36 +01:00
David Sidrane
43c1237d00 On lis3mdl use the bus setting to return internal/external
Removed asssumtion that all HW other then PX4v1 has lis3mdl on
  an external i2c bus. Use the actual value of the bus the device
  was found and instanced on to return the result of
  MAGIOCGEXTERNAL ioctl
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
Michael Schaeuble
7aea2ca030 BebopFlow: Add V4L2 interface and image functionality 2017-01-20 23:09:13 +01:00
Michael Schaeuble
f572752412 BebopFlow: Add initial PX4 app and structure 2017-01-20 23:09:13 +01:00
Lorenz Meier
27fca51b05 Update DF 2017-01-20 23:09:13 +01:00
Michael Schaeuble
85aa710414 BebopRangeFinder: Integration into build and starup 2017-01-20 23:09:13 +01:00
Michael Schaeuble
6cb659c8ef BebopRangeFinder: Add DF wrapper for Bebop's height sensor 2017-01-20 23:09:13 +01:00
David Sidrane
1d4ae4c683 Allows a board config to override the number of partitions and names
A board_config may define BOARD_HAS_MTD_PARTITION_OVERRIDE to
   uses it's own number of partitions and names.

   If a BOARD_HAS_MTD_PARTITION_OVERRIDE is not defined
   the hardcoded original values of fs/mtd_params &
   /fs/mtd_waypoints are used.

on an mtd device.
2017-01-20 22:55:04 +01:00
David Sidrane
487fbdf009 Use BOARD_EEPROM_WP_CTRL signal to control EEPROM WP signal if defined
Erases and write operations will use the BOARD_EEPROM_WP_CTRL
  macro to remove the Write protection and restore it.
2017-01-20 22:55:04 +01:00
David Sidrane
44cb1afa4d Provide an overidable nop default for BOARD_EEPROM_WP_CTRL
To simplify integration of an EEPROM device with a Write Protect
  control pin, we add an overidable BOARD_EEPROM_WP_CTRL macro
  the does nothing.

  A board that provids the GPIO for WP should define
  BOARD_EEPROM_WP_CTRL(_protected_true) that will set the WP GPIO
  to the Protected state when passed true.
2017-01-20 22:55:04 +01:00
David Sidrane
9002581ad4 Fixes the missing CONFIG_ prefix on RAMTRON_WRITEWAIT
This is an intrim nuttx patch that fixes the missing CONFIG_
  prefix on RAMTRON_WRITEWAIT. PR submitted upstream. This will
  be in affect until the next uptake of upstream NuttX
2017-01-20 22:53:56 +01:00
Janis Dzerve
3c270ae2a8 simulator: Do not kill every process with string 'px4' in the name 2017-01-20 09:41:16 +01:00
José Roberto de Souza
6bcf9266dc aerofc: Correctly enable UART driver for UART5(Telemetry port)
UART4 and UART5 are not USART instances.
2017-01-20 08:49:17 +01:00
David Sidrane
d42f8f4745 BugFix:Prevent drv_led_pwm passing a value of 0 to px4_arch_configgpio
This prevents the meta value of 0 => not used from being passed to
  px4_arch_configgpio. As this would map to PORTA|PIN0 and is not
  the intended configuration.
2017-01-19 22:18:04 +01:00
David Sidrane
3ea5a24924 crazyflie BugFix:Prevent a value of 0 being passed to px4_arch_configgpio
This prevents the meta value of 0 => not used from being passed to
  px4_arch_configgpio. As this would map to PORTA|PIN0 and is not
  the intended use.
2017-01-19 22:18:04 +01:00
Beat Küng
c1b1d03515 mc_att_control: use a maximum of 3 gyros 2017-01-19 19:24:52 +01:00