Commit Graph

192 Commits

Author SHA1 Message Date
Lorenz Meier 08e49806c8 Logger: use default scheduling priorities 2017-08-02 21:18:35 +02:00
Beat Küng 0109154c43 logger: avoid logging the UUID if the system does not provide it
The linux targets don't have it and setting a fixed constant causes
wrong vehicle associationss in Flight Review.
2017-07-24 09:01:02 +02:00
Julien Lecoeur 71136dcedf Log_writer_file: Increase stack size
Test flights reported the warning `[load_mon] log_writer_file low on stack! (292 bytes left)`

Increase stack size from 1060  to 1072 (=8 + 1060 rounded to next multiple of 8).
2017-07-18 08:24:37 +02:00
Beat Küng a43f135ad4 minor documentation updates to some commands 2017-07-14 11:57:11 +02:00
Beat Küng 053eb12329 Module documentation: switch to Markdown 2017-07-14 11:57:11 +02:00
Beat Küng 59bde454b5 ModuleBase: instanciate -> instantiate 2017-07-14 11:57:11 +02:00
Beat Küng 7361244359 logger: convert to use ModuleBase 2017-07-14 11:57:11 +02:00
Lorenz Meier f2b8291587 Logger: Run at lower priority than core control pipeline
This should ensure that controllers run first and log data copying happens after.
;
2017-07-09 21:59:01 +02:00
Daniel Agar 61fd6f4c8a uorb failure print topic name 2017-07-09 14:40:11 +02:00
Beat Küng c775b07b43 logger: use INFO_MULTIPLE for top & perf output 2017-07-07 17:06:48 +02:00
Beat Küng 209f220288 hardfault_log: move hardfault_store_ulog_filename to logger module 2017-07-07 17:06:48 +02:00
Beat Küng b515873bee ULog: add INFO_MULTIPLE & FLAG_BITS messages
This requires support in the parsers, and thus the ULog file version is
increased.
As long as no data is appended, both, existing pyulog & FlightPlot, can
still read the new logs (they will output a warning).
The replay module will print an error, but still continue.
2017-07-07 17:06:48 +02:00
Beat Küng 1be089cf0c BBSRAM: add another partition and store the last ulog path 2017-07-07 17:06:48 +02:00
Beat Küng 18ea5ec1f8 logger: add git branch name to the log 2017-07-07 17:06:48 +02:00
James Goppert 66a890d428 Remove mode enum since not used and declare enum type. 2017-07-06 09:02:13 +02:00
James Goppert 9f20730d7e Remove unused sdlog mode handle. 2017-07-06 09:02:13 +02:00
James Goppert 57e0051c42 Fix enum. 2017-07-06 09:02:13 +02:00
James Goppert ac8ef5f338 Formatting. 2017-07-06 09:02:13 +02:00
James Goppert 16f46c15d3 Switch to class enum and cleanup log profiles. 2017-07-06 09:02:13 +02:00
James Goppert 034c0c702a Remove estimator replay log profile. 2017-07-06 09:02:13 +02:00
Beat Küng 784cec1cae logger: check if topic already added & if so only update the interval 2017-07-06 09:02:13 +02:00
James Goppert 15ae3a9eb7 Add estimator replay topics to default. 2017-07-06 09:02:13 +02:00
James Goppert d10a491243 Add logging profiles to logger module. 2017-07-06 09:02:13 +02:00
Daniel Agar f947205cbe delete vehicle_global_velocity_setpoint 2017-06-26 11:31:25 -04:00
Mohammed Kabir b146e7afde logger : log geotagging packet 2017-05-12 22:11:17 +02:00
Beat Küng 8bfa84f73f log_writer_file: make sure to close the file
and avoid doing a loop iteration when the thread is requested to exit
(as it could access _buffer).
2017-05-04 08:44:11 +02:00
Lorenz Meier 65baf99832 Logger hotfix: Allocate buffer on logging
This enables to use the RAM normally consumed by the log buffer to be used for calibration and other memory-intense tasks.
These run typically only disarmed when logging is not enabled.
2017-05-03 21:52:04 +02:00
Beat Küng 1d1eedb086 logger: register shutdown hook for graceful shutdown
This will avoid file system corruptions in cases where px4_shutdown_request
is used. However it will not help obviously when the battery is pulled
directly.
2017-04-20 10:01:51 +02:00
Beat Küng 24380ae88c logger: add SDLOG_DIRS_MAX param to limit the max number of log directories
Disabled by default, so that logs are not deleted unexpectedly.
2017-04-10 23:37:09 +02:00
Beat Küng 7f0db95f87 logger: reduce CPU load by ~1.5%
Reduces CPU load from ~6.9% to 5.3% (tested on Pixracer & Pixhawk). The
method is only used once, so it does not increase flash usage.
2017-04-10 23:37:09 +02:00
Beat Küng 75bd4f1121 logger: implement a logrotate
Remove old log directories on startup if free space falls below a threshold.
The threshold is 300MB or 10% of the disk capacity if that's smaller.
2017-04-10 23:37:09 +02:00
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