Beat Küng
0fb0f17ccb
logger: reduce memory usage, by limiting the nr of added topics to 64 (was 128)
2016-06-06 23:27:16 +02:00
Beat Küng
febe75bb12
logger: don't use uint8_t buffer[msg_size]; (it's C99 not C++)
...
Also, it's not clear where the allocation was. It looks like it was on
the heap, but the compiler could decide to put it on the stack. This is
very bad for us because we use fixed size stacks with tights bounds. So if
a user specifies a large topic to log, it could have crashed.
Now the allocation is on the heap and the user can specify any size of
topic to log (as long as there is enough memory).
2016-06-06 23:27:16 +02:00
Beat Küng
034772056a
logger: prepare for replay: add replayed file to the log, use _replayed as file name suffix
2016-06-02 07:32:49 +02:00
Beat Küng
069dd01cb0
logger: subscribe to mavlink_log messages and write them to the log
2016-06-02 07:32:49 +02:00
Beat Küng
659ac8faf2
refactor logger: use static fields & move them to source file
...
avoids multiple declarations of...
2016-06-02 07:32:49 +02:00
Beat Küng
bd96afa00b
logger: use int32_t for utc_offset instead of uint32_t
2016-05-22 13:31:35 +02:00
Beat Küng
c13247e14f
logger: log all known formats, add ADD_LOGGED_MSG message
...
this is needed for nested topics.
2016-05-22 13:31:35 +02:00
Beat Küng
0ddd7a408c
logger: write "sys_name" and "time_ref_utc" info to log file
2016-05-22 13:31:35 +02:00
Beat Küng
1719d9a957
logger: add a file magic
2016-05-22 13:31:35 +02:00
Beat Küng
0f30bfa0ac
logger: fix -e parameter (logger immediately stopped again after start)
2016-05-14 11:27:07 +02:00
Beat Küng
fcf7e8b78c
logger: -e option only logs until disarm, add -f option to log until shutdown
2016-05-14 11:27:07 +02:00
Beat Küng
fc51f81bf5
logger: add free space check (need at least 50MB to start)
2016-05-14 11:27:07 +02:00
Beat Küng
fe2b80ffb8
logger: add '-t' option to use GPS date/time for file and dir name
2016-05-14 11:27:07 +02:00
Julian Oes
d3a9930b50
logger: get paths working on Snapdragon
2016-05-14 11:27:07 +02:00
Beat Küng
693703de1e
logger: initialize logger_ptr with null
2016-05-14 11:27:07 +02:00
Beat Küng
d7f0808316
logger: create _vehicle_status_sub & _parameter_update_sub on stack
...
Since it's only used in run().
2016-05-14 11:27:07 +02:00
Beat Küng
d5dcbf01d0
logger: add copyright to files
2016-05-14 11:27:07 +02:00
Beat Küng
dde96dd4d7
logger: allocate _vehicle_status_sub & _parameter_update_sub on the logger thread
...
This makes sure the file descriptors are closed in the right thread.
Before on NuttX, when stopping the logger, orb unsubscribe failed due to
this.
2016-05-14 11:27:07 +02:00
Beat Küng
9a02dbdd66
logger: extend status ouput, disable DBGPRINT for now
2016-05-14 11:27:07 +02:00
Daniel Agar
69c1ce1714
WIP logger serialization
2016-05-14 11:27:07 +02:00
Beat Küng
63bd2cebf9
refactor logger: add a write_wait method to avoid code duplication
2016-05-14 11:27:07 +02:00
Beat Küng
8b5a325644
logger: remove _log_buffer from Logger, initialize it in the writer instead
...
it's not used in the logger, so don't store it there. It is accessed via
LogWriter::write.
This also makes sure the buffer size is >= _min_write_chunk and handles
allocation failure properly.
2016-05-14 11:27:07 +02:00
Mark Whitehorn
9dbbe8cd8d
log changes to parameters
2016-05-14 11:27:07 +02:00
Mark Whitehorn
fb4d72df86
write git and hw version records to log
2016-05-14 11:27:07 +02:00
Daniel Agar
4e0129275d
new logger
2016-05-14 11:27:07 +02:00