Commit Graph

472 Commits

Author SHA1 Message Date
Lorenz Meier a40e1ea269 sdlog2: Properly handle pragma 2016-05-13 10:35:07 +02:00
Julian Oes 30b6f9ff6c sdlog2: more merge conflict resolving 2016-05-12 08:16:36 +02:00
Julian Oes b965554bdd sdlog2: move main state, fix formatting, fix bug
Since the vehicle_status topic has been split up, we can't publish it
together with the the split cpuload and commander_state topics.

Therefore, the log field STAT.MainState will change to COMM.MainState
because it is only the internal commander state. Important to the
outside is STAT.NavState.

Likewise, the log field STAT.Load becomes LOAD.CPU.
2016-05-12 08:16:36 +02:00
Jonathan Challinger 01305da7e7 sdlog2: subscribe to and use cpuload message instead of vehicle_status 2016-05-12 08:16:36 +02:00
Julian Oes f6845df21f sdlog2: don't log an empty sensor_combined topic 2016-05-11 21:30:03 +02:00
Julian Oes c8d888cdc1 sdlog2: fix wrong if (facepalm!) 2016-05-11 21:30:03 +02:00
Julian Oes e00101e5ab sdlog2: remove duplicate orb_copy 2016-05-11 21:30:03 +02:00
Julian Oes 871c112699 sdlog2: log normal data and replay on Snapdragon
In SITL and on Snapdragon, the logging performance is high enough, so we
can log both: the usual topics, as well as the ekf2 replay fields.

