8807 Commits

Author SHA1 Message Date
David Sidrane
6ab32f1632 logger uses common board api for mcu_version 2017-01-26 08:39:12 +01:00
David Sidrane
242f563d44 Adds a board common API for retriving the SoC' Silicon revision data/errata
This abstraction will support mcu's other than the stm32 family.
    It moves the systemlib/mcu_version.c functionality to
    common/stm32/board_mcu_version.c
2017-01-26 08:39:12 +01:00
Siddharth Bharat Purohit
975893a406 events: tempcal: get rid of commented code 2017-01-25 22:43:29 +01:00
Beat Küng
be512fdc4c temperature_calibration: use device id from published topic
uorb topic instance does not necessarily match the gyro device path instance,
so we need to use the id from the topic.
2017-01-25 22:43:29 +01:00
Beat Küng
00d2fc936a polyfit.hpp: fix code style (class member variables start with _) 2017-01-25 22:43:29 +01:00
Beat Küng
2fbb1aee84 temperature_calibration: fix poll (number of fds), remove usleep
useep() is not needed because we use the poll()
2017-01-25 22:43:29 +01:00
Beat Küng
54e9bda412 temperature_calibration: properly initialize gyro subscriptions & bounds checking 2017-01-25 22:43:29 +01:00
Beat Küng
e74e883c56 temperature_calibration: change some log levels to be more appropriate 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
5c7dbe0f24 events: tempcal: run cal for all available gyros 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
7e6daaf3d1 tempcal: remove separate temperature calibration module 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
416a0aece2 events:polyfit: change to using int/unsigned instead of (u)intx_t types 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
e390f672c9 events: tempcal: save temperature calibration result 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
917a8f63f6 events: add temperature calibration scheme 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
86d9ba9cde tempcal: move to using Matrix library functions 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
acff114260 tempcal: add ref temperature and proper debug print methods 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
137ade308f tempcal: change to double as float was insufficient for calculation 2017-01-25 22:43:29 +01:00
Siddharth Bharat Purohit
269d05ff22 tempcal: sandbox app for temperature calibration 2017-01-25 22:43:29 +01:00
Beat Küng
c1e2aeff0b commander: ignore PREFLIGHT_CALIBRATION for temperature calibration param 2017-01-25 22:43:29 +01:00
Beat Küng
ab8ac8f63a events: add new module events
It uses the LP worker queue to periodically check for vehicle commands (30hz),
useful for several housekeeping tasks.
Currently the only task is temperature calibration.

Commands can be started via command line or via vehicle_command (from
Mavlink)

TODO: need to spec & extend the mavlink command.
2017-01-25 22:43:29 +01:00
Matthias Grob
34080be68b mc_pos_control: removed special mode switch calculation
because it is not needed anymore with feed forward thrust
it even produced aggressive twitches when used together with the feed forward thrust
2017-01-25 22:42:45 +01:00
Lorenz Meier
63057d7b60 Ensure that manual control is only sent by sensors app if signal is valid and initialized 2017-01-25 07:43:45 +01:00
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