Commit Graph

4331 Commits

Author SHA1 Message Date
Daniel Agar 0069141ffc px4fmu increase actuator controls poll timeout 2018-07-30 10:32:56 -04:00
Daniel Agar cdf828cbda rc_input don't store cycle_timestamp 2018-07-30 10:32:56 -04:00
Daniel Agar 46254420be rc_input add perf counters 2018-07-30 10:32:56 -04:00
Daniel Agar 658237f36a px4fmu move RC input to new rc_input driver 2018-07-30 10:32:56 -04:00
Daniel Agar 4e05f26659 ms4525 driver extend to support ms4515 2018-07-30 10:24:40 +02:00
mcsauder ac8f44268b Added remaining two channels of PWM_AUX_DIS disarm parameter set commands, remove trailing whitespace from pwm_params_aux.c and pwm_params_main.c, gps/params.c and added block comment headers to separate sections instead of whitespace. 2018-07-30 09:36:44 +02:00
Daniel Agar 4f0c9c501a lps22hb cleanup startup options 2018-07-30 00:36:05 -04:00
Daniel Agar a4a040aa45 ADIS16477 run onboard self test during init 2018-07-29 18:09:34 -04:00
Daniel Agar cc1c37ffd1 ADIS16477 improve reset and probe logic 2018-07-29 18:09:34 -04:00
Daniel Agar cc96e5ec5e sensor messages remove unused fields and improve comments 2018-07-29 21:04:21 +02:00
Beat Küng 6e24bbbaaf fmu: add CRSF RC and Telemetry support
- Telemetry is only enabled on omnibus, since on Pixhawk it seems we cannot
  write to the RC UART due to how the board is wired
- For the Telemetry the UART needs to be opened RW
2018-07-28 15:23:09 +02:00
Beat Küng 388b963dd8 refactor fmu: fix naming convention for raw_rc_count & raw_rc_values 2018-07-28 15:23:09 +02:00
Beat Küng 3816145d59 fmu: fix init & use of _control_subs
0 is a valid file descriptor, init (all) to -1 instead
2018-07-28 15:23:09 +02:00
Beat Küng 442d4410ca pwm_out_sim: cleanup, avoid unnecessary & incorrect init of _control_subs
These need to be set to -1.
2018-07-28 15:23:09 +02:00
Daniel Agar be3af59c76 lsm303agr flip z axis and properly set scaling and range 2018-07-28 15:22:20 +02:00
Daniel Agar 14cf92d8b2 lsm303agr split main 2018-07-28 15:22:20 +02:00
Daniel Agar 3d3855e87b AV-X configure default serial on UART5 (J116) 2018-07-28 03:21:01 -07:00
Daniel Agar d7b2b48bad tap_esc increase stack 1100 -> 1180 bytes 2018-07-26 07:48:01 +02:00
Daniel Agar 1481015675 ROMFS cmake update dependency handling 2018-07-24 09:12:44 +02:00
Beat Küng 3f03288a95 omnibus: add support for Hobbywing XRotor F4 G2
It has an ICM-20602 IMU
2018-07-23 11:04:17 +02:00
Kurt Kiefer b111489825 PX4IO: re-enable handling digital rssi
The px4io driver was ignoring the contents of PX4IO_P_RAW_RC_NRSSI
since digital rssi wasn't working properly. This change was made in
commit 41b127d40.