Note that the ekf2 replay still needs to be enabled via param.
2016-05-11 21:30:03 +02:00
Paul Riseborough 4b8c7201b7 sdlog2: add logging of ekf2 internal fault message 2016-05-11 14:53:55 +02:00
Lorenz Meier d017514d59 sdlog2: Start / stop logging on arming even if enabled already during boot 2016-05-11 14:46:23 +02:00
sander 9a09c5af5c Add low pass filtered current draw 2016-05-10 21:34:11 +02:00
CarlOlsson 6b5e77250f ekf2: Added airspeed to rpl logging 2016-05-10 21:32:55 +02:00
Julian Oes ef6892a885 sdlog2 bugfix of vehicle_status conflicting with commander_state (#4402)
* sdlog2: move from STAT.MainState to COMM.MainState

This fixes a bug where vehicle_system_status and the commander internal
state were conflicting.

This will need adaptations in logging tools.

* sdlog2: don't bother changing STAT.MainState

For compatibility reasons, let's stick to the used log field (but still
fix the bug where the buffer (union) was overwrittern.
2016-04-29 17:16:45 +02:00
Lorenz Meier d67ff7564f Fix sdlog2 race between copy and store 2016-04-28 12:20:16 +02:00
Lorenz Meier e42b1dc948 Revert "fix bug in the logging app:"
This reverts commit 29c5c25f47.
2016-04-28 12:14:29 +02:00
Roman 29c5c25f47 fix bug in the logging app:
- either sensor combined or the replay topic where copied into
the union buffer but at times the memory was overwritten by other
topics which updated below
- this change makes sure that the two topics are copied into the union
buffer at the correct location in the code
2016-04-27 21:40:07 +02:00
Paul Riseborough 771d753419 sdlog2: log ekf2 GPS and control status flags 2016-04-20 21:47:29 +02:00
Lorenz Meier b90f6dc157 Fix text print to logfile 2016-04-18 17:06:12 +02:00
James Goppert 967e4dd127 Modified cmake to use STACK_MAX and STACK_MAIN 2016-04-14 13:36:36 -04:00
Julian Oes 015d7431a7 sdlog2: comment fix 2016-04-12 13:13:50 +02:00
Julian Oes 1aa45cede8 sdlog2: workaround for Snapdragon
This fixes an issue where topics where not subscribed to on the Linux
side on Snapdragon. It's a hack until there is a proper fix for the
orb_exists() call.
2016-04-12 13:13:50 +02:00
Julian Oes 32f2b89252 sdlog2: comment fix 2016-04-11 18:01:49 +02:00
Julian Oes 3b806235ac sdlog2: compile fixes after rebase 2016-04-11 18:01:49 +02:00
Julian Oes 5ca5af5fcd commander: take main_state out of vehicle_status
This state is only commander internal. Therefore it doesn't need to be
in vehicle_status. Instead it is now in the commander_state message.
2016-04-11 18:01:48 +02:00
Julian Oes 1f44fb1efd commander: internalize system status bools
Most condition bools in the commander are not used anywhere but in the
commander. It therefore makes sense to move them to a different internal
struct and remove them from the vehicle_status message.

Also, the land_detected should be used by all the modules instead of
getting it through the commander and system_status.
2016-04-11 18:01:47 +02:00
Julian Oes 32c3135788 commander: move battery calculations to systemlib
The commander used to consume the battery_status topic and write the
contents after some calculations into the system state. Instead, the
calculations now happen in library calls in systemlib/battery.

This moves the battery fields out of the vehicle_status message into the
battery_status topic.

This brought quite some changes in all modules that need battery
information. The current state is compiling but untested.
2016-04-11 18:01:47 +02:00
Beat Küng 7ff80463be fix completely wrong file permissions for log files & mavlink ftp (new mode 666) 2016-04-11 11:23:01 +02:00
Julian Oes 2b95b3dff1 sdlog2: fixed wrong memset 2016-04-04 13:02:36 +02:00
Lorenz Meier 0d94800b50 VTOL: Add missing fields to log. Fixes #4080 2016-04-02 21:39:03 +01:00
Andreas Antener 4a4ab13bfe log both actuator groups 0 and 1 again 2016-03-30 20:59:28 +02:00
CarlOlsson 23d084dbc9 adopted logging 2 2016-03-30 17:33:37 +02:00
CarlOlsson 3244808ca8 Adopted logging 2016-03-30 17:33:37 +02:00
Lorenz Meier bc39cae5a3 Revert argc change reqquired for NuttX 2016-03-29 22:47:48 +02:00
Julian Oes 3464648533 sdlog2: fix segfault when starting without args
`sdlog2 start` lead to a segfault.
2016-03-29 22:43:20 +02:00
Julian Oes 4179ed6c19 sdlog2: don't free the logbuffer after disarm
Only free the logbuffer if you exit sdlog2. After disarming, just reset
the pointers. This way, we don't take any risks doing malloc and free.

The actual "double free" was caused by trying to free the perf counter
inside logbuffer_free.
2016-03-29 22:43:20 +02:00
Julian Oes 7ce297be59 sdlog2: add logbuffer_reset to reset pointers
This allows resetting of the logbuffer without having to free and malloc
again.
2016-03-29 22:43:20 +02:00
Julian Oes 4e64382ba5 sdlog2: fixes for Snapdragon 2016-03-29 09:55:29 +02:00
Bo Liu e697998828 fix sdlog2 self deadlock bug 2016-03-26 13:59:33 -05:00
Daniel Agar 26bb2fd22f capitalize param values 2016-03-25 20:38:08 -04:00
Daniel Agar 6888545037 remove @unit enum 2016-03-25 20:33:25 -04:00
Daniel Agar 70a68def83 params correct boolean tag 2016-03-25 20:25:17 -04:00
Julian Oes bba0d0384d drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using
it.
2016-03-24 13:10:02 +01:00
Lorenz Meier 1f47aa1180 SD log: Fix skipped statistics 2016-03-23 20:08:45 +01:00
Lorenz Meier 2dcd529ad8 sdlog2: Use more appropriate priorities and locking strategies. 2016-03-23 20:08:45 +01:00
Julian Oes 2e3093cd8f sdlog2: put defines around QURT path 2016-03-22 22:22:30 +01:00
Kevin Mehall 46bc1774f4 sdlog2: hard-code path to work on Linux 2016-03-22 22:21:24 +01:00
Paul Riseborough a46b924d8c sdlog2: Fix bug in EKF replay message format 2016-03-19 19:11:15 +04:00
Mark Whitehorn 6b997f9e91 fix error in use of union 2016-03-19 11:22:37 +04:00
Mark Whitehorn 7dde4cb55b fix sensor_combined_s temperature indexing error 2016-03-19 11:22:37 +04:00
Daniel Agar 7a9427bc34 param remove empty @unit 2016-03-14 09:12:34 +01:00