Commit Graph

19847 Commits

Author SHA1 Message Date
Beat Küng
4da2ae2302 MavlinkOrbSubscription: optimize fields for size
reorder & reduce instance to uint8_t (which is more than enough).
Reduces sizeof(MavlinkOrbSubscription) from 40 to 24.

On Pixracer this frees almost 2KB of RAM
2016-10-23 15:25:20 +02:00
Beat Küng
c50e4a6e21 uORB::DeviceNode: reduce the size of some members
The limits the maximum queue size to 255, which I think is ok for the
forseable future.

sizeof(uORB::DeviceNode) is reduces from 128 to 112 on NuttX, and with
~80 instances, this saves over 1KB of RAM.
2016-10-23 15:25:20 +02:00
Beat Küng
03c12c4c78 Device: use uint16_t for _open_count instead of int (save space) 2016-10-23 15:25:20 +02:00
Beat Küng
a5e6f3213f Device: remove _irq_attached flag, test with _irq == 0 instead 2016-10-23 15:25:20 +02:00
Beat Küng
64df463a85 logger: avoid setting the interval for topics where not needed
Saves some RAM, although not much in that case. But all subscriptions
combined need ~1.5KB only for the interval data within uORB.
2016-10-23 15:25:20 +02:00
Beat Küng
7140914d38 logger: remove LoggerSubscription::time_tried_subscribe
Instead use a single timestamp for subscription checks. This frees up
~800B of RAM.

