21665 Commits

Author SHA1 Message Date
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
Beat Küng
374dc1be4c px4nucleoF767ZI-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
Beat Küng
d25218eba2 px4fmu-v5 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
Beat Küng
3848432302 px4fmu-v4pro 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
Beat Küng
1f520f15a3 px4fmu-v4 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
Beat Küng
b73cd50863 px4fmu-v3 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
Beat Küng
b89451f160 px4fmu-v2 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
Beat Küng
0ffcf70a84 px4fmu-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
Beat Küng
58aff84911 stm32f4discovery 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
Beat Küng
6170544738 mindpx-v2 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
Beat Küng
3ac953db0e esc35-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
Beat Küng
9862f1c5f9 crazyflie 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
Beat Küng
34a2326c12 auav-x21 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
Beat Küng
ab541b1321 px4esc-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
Beat Küng
3cdec49a09 aerofc-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
Beat Küng
d10848c129 aerocore 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
Beat Küng
cfcc75d444 mavlink shell: check if there's enough free buffer to send the mavlink message
if there is not, the process on the other end of the pipe will just block.
This improves reliability over slow links.
2017-03-10 11:29:09 +01:00
Beat Küng
644d237ce6 posix-configs scripts: remove unneeded 'sleep 1'
There is no need to wait, and it would be the wrong way of doing
startup synchronization.
2017-03-10 11:28:41 +01:00
Beat Küng
b1e27f4395 simulator: handle ctrl-c during startup correctly
This makes sure the px4 process does not hang when Ctrl-C is pressed
during startup.
2017-03-10 11:28:41 +01:00
Beat Küng
9597e708df sensors: remove sensors_init
The initialization code is redundant and incomplete (only the first sensor
is done). I verified that all drivers already set this on startup.
For the mags, they all set their maximum supported update rate.
For the baro, the call can silently fail, as for example the MS5611 which
does not support 150Hz update. But it also sets the maximum in
initialization.

Tested on Pixhawk & pixracer.
2017-03-10 11:28:41 +01:00
Beat Küng
019386a5a0 bmi160: remove debug output 2017-03-10 11:28:41 +01:00
Beat Küng
828bb983e8 rpi startup scripts: start dataman so that missions can be flown 2017-03-10 09:00:24 +01:00
Beat Küng
2a6eac578d rpi: add HIL config 2017-03-10 09:00:24 +01:00
Beat Küng
32995a5bc1 state_machine_helper: remove unneeded code to disable sensor publication
In HIL mode we do not start the sensors anymore, so this is not needed.

Also it did not work (I did not try to find the reason, just noticed the
sensors kept publishing in HIL mode)
2017-03-10 09:00:24 +01:00
Beat Küng
af1984ac07 sensors: do not warn about baro in HIL mode 2017-03-10 09:00:24 +01:00
Beat Küng
bc91005e7a voted_sensors_update: increase accel & gyro timeout in HIL mode 2017-03-10 09:00:24 +01:00
Beat Küng
3a737097ee rpi px4.config: switch to ekf2 2017-03-10 09:00:24 +01:00
Beat Küng
541e53fdcf jmavsim_run.sh: add -i to specify the IP 2017-03-10 09:00:24 +01:00
jwilson
62200e2a81 WIP: Temporary fix for a problem which prevents arming on the Snapdragon Flight board. 2017-03-10 08:54:08 +01:00
Julian Oes
0c926106f1 param_shmem.c: comment out locking on Snappy
The param locking doesn't seem to be working on Snapdragon, so let's
just comment it out again.
2017-03-08 15:44:31 +01:00
Julian Oes
9235c0fd67 Update jMAVSim submodule
This fixes the compass, see:
https://github.com/PX4/jMAVSim/pull/55
2017-03-08 19:37:57 +08:00
jwilson
4f9245cc9c Resolves a conflict in the type of the index parameter in the dm_read and dm_write function signature, caused by a recent change in the dataman code. This problem was causing the loading of the flight stack to fail on the aDSP. 2017-03-08 15:04:20 +08:00
Julian Oes
24819ce7b1 commander: no datalink failsafe on ground
On SITL startup we got a datalink lost failsafe message whenever home
was initialized. The reason that in standalone SITL, there is usually no
datalink connected. However, on ground, we shouldn't really failsafe,
therefore it makes sense not to enter the state in the first place.
2017-03-08 05:33:32 +08:00
Beat Küng
c715228b8f LandDetector: save & initialize total flight time 2017-03-08 04:19:22 +08:00
Beat Küng
bac10bcfb8 rcS: do not wipe flight time param on autoconf 2017-03-08 04:19:22 +08:00
Michael Schaeuble
06c5cb506a Enable ICM 20608 on Pixhawk Pro 2017-03-08 04:18:48 +08:00
Beat Küng
561a5c5422 Tools/px_mkfw.py: use the same args to get the git version as px_update_git_header.py 2017-03-07 23:55:37 +08:00
Mathieu Bresciani
d67b6efda3 PixHawk Pro: Update mag IDs to have external higher priority 2017-03-07 23:43:28 +08:00
Lorenz Meier
daf668e687 Fixed wing land detector: Fix RTL logic with a temporary altitude limit workaround 2017-03-07 15:48:23 +08:00