Beat Küng
2a175aa2f9
logger: use nullptr instead of NULL
2017-04-01 20:19:52 +02:00
Beat Küng
bfcbe4b6c3
log_writer_file: rename perf counters
...
To be more consistent with the rest of the system
2017-04-01 20:19:52 +02:00
Beat Küng
190c14c186
logger: add preflight & postflight process usage & perf counters to the log
...
For the process usage: we need to measure over a certain period of time,
then we can use the results. To avoid blocking, this does:
- after log is started, initialze the load counters, then one second later
add the results to the log
- after disarming: continue logging for one more second, then add the process
load to the log and stop logging.
- to avoid a delay, 'logger stop' will stop immediately and not log
postflight process usage.
2017-04-01 20:19:52 +02:00
Beat Küng
358bcb6ae0
visibility.h: add #pragma GCC poison getenv setenv putenv
...
Just to make sure that it will never be used on NuttX. This is not an
architectural limitation, just a memory optimization, since we call
clearenv() on NuttX.
2017-03-29 23:02:09 +02: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
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
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
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
df8c1a1489
logger: log ekf2_replay topic if EKF2_REC_RPL is set
2017-03-04 22:47:54 +08:00
Beat Küng
45ffb190e3
logger: add -p <topic> option to poll on a topic instead of running at fixed rate
...
this will be needed for fast replay. In addition, this option disables
the orb interval.
It can be removed again once we have time simulation.
2017-03-04 22:47:54 +08:00
Kabir Mohammed
444005f290
logger : Log new vision topics
2017-02-15 21:48:33 +01:00
David Sidrane
138f0378a7
logger uses simpler common bord indentity api
2017-02-04 22:27:04 +01:00
Beat Küng
03dc991188
log_writer_file: adjust stack size
...
Stack size was below threshold of 300 by 8 bytes.
2017-02-04 12:15:59 +01:00
Beat Küng
5c2fa034da
load_mon: rename low_stack -> task_stack_info & always publish it
...
- use uorb queue to not drop any info, only do 2 tasks per cycle
- also print a warning on low stack (which will be added to ulog)
this allows to gather statistics of each task's stack usage over time.
2017-02-04 12:15:59 +01:00
Daniel Agar
e927f3e040
clang-tidy modernize-use-nullptr
2017-02-01 22:15:50 -05:00
Beat Küng
97d7164b64
logger: remove actuator_controls from list of default topics
...
this was actually never published, only _0, _1, ... get published
2017-02-01 08:40:23 +01:00
Daniel Agar
28e50d5911
astyle src/modules/logger
2017-01-29 01:18:32 +01:00
David Sidrane
6ab32f1632
logger uses common board api for mcu_version
2017-01-26 08:39:12 +01:00
David Sidrane
5c239ffb0b
logger uses board_get_uuid_formated32 instead of mcu_unique_id
...
Replace the creation of uuid string with the board common api
board_get_uuid_formated32 as opposed to using mcu_unique_id
and printf.
2017-01-25 07:43:11 +01:00
Paul Riseborough
3a029e58c7
logger: Add mode for thermal calibration logging
...
Logs the IMU and baro data at 10Hz
2017-01-21 11:48:02 +01:00
wangxdflight
b693e29d64
enable px4 flight for excelsior(legacy)
2017-01-16 08:25:58 -08:00
Beat Küng
30f80515ec
fix logger: sscanf was used wrong for custom topics file
...
using scanf with %s reads until the first whitespace, which included the
comma (as per C standard and tested on linux). Behavior on NuttX differs.
This makes it work on both Linux and Nuttx.
2017-01-09 11:09:37 +01:00
Beat Küng
59ca22ee6d
px4.h: remove this include, causes compile problems on GCC 6.1.0
...
It causes problems because it includes px4_nodehandle.h which in turn
includes <functional>, and this is not available on NuttX
2017-01-03 10:39:55 +01:00
Lorenz Meier
38d27e284f
Logger: Header cleanup
2016-12-27 21:00:51 +01:00
Beat Küng
3d0f1e4a4f
logger: use better variable names for chip name description
2016-12-21 11:35:10 +01:00
Beat Küng
5ad2595f43
logger: add more version info & uuid
...
in particular:
- SW release version (in addition to the git hash)
- OS version (tag + git hash if exists)
- mcu version & revision & UUID
- toolchain version
The uuid can be disabled via parameter, it's enabled by default.
2016-12-21 11:35:10 +01:00
Beat Küng
41dc34204c
version cleanup: move all version information into version.c and use a common API
...
The provided versioning information is the same, except for some additions,
like OS version (which still need to be implemented on NuttX).
2016-12-21 11:35:10 +01:00
Beat Küng
c662113527
board_name.c: remove the file and HW_ARCH macro, use px4_board_name() instead
...
boards define BOARD_NAME, so board_name() is not necessary. HW_ARCH was
just a wrapper around board_name().
This patch simplifies to having only one common method px4_board_name().
2016-12-21 11:35:10 +01:00
David Sidrane
c9f10107c0
Nuttx Upgrade:Adds sem_setprotocol
2016-12-21 08:34:21 +01:00
Mark Whitehorn
257e236c92
add errno to error message
2016-12-10 12:56:39 +01:00
Andreas Antener
a74269ec60
Load monitor: adding stack logging to logger
2016-12-09 21:12:12 +01:00
Daniel Agar
0fa79eab5c
add differential_pressure to airspeed logging
2016-11-19 15:15:36 +01:00
Paul Riseborough
81dc20ea86
logger: add preflight sensor check messages
2016-11-19 15:12:08 +01:00
Beat Küng
9301e9cc50
logger params: add SDLOG_MODE to select when to start & stop logging
2016-11-19 15:12:08 +01:00
James Goppert
3511f8abfb
Add position ground truth. ( #5819 )
...
Have confirmed this works with gazebo sitl.
2016-11-09 19:38:38 -05:00
Beat Küng
00cd2902c7
fix logger: avoid leaking file descriptor in get_log_time()
...
orb_subscribe can succeed, but if there is no publisher, orb_copy will fail.
We still need to unsubscribe in that case.
2016-10-31 12:41:04 +01:00
Beat Küng
cbbee30e48
log_writer_file: add include px4_posix.h (needed for stack size macro)
...
Failed with GCC 6.0.1, don't know why it worked before...
2016-10-24 10:22:48 +02:00
Beat Küng
f7d8612bc9
logger: enable all backends by default
...
This requires ~270B more RAM
2016-10-23 15:25:20 +02:00
Beat Küng
09d8e4fd8c
logger: reduce stack size, which got freed in 05a771152520
...
commit msg: 'logger: avoid uORB::Subscription, directly use orb_subscribe() 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
Beat Küng
9272aa592a
logwriter: fix shadowing compiler warnings
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
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
b233753e23
logger: don't exit if directory creation failed & mavlink mode enabled
2016-10-19 13:13:47 +02:00