13820 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Michael Schaeuble
06c5cb506a Enable ICM 20608 on Pixhawk Pro 2017-03-08 04:18:48 +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
zthorson
b8e72789cd px4fmu-v4: Formatting fixes
Signed-off-by: zthorson <zachthorson@gmail.com>
2017-03-05 11:42:27 +08:00
zthorson
a716b105f5 px4fmu-v4: Only close down fmu drivers on reset if they weren't running
Signed-off-by: zthorson <zachthorson@gmail.com>
2017-03-05 11:42:27 +08:00
zthorson
63857c6afc px4fmu-v4: Fix for HIL Unable to Set Control Surfaces. Fixes #5651
The sensor_rest command added to the startup script for px4fmu_v4 hardware
was leaving the /dev/pwm_output0 driver open.  This would prevent the
pwm_out_sim module from registering as a simulated driver.  The result
would cause the system to properly boot in HIL mode, but you would not
be able to set any control surfaces.

Since sensor_rest and peripheral_reset are only used on initialization, the
drivers can be shut down after they have performed their reset functions.

Signed-off-by: zthorson <zachthorson@gmail.com>
2017-03-05 11:42:27 +08:00
Daniel Agar
e63ee9d8bd fw_att wheel controller enable param (default off) 2017-03-05 11:41:14 +08:00
Beat Küng
ca05e64a9f replay: update & add some comments 2017-03-04 22:47:54 +08:00
Beat Küng
eaa9e6a019 ekf2: set att.timestamp to now in replay mode before ekf is initialized
logger will always log this topic, and a 0 timestamp will look worse in
FlightPlot. This will show a period of 0 attitude instead before ekf
is initialized.
2017-03-04 22:47:54 +08:00
Beat Küng
01541bb10d logger: switch from ekf2_replay to ekf2_timestamps topic, enable by default 2017-03-04 22:47:54 +08:00
Beat Küng
1d48d7e053 ekf2 replay: add statistics output when replay finished
The error counter is an indicator that the logger missed samples or dropped
due to a too small write buffer.
2017-03-04 22:47:54 +08:00
Beat Küng
2a11a2bc0b ekf2 replay: switch from ekf2_replay to ekf2_timestamps topic 2017-03-04 22:47:54 +08:00
Beat Küng
aabdc4125b ekf2: publish ekf2_timestamps topic 2017-03-04 22:47:54 +08:00
Beat Küng
473192aa81 replay: some API refactoring & extensions
in preparation to the updated ekf2 replay
2017-03-04 22:47:54 +08:00