Now that PX4IO_P_RAW_RC_NRSSI is returning valid values for digital
rssi, we can re-enable its use.
2018-07-23 08:16:51 +02:00
Daniel Agar b1d3bb0403 stop ignoring Wmissing-field-initializers and fix (#9912) 2018-07-22 12:45:52 -04:00
mcsauder 14a8afb61d Formatted whitespace and comments, standardized comment block styles and single line comments, and added capitalization and full stops to comments wherever appropriate. 2018-07-22 08:44:30 +02:00
Kurt Kiefer 597372bec9 Gather RSSI data from Spektrum Telemetry receivers
On SPM4649T receivers with firmware versions at least 1.1RC9, the
serial data will contain an rssi value in dbm, as outlined in the
Remote Receiver Interfacing document section 8.3.1.

If the value received is greater than or equal to zero, the receiver
does not support rssi data, and the incoming value will be ignored.
However, if the value is negative, we can use the rssi value.

When we have a valid rssi, it gets mapped to a percentage from 0 to
100 as expected by mavlink. This mapping is constructed as a
logarithmic function over Spektrum's published minimum and maximum
rssi values, -92dBm to -42dBm as 0 to 100:
100 Log10[1 + (x - min) * (9 / (max - min))]

This change updates all calls to the dsm input rountes to return
the rssi value.

Note that one place this doesn't work with the px4io enabled.
There is a comment left in the absence of analog rssi that:
"we do not actually get digital RSSI regs[PX4IO_P_RAW_RC_NRSSI]".
This restriction has been left in place, as removing it exposes a
problem where the frequency of the control tick is greater than
that of valid dsm frames so the rssi isn't valid every cycle.
2018-07-22 08:42:30 +02:00
David Sidrane 5ae39229b8 manifest:Clean up using synbolic constants 2018-07-20 18:29:58 +02:00
David Sidrane 45f210e544 fmu:Use Compile time & run time Safety switch control
Platforms that provide HW versioning tend to have
   more FLASH and can have a PX4IO as an option.
   (E.G.) FMUv5. This change provides run time
   decision to control the safety switch on
   platfors that have BOARD_HAS_VERSIONING.

   On platforms with no versioning and have
   BOARD_HAS_STATIC_MANIFEST defined as a 1
   The decision is compile time only. When a PX4IO
   is present the fmu control of the safety is
   not built.
2018-07-20 18:29:58 +02:00
David Sidrane 3ea3c1f537 px4fmu-v5:Runtime Safety LED support.
Safety Switch is HW version dependent on having an PX4IO
   So we init to a benign state with the _INIT definition
   and use the non _INIT verion in the driver if the run time
   decision is we do not have a PX4IO
2018-07-20 18:29:58 +02:00
David Sidrane 3136521493 px4fmu-v5:Fix led toggle.
The phyical led read was not returing the logical state
    of the LED. Since they are active low, when on it was
    returning 0 and the the negation operation in togggle
    was makeing that a 1 which it already was.
2018-07-20 18:29:58 +02:00
David Sidrane 1db1155697 px4fmu-v5:Comment and define SAFETY LED and Button so FMU can use
Safety Switch is HW version dependent on having an PX4IO
  So we init to a benign state with the _INIT definition
  and provide the the non _INIT one for the driver to make a run time
  decision to use it.

  We also define the FMU GPIO_BTN_SAFETY and GPIO_LED_SAFETY alias
  so the px4fmu will drrive will be built with the safety switch
  code at compile time and have runtime control via the manifest
2018-07-20 18:29:58 +02:00
David Sidrane c9cf17c432 px4fmu-v5:define BOARD_HAS_CONTROL_STATUS_LEDS
FMUv5 supports status LEDs.
2018-07-20 18:29:58 +02:00
David Sidrane 0b60df5fe0 px4fmu-v2:Added HW manifest (only support PX4IO) for now
This is the beginning of the manifest support on FMUv2/v3
   it only provide PX4_MFT_PX4IO for now.
2018-07-20 18:29:58 +02:00
David Sidrane 08e04e3c5c px4fmu-v4pro:Comment GPIO_BTN_SAFETY_FMU is inited and not used 2018-07-20 18:29:58 +02:00
David Sidrane 4330d6dad5 px4fmu-v4pro::Define BOARD_HAS_STATIC_MANIFEST as 1
When BOARD_HAS_STATIC_MANIFEST is defined with a value of 1
   and the board_config provides the BOARD_USES_PX4IO_VERSION
   then the board_common will define
   PX4_MFT_HW_SUPPORTED_PX4_MFT_PX4IO
2018-07-20 18:29:58 +02:00
David Sidrane 3b0427c2a5 auav-x21:Define BOARD_HAS_STATIC_MANIFEST as 1
When BOARD_HAS_STATIC_MANIFEST is defined with a value of 1
    and the board_config provides the BOARD_USES_PX4IO_VERSION
    then the board_common will define
    PX4_MFT_HW_SUPPORTED_PX4_MFT_PX4IO
2018-07-20 18:29:58 +02:00
David Sidrane 68aa5664b0 px4io:Use manifest query mechanism 2018-07-20 18:29:58 +02:00
David Sidrane 840b3ae985 px4fmu-v5:manifest add initial query mechanism 2018-07-20 18:29:58 +02:00
David Sidrane a0cc4dc345 Fix typo 2018-07-20 18:29:58 +02:00
David Sidrane f2cb7b0ade board_common:Add underpinning for board manifest query 2018-07-20 18:29:58 +02:00
David Sidrane 5b4da90d60 fmuv2:Added State information for FMUv2 questionable hardware
This HW does not respond to the GPIO query consistantly
   and should be treated like regular FMUv2
2018-07-20 18:29:58 +02:00
David Sidrane 7524a318cc px4fmuv5:Fix display order to ver rev 2018-07-20 18:29:58 +02:00
DanielePettenuzzo ee9a336d62 add PX4_I2C_BUS_EXPANSION2 support in px4flow driver 2018-07-19 09:31:51 +02:00
Daniel Agar 8985403c00 FMU relocate MOT_SLEW_MAX and THR_MDL_FAC parameters centrally 2018-07-17 19:59:41 -04:00
Daniel Agar c26ca49f36 PWM parameters centralize under sensors and add aux 7&8 2018-07-17 19:59:41 -04:00
Daniel Agar 24d742ed51 FMU PWM parameters respect instance for MAIN/AUX usage 2018-07-17 19:59:41 -04:00
David Sidrane 6f665aee55 board_common:Update description to include paramater. 2018-07-17 08:53:29 +02:00
David Sidrane a7a1607689 fmu & px4io:Use uORB Publish Auto 2018-07-17 08:53:29 +02:00
David Sidrane 33c9459ebe fmu:Use extended board_supports_single_wire APU with UxART 2018-07-17 08:53:29 +02:00
David Sidrane ec73e73934 px4fmu-v5:Support board_supports_single_wire query by UxART 2018-07-17 08:53:29 +02:00
David Sidrane ab49b42f1c board_common:Extend board_supports_single_wire API to use UxART_BASE 2018-07-17 08:53:29 +02:00
David Sidrane b6d01c36af px4fmu-v5:Support RX TX swap 2018-07-17 08:53:29 +02:00