Also make sure the subscription checks are distributed over time. On each
update, at most 1 topic subscription is checked. Reduces the load of the
logger from 7.3% to 5.8% (Pixracer)
2016-10-23 15:25:20 +02:00
Beat Küng
f244a78368 logger: avoid uORB::Subscription, directly use orb_subscribe() instead
This frees up ~160B stack size
2016-10-23 15:25:20 +02:00
Beat Küng
4120cd93df logger: make sure structs are properly aligned
ulog_message_info_header_s *msg = reinterpret_cast<ulog_message_info_header_s *>(buffer);
members of msg could end up unaligned, because of the uint8_t buffer.
2016-10-23 15:25:20 +02:00
Lorenz Meier
296b07f9d8 Update Gazebo plugin to fix plane model 2016-10-23 14:21:50 +02:00
Julian Oes
3aa9a72562 mavlink_shell.py: default to 57600 baudrate 2016-10-23 14:00:29 +02:00
Paul Riseborough
06ad477847 ekf2: publish vibration metrics 2016-10-22 12:03:05 +02:00
Paul Riseborough
79ec263b1e msg: Change definition for un-used vibration monitoring variable
Makes the message more useful in comparing the types of vibration likely to cause numerical errors and matches the update ecl library interface.
2016-10-22 12:03:05 +02:00
Paul Riseborough
6a3b147477 ecl: update library reference
Adds reporting of IMU coning and high frequency vibration levels
2016-10-22 12:03:05 +02:00
David Sidrane
a2ad92b2d7 Bugfix: Hard Fault hmc5883 with not params
Fault results from if (!strcmp(verb, "start")) {``` with null verb
2016-10-22 11:54:38 +02:00
David Sidrane
bdfb2bbb8d Fixed hardfault on fast proc
_baro_topic can be null in init sequence
   init call collect before the topic is inited.

I think this pattern is repeated in other drivers. I would suggest
allowing null in orb_publish to just return.
2016-10-22 11:43:22 +02:00
Siddharth Bharat Purohit
b75ff417ea fmu: fix typo introduced in 78b0d1a which adds PWM1 mode 2016-10-22 08:37:13 +02:00
Carlo Wood
6fc30c76a6 Clean up of app.h
app.h, generated from app.h_in, has unnecessary code duplication
and isn't a header file (it defines globals, static functions
and doesn't have a header guard, moreover, it has a 'using namespace
std;'). Because of this, a real headerfile that declares the stuff
defined in apps.h was missing leading to even more code duplication:
scattered forward declarations in .cpp files and an often repeated
type of std::map<std::string, px4_main_t>.

This patch moves cmake/qurt/apps.h_in to src/platforms/apps.cpp.in
(with some changes) and removes cmake/posix/apps.h_in.
Then src/platforms/apps.cpp.in is split into src/platforms/apps.cpp.in
and src/platforms/apps.h.in, splitting declarations from definitions.

A typedef is defined for the map (apps_map_type).

The main difference between cmake/posix/apps.h_in and
cmake/qurt/apps.h_in was that the first defined a global 'apps',
while qurt stores the apps in QShell. I opted to get rid of
the global variable (which are in general evil for various reasons)
and used the API of cmake/qurt/apps.h_in where a provided 'apps'
map is initialized with a call to init_app_map. Thus removing
the existing code duplication.
2016-10-22 08:31:14 +02:00
Daniel Agar
c200ef88ed travis-ci, circleci update to GCC 4.9 and 5.4 2016-10-20 22:01:53 -04:00
Julian Oes
d57e9f13d7 px_uploader.py: catch exception in except block
This could lead to an exception if serial is not available.
2016-10-20 23:18:56 +02:00
Julian Oes
d1822699a9 px_uploader.py: remove unused variable 2016-10-20 23:18:56 +02:00
Julian Oes
a14c565ab1 px_uploader.py: trailing whitespace 2016-10-20 23:18:56 +02:00
Julian Oes
78b0d1a01f tap: add landing gear capability
This configures the PWM output for the landing gear.
2016-10-20 23:17:05 +02:00
Julian Oes
2fff2ab9ac Add switch for landing gear, pass it to actuators 2016-10-20 23:17:05 +02:00
Beat Küng
10c4ec2e1a update gps submodule 2016-10-20 21:12:11 +02:00
Beat Küng
0002e86b6f jmavsim_run.sh: add additional arguments for HITL 2016-10-20 18:54:47 +02:00
Beat Küng
7ed81e5edb simulator_mavlink: send MAV_CMD_SET_MESSAGE_INTERVAL to enable ground truth 2016-10-20 18:54:47 +02:00
Beat Küng
7415d94e12 mavlink: don't publish HIL_CONTROLS in HIL mode
it generates unnecessary load. If really needed, it can still be enabled
manually.
2016-10-20 18:54:47 +02:00
Daniel Agar
3fda48517d travis-ci git clone depth 1000 2016-10-19 20:31:56 -04:00
Lorenz Meier
7b2898eaee Fix merge collision 2016-10-19 18:29:34 +02:00
Lorenz Meier
3f5f74399e Increased SBUS buffer size for more reliable SBUS and DSM parsing 2016-10-19 15:32:30 +02:00
Lorenz Meier
f7f406c45d Expand RC test to 2nd receiver with 12 channels 2016-10-19 15:31:54 +02:00
Lorenz Meier
6f7a5cdf9b Add additional DSM test data 2016-10-19 15:31:54 +02:00
Beat Küng
210b5704a9 px4fmu_common rcS: fix MAVLINK_F test
fixes a 'test: syntax error' message on startup. There were two problems:
- the expansion of $MAVLINK_F lead to multiple arguments in the test
  when the variable contained spaces. Fixed with ""
- the x prevents interpretation as a unary expression, if $MAVLINK_F starts
  with a - character (in that case the expansion would be:
  if [ -r 1200 ... and nsh interprets - as unary expression)
2016-10-19 15:27:09 +02:00
Beat Küng
3bb479f72e ulog mavlink: use the px4_sem calls (needed for OSX) 2016-10-19 13:13:47 +02:00
Beat Küng
7c40c8dfd9 update mavlink submodules 2016-10-19 13:13:47 +02:00
Beat Küng
9272aa592a logwriter: fix shadowing compiler warnings 2016-10-19 13:13:47 +02:00
Beat Küng
b2d45732c2 system_params: add missing crazyflie to the param description 2016-10-19 13:13:47 +02:00
Beat Küng
318c970477 mavlink ulog streaming: add rate limiting
This limits the maximum bandwidth of ulog streaming to 70% of the specified
mavlink datarate. If less is used, the leftover is assigned to the mavlink
streams, if more is used, it starts to drop.

mavlink status outputs the currently used rate, to check if a link is
saturated.
2016-10-19 13:13:47 +02:00
Beat Küng
8f5656f033 mavlink ulog: add target sys & component ids (update to changed mavlink message) 2016-10-19 13:13:47 +02:00
Beat Küng
326800e5a8 logger: increase stack size
evaluated with: logger start -e -t -m all
and then make sure to get an error printf in the mavlink writer backend,
eg. for an ack timeout.
2016-10-19 13:13:47 +02:00
Beat Küng
8e0d548f51 logger: increase default queue size for mavlink logging to 14
tested on Pixracer: 14 still produces some dropouts once in a while, but I
think it's a fair tradefoff between RAM usage & dropouts. The queue needs
about 3.5KB of RAM.

When topic sizes/logging rates change, this will have to be reevaluated.
2016-10-19 13:13:47 +02:00
Beat Küng
6999bb3e9a Tools: add mavlink_ulog_streaming.py script to stream ULog via MAVLink to a file 2016-10-19 13:13:47 +02:00
Beat Küng
7d72f31a29 mavlink: integrate MavlinkULog into the main Mavlink task & receiver 2016-10-19 13:13:47 +02:00
Beat Küng
57d85de4d1 mavlink: add MavlinkULog class to receive ulog data from the logger 2016-10-19 13:13:47 +02:00
Beat Küng
f29a50df31 logger: add support for mavlink backend in Logger class, handle start/stop 2016-10-19 13:13:47 +02:00
Beat Küng
2dc59efbb6 logger: add mavlink write backend 2016-10-19 13:13:47 +02:00
Beat Küng
b7d07d77d6 msg files: add ulog_stream & ulog_stream_ack 2016-10-19 13:13:47 +02:00
Beat Küng
b233753e23 logger: don't exit if directory creation failed & mavlink mode enabled 2016-10-19 13:13:47 +02:00
Beat Küng
8ea38bc278 logger: better status output with configured backend mode 2016-10-19 13:13:47 +02:00
Beat Küng
7a60c1296e logger: re-use subscribed topic id's, only set them once on first use
Will be necessary when using multiple backends in parallel.
2016-10-19 13:13:47 +02:00