Commit Graph

21729 Commits

Author SHA1 Message Date
Henry Zhang 6791090fe3 add new config for NanoMind (#6874) 2017-03-22 01:46:13 -04:00
Dennis Mannhart 8f1e851911 Stick to velocity fix (#6825)
* mc_pos_control: use just float for vel and cruise in xy

* mc_pos_control: stick map saturate magnitude to 1

* mc_pos_control: take minimum cruising speed for auto

* mc_pos_control: cruise speed triplet higher than from mc_pos_control

mc_pos_control: fix if for cruise in auto

* mc_pos_control: use PX4_ISFINITE criteria
2017-03-21 07:58:47 +01:00
David Sidrane 7d62aa6a6d HOTFIX:Backport Memory corruption due to stack coloring overreach complete (#6848)
Backport of upstream NuttX

       86400a252dcbe6e4aef3ecca000b469a0fe96b67
       08e92abb0ba744927ed0b32294859b0f47726f82
       4b65817e99cbdf04fefad883eca0e7c8a9add63c

       Improper rounding in redundant stack coloring
       routines could overwriting the TOS+1 and BOS-1
       depending on the value of CONFIG_ARCH_INTERRUPTSTACK

       This applies the compelet upstream set of fixes from
       David Cabecinhas <david.cab+bitbucket@gmail.com>

       Improper rouding in redundant stack coloring
       routines was overwriting the TOS+1 and BOS-1

       The legacy OABI 4 byte stack alingment was removed
       Only the EABI 8 byte alinement is supported
       The redundant interrupt stack coloring. up_initalize
       had the correct implemantation (last verson of patch)
       and the redundant version in the
       arch/arm/src/stmxxx/stmxx_irq.c was calculating the size
       wrong.

       This is fixed by rounding up CONFIG_ARCH_INTERRUPTSTACK
       by 4 bytes when allocated and alining on a 8 byte boundry
2017-03-20 07:32:45 -10:00
David Sidrane f2164b135d Consolidate the flash patches to fix build (#6850)
nuttx-patches/workarround_for_flash_data_cache_corruption.patch was
   patching a file patched in nuttx-patches/wip_inflight_to_upstream.patch

   The changes in workarround_for_flash_data_cache_corruption.patch
   will be submitted upstream once refactored (upstream coding style
   compliant and moved to correct location)
2017-03-20 06:18:23 -10:00
Dennis Mannhart c9643cb075 mc_pos_control: delete leftover from transitional changes for vel_max_z (#6822) 2017-03-20 10:06:29 +01:00
Dennis Mannhart 31aff0b6c0 mc_pos_control: change yaw setpoint to yaw (#6854) 2017-03-20 10:05:33 +01:00
Beat Küng 546bd2b4d0 drivers: remove the overflow perf counter
This was used together with the read() interface, but we don't use that
so the counters are wrong.
2017-03-20 09:11:34 +01:00
Beat Küng f60dfbbb40 perf: remove unused event_overruns, reduce type of delta times to 32bits
32 bits are still enough to measure elapsed times up to 1 hour.

Testing on Pixracer: I counted 73 allocations and 39 frees during bootup,
resulting in 2kB RAM usage after boot. This patch reduce this by ~0.5kB.
2017-03-20 09:11:34 +01:00
David L Sprague 0a02a4c503 Fixed Issue #6596
Fixed the block comments at the top of the source file and the help message for the script (starting at line 279) so that an underscore ("_") character is correctly described as the separator for the first message field name rather than a period character "."
2017-03-20 08:35:39 +01:00
Pavel Kirienko 2b2c307eac Performance audit (intentionally duplicates #6829) (#6847)
* UAVCAN ESC output: removing ESC output channels from published message that are always zero. This allows the UAVCAN stack to always transfer only the minimum number of output values, avoiding redundant zeroes and the associated increase in bus load and CPU time

* Added a separate mixer file for CAN quadrotor

* Sampling profiler improvements

* PMSP: Output more endpoints

* Matrix update

* libc usage workaround

* Removed UAVCAN perfcounters

* Matrix submodule update
2017-03-18 04:16:20 -10:00
David Sidrane c20b85e6ad Revert "UAVCAN performance audit (#6829)" (#6846)
This reverts commit 21e04c9f7a.
2017-03-18 04:04:43 -10:00
Pavel Kirienko 21e04c9f7a UAVCAN performance audit (#6829)
* UAVCAN ESC output: removing ESC output channels from published message that are always zero. This allows the UAVCAN stack to always transfer only the minimum number of output values, avoiding redundant zeroes and the associated increase in bus load and CPU time

* Added a separate mixer file for CAN quadrotor

* Sampling profiler improvements

* PMSP: Output more endpoints

* Matrix update

* libc usage workaround

* Removed UAVCAN perfcounters
2017-03-18 03:47:09 -10:00
David Sidrane 4fe29e5246 Fiexs frsky telemetry stack warning
WARN  [load_mon] frsky_telemetry low on stack! (164 bytes left)

Added 168 bytes = 160 needed + 8 bytes for head room
2017-03-18 10:54:49 +01:00
Lorenz Meier 7695b65b7f MAVLink app: Default to MISSION, not MISSION_INT
In order to ensure correct transmission the mission system needs to default to the legacy protocol and switch to the new implementation when these conditions are met:
  * If the GCS sends a MISSION_REQUEST_INT - it will do this based on the AUTOPILOT_VERSION flag indicating int mission support
  * If the autopilot sends a MISSION_REQUEST and has the AUTOPILOT_VERSION flag for 2.0 set, the GCS should NACK it, which will make the autopilot retry a MISSION_REQUEST_INT
  * If the autopilot sends a MISSION_REQUEST_INT and the GCS does not support it, the GCS will ignore and time out. The autopilot could retry now opportunistically with the old protocol, but this is not great for lossy links.
  * If the GCS sends a MISSION_ITEM_INT - this is a fallback
2017-03-16 23:16:39 +01:00
Matthias Grob bb3b26e00f logger: adjusted log_writer_file stack size
because of messages in the logs
2017-03-16 14:05:15 +01:00
Matthias Grob ca9393eb97 mc_pos_control: fix parameter description of expo for QGC parsing 2017-03-16 11:42:27 +01:00
ChristophTobler d5137ed794 set EKF2_AID_MASK and EKF2_HGT_MODE because of iris_opt_flow 2017-03-16 09:18:54 +01:00
Beat Küng 948635c989 LandDetector: call param_notify_changes() instead of param_save_default()
param_save_default() could take something like 0.5s, and because the
LandDetector is running on the HP work queue, this would block other
tasks, like RC handling or drivers.
2017-03-14 21:43:44 +01:00
Beat Küng f6d9d77f60 param_notify_changes: set unsaved to true
This will make sure that commmander will save the params.
2017-03-14 21:43:30 +01:00
Beat Küng 0e650638e4 param: implement RW locking
This allows concurrent read access, which are much more common; reducing
potential lock contention and increasing concurrency.

Taking a lock is expensive, and the reader lock is now even more expensive.
An RCU synchronization scheme would reduce the overhead of the readers to
increasing/decreasing an atomic counter.
Thus this should only be an intermediate step until we move towards RCU.

Tested on SITL & Pixracer.
2017-03-14 21:30:53 +01:00
Beat Küng b4290b6b52 params: make param_t uint16_t on NuttX
param_t is only used as an offset and we have <1000 params, so an uint16_t
is enough.
This saves roughly 1KB of RAM. We only do that on NuttX because normal
integers have better performance in general.
Previously on amd64, this was even 64bits because it was an uintptr_t.
2017-03-14 21:30:53 +01:00
Beat Küng 45af77a543 mavlink parameters: try to send 5 params at once on USB & UDP connections
This further speeds up param loading.

On Pixracer via USB, it's possible to send up to 11 at once before the TX
buffer gets full, so there is still enough free bandwidth left.
2017-03-14 21:30:04 +01:00
Beat Küng 2873d973de mavlink: increase parameter rate from 120 to 300Hz
This speeds up parameter loading. Slow links like telemetry are unaffected,
since the mavlink loop runs only with ~100Hz.

Tested on various links, like:
- telemetry link
- pixracer WiFi
- pixracer USB
- SITL
2017-03-14 21:30:04 +01:00
Simone Guscetti cc153638d2 commander calibration_routines: fix the white led
The white led state would continue during calibration, now it return to the previus state
2017-03-14 14:25:49 +01:00
Simone Guscetti 1e4b79034f commander_helper: Add rgbled function
with priority and blink period
2017-03-14 14:25:49 +01:00
Lorenz Meier 2af5d1b929 Mission transfer: Fix retry logic
Previously the retry would not actually have been sent if nothing had been received in time.
2017-03-13 21:51:21 +01:00
Lorenz Meier 10dcb90d52 Commander: Store last manual stick setpoints only when actually in manual control mode 2017-03-13 21:08:17 +01:00
David Sidrane bef24b906e Removed v4pro cloned v4 inappropriate definitions (#6808)
* Remove remove safty swtich LED from FMU control

* Differentiate GPIO_BTN_SAFETY_FMU  from GPIO_BTN_SAFETY
2017-03-13 07:26:36 -10:00
Lorenz Meier 1a3317ebab Commander: Do not abort low battery handling due to stick motion. 2017-03-13 08:42:51 +01:00
Lorenz Meier e9e79cdc9b Updated optical flow repo 2017-03-13 08:37:50 +01:00
Lorenz Meier 706464d2eb Land detector: Fix param meta data 2017-03-12 14:42:19 +01:00
Lorenz Meier e4c012289f Logger: Sync setpoints and states to same rates 2017-03-12 11:10:19 +01:00
Lorenz Meier f7e4d8453d Logger: Drop position_setpoint_triplet to 5 Hz since its not required at such a high rate in analysis 2017-03-12 11:06:40 +01:00
Beat Küng 32cf540159 rgbled: make sure to load the params on startup 2017-03-12 00:08:35 +01:00
Beat Küng 2cf849a520 led_control: fix errors by clang-tidy 2017-03-12 00:08:35 +01:00
Beat Küng f22fc1c543 led: add breathe mode 2017-03-12 00:08:35 +01:00
Beat Küng 30841ee6bf send_event: separate initialization and wait until started for 'send_event start_listening' 2017-03-12 00:08:35 +01:00
Beat Küng 1177ec91e5 temperatoru_calibration: reformat comments to use doxygen style 2017-03-12 00:08:35 +01:00
Beat Küng 7cb291aa62 temperature_calibration: use a define for error code -110 2017-03-12 00:08:35 +01:00
Beat Küng ce8707532e led/led: change update logic to keep blinking led's in sync 2017-03-12 00:08:35 +01:00
Beat Küng 9e09f70f37 lib/led: make sure to do an orb_copy on startup 2017-03-12 00:08:35 +01:00
Beat Küng b7f5d92b21 lib/led: add some clarifying comments 2017-03-12 00:08:35 +01:00
Beat Küng df791cef94 RPi: make sure navio_rgbled works and add it to autostart 2017-03-12 00:08:35 +01:00
Beat Küng 38156d862f temperature_calibration: add led indication
- starts with yellow blinking
- turns led to solid according to progress
- blink red on error, green on success
2017-03-12 00:08:35 +01:00
Beat Küng 1e4fcb6616 cmake configs: add systemcmds/led_control and lib/led where needed 2017-03-12 00:08:35 +01:00
Beat Küng b1be963083 px4fmu_test rcS: switch to led_control command 2017-03-12 00:08:35 +01:00
Beat Küng 46fef30526 systemcmds: add new command led_control
This can be used to test & control the new uorb-based led backend.
2017-03-12 00:08:35 +01:00
Beat Küng 83afc207d4 drv_rgbled.h: remove this, it's not used anymore 2017-03-12 00:08:35 +01:00
Beat Küng 95e8e26ae0 commander: use led_control uorb topic 2017-03-12 00:08:35 +01:00
Beat Küng 8dae94d90a lib/led: add BREATHE mode (but not implemented yet) 2017-03-12 00:08:35 +01:00