Commit Graph

21703 Commits

Author SHA1 Message Date
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
Beat Küng 729486f992 rgbled: switch to new led uorb interface 2017-03-12 00:08:35 +01:00
Beat Küng 7fd6748f34 rgbled_pwm: switch to new led uorb interface 2017-03-12 00:08:35 +01:00
Beat Küng 6debbcb20d navio: switch to new led uorb interface 2017-03-12 00:08:35 +01:00
Beat Küng 43b98d9a2f lib/led: add led class with led_control uorb topic
This is the new interface to control external LED's (user-facing).
Features:
- Supports maximum N Leds (where the board can define N)
- on/off/blink M times
- Different priorities
- Allows setting a single led or multiple at once
2017-03-12 00:08:35 +01:00
Beat Küng 5ebbbfc6bf rgbled_pwm: warnx -> PX4_WARN, NULL -> nullptr 2017-03-12 00:08:35 +01:00
Beat Küng b0439836f6 refactor drv_led.h: rename to drv_board_led.h
This makes it clear that it's used to control the board LED's, not external
LED's.
2017-03-12 00:08:35 +01:00
Beat Küng 61c1f6a8ef rgbled: warnx -> PX4_WARN and NULL -> nullptr 2017-03-12 00:08:35 +01:00
Beat Küng 4b1bbaa114 posix: remove rgbledsim driver which does nothing
In addition this is almost a copy of the rgbled driver
2017-03-12 00:08:35 +01:00
Julian Oes 404719953c commander: fix abs bug / trigger POSCTL both ways
The check if stick were touched was only working in one direction (per
axis) because fabsf was used incorrectly.

However, this check is still only a differential check triggered by
fast movement and does not trigger if someone slowly moves a stick to
the side. Also, the sensitivity depends on the rate of the commander
loop and/or the RC update loop. The correct solution would be a proper
filtering and trigger for movement.
2017-03-11 22:41:23 +01:00
Lorenz Meier fb64403607 Updated jMAVSim 2017-03-11 22:03:17 +01:00
Lorenz Meier 86a8e95017 Update jMAVSim to fix compatibility with recent java versions 2017-03-11 21:37:06 +01:00
David Sidrane 5a66539b36 HOTFIX:Backport Memory corruption due to stack coloring overreach
Backport of upstream NuttX PR 264

   As discovered by dcabecinhas. This fix assume the 8 byte
   alignment options for size stack size or this will overwrite
   the first word after TOS
   See https://github.com/PX4/Firmware/issues/6613#issuecomment-285869778
2017-03-11 20:26:51 +01:00
Daniel Agar 742d0e53f9 examples NULL to nullptr 2017-03-11 11:40:14 +01:00
Daniel Agar 0611677ee2 segway move to examples 2017-03-11 11:40:14 +01:00
Daniel Agar 89ff9f1fe3 cmake fmu-v3 fix and enable more examples
- sync posix_sitl_default and px4fmu-v4pro/v5 with fmu-v3
 - fixes #6667
2017-03-11 11:40:14 +01:00
Beat Küng 4811ab6b13 logger: reduce rate of some topics
In SITL, logging rate reduces from 70kB/s to 45kB/s.
2017-03-11 10:30:38 +01:00
José Roberto de Souza f61b830ae9 nuttx-configs: aerofc: Enable CONFIG_STM32_FLASH_WORKAROUND_DATA_CACHE_CORRUPTION_ON_RWW
Now AeroFC is making use of both flash memory banks so it need this
workaround.
2017-03-11 10:30:04 +01:00
José Roberto de Souza 03e3877535 nuttx-patches: Add workaround for flash data cache corruption on read-while-write 2017-03-11 10:30:04 +01:00
David Sidrane c967cade47 HOTFIX:Backport of second round upstream NuttX i2c fix (#6771)
backport 3cd66af889b42b036d6c9d88e067fc3b8abbdb2a and pr 258

   Applies to STM32F4 and STM32F7

   STM32, STM32 F7, and STM32 L4: Clone Freddie Chopin's I2C change to similar STM32 I2C drivers.

   Save elapsed time before handling I2C in stm32_i2c_sem_waitstop()
   This patch follows the same logic as in previous fix to
   stm32_i2c_sem_waitdone().
   It is possible that a context switch occurs after I2C registers are read
   but before elapsed time is saved in stm32_i2c_sem_waitstop(). It is then
   possible that the registers were read only once with "elapsed time"
   equal 0. When scheduler resumes this thread it is quite possible that
   now "elapsed time" will be well above timeout threshold. In that case
   the function returns and reports a timeout, even though the registers
   were not read "recently".
   Fix this by inverting the order of operations in the loop - save elapsed
   time before reading registers. This way a context switch anywhere in the
   loop will not cause an erroneous "timeout" error.
2017-03-10 07:26:51 -10:00
David Sidrane 60c8c84e18 HOTFIX:Backport of upstream NuttX i2c fix
5a6d95dd9f051be548a8d2378aaef75f0a1ba5e1 and ee5ae3a57dbbe835584f164c956e0374da1ed2eb

   Applies to STM32F4 and STM32F7

   Save elapsed time before handling I2C in stm32_i2c_sem_waitdone()
   It is possible that a context switch occurs after stm32_i2c_isr() call
   but before elapsed time is saved in stm32_i2c_sem_waitdone(). It is then
   possible that the handling code was executed only once with "elapsed
   time" equal 0. When scheduler resumes this thread it is quite possible
   that now "elapsed time" will be well above timeout threshold. In that
   case the function returns and reports a timeout, even though the
   handling code was not executed "recently".
   Fix this by inverting the order of operations in the loop - save elapsed
  time before handling I2C. This way a context switch anywhere in the loop
  will not cause an erroneous "timeout" error.
2017-03-10 12:15:10 +01:00
José Roberto de Souza 07921c9f3a aerofc: Use ram_flash dataman backend 2017-03-10 11:31:07 +01:00
José Roberto de Souza e2aae04c95 modules: dataman: Add a ram_flash backend
This backend will keep all updated data in RAM and
persist the data between reboots using flash memory.

Using only flash memory would result in a slow backend that
would decrease the lifetime of the flash memory, using both
we can reduce the several cycles of erase & write into flash
and keep the performance of the backend almost as fast
as the RAM only backend.

Note: Do not use this backend on a sector from the same flash memory
bank as the memory bank that STM32 read instructions or it can block
the CPU from fetching instructions from flash during the erase and
write operations and cause your drone crash.
2017-03-10 11:31:07 +01:00
José Roberto de Souza 75e7cfcbe8 modules: flashparams: Change size to uint32_t
So flash sector of 64Kbyes and 128Kbytes can also be used.
2017-03-10 11:31:07 +01:00
José Roberto de Souza a2670bdbc8 modules: dataman: Move backend specific out of main routines 2017-03-10 11:31:07 +01:00
José Roberto de Souza 66d9d56525 modules: dataman: Share memory between backends
Also having just a boolean to track if backend is running.
2017-03-10 11:31:07 +01:00
Beat Küng 8d5ba63686 tap-v1 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70
This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
size of the mavlink message. Since the pipe is blocking, a process writing
a lot of data will just wait, data will not be dropped.

The mavlink shell is the only process creating a pipe.
2017-03-10 11:29:09 +01